beautypg.com

Modbus tcp kommunikation – Lenze I/O system 1000 System Manual User Manual

Page 721

background image

Modbus TCP Kommunikation

Access to the I/O system 1000

Function codes

13

l

721

EDSIO1000 EN 7.0

Write n bits

Code 0F

h

: Write n bits in master output range 0x

Please observe that the number of bits must be additionally given in bits.

Command frame:

Modbus TCP header

Slave

address

Function

code

Address

1. bit

Number

Bits

Number

Bytes

Data

1. byte

Data

2. byte

...

x

x

0

0

0

6 bytes

1 byte

1 byte

1 word

1 word

1 byte

1 byte

1 byte

1 byte

max. 248 bytes

Response message:

Modbus TCP header

Slave

address

Function

code

Address

1. bit

Number

Bits

x

x

0

0

0

6

6 bytes

1 byte

1 byte

1 word

1 word

Write n words

Code 10

h

: Write n words in master output range.

Command frame:

Modbus TCP header

Slave

address

Function

code

Address

1. word

Number

Words

Number

Bytes

Data

1. word

Data

2. word

...

x

x

0

0

0

6 bytes

1 byte

1 byte

1 word

1 word

1 byte

1 word

1 word

1 word

max. 124 words

Response message:

Modbus TCP header

Slave

address

Function

code

Address

1. word

Number

Words

x

x

0

0

0

6

6 bytes

1 byte

1 byte

1 word

1 word

Mask 1 word

Code 16

h

: This function serves to mask a word in the master output area 4x.

Command frame:

Modbus TCP header

Slave

address

Function

code

Address

Word

AND

Mask

OR

Mask

x

x

0

0

0

8

6 bytes

1 byte

1 byte

1 word

1 word

1 word

Response message:

Modbus TCP header

Slave

address

Function

code

Address

Word

AND

Mask

OR

Mask

x

x

0

0

0

8

6 bytes

1 byte

1 byte

1 word

1 word

1 word