5. Initial Programming
260
[Device Name]_REQDG_[Requisition Number]: [Variable Type];
Where:
Device Name: Name that appear at the TreeView to the device.
Mapping Number: Number of the mapping that was declared on the device mapping table,
following the up to down sequence, starting with 0001.
Variable Type: Number
“NXMODBUS_DIAGNOSTIC_STRUCTS.T_DIAG_MODBUS_RTU_MAPPING_1” to
MODBUS Master and
“NXMODBUS_DIAGNOSTIC_STRUCTS.T_DIAG_MODBUS_ETH_MAPPING_1” to
MODBUS Client.
ATTENTION:
The requisition diagnostics variables of direct mapping MODBUS Master/Client are declared at
“System_Diagnostics” GVL.
Example:
Device.Application.ReqDiagnostics
VAR_GLOBAL
MODBUS_Device_REQDG_0001 : NXMODBUS_DIAGNOSTIC_STRUCTS.T_DIAG_MODBUS_RTU_MAPPING_1;
MODBUS_Device_REQDG_0002 : NXMODBUS_DIAGNOSTIC_STRUCTS.T_DIAG_MODBUS_RTU_MAPPING_1;
MODBUS_Device_REQDG_0003 : NXMODBUS_DIAGNOSTIC_STRUCTS.T_DIAG_MODBUS_RTU_MAPPING_1;
MODBUS_Device_1_REQDG_0001 : NXMODBUS_DIAGNOSTIC_STRUCTS.T_DIAG_MODBUS_ETH_MAPPING_1;
MODBUS_Device_1_REQDG_0002 : NXMODBUS_DIAGNOSTIC_STRUCTS.T_DIAG_MODBUS_ETH_MAPPING_1;
END_VAR
The “ReqDiagnostics” GVL is editable, therefore the requisitions diagnostic variables can be
manually created without need to follow the model created by the automatic declaration. Both ways
can be used at same time, but the variables must always be of type reffering to the device. And take
care to don’t delete or change a variable automatically declared, because they might being used by
some device. If the variable be deleted or changed an error is going to be generated while the project
is being compiled. To correct the automatically declared variable name, it must be followed the
model exemplified above according to the device and the requisition to which they belong.
Sending an application to the CPU and changing it to “RUN”. Through “ReqDiagnostics” GVL, it is
possible to watch diagnostics variable values of MODBUS Clientt/Server device mappings, as shown
at Figure 5-26.