Preset multiple register (Function 16)

The Preset Multiple Register function can be used to write a number of analog outputs. The first two analog output words are written in this example. The analog outputs start at an offset of 0x0800. 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 formed from the combination of 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, and the second word is to receive the value 0x3FFF.

Query

Byte Name

Example

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

Response

The coupler replies with the start address and the length of the transmitted words.

Byte Name

Example

Function code

16

Start address high

8

Start address low

0

Length high

0

Length low

2