BC7300
31
Query
Byte Name
Example
RTU
ASCII
Start frame
„:“
0x3A
Slave address
11
0x0B
„0B“
0x30, 0x42
Function code
6
0x06
„06“
0x30, 0x36
Start address high
8
0x08
„08“
0x30, 0x38
Start address low
0
0x00
„00“
0x30, 0x30
Data high
63
0x3F
„3F“
0x33, 0x46
Data low
255
0xFF
„FF“
0x46, 0x46
Error Check
LRC / CRC
0xDA
0xB0
„A9“
0x41, 0x39
End of frame
t1-t2-t3
CRLF
0xD, 0xA
Response
The Bus Terminal Controller answers with the same telegram.
Byte Name
Example
RTU
ASCII
Start frame
„:“
0x3A
Slave address
11
0x0B
„0B“
0x30, 0x42
Function code
6
0x06
„06“
0x30, 0x36
Start address high
8
0x08
„08“
0x30, 0x38
Start address low
0
0x00
„00“
0x30, 0x30
Data high
63
0x3F
„3F“
0x33, 0x46
Data low
255
0xFF
„FF“
0x46, 0x46
Error Check
LRC / CRC
0xDA
0xB0
„A9“
0x41, 0x39
End of frame
t1-t2-t3
CRLF
0xD, 0xA
Writing a Number of Digital Outputs (Function 15)
FORCE MULTIPLE COILS
Function 15 can be used to set or reset a number of digital outputs at the
same time.
In this example the first 20 digital outputs of slave number 11 are written.
The digital outputs begin at offset 0x0000 (hex). Here the offset always
describes a bit. Offset 0x0003 writes to the fourth bit in the output process
image. The length indicates the number of bits, and the "Byte count" is
composed from the combination all the bytes that are to be written.
Example: 20 bits – corresponds to 24 bits – count is 3 bytes (round up to
the nearest byte)
The data bytes contain the values for the individual bits.
In this example, the first 16 bits are set to "TRUE", while bits 17 to 20 are
"FALSE".