Code example: One conveyor belt

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 conveyor belt is parameterized in the PRG_ExampleSingleConveyorTracking.Init() method.

In the PRG_ExampleSingleConveyorTracking.HighPrio() method, the position profile of the conveyor belt is cyclically assigned to the fbConveyor block.

The two methods should be called in the USER_PRG.Init() and USER_PRG.HighPrio() actions, and the name of the robot node assigned by the user in MOVISUITE® (e.g. MyRobot) should be transferred.

 

User_PRG.Init()

xInitDone := (* xInitDone AND *)

PRG_ExampleSingleConveyorTracking.Init(

rInterface_Robot := Interface_MyRobot,rHMI_Robot := HMI_MyRobot

);

 

User_PRG.HighPrio()

PRG_ExampleSingleConveyorTracking.HighPrio(

 

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