Starting up the device - RS 485 Modbus interface
Leuze electronic GmbH + Co. KG
CML 730i
160
Changeover from RS 485 Modbus to autosend ASCII protocol
14.4.2 Structure of data frame in binary format
14.4.3 Structure of data frame in ASCII format
01
=
Slave address 1
05
=
Write-coil command
00 00
=
Address 1 (application level; counting technically begins with zero)
00 00
=
OFF
FF 00
=
ON
8C 3A =
CRC checksum
Message from master (PLC) to slave (CML 700i): (AUTOSEND ON)
HEX: 01 05 00 01 FF 00 DD FA
Expected answer from slave (CML 700i) to master (PLC): (AUTOSEND ON)
HEX: 01 05 00 01 FF 00 DD FA
01
=
Slave address 1
05
=
Write-coil command
00 01
=
Address 2 (application level; counting technically begins with zero)
00 00
=
OFF
FF 00
=
ON
DD FA =
CRC checksum
Byte no.
Direction of RS 485
(from the perspective of
the CML 700i)
Description
0
Send
Number of user data bytes (n)
1
Send
8-bit checksum of all user data bytes and the number of user data bytes (checksum is the 1-byte sum
of all user data, i.e., carryovers on the 9th bit are lost)
2 … n + 1
Send
n user data byte(s)
Changeover
Changeover to receiving;
CML 700i waits for EOT byte (0x04) from the control (Modbus master)
Changeover
Changeover to send if no EOT byte was received
n + x …
Receive
Repeat with byte 0, etc., if autosend is not stopped
Byte no.
Direction of RS 485
(from the perspective of
the CML 700i)
Description
0
Send
STX – start identifier (0x02)
1
Send
Number of user data bytes (n) (4, 8, …) low byte high digit
2
Send
Number of user data bytes (n) (4, 8, …) low byte low digit
3
Send
Number of user data bytes (n) (4, 8, …) high byte high digit
4
Send
Number of user data bytes (n) (4, 8, …) high byte low digit
5 … 5+n-1
Send
n user data byte(s)
5+n
Send
16-bit checksum of bytes 1 … 5+n-1 low byte high digit
5+n+1
Send
16-bit checksum of bytes 1 … 5+n-1 low byte low digit