LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can TCP/IP communication be used for 2 Labview processes on the same target?

I am a newbie to all this LV stuff so bear with me.  We are trying to create a simulation tool that will run on the same machine as the client GUI [also LV].  Can we use TCP/IP to communicate between these 2 LV processes on the same machine?  If so, how?  Thanks for the help.

0 Kudos
Message 1 of 4
(3,169 Views)

Yes.  It's the same as communicating between two different machines - one process needs to act as a client and the other as a server.  See the TCP examples included with LabVIEW.  For the hostname or IP address, use "localhost" or "127.0.0.1" which always refers to the local computer.

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

Hi nathand,

I have another issue while communicating with TCP/IP protocol.

I am sending data from RT target to Host computer(Main UI ) using TCP . Also I have created EXE file of main main UI which one is running on Host computer. and ussing this exe file in three different PC  and want to send the control signal from all four PC (three exe installed and one host PC). I created four communication loop in RT with four different port for communication with four PC.

When I am running the all VIs ,Its try to connect to the port of the listener and and showing keep waiting for a connection. Another problem is whatever value we sending from four PC , Target vi receiving random value with actual value. Also every time its getting reset.

So please help me here.

 

Thanks!

0 Kudos
Message 3 of 4
(3,133 Views)

I'm sorry, I cannot understand your questions.  What do you mean by "its getting reset"?  You don't need four separate loops, you need to structure your communication properly to handle multiple simultaneous connections.  Common ways do this include storing connections in an array, or dynamically launching an instance of a VI to handle each incoming connection.

 

What have you done to debug these problems?  Can you attach your code?  The best way to do this would be to include ALL of your VIs in a ZIP archive and attach it to a post.  Please do not insert a small screenshot unless you are certain that it shows all the relevant portions of the code.

0 Kudos
Message 4 of 4
(3,122 Views)