Beckhoff BC7300 Manual page 34

Modbus bus terminal controller
Table of Contents

Advertisement

MODBUS
34
Query
Byte Name
Example
Start frame
Slave address 11
Function code 23
Read start address
0
high
Read start address
0
low
Read length high 0
Read length low 2
Write start address
8
high
Write start address
0
low
Write length high 0
Write length low 2
Byte Count 4
Data 1 high 63
Data1 low 255
Data 2 high 127
Data 2 low 255
Error Check
LRC / CRC
End of frame
Response
The Bus Terminal Controller replies with the start address and the length of
the bytes to be transferred in "Byte count". The data information follows. In
this example the first word contains 0x0038 (hex) while the second word
contains 0x3F0B.
Byte Name
Example
Start frame
Slave address 11
Function code 23
Byte Count 4
Data 1 high 0
Data 1 low 56
Data 2 high 63
Data 2 low 11
Error Check
LRC / CRC
End of frame
Diagnostics
In the MODBUS, function 08 provides a series of tests for examination of
the communication system between the master and the slave and for
inspection of a variety of internal error states within the slave. A broadcast
telegram is not supported.
The function uses a two-byte sub-function code field in the query to define
the test that is to be carried out. The slave outputs the function code and
the sub-function code as an answer.
The diagnostic queries use a two-byte data field to send diagnostics data
or control information to the slave.
RTU
ASCII
„:"
0x3A
0x0B
„0B"
0x30, 0x42
0x17
„17"
0x31, 0x37
0x00
„00"
0x30, 0x30
0x00
„00"
0x30, 0x30
0x00
„00"
0x30, 0x30
0x02
„02"
0x30, 0x32
0x08
„08"
0x30, 0x38
0x00
„00"
0x30, 0x30
0x00
„00"
0x30, 0x30
0x02
„02"
0x30, 0x32
0x04
„04"
0x30, 0x34
0x3F
„3F"
0x33, 0x46
0xFF
„FF"
0x46, 0x46
0x7F
„7F"
0x37, 0x46
0xFF
„FF"
0x46, 0x46
0x76
„12"
0x31, 0x32
0xD3
T1-t2-t3
CRLF
0xD, 0xA
RTU
ASCII
„:"
0x3A
0x0B
„0B"
0x30, 0x42
0x17
„17"
0x31, 0x37
0x04
„04"
0x30, 0x34
0x00
„00"
0x30, 0x30
0x38
„38"
0x33, 0x38
0x3F
„3F"
0x33, 0x46
0x0B
„0B"
0x30, 0x42
0x82
„58"
0x35, 0x38
0xDD
t1-t2-t3
CRLF
0xD, 0xA
BC7300

Advertisement

Table of Contents
loading

Table of Contents