LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using TCP/IP to connect a VI in one computer to another which are connected via same network

Hi all,

 

We are trying to parse processed  data from a Labview application in one computer to another. We are trying to connect via TCP blocks ,but we only have information about the IP addresses of the two systems. We are unable to understand how to find the remote port or service number and also please let us know if there is any other effective way to send processed data between VIs on different computers.

 

VI blocks :TCP Open Connection, TCP Read, TCP Write.

0 Kudos
Message 1 of 7
(2,268 Views)

Hi anir,

 


@anir24 wrote:

We are trying to connect via TCP blocks ,but we only have information about the IP addresses of the two systems. We are unable to understand how to find the remote port or service number and also please let us know if there is any other effective way to send processed data between VIs on different computers.

 

VI blocks :TCP Open Connection, TCP Read, TCP Write.


You can/should define the port for your communication channel…

Have you tried to use NetworkStreams instead of plain TCP/IP? LabVIEW comes with ahuge example library and also has examples for using NetworkStreams…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(2,225 Views)

@anir24 wrote:

VI blocks :TCP Open Connection, TCP Read, TCP Write.


The server should use TCP Listen.vi instead of TCP Open Connection.  You then get to define the port used for the connection.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 7
(2,196 Views)

You should also define what you mean by "parsing processed data".  Do you expect to download a file and work on it locally?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 7
(2,188 Views)

The processed data is of data type string and it contains data regarding status of process. This data is  used only for monitoring a process from a remote computer.

0 Kudos
Message 5 of 7
(2,177 Views)

@anir24 wrote:

The processed data is of data type string and it contains data regarding status of process. This data is  used only for monitoring a process from a remote computer.


Oh, okay.  So if you haven't already, you will have to design a communications protocol to define data start, data stop, and (optional) is what you got what you sent?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 7
(2,160 Views)

@crossrulz wrote:

@anir24 wrote:

VI blocks :TCP Open Connection, TCP Read, TCP Write.


The server should use TCP Listen.vi instead of TCP Open Connection.  You then get to define the port used for the connection.


For the basics which VIs you need have a look at the example "Simple TCP.lvproj" from the NI Example Finder, too.

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 7 of 7
(2,149 Views)