Using the Library with the PacDrive 3 System
This chapter provides you information on using the library RoboticModule with the PacDrive 3 System.
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
oOpen the devices tree of the RoboticModuleExample project template.
oGo 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
oGo to the node SERCOSIII of your project.
oDepending 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
oOpen 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>'');
oConfigure the correct transformation, depending on the robot kinematic. Use _CopyMaster as copy master.
Add the drives you inserted in step 2 (DRV_<NewRobot>A, DRV_<NewRobot>B, DRV_<NewRobot>C, ... ) to the transformation.
oIf 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.
oVerify the other possibilities of configurations in Init_Robot.
For example, SetEmergencyParameter, ModifyCoordinateSystem or AddAuxAx.
oVerify/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 copy master.
oVerify/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
oOpen the devices tree of the RoboticModuleExample project template.
oGo to the folder LMC_PacDrive -> PLC Logic -> Application -> RoboticModuleExample -> TaskCalls.
oOpen 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.
oCopy the action Init_RobotNode.
Change the name of the added action to initialize the robot node module to Init_<NewRobot>Node.
oOpen Init_<NewRobot>Node and set the module name.
astSubModuleInterface[c_udi<NewRobot>].i_sModuleName := STANDARD.CONCAT(STR1 := stMachineInterface.i_sModuleName, STR2 := ': <NewRobot>Node');
oOpen Init_Module_Action and call Init_<NewRobot>Node();
oOpen 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>].
oOpen 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>.
oOpen UpdateStructs and copy the section "Update AddInterface - Robot".
Use the constant variable c_udi<NewRobot> instead of c_udiRobot.
oOpen 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>;