Writing A Number Of Digital Outputs (Function 15) - Beckhoff BC7300 Manual

Modbus bus terminal controller
Table of Contents

Advertisement

FORCE MULTIPLE COILS
BC7300
Query
Byte Name
Example
Start frame
Slave address 11
Function code 6
Start address high 8
Start address low 0
Data high 63
Data low 255
Error Check
LRC / CRC
End of frame
Response
The Bus Terminal Controller answers with the same telegram.
Byte Name
Example
Start frame
Slave address 11
Function code 6
Start address high 8
Start address low 0
Data high 63
Data low 255
Error Check
LRC / CRC
End of frame

Writing a Number of Digital Outputs (Function 15)

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".
RTU
ASCII
„:"
0x3A
0x0B
„0B"
0x30, 0x42
0x06
„06"
0x30, 0x36
0x08
„08"
0x30, 0x38
0x00
„00"
0x30, 0x30
0x3F
„3F"
0x33, 0x46
0xFF
„FF"
0x46, 0x46
0xDA
„A9"
0x41, 0x39
0xB0
t1-t2-t3
CRLF
0xD, 0xA
RTU
ASCII
„:"
0x3A
0x0B
„0B"
0x30, 0x42
0x06
„06"
0x30, 0x36
0x08
„08"
0x30, 0x38
0x00
„00"
0x30, 0x30
0x3F
„3F"
0x33, 0x46
0xFF
„FF"
0x46, 0x46
0xDA
„A9"
0x41, 0x39
0xB0
t1-t2-t3
CRLF
0xD, 0xA
31

Advertisement

Table of Contents
loading

Table of Contents