Writing an analogue output (function 6) – BECKHOFF BK7300 User Manual

Page 29

Advertising
background image

MODBUS

BK7300

25


Writing an Analogue Output (Function 6)

PRESET SINGLE
REGISTER

Function 6 can be used to access the output process image and the
interface.

The first analogue output of slave number 11 is written with function 6. The
analogue outputs begin at offset 0x0800 (hex). Here again the offset
always describes a word. This means offset 0x0803 refers to the fourth
word in the output process image.


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 coupler 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

Advertising