Read Analog Inputs (Function 4) - Beckhoff BC7300 Manual

Modbus bus terminal controller
Table of Contents

Advertisement

READ INPUT REGISTER
BC7300
Query
Byte Name
Example
Start frame
Slave address 11
Function code 3
Start address high 8
Start address low 0
Count high 0
Count low 2
Error Check
LRC / CRC
End of frame
Response
The Bus Terminal Controller answers with byte count 4, i.e. 4 bytes of data
are returned. The query was for 2 analog channels, and these are now
distributed over 2 words. In the analog output process image, the first
channel has the value 0x3FFF, while the second channel has the value
0x0.
Byte Name
Example
Start frame
Slave address 11
Function code 3
Count byte 4
Data 1 high byte 63
Data 1 low byte 255
Data 2 high byte 0
Data 2 low byte 0
Error Check
LRC / CRC
End of frame

Read Analog Inputs (Function 4)

Function 4 is used to read the analog inputs.
In this example the first two analog inputs of slave number 11 are read.
The analog outputs begin at offset 0x0000 (hex). The length indicates the
number of words to be read. A KL3002 has 2 words of input data, which is
why the value to be entered in "Count low" is two.
Query
Byte Name
Example
Start frame
Slave address 11
Function code 4
Start address high 0
Start address low 0
Count high 0
Count low 2
Error Check
LRC / CRC
End of frame
Response
The Bus Terminal Controller answers with byte count 4, i.e. 4 bytes of data
are returned. The query was for 2 analog channels, and these will now be
RTU
ASCII
„:"
0x3A
0x0B
„0B"
0x30, 0x42
0x03
„03"
0x30, 0x33
0x08
„08"
0x30, 0x38
0x00
„00"
0x30, 0x30
0x00
„00"
0x30, 0x30
0x02
„02"
0x30, 0x32
0xC6
„E8"
0x45, 0x38
0xC1
t1-t2-t3
CRLF
0xD, 0xA
RTU
ASCII
„:"
0x3A
0x0B
„0B"
0x30, 0x42
0x03
„03"
0x30, 0x31
0x04
„04"
0x30, 0x30
0x3F
„3F"
0x33, 0x46
0xFF
„FF"
0x46, 0x46
0x00
„00"
0x30, 0x30
0x00
„00"
0x30, 0x30
0xC6
„B0"
0x42, 0x30
0xC1
t1-t2-t3
CRLF
0xD, 0xA
RTU
ASCII
„:"
0x3A
0x0B
„0B"
0x30, 0x42
0x04
„04"
0x30, 0x34
0x00
„00"
0x30, 0x30
0x00
„00"
0x30, 0x30
0x00
„00"
0x30, 0x30
0x02
„02"
0x30, 0x32
0x71
„EF"
0x45, 0x46
0x61
t1-t2-t3
CRLF
0xD, 0xA
29

Advertisement

Table of Contents
loading

Table of Contents