Ethernet Connection between Computer and two DVP28SV using DVPEN01-SL with Ladder Program

Ethernet Connection between Computer and two DVP28SV using DVPEN01-SL with Ladder Program

 
 
Control Purpose:
·
Setting up network parameters of DVPEN01-SL directly on the PC
(1) IP of PC executing WPLSoft: 192.168.0.3
(2) Subnet mask: 255.255.255.0; Gateway: 192.168.0.1
(3) Set IP of PLC_A: 192.168.0.4; PLC_B: 192.168.0.5
(4) Connect the PC and DVPEN01-SL by RJ-45 cable
Note: Both PC and DVPEN01-SL have to adopt static IP.
·
Writing the time of RTC in PLC_B into D0 ~ D6 of PLC_A
(1) Adopting static IP
(2) IP of PLC_A: 192.168.0.4
(3) IP of PLC_B: 192.168.0.5
(4) Update form PLC_B to PLC_A
Devices:
Device
Function
M1013
1s clock pulse
PLC_B M1
Write the data into DVPEN01-SL module
PLC_B M2
Check if data exchange is successfully executed.
Settings:
·
Select Communication Setting in WPLSoft.
 
·
Select Ethernet in connection setup and click OK.
·
Click Auto-Search icon to search for all DVPEN01-SL modules in the network.
 
·
Designate a DVPEN01-SL and double click to open the setup page.
·
The setup window will appear as below.
 
·
Switch to Data Exchange window.
·
Check Enable Data Exchange box. Enter IP address of PLC_A :192.168.0.4 in No. 1 Data Exchange Host IP column. Click OK to complete the setting.
·
Control Program:
·
PLC Ladder Program of PLC_A:
·
PLC Ladder Program of PLC_B:
Program Description:
·
PLC Ladder Program of PLC_A:
(1) The received data are stored in CR#49 ~ CR#55.
(2) The data received every one second are written into D0 ~ D6.
·
PLC Ladder Program of PLC_B:
(1) The data exchange will be executed every one second.
(2) Write the communication address of the destination PLC in CR#28, and DVPEN01-SL will automatically detect by the previous setting that No. 1 IP is “192.168.0.4″.
(3) Write the data of RTC into CR#29 ~ CR#355.
(4) Write “1” into CR#13 to start the data exchange.
(5) CR#14 = 2 refers to exchange completed. CR#14 = 3 refers to exchange failed.

Leave a Comment