11-23-2018 07:28 AM
Hi,
I need to communicate a Labview program with a Beckhoff PLC, and to do that I create a server-client communication.
The PLC is the client and the code is programmed on Twincat 3 ( the client code is ok, I test it)
The server will be a PC running the Labview TCPIP server example(only the server part). ( I take only the server .VI of TCPIP com example of Labview)
The issue is that the connection does not occur. (Port 200 is listening and I put the IP addres so I dont know what is happening. Meaby a socket issue ?.)
I know that the PLC client is not the problem, because I did a successfull conexion with a LabWindows TCPIP server. ( but I need to do a server with Labview, not Labwindows).
Kind regards.
11-26-2018 08:49 AM
You have to provide to your PLC the IP address of the computer running LabVIEW.
I see that you provided a string with an IP address to the TCP Listen VI. This string is only used as a reference and should probably something like "local_computer". What I want to say here is that the TCP Listen VI can only use the existing IP address of the computer. You cannot provide it.
The I32 net address input of that VI is used only in case you have more than one network card on that computer and you want to specify which one to use.
Make sure that your firewall allows LabVIEW to have TCP connections.
I use TCP communication with LabVIEW all the time and the biggest issue is the firewall. Also, if you attempt connections several times (and from different applications), Windows sometimes block the specific port you use for a while.
11-26-2018 12:22 PM
What error is the LabVIEW side returning?
Have you looked into using the ADS .NET protocol?
03-14-2019 10:00 AM
What I/O => Devices do you have in your Twincat project?