6 Application example: Modbus TCP
6.3 Communication examples: Modbus TCP
128
XI/ON: XNE-GWBR-2ETH-MB
10/2011 MN05002008Z-EN
www.eaton.com
2
Now, the process data length of the digital outputs is determined:
Process data length, digital outputs:
Function code 04: register 0×1012
Value: 0×
02
= 2 bits
In the packed station process output data, the output data of the digital modules directly
follow the packed output data of the intelligent modules (6 registers). They can thus be
found in the register area 0×0800 to 0×09FF starting with register 0×0806.
3
In order to set the outputs 2 of module 3, the bit 1 of byte 0 in register 0×0806, have to be
written.
Function code 06, "Write Single register"
Value: 0×
02
0×00:
Figure 59:
reading out the
process data
length of digital
outputs
Table 66:
Process data
length of digital
modules
Module
Process output
Bit
2
XN-2DO-24VDC-0.5A-P
2 bits
Total
1 register
Figure 60:
Setting outputs
A
register-no.
B
register-value
A
B