LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Three-PC network clock

Hello, I'm trying to put together a small system that does the following: Imagine 3 different rooms, where some event (a lecture in this case) has to start simultaneously, and last for exactly 20 minutes. Each room has a PC (and network). One of the PC's is the master. When the people in the other two rooms are ready to start, they send a message about this to the master PC by LV via the network. (like a green led illuminating) When the operator of the master PC sees that the others are ready to start, he starts the clock, which counts down from 20 minutes. This clock is displayed on the other two PC as well; so that everyone keeps track of the same time. When the countdown is over, the master PC starts requesting whether the two other PC's are read
y to go for the next 20 minute session, and so on.
The clock itself isn't the problem, but I have no experience with networking. How do I set up a server, how do I connect the clients, etc.? (the IP's are dynamic; DHCP. can I target computernames directly? should I use datasocket, TCP/IP, etc.?)
Thanks! (LV 7)
0 Kudos
Message 1 of 3
(2,609 Views)
Hello Michal,

Thank you for your question regarding DataSocket. It sounds like you would like to synchronize three classrooms using LabVIEW. DataSockets seem like the obvious tool for this project. This allows you to efficiently pass data over the Internet, and respond to multiple users without the complexity of low-level TCP programming. Each DataSocket connection corresponds to a specific piece of data that you want to send and can be named so that you can refer to it. The connection to the URL node can be a computer name on the same network as well as an IP address so you don't have to worry about DHCP. There are some great examples in LV7 for data sockets. Go to Help>>Find Examples Then Browse by task. Select Networking>>DataSocket>>General and here you can find
many examples that use DataSocket to communicate between computers. DS Read.vi and DS Write.vi are some simple ones to get you started. One thing to remember is that the DataSocket server must be running on the �server classroom� computer. All this assumes that you have LabVIEW running on all three computers. There are alternative ways to approach this problem but if you have LabVIEW on all the computers this may be the best way to implement your idea.

Other resources can be found on the ni.com website by clicking the support tab at the top of the home page. Then search from Technical Resources at the top of the page for your topic. I hope these resources help! It sounds like a great project. Let me know if you need any other support with this issue.

Shea C.
Applications Engineering
0 Kudos
Message 2 of 3
(2,609 Views)
Hi Shea,
thanks for your answer. I've already programmed the whole thing using TCP. However, datasocket sounds like a simpler solution; I'll have a look at the resources you recommend.
regards,
M,-
0 Kudos
Message 3 of 3
(2,609 Views)