Chapter 10 Example Program
10-16
After standard settings, P2P channel and P2P block should be set. Setting methods are as follows.
bottom of project window.
2
Communic
ation
module
setting
1. Double-click of project window.
(P2P 01 is fixed as built-in communication)
2. Select slot no. (No. 1) of client module and press OK.
1. Double-click of P2P 01 and set P2P driver of channel 1 as Modbus RTU client
and click [OK].
1. Double-click of P2P 02.
5
Setting of
writing
operation
(1)
▶
Write 1 word of M100 of client to M1 of server
1. Ch.: Select ch.2 set as Modbus RTU client set in P2P channel.
2. P2P function: select WRITE.
3. Conditional flag: to send frame every 200ms, use flag F92.
4. Command type, Data type: to write 1 word, select single and 2 byte.
5.
Destination station number: select station number of server.
6.
Setting: after setting Read area and Save area, click OK.
(1) Read area: device address saved in the client (M100)
(2) Save area: deice address of server to save (0x40001: M1)
* If all settings are completed, color of index of channel becomes black.
6
Setting of
writing
operation
(2)
▶
Write 4 words from D0 of client to M2~M5 of server
1. Ch., P2P function, conditional flag, destination station no.: same with step 5
2. Command type, Data type: because of writing continuous 4words, select Continuous,
WORD
3. Data size: because of 4 words, input 4.
4. Setting: after setting Read area and Save area, click OK.
(1) Read area: device address saved in the client (D0)
(2) Save area: deice address of server to save (0x40002 : M2)