KAS - Linking PDO parameters into application code
The PDO Ethercat channel provides deterministic, fast update of parameters between the KAS controller and drives (through Ethercat). The PDO Selection Mapping tab provides an method to link PDO parameters to variables in the application code. The following example shows mapping the Drive Status word bits to (bool) variables in the project.
The drive Status Word bit definitions are as follows:
Project Dictionary Variable A1_ErrorActive is linked to Status Word bit 3:
A1_ErrorActive := A1_StatusWord.3;
Project Dictionary Variable A1_Enabled is linked to Status Word bit 2:
A1_Enabled := A1_StatusWord.2;
The following shows the state of the variables when the drive is enabled and no drive faults:
The following shows the state of the variables when the drive is disabled (due to drive fault)
Note: This is an example of connecting PDOs to project variables. In some cases the PDO parameters are already linked through calling a PLCopen and PipeNetwork function block. For example, drive status information is also available by calling MLAxisStatus in PipeNetwork Motion or calling MC_ReadStatus in PLCopen Motion.