LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCPIP Labview-PLC (when the PLC is the client)

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.

 

 

0 Kudos
Message 1 of 4
(2,394 Views)

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.

Marc Dubois
0 Kudos
Message 2 of 4
(2,342 Views)

What error is the LabVIEW side returning? 

 

Have you looked into using the ADS .NET protocol? 

0 Kudos
Message 3 of 4
(2,332 Views)

What I/O => Devices do you have in your Twincat project?

0 Kudos
Message 4 of 4
(2,231 Views)