The Device Module implements the device Lexium 32M for Modbus TCP. This device is added under the Industrial Ethernet manager with the name selected within the Add Function From Template dialog box.
The device is preconfigured. The configuration includes the Lexium 32M channel for the cyclic data exchange with the device. The repetition rate for the channel is selected with 10 ms.
The Device Module implements a GVL. This GVL is added under the node within a folder with the name selected within the dialog box. The GVL gets the same name as the folder and the device but 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.
The Device Module implements a program. This program is added under the node within a folder with the name selected within the dialog box. The program gets the same name as the folder and the device but with the prefix Prg_
. Besides, the program-call is added automatically to the associated task.
For basic control functions, the program code does not need to be modified, all required signals and parameter are linked to the associated variables in the GVL.
The program is divided into several actions. These are described in the following table.
Name of the action |
Description |
---|---|
|
Processes the functions to monitoring and control of the Modbus TCP communication with the device. |
|
Contains a selection of function block calls to control the Lexium. Each function block is called in each program cycle. |
|
Contains a selection of function block calls to gather status information from the Lexium. Each function block is called in each program cycle. |
|
Contains a selection of function block calls to write a set of parameters to the Lexium. |
GVL_<name device module>.c_uiChannelId
. The channel ID is automatically generated when the device is added to the project and can be obtained through the in the tab .
Further information about the control logic is available inside the program in terms of comments.