NOTE: When requesting a variable that is out of the range configured in the VM600,
the exception code “02” will be returned to indicate the use of an illegal data
address.
Request frame
1 byte 1 byte 2 bytes 2 bytes 2 bytes
Slave
address
Modbus
function
First coil address
to be read
Number of coils
to be read
CRC
Response frame
1 byte 1 byte 1 byte n bytes 2 bytes
Address Function Byte
count
Bit values
(least significant bit is first coil value)
CRC
Functions 01/02 (Read coils/Read discrete inputs)
Example:
Read eight discrete values from Modbus address 01, starting from the first coil (= coil 0).
Request frame
An example response if the coil has a value of 0b10010110 (binary) as follows:
0 is 0 Least significant bit (LSB)
1is1
2is1
3is0
4is1
5is0
6is0
7 is 1 Most significant bit (MSB)
This corresponds to a value of 0x96 (hexadecimal).
Response frame
0x01 0x01 0x00 0x00 0x00 0x08 0xXX 0xXX
Slave
address
Modbus
function
First register address to
be read = 0x0000
8 bits to be read CRC
0x01 0x01 0x01 0x96 2 bytes
Address Function Byte
count
1 byte of data CRC
Figure 8-4: Formats and example for Modbus function 01