From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Precise triggering output and input voltage generation in DAQ Assistant

Solved!
Go to solution

Hi,

 

I am just wondering whether someone has encountered a simular problem related to the synchronisation of input and output voltage. I am using a NI USB-6259 and LabView 11. I was using the DAQ Assistant to configurate the input and output channel. In particular, my task is to generate a single rectangular "pulse" as output voltage to drive a coil and after the pulse is gone obtain a signal from a magnetic field sensor and get a power spectrum. This means that the order and time frame at which the DAQ assistants are used is extremely important. For instance, the output voltage channel must be open first for 2 seconds. Afterwards, the input voltage channel must be open for 1 second in which the sensor signal is obtained and postprocessed. Only after these tasks are performed in that order it can can be repeated in a loop until the experiment is over. I don't know how to trigger the DAQ assistants (one for the input and one for the output voltage) properly. Is there any trick?

 

Cheers

Michael     

0 Kudos
Message 1 of 9
(3,593 Views)

I should mention that I have the two DAQ assistants in a flat sequence structure within a while loop. However, the second part starts before the first one has finished its task. With other words, they are not synchronised.   

0 Kudos
Message 2 of 9
(3,572 Views)

Hi Michael,

 

Are you just trying to control the execution of the program or is it more than that?

 

What do you mean when you say trigger the DAQ assistants?

Dave C.

Applications Engineer
National Instruments
0 Kudos
Message 3 of 9
(3,567 Views)

Hi Dave,

 

thanks for replying. In the a while loop I have a flat sequency strcuture containing two DAQ assistants. The first one in the sequence suppose to handles the generation of a analogue output voltage (to drive a coil) and the second one handles the input analogue voltages from two sensors. The output volgate has a rectangular shape with 2 seconds width and amplitude of 1.5 V. This is generated by the subVI "Simulate Arbitrary Waveform" and wired into the first DAQ assistant. 

Now the problem really is that the second DAQ assistant starts already although the first one has not finished its task first. Or with other word, howe can I control and flag the precise start and end of the DAQ assistant without using API and even hardware triggering. To summarize, I would like to run the first DAQ to drive the coil for the duration of the pulse, 2 seconds. Than I would like start the second DAQ to receive the signals for one sesond from the magnetic field sensor and obtain a spectrum. Once this is completed the next loop can started.

I hope it makes sense, otherwise I will attach the program.

Cheers

Michael 

0 Kudos
Message 4 of 9
(3,551 Views)

Hi Michael,

 

Are you using the error wires in your program?  These will force the order of execution.

 

Could you provide a screen shot of your block diagram?

 

Thanks,

Dave C.

Applications Engineer
National Instruments
0 Kudos
Message 5 of 9
(3,540 Views)
Solution
Accepted by topic author MV_CAI

Hi Dave,

thanks for that I wired the error channels but the synchronisation problem was not related to it. In the DAQ assistant I simply had to switch the aquistion method from "continuous samples" to "N-switch" for both the input and output voltage and everything works fine now.

Thanks again

Michael

 

 

0 Kudos
Message 6 of 9
(3,509 Views)

I meant "N-samples"

sorry

 

0 Kudos
Message 7 of 9
(3,472 Views)

I have a similar issue, could ou please provide your vi?

0 Kudos
Message 8 of 9
(3,396 Views)

Hi,

 

did you try to wire the error out/in through in each structure?  What happens is that each process in the subVIs (DAQ assistant, Time delay etc.) is concluded by creating an error report which is passed on. So you can make sure that at least within a while structure (or others) the sequence of events is synchronized.

 

Cheers

 

0 Kudos
Message 9 of 9
(3,385 Views)