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].

In the PRG_ExampleSingleConveyorTracking.Init_Conveyor() action, the origin of the USER coordinate system of the conveyor belt with reference to the BASE coordinate system is parameterized.

Afterwards, the program is invoked in the USER_PRG.HighPrio() and USER_PRG.Init() actions and during the process, the name of the robot node (e.g. MyRobot) assigned by the user in MOVISUITE® is transferred to the example program.

User_PRG.HighPrio()

PRG_ExampleSingleConveyorTracking(

rInterface_Robot := Interface_MyRobot,

rHMI_Robot := HMI_MyRobot);

 

User_PRG.Init()

xInitDone := (* xInitDone AND *)

PRG_ExampleSingleConveyorTracking.fbConveyor.Init();

 

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