5 MODBUS RTU Protocol communication
CP340/CP341/CP440/CP441 Communication and Programming
Entry-ID: 88867653, V1.0, 02/2014
54
S
ie
m
e
n
s
A
G
2014
A
ll r
ig
h
ts
r
e
s
e
rv
e
d
Fig. 96: Setting communication parameters
4. Then set the address 1 to 4 as 111 to 444 respectively, set M0.3 as TRUE in
Step7 Variable table to enable receiving. Then set M0.0 as TRUE ( rising edge
trigger. If it is necessary to re-send, set M0.0 from TRUE to FALSE, and then set it
back to TRUE again). It may be monitored that the values from DB1.DBW0 to
DB1.DBW4 are 111 to 444, as shown in the Fig. below.
Fig. 97: Monitoring of receive data
5. If it is necessary to read the floating point number, it must be set in data format.
Click the menu Display->Float Inverse.
Fig. 98: Setting of floating point number data format
6. Set the values of address 1 and 3 as 1.234 and 5.678 respectively, and trigger
M0.0 to send. You may see that the received data are 1.234 and 5.678, as shown
in the Fig. below: