Communicating with the PLC
6.2 MODBUS communication
SINAMICS V20 Inverter
110
Operating Instructions, 07/2012, A5E03728167
FC6 - Write Single Register
When a message with FC = 0 x 06 is received, then 4 bytes of data are expected, that is,
FC6 has 4 bytes of data:
●
2 bytes for the register address
●
2 bytes for the register value
Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Byte 8
Address FC (0 x 06) Start address
(MSF)
Start address
(LSF)
New register
value (MSF)
New register
value (LSF)
CRC
CRC
FC16 - Write Multiple Registers
When a message with FC = 0 x 10 is received, then 5 + N bytes of data are expected, that
is, FC16 has 5 + N bytes of data:
●
2 bytes for the starting address
●
2 bytes for the number of registers
●
1 byte for the byte count
●
N bytes for the register values
Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Byte 7 +
n
Byte 8 +
n
Byte 9 +
n
Byte 10
+ n
Address FC (0 x
10)
Start
address
(MSF)
Start
address
(LSF)
Number
of
registers
(MSF)
Number
of
registers
(LSF)
Number
of bytes
nth value
(MSF)
nth value
(LSF)
CRC
CRC
Exception Responses
If an error is detected through the MODBUS processing, the slave will respond with the FC
of the request, but with most significant bit of the FC high and with the Exception Code in the
data field. However, any error detected on the global address 0 does not result in a response
since all slaves cannot respond at once.
If an error is detected within the received message (for example, parity error, incorrect CRC
and so on), then NO response is sent to the master.
Note that if a request with FC16 is received which contains a write that the inverter cannot
perform (including write to a zero entry), other valid writes will still be performed even though
an exception response is returned.
The following MODBUS Exception Codes are supported by SINAMICS V20:
Exception Code
MODBUS name
Meaning
01
Illegal function code
The function code is not supported – only FC3,
FC6 and FC16 are supported.
02
Illegal data address
An invalid address was queried.
03
Illegal data value
An invalid data value was recognized.
04
Slave device failure
An unrecoverable error occurred while the device
was processing the action.
Содержание SINAMICS V20 Series
Страница 4: ...Preface SINAMICS V20 Inverter 4 Operating Instructions 07 2012 A5E03728167 ...
Страница 12: ...Safety instructions SINAMICS V20 Inverter 12 Operating Instructions 07 2012 A5E03728167 ...
Страница 232: ...Parameter list 7 2 Parameter list SINAMICS V20 Inverter 232 Operating Instructions 07 2012 A5E03728167 ...
Страница 274: ...Index SINAMICS V20 Inverter 274 Operating Instructions 07 2012 A5E03728167 ...