LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

input-output "synchronization"

Hello.
 
Using Labview 7.1 and the PCI 6071 DAQmx card i'm trying to generate a sine wave of controllable amplitude and frequency.This is done with the upper part of the vi. This sinus analog output is sent as an input to a device (some kind of transformer). At the output of this transformer i get again a sine wave with time-dependent amplitude (the amplitude decreases with time), and i need also my vi to acquire this waveform, calculate its amplitude and plot the values in a "amplitude vs time" graph (every one second). This is done with the rest of the vi.
The problem is that, firstly, i don't know how to measure absolute time and provide it to the graph (for the x-axis).
Secondly, just watching the amplitude values randomly as they arrive, i also get zero values which is impossible for the transformer output. I mean that, there are instances when the analog input channel measures, but on the same time my analogue output doesn't generate the sine wave.
How can i "synchronize" the input and output of the card, so that the input channel won't "acquire" in these instances when the output channel doesn't "generate"?
 
ps. i run the vi using the "run continuously" button , in order to achieve continuous generation and acquisition from the channels".
0 Kudos
Message 1 of 5
(2,743 Views)
Hello Labros,

There is nothing in your application which controls which portion executes first.  The read might happen before the write occurs.  Also, typically you want to use a while loop to run "continuously" instead of using the run continuously button.  Finally, if you create and run a task, you should also stop and clear the task.  It looks like you have a good start with your application.  Keep these suggestions in mind as you continue to develop your program.

I would like to point you to the LabVIEW example programs.  Select "Help>>Find Examples".  Next choose to "Browse by Task". Select "Hardware Input & Output>>NI-DAQmx>>Synchronization>>Muti-Function".  Please reference either "Multi-Function Synch AI-AO" or "Multi-Function Synch AI-AO Ext Digital Trigger".  These examples are well documented, fully tested and should help you with your application.

I hope this helps,

Jennifer O.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(2,715 Views)
Hello labros,

On our web site, you can find a very good tutorial called Timing and Synchronization Features of Ni-DAQmx
More informations about NI-DAQmx: www.ni.com/gettingstarted

Best regards,
Nick_CH
0 Kudos
Message 3 of 5
(2,712 Views)

Dear Jennifer,

Your remarks were most valuable and the application works fine using the triggering ability described in the example you mentioned. The input us finally capable of "catching" the wave with very good accuracy even in high frequencies.

Thanks a lot .

0 Kudos
Message 4 of 5
(2,700 Views)

Dear Nick,

My thanks to you to. The notes proved to be very usefull for future extended Daqmx applications.

0 Kudos
Message 5 of 5
(2,699 Views)