Code example

INFORMATION

The following example can be imported in the IEC Editor. In the IEC Editor, open the menu [Tools] > [Scripting] > [Scripts] > [R], and select the menu entry [Robotics_Examples.py].

The rotary table is parameterized in the FB_ExampleRotaryTableControlledByRobot.Init() method.

In the FB_ExampleRotaryTableControlledByRobot.HighPrio() method, the position profile of the rotary table controlled by the robot is cyclically assigned to the ProfileGeneration.Tracking.MasterUserProgram.In.lrMasterPosition input of the MultiMotion axis that drives the rotary table.

The two methods are to be called in the USER_PRG.Init() and USER_PRG.High-Prio() actions. When doing this, the name of the robot node assigned by the user in MOVISUITE® (e.g. MyRobot) must be transferred.

User_PRG.Init()

xInitDone := (* xInitDone AND *)

fbExampleRotaryTableControlledByRobot.Init(

rRobot := MyRobot,

rInterface_Robot := Interface_MyRobot,

rHMI_Robot := HMI_MyRobot,

rRotaryTable := MyRotaryTable,

rInterface_RotaryTable := Interface_MyRotaryTable

);

 

User_PRG.HighPrio()

fbExampleRotaryTableControlledByRobot.HighPrio(

xSEW_PRG_InitDone := SEW_PRG.xInitDone,

rRotaryTable := MyRotaryTable,

rInterface_RotaryTable := Interface_MyRotaryTable

);

 

If additional Init() signals are depicted in the USER_PRG.Init() action, all of them must be linked.