LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I synchronize two processes on two different PC's ?

I have a master and slave computer with a vi running on each, periodically these processes will need to be synchronized. If the processes were running as separate threads on the same PC, I
know could use the LabVIEW rendezvous technology to do this. But because the processes are on separate PCs, it is not obvious to me how to accomplish the sychronization. Thank you for your consideration of my
question.
0 Kudos
Message 1 of 8
(4,584 Views)
Have you tried using sockets (Communication->UDP)? I've used them in the past for inter-process communication between UNIX and PC programs.
-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 2 of 8
(4,583 Views)
Another option besides Datasocket is VI Server. For example, you can change variables on the remote system while polling for them to ensure synchronization.

Bryan Dickey
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 3 of 8
(4,583 Views)
Interesting point. I haven't tried that method yet. How fast is the communication? Is it based on sockets or something else?
-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 4 of 8
(4,583 Views)
VI Server is built on ActiveX and TCP/IP. So the network communication portion is based on sockets. There is a good discussion topic about synchronizing across a network called "Data-Communication between hosts: "Queues" v. "VI-Server""

Bryan Dickey
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 5 of 8
(4,583 Views)
There are (as the other posters have pointed out) a variety of way to accomplish this task, I guess the question that's of key importance, is how closely do the two functions need to be synchronized? Given that there is a network involved--which is very non deterministic--the timing I assume isn't too exacting.

Could you explain a little more about your application. It would help us to provide more specific examples, or even code...

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 8
(4,583 Views)
Thanks for all the suggestions. I have solved the problem using the example "VI server and semaphores". The example demonstrates how to use semaphores over a network, I made a similar set of VIs using the rendezvous VIs. Thanks again.
0 Kudos
Message 8 of 8
(4,583 Views)
You could consider a serial link (com port) , if it needs to be fast. The
PCs must be close together.

You can choose from many solutions (using filesystem, database
synchronisation, the ones mentioned by mr. Bradley and mr. Dickey, even
DDE). As mr. Porter mentioned, it all depends on the application.

Regards,

Wiebe.


"Frank Rizzo" wrote in message
news:506500000008000000FC490000-1021771306000@exchange.ni.com...
> I have a master and slave computer with a vi running on each,
> periodically these processes will need to be synchronized. If the
> processes were running as separate threads on the same PC, I
> know could use the LabVIEW rendezvous technology to do this. But
> because the processes are on separate PCs, it is not obvious to me h
ow
> to accomplish the sychronization. Thank you for your consideration of
> my
> question.
0 Kudos
Message 7 of 8
(4,583 Views)