6. Configuring the Gateway

6.11.3. Adding a Special Modbus Command

Apart from the standard Modbus commands covered in the previous chapter, it is possible to create two types of special Modbus commands: Modbus commands using the same template as standard commands and Modbus commands whose nature and frame content can be completely changed by the user.

6.11.3.1. Modbus Commands Based on Standard Commands

You create a command of this type from the “Select Command” window (see chapter 6.11.2 With a Generic Modbus Slave, page 70), by choosing “Add Command” from the “Command” menu. The window shown below appears. It shows the structure of the future command’s query and response frames, which will then be added to the list of available Modbus commands. This structure includes the standard elements, that is to say the “Slave Address”, “Function” and “Checksum” fields, described in previous chapters.

Please see chapter 2.12 Command editor in the AbcConf user manual, entitled AnyBus Communicator – User Manual for further information about creating standard Modbus commands. This manual can be found on the CD LU9CD1 : “ABC_User_Manual.pdf”.

6.11.3.2. Modbus Commands which Can Be Completely Changed by the User

In AbcConf, these commands are known as “Transactions”. Unlike in the previous case, the whole structure of the query and response frames associated with these commands correspond to an association of input or output data in the gateway’s memory (“Data” fields), constants in Byte, Word or DWord format and a final “Checksum” field.

All of the data contained in the query and response “Data” fields of a “Transactions” command are managed by the Profibus-DP master, including the “Slave address” and “Function” fields if these are placed in a “Data” field. For instance, this allows you to manage all of the Modbus frame fields from the Profibus-DP master if all of the query and response fields of a “Transactions” element (excluding “Checksum”) are “Data” type fields.

N.B.: You must not place more than one “Data” field in any Modbus frame. This guarantees that all of the data involved will be processed by the gateway at the same time.

81

Page 80
Image 80
Schneider Electric LUFP7 user manual Adding a Special Modbus Command, Modbus Commands Based on Standard Commands