66
EN
ATyS p M - 542935E - SOCOMEC
13.9.3. Modbus
®
protocol
The Modbus
®
protocol used by the ATyS requires a dialogue using a master/slave hierarchical structure. Two
dialogues are possible:
• the master communicates with a slave (ATyS) and waits for its reply,
• the master communicates with all the slaves (ATyS) without waiting for their reply.
The mode of communication is the RTU (Remote Terminal Unit) using hexadecimal characters of at least 8 bits.
In the communication protocol, a standard frame is made up of the following elements:
Slave address
Function code
Address
Data
CRC 16
• Slave address: Communicating device address (Add, menu Comm parameters)
• Function code: the codes which can be used are as follows:
3 : to read n words (maximum 125)
6 : to write one word
16 : to write n words (maximum 125).
• Address : Register address (refer to following tables)
• Data : Parameters linked to function (number of words, value)
When slave address 0 is selected, a message is sent to all devices present on the network (only for functions 6 and 16);
this type of message is called general distribution, so it is not followed up with a response from the slaves.
The maximum response time (timeout) is 250 ms between a question and a response.
Modbus connector