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: 

HELP !! Need real time communications between one Instructor Laptop to 12 -20 student laptops (Wireless network )

Solved!
Go to solution

Hello,

          I am trying to delvelop software (Labview based) That will be  installed on students laptops (12-20 max) that will read data continusly (1-10 hz max) from the instructors laptop. I am told that using a text file and have students read continuosly is not a viable option. Any help would be greatly appreiciated. I mostly write simple data aquistion type programs strain gages LVDT's etc as an engineer. I am not a full time programmer so I learn as needed. The data is simple double prescision contantly updated from a simulation.

   

          This is going to be a freebie software for schools eventually. Please help...  Thanks

0 Kudos
Message 1 of 11
(3,007 Views)

I would use network shared variables.

0 Kudos
Message 2 of 11
(3,001 Views)

If you want to use platforms other than Windows, and many schools do use other platforms, then shared variables are not an option. DataSocket is not quite as easy to use but will work on other platforms.

 

Lynn

0 Kudos
Message 3 of 11
(2,977 Views)
You could maybe consider sending UDP multicast packets?

UDP allows you to broadcast information over the network to multiple destinations. In the software for the students you can listen for the UDP data.

LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 11
(2,970 Views)

Thank you. Have you see there are examples of the code on line ?

0 Kudos
Message 5 of 11
(2,960 Views)

LabVIEW itself has examples built-in for transmitting and receiving UDP packets.  Go to Help >> Example Finder.

0 Kudos
Message 6 of 11
(2,953 Views)

Thanks I did The order of the data is important.

0 Kudos
Message 7 of 11
(2,948 Views)

What exactly do you mean by "order of the data is important"?

0 Kudos
Message 8 of 11
(2,939 Views)

I read from the ni website that the packets need to be small and that the order of the numbers in the UDT packets sometimes arrive in different order

 

"User Datagram Protocol, or UDP, provides a means for communicating short packets of data to one or more recipients. Unlike TCP, UDP does not guarantee the safe arrival of data to the destination. Furthermore, data sent in multiple packets may not arrive at the destination in the order they were sent

 

 I need to ensure the data which is derived from functions extracted from a real time simulation need to arrive to several laptops (12-20) in the correct order so the software on those laptops can process the data correctly.

0 Kudos
Message 9 of 11
(2,929 Views)
Solution
Accepted by topic author Matrix54

Well, you can also use TCP instead of UDP.  The TCP networking protocol provides a little more overhead to make sure packets arrive in order, and will be resent if missed.  That doesn't necessarily guarantee all data will arrive.  Unplug a network cable for a short period of time, and a sent packet will eventually timeout and disappear.  But the internet runs on this protocol pretty well, (at least that's what I've been told Smiley Wink) so I'm pretty sure it will work reliably enough for your small network application.

 

If you need further assurances all of your data arrives, then you can serialize each pack of data yourself, put a sequential number in the transmission with the other data.  If the receiving program detects a missing serial number, or one out of order, then at least you know at the level of your application and can do something about it.  But I seriously doubt your application is so critical that you'd need to worry about implementing this.  Just rely on TCP and you'll be fine.

0 Kudos
Message 10 of 11
(2,924 Views)