Visilogic Ethernet Connection over TCP/IP (Call)
Christopher McCabe
May-19th, 2022 13:07

Connection over Ethernet with TCP/IP(call) using Visilogic

To download to the PLC form your PC using an ethernet connection please follow the steps below:

  1. The PLC must need to have or comprise an Ethernet card in one of the com ports on the controller.
  2. In the ladder code add the function TCP/IP card Init after a direct contact of SB2 and configure the IP address, Subnet mask and default gateway according to your network settings.
  3. The PLC Name, TCP/IP Card Init and TCP/IP Socket Init can be found under the Com tab when selecting Main Module under the ladder row in the solution explore field to the left of the software screen.
  4. Add the function PLC name after TCP/IP card Init and configure your PLC name.

5. Connect a TCP/IP Socket Init FB to the Card Init to setup the socket number you will use, protocol is set to TCP, local port depends on the socket number, # 0 is 20000, # 1 is 20256, # 2 is 502, and # 3 is 20257. Set the client/server to Server(slave).

6. Power up the PLC if you haven't already done so. Hold your finger anywhere on the screen for 10 seconds until you see an Info Mode screen appear. Select the button Enter Info Mode. The default password is 1111 and select the big return arrow button.

7. Select Version > select software and write down the PLC name to the controller currently stored on the PLC.

8. Select Esc 2 times to go back to the main menu > Select Ethernet > Select IP parameters and enter in the IP address, subnet mask and gateway of the parameters you are using in your program on Visilogic.

9. Select Apply when finished and select Esc to go back one screen > Select Socket parameters > select the Socket 0 row for Socket to highlight it > scroll up or down until you get to the socket number you are using in your program. Make sure the port number on the PLC matches the ones described for each socket number. Verify the TCP_UCP field says TCP Slave. To change it select the row to highlight it and scroll up or down. Select apply when finished and select esc 4 times to go back to the PLCs normal screen.

10. To Download the application > select Connection > select communication & OS .

11. Set the connection type to TCP/IP (call)

12. Select the icon to the right of the field for the project setting to open the project setting screen as shown below and enter in your IP address, TCP for protocol, the port number for the socket # you are using and the PLCs name you wrote down earlier.

13. Select OK and then select the "Get OPLC Button at the bottom of the communication-PC setting screen and if the 3 blank boxes above the button populate with a black text, then the communication over Ethernet from the PC to the PLC is successful.

14. Select Exit and then select the Connection Tab > select download > select download All & burn is this is the first time downloading to the PLC to burn a copy to the flash memory in case of power failure and battery loss down the road.

15. Once the download is finished you will need to change the PLC name on the project settings to what you set in the program on Visilogic since you just downloaded a new name and wont be able to go online with the controller from the software unless the names match each other.

Was this article helpful?
1 out of 1 found this helpful