Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronize AO on three MyDAQs

I'm using multiple myDAQs to control a full color laser show.  One device controls the AO for the steering mirrors and the three laser powers are controlled by the AO channels on two other devices (R on one and GB on the other).  I'm using the DAQ Assistant to control the myDAQs. 

The file is attached.

0 Kudos
Message 1 of 6
(6,641 Views)

Hello,

 

You will not be able to get a truly synchronous output for your MyDAQs as there is not a way to share the internal clocks and they do not support triggering. The best advice I can give you in order to achieve a pseudo-synchronous setup is to place a Flat Sequence Structure around your DAQ Assistant VIs. This will at least assure that all of the data for each MyDAQ is ready before providing it to a single MyDAQ. The Flat Sequence Structure can be found in Programming » Structures on the functions palette.

 

Jake B.

0 Kudos
Message 2 of 6
(6,608 Views)

Well, that is a bit frustrating.  

Is there any way to intentionally delay the start of the second after the first completes?  In other words, while I can't synchronize the start, could I put a known delay in between the two?  

Thanks for your help.

0 Kudos
Message 3 of 6
(6,602 Views)

You can put a delay between the two by expanding the Flat Sequence Structure to three separate frames, have the first DAQ Assistant in the first frame, and the other DAQ Assistants in the last frame. In the middle frame place a Wait (ms) VI and wire up your specified delay time to it. 

 

To expand the Flat Sequence Structure you can right click it and select Add Frame After to add a frame.

 

The Wait (ms) VI can be found on the Timing sub-palette.

 

Jake B.

0 Kudos
Message 4 of 6
(6,591 Views)

When I tried doing that (flat sequencing), I ended up with buffer underruns for my analog write commands.  I am not familiar with the inner workings of writing samples continuously, but I think that delaying one until the previous has finished is a bad idea.  Is there any way to detect when a certain block begins to execute?  I think that I need them to run simultaneously, but I would like to make sure that one begins after the other and possibly put a short delay in between.

Thanks in advance.

0 Kudos
Message 5 of 6
(6,565 Views)

Due to the limitations of your hardware, I do not believe this will be possible. The best alternative solution is to use a Sequence Structure directly before the DAQ Assistants and just have the wires run through it to assure your data is arriving at the DAQ Assistants at the same time.

 

-Jake B.

0 Kudos
Message 6 of 6
(6,551 Views)