01-31-2013 12:13 AM
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
Solved! Go to Solution.
01-31-2013 05:19 PM
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.
01-31-2013 06:39 PM
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?
02-01-2013 12:18 AM
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
02-01-2013 03:27 PM
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,
02-03-2013 09:13 PM
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
02-10-2013 05:47 PM
I meant "N-samples"
sorry
06-04-2013 02:20 PM
I have a similar issue, could ou please provide your vi?
06-04-2013 06:57 PM
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