Writing A Number Of Analog Outputs (Function 16) - Beckhoff BC7300 Manual

Modbus bus terminal controller
Table of Contents

Advertisement

MODBUS
PRESET MULTIPLE
REGISTERS
32
Query
Byte Name
Example
Start frame
Slave address 11
Function code 15
Start address high 0
Start address low 0
Length high 0
Length low 20
Byte Count 3
Data 1 bit 0..7 255
Data 2 bit 8..15 255
Data 3 bit 16..19 0
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 15
Start address high 0
Start address low 0
Data high 0
Data low 20
Error Check
LRC / CRC
End of frame

Writing a Number of Analog Outputs (Function 16)

Function 16 can be used to write a number of analog outputs. In this
example the first 2 analog output words of slave number 11 are written.
The analog outputs begin at offset 0x0800 (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 0x7FFF
(hex), and the second word is to receive the value 0x3FFF.
RTU
ASCII
„:"
0x3A
0x0B
„0B"
0x30, 0x42
0x0F
„0F"
0x30, 0x46
0x00
„00"
0x30, 0x30
0x00
„00"
0x30, 0x30
0x00
„00"
0x30, 0x30
0x14
„14"
0x31, 0x34
0x03
„03"
0x30, 0x33
0xFF
„FF"
0x46, 0x46
0xFF
„FF"
0x46, 0x46
0x00
„00"
0x30, 0x30
0x01
„D1"
0x44, 0x31
0x95
t1-t2-t3
CRLF
0xD, 0xA
RTU
ASCII
„:"
0x3A
0x0B
„0B"
0x30, 0x42
0x0F
„0F"
0x30, 0x46
0x00
„00"
0x30, 0x30
0x00
„00"
0x30, 0x30
0x00
„00"
0x30, 0x30
0x14
„14"
0x30, 0x34
0xDA
„D2"
0x44, 0x32
0xB0
t1-t2-t3
CRLF
0xD, 0xA
BC7300

Advertisement

Table of Contents
loading

Table of Contents