IEC function call for the SRL program

To call an IEC function from the SRL program, create the following function in the IEC program:

  1. Create a new function block (Context menu / Add object / POU… / Type: function block).
  2. Implement the following interface using the function block:
    SEW_MK_Robotics.SEW_IRobLangPub.ICallF
  3. Implement all interfaces (context menu of the function block/Implement interfaces…).
  4. Create an instance of the function block in the User_PRG program
  5. Connect the function block to the robot by adding the following code line in User_PRG.Init ("MyRobot" corresponds to the name of the robot node assigned by the user in MOVISUITE®):
    MyRobot.LinkICallF(fbCallFunction);
  6. Using the CallF method, program a case distinction that depends on the uiCallIndex variable.
  7. Program the desired function into the appropriate branch of the case distinction. The next SRL command is always only processed after setting CallF to "TRUE".

For further information on calling the IEC function in the RobotMonitor, refer to chapter IEC function call. An application example for the IEC call function for the SRL program can be found in chapters IEC call function for the SRL program, Path event and Setting tangential control.