From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using labview to monitor specific tcp port

Hello,

Im using cRio-9067 and I have another devices that are connected to my local network (think about them as thermostats that wait for a command to come and tell them to take a sample, and after that they send the answer on the network)

so, my question is, how can I control them?

becasue i cant make a vi for each thermostat (they have a microcontroller inside them that read the commands from the network) , and my guess is that to create a tcp protocol using LabView I have to make a client and server VIs.

 

Is there any way to make only a server VI that sends the "take a sample" command and on the same time it will listen to the answer?

 

Thanks alot!

0 Kudos
Message 1 of 3
(3,121 Views)

You need to read device documentation.
If you know communication protocol, you can "talk" with your device.
Your vi (server) send command (request) and wait for answer.
You don't need wriet another side (your device) on LabVIEW.

0 Kudos
Message 2 of 3
(3,075 Views)

Actually, It is the other way around. Your network thermoststas are the "servers" while your LabVIEW application is the client that opens a tcp connection to the specific port on the remote device, sends a well formed command, and waits for a reply on the same connection.

 

So, start reading the manual about the details of the communication format. Do you have a link to the manual? Typically, these devices run very simple web services so this should be quite easy.

0 Kudos
Message 3 of 3
(3,072 Views)