Using the Library with the PacDrive 3 System

General

This chapter provides you information on using the library RoboticModule with the PacDrive 3 System.

Inserting a new RoboticModule

NOTE: In this description the placeholder <NewRobot> is used for the name of the added robot. It has to be defined by the user when adding the new robot to the project.
1.

Insert a new robot node module SR_<NewRobot>Module

  • Open the devices tree of the RoboticModuleExample project template.

  • Go to the folder LMC_PacDrive -> PLC Logic -> Application -> RoboticModuleExample -> EquipmentModules.

    Copy the existing robot node module SR_RobotModule.

    Change the name of the new robot node module to SR_<NewRobot>Module.

2.

Insert axes for the added robot module

  • Go to the node SERCOSIII of your project.

  • Depending on the type of the robot, insert all necessary axes.

    Give the axes the robot specific name. For example DRV_<NewRobot>A, DRV_<NewRobot>B, DRV_<NewRobot>C, ...

3.

Parameterization of the added robot module

  • Open Init_Robot of the added robot node module SR_<NewRobot>Module.

    Change the name of the added robot node module to <NewRobot>.

    astSubModuleInterface[c_udiRobot].i_sModuleName := CONCAT(STR1:=iq_stStandardModuleItf.i_sModuleName, STR2:=': <NewRobot>'');

  • Configure the correct transformation, depending on the robot kinematic. Use _CopyMaster as code snippets.

    Add the drives you inserted in step 2 (DRV_<NewRobot>A, DRV_<NewRobot>B, DRV_<NewRobot>C, ... ) to the transformation.

  • If the robot type requires only two axes (for example axis A and B) or no auxiliary axis is needed, then delete the corresponding actions (for example Init_C and/or Init_AuxAx1) and the call of these actions in Init_Robot.

  • Verify the other possibilities of configurations in Init_Robot.

    For example, SetEmergencyParameter, ModifyCoordinateSystem or AddAuxAx.

  • Verify/Modify the configuration of the used homing modes of each axis.

    Therefore, you must verify the actions Init_A, Init_B, ..., Init_AuxAx1.

    Use the _CopyMaster as code snippets.

  • Verify/Modify the configuration of the manual parameters of the robot.

    Therefore, you must verify the action Init_ManualMode.

4.

Register the added robot node module SR_<NewRobot>Module in the main program SR_MainMachine

  • Open the devices tree of the RoboticModuleExample project template.

  • Go to the folder LMC_PacDrive -> PLC Logic -> Application -> RoboticModuleExample -> TaskCalls.

  • Open the main program SR_MainMachine.

    Increase the value of the constant variable c_udiNumberOfSubModules by 1.

    Add a constant variable c_udi<NewRobot>. Set the value of the variable to a increased value by 1.

    Increase the value of the constant variable c_udiNumberOfGroupMembers by 1.

  • Copy the action Init_RobotNode.

    Change the name of the added action to initialize the robot node module to Init_<NewRobot>Node.

  • Open Init_<NewRobot>Node and set the module name.

    astSubModuleInterface[c_udi<NewRobot>].i_sModuleName := STANDARD.CONCAT(STR1 := stMachineInterface.i_sModuleName, STR2 := ': <NewRobot>Node');

  • Open Init_Module_Action and call Init_<NewRobot>Node();

  • Open SubModules_Action of the main program SR_MainMachine.

    Copy the network containing the SR_RobotModule.

    Change the name of the called POU to SR_<NewRobot>Module.

    Change the constant variable in astSubModuleInterface[c_udiRobot] to astSubModuleInterface[c_udi<NewRobot>].

  • Open Init_CmdTables and search for c_udiRobot in all command tables.

    Copy the command table section and insert it underneath the found section.

    Change the constant variable from c_udiRobot to c_udi<NewRobot>.

  • Open UpdateStructs and copy the section "Update AddInterface - Robot".

    Use the constant variable c_udi<NewRobot> instead of c_udiRobot.

  • Open Init_SubModules and add the new robot module to a defined module group, if necessary.

    For example, aaudiSubModuleGroups[c_udiRobotGroup-TPL.Gc_udiGroupOffset,TPL.ET_Group.Member2] := c_udi<NewRobot>;