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: 

Requesting single or multiple data from TCP server

The TCP Server VI has many variable which need to be sended to the client. But not all of this data is needed on each request. Some variables are requested more frequently compared to others. It is unnecerssary to send the all the data all the time. What is an elegant way of implementing this where the client asks for one or a multiple combination of these datasets?

 

Cluster of 8 x UNIT8 - Fuse information - 1Hz

UINT8 - Voltage - 5Hz

Cluster of 8 UINT32 - Motor speed - 100Hz

UINT32 - Elevation - 200Hz

etc....

 

0 Kudos
Message 1 of 2
(2,496 Views)

You might want to have a look at the STM library that NI Systems Engineers put out.  It basically uses a string to name what is being requested and/or supplied.  So the client sends the command string to the server, the server recieves and deciphers the string and replies with the required data.  Nothing really fancy needed.


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 2 of 2
(2,490 Views)