Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Run differnet labview programs on different computers at the same time

I want to run 2 different labview program on 2 different comptuer at the same time. (I mean the exact starting time). Anyone know how can I do it?
Thanks alot.
KL
0 Kudos
Message 1 of 7
(4,197 Views)
Depending on what kind of delays you can live with, and what kind of hardware you have, there are several ways of doing it;
1) if the computers both have some kind of acquisition boards in them, you can trigger both programs via the counters of the boards. (one computer triggers the other, or external trigger)
2) if both computers are online, you can use TCP/IP or datasocket to synchronise them (either start both from a third party, or trigger one computer with the other)
3) you can probably also use serial or parallel lines to achieve some sort of synchronised start. (trigger one computer from the other)

I guess the first way will give the tightest synchronisation, especially if you use an external trigger to start both computers.
Both method 2) and 3) will result in some delays, but you can probably reduce them to large extent by programming in a small delay in the computer which triggers the other, so that it won't start the main body program until the trigger has been received by the listener.

Well, there are probably dozens of other ways of doing this as well...
what kinds of delays can you live with? and what kind of hardware do you have available? it will be easier to suggest something specific if we have that info.

good luck!

m,-
0 Kudos
Message 2 of 7
(4,195 Views)


@Michal wrote:
Depending on what kind of delays you can live with, and what kind of hardware you have, there are several ways of doing it;
1) if the computers both have some kind of acquisition boards in them, you can trigger both programs via the counters of the boards. (one computer triggers the other, or external trigger)
2) if both computers are online, you can use TCP/IP or datasocket to synchronise them (either start both from a third party, or trigger one computer with the other)
3) you can probably also use serial or parallel lines to achieve some sort of synchronised start. (trigger one computer from the other)

I guess the first way will give the tightest synchronisation, especially if you use an external trigger to start both computers.
Both method 2) and 3) will result in some delays, but you can probably reduce them to large extent by programming in a small delay in the computer which triggers the other, so that it won't start the main body program until the trigger has been received by the listener.

Well, there are probably dozens of other ways of doing this as well...
what kinds of delays can you live with? and what kind of hardware do you have available? it will be easier to suggest something specific if we have that info.

good luck!

m,-




We don't have any DAQ board. 😞
but I guess what we an do is to trigger one from the other one. That is somthing i am not very sure about how to do it.
KL
0 Kudos
Message 3 of 7
(4,192 Views)
OK. so are the computers connected to a network?
and how critical is the timing?
0 Kudos
Message 4 of 7
(4,187 Views)


@Michal wrote:
OK. so are the computers connected to a network?
and how critical is the timing?


Yup, one of them is cable connected and the other one is wireless connected (Laptop). The time scale offset we are talking about is within 100ms.
0 Kudos
Message 5 of 7
(4,184 Views)
Alrighty then...
I've put together a simple example code which might work. It's based on TCP/IP, so the delay time depends on the network.
Basically, there is one code for a master computer, and one for a slave.
The slave connects to the master, tells it that it's ready to go, and then the master starts an event on both PC's "simultaneously" (as I mentioned, there will be some delay).
In this example, the event is a "BEEP" sound on both computers.

It should be straightforward to modify the code and add additional communication, or to remove some steps (such as the slave telling the master that it's ready).

Anyway; simply replace the "beep.vi"s with the code you wish to execute, and it should hopefully work.

Let me know how it goes.
Good luck!

m,-
0 Kudos
Message 6 of 7
(4,176 Views)
...wasn't able to attach two files in one message... here's the slave;
0 Kudos
Message 7 of 7
(4,174 Views)