Writing And Reading Analog Outputs And Inputs; (Function 23) - Beckhoff BC7300 Manual

Modbus bus terminal controller
Table of Contents

Advertisement

READ / WRITE
REGISTERS
BC7300
Query
Byte Name
Example
Start frame
Slave address 11
Function code 16
Start address high 8
Start address low 0
Length high 0
Length low 2
Byte Count 4
Data 1 byte 1 127
Data 1 byte 2 255
Data 2 byte 1 63
Data 2 byte 2 255
Error Check
LRC / CRC
End of frame
Response
The Bus Terminal Controller replies with the start address and the length of
the transmitted words.
Byte Name
Example
Start frame
Slave address 11
Function code 16
Start address high 8
Start address low 0
Length high 0
Length low 2
Error Check
LRC / CRC
End of frame

Writing and Reading Analog Outputs and Inputs

(Function 23)

A number of analog outputs can be written and a number of analog inputs
read with one telegram using function 23. In this example the first 2 analog
output words of slave number 11 are written, and the first two analog inputs
are read. The analog outputs start at offset 0x0800 (hex), while the inputs
start at offset 0x0000 (hex). Here the offset always describes a word.
Offset 0x0003 writes to the fourth word in the output process image. The
length indicates the number of words, and the "Byte count" is composed
from the combination all the bytes that are to be written.
Example: 4 words – correspond to a byte count of 8
The data bytes contain the values for the analog outputs. In this example,
two words are to be written. The first word is to receive the value 0x3FFF
(hex), and the second word is to receive the value 0x7FFF.
RTU
ASCII
„:"
0x3A
0x0B
„0B"
0x30, 0x42
0x10
„10"
0x31, 0x30
0x08
„08"
0x30, 0x38
0x00
„00"
0x30, 0x30
0x00
„00"
0x30, 0x30
0x02
„02"
0x30, 0x32
0x04
„04"
0x30, 0x34
0x7F
„7F"
0x37, 0x46
0xFF
„FF"
0x46, 0x46
0x3F
„3F"
0x33, 0x46
0xFF
„FF"
0x46, 0x46
0xCD
„1B"
0x31, 0x42
0xE3
t1-t2-t3
CRLF
0xD, 0xA
RTU
ASCII
„:"
0x3A
0x0B
„0B"
0x30, 0x42
0x10
„10"
0x31, 0x30
0x08
„08"
0x30, 0x38
0x00
„00"
0x30, 0x30
0x00
„00"
0x30, 0x30
0x02
„02"
0x30, 0x32
0x43
„DB"
0x44, 0x42
0x02
t1-t2-t3
CRLF
0xD, 0xA
33

Advertisement

Table of Contents
loading

Table of Contents