LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview TCP/IP server-clients question

Hello everyone, I am developing a control application. I have a local server for actual control of hardwares and several clients at remote places. I try to use the same GUI for both clients and actual server control application so end user will fell no difference no matter they are working on clients or the server. The client response the user input by sending text massages to server and the server send some response text back to clients.

 

Since I have lots of controls and indicators in the front panel, I don't know if there is a efficient way to synchronize the clients GUI with the server GUI. Should I send the control button/indicator status to clients individually or collectively? Which way is a better way for communication between server and clients: send small data more frequent or send larger data less frequent?  Does anyone can give me a example? 

 

Thank you.

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

There is no single answer to your question. What you need to determine is how closely synchronized your clients and server need to be. If they basically need realtime updates than you will probably be best to send smaller packets with just the data that has changed. You can use a simple key/value pair array or clusters. The cluster would consist of a string which is the name of the element you want to update and a variant which is the actual data. This will minimize your updates to only values that have changed. If you updates don't need to be as frequent you can still use the same approach but have your server check at some specificed amount of time to collect the updates and send them. Is your server sending updates to all of the clients? If so you will need to keep track of each of the connection references to clients and loop over the list to send the updates. If you are on a local network on a single subnet you could use a UDP broadcast to send the updates. If you are crossing subnets UDP broadcasts generally will not work. Most switches will prevent them from being sent across subnets.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 4
(2,001 Views)

Hi dude,

Maybe you can try this link to connect it efficiently and doing by his suggestions are more valuable.

http://digital.ni.com/public.nsf/allkb/6F58D8300ACB743C862579F8006E2800

Boldness has genius, power and magic in it!'
0 Kudos
Message 3 of 4
(1,986 Views)

Thanks for help suggestions. I will check them out.

0 Kudos
Message 4 of 4
(1,978 Views)