Each Device Module implements the device for the associated Altivar type for CANopen. The device is added under the CANopen manager in your configuration with the instance name assigned within the Add Function From Template dialog box.
The device is preconfigured and corresponds to the default configuration of the associated device.
Global Variable List - GVL_<name device module>
The Device Module implements a GVL. This GVL is added under the Application node in the folder with the name assigned within the Add Function From Template dialog box. The GVL has the same name as the device instance with the prefix GVL_.
The GVL contains the variables which build the interface from the implemented program code to the application. The clear name of the GVL and the uniform naming of the variables facilitate a simple and structured implementation into the application.
Program - Prg_<name device module>
The Device Module implements a POU of type Program. This program is added under the Application node within a folder with the name assigned within the Add Function From Template dialog box. The program has the same name as the device instance with the prefix Prg_. A program-call is added automatically to the associated task.
For the main control functions, the program code does not need to be modified, the required signals and control parameters are linked to the associated variables in the GVL.
The program is divided into several actions. They are described in the following table.
Name of the action |
Description |
---|---|
A01_GetNodeState |
Contains the call of the GET_STATE function block to obtain the communication state for the CANopen device. |
A02_Ctrl_ATV |
Contains a selection of function block calls to control and monitor the Altivar. Each function block is called in each program cycle. |
A03_Config_ATV |
Contains a selection of function block calls to write a set of parameters to the Altivar. |
A04_FbErrorDetection |
Contains the logic for the evaluation of the error messages which are provided by the motion control (MC_) function blocks. |
Further information about the control logic is available inside the program in terms of comments.