LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to synchronize parallel VIs in labview 7.1

Solved!
Go to solution

I fully agree with Dennis on this one.  This is a hardware issue.  You do want to configure the DMMs so one triggers the other.  However, this will produce a delay from one to the other, but it should be highly repeatable.  This allows you do take some pretrigger points on the slave DMM to compensate.  This does not, however, ensure that the data points are collected at the same time (the clock phases on the DMMs may or may not be synchronized).  If you can share the clocks, in some fashion, between the DMMs, you should do this, as well. If you can't, you should be able to determine the offset and do a resampling to get things back where they belong (this is not a really desired method of doing things, as resampling can miss things like sudden data spikes).

 

Note that we could give more help if we knew the brand and model of DMMs you are trying to synchronize.

 

Good Luck!  Let us know if you need more help.

0 Kudos
Message 11 of 14
(1,289 Views)
Solution
Accepted by topic author Convert sine waveform in to Square

Hi Gray

 

Thanks for your comments. Actually I use two Agilent  DMMs (3458A). Ya it is a harware problem.  When we   use external timing signal to sample triggring and Trig Event, we cannot find fix relation of Trig Event between two DMMs. Master slave combination can find fixed relationship with repeatable data, but sampling rate is controlled by programme. Alreardy I did the synchronization with fixed time delay using second option. But still I have prolem. Some time programme works, but some time the 2nd DMM not trigger. I attached progrrame code here. Can you give some comments to fix this problem problem.

 

Wije

0 Kudos
Message 12 of 14
(1,271 Views)
I have never used this particular DMM, but the driver looks IVI, so my comments will be based on that assumption.  It appears you have a race condition in your trigger arming.  There are two VIs labelled "Arm", but both execute in parallel.  This means that the order of arming is arbitrary.  Sometimes the slave will be armed before the master, sometimes after.  If the slave is armed after the master and the master triggers before the slave is armed, the slave will never trigger.  You need to fix your data flow so that the slave is always armed and ready before the master is armed.  You can do this by adding another sequence or two to your flat sequence, or you can reroute your error wire to enforce execution sequence (preferred).  Hopefully this helps.  Good luck.
0 Kudos
Message 13 of 14
(1,256 Views)
Well, I have not looked at what your code does but if you have a loop running there is a timing function called "Wait until next mutiple". In each loop wire a msec value to the func.  I guess though your not using loops from the jpg above.
0 Kudos
Message 14 of 14
(1,244 Views)