Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get notified the AO profile has been finished

I am generationg an output analog profile usling the NI PCI-6014 DAQ (Windows2000/XP environment and VC++ 6 are used). My goal is to generate it once, but I do not want to make a synchronous call having a real-time application. So what I am doing is sending a waveform to the AO and stopping it on timer. Is there any possibility that driver notifies me at the end of the profile so that I could be more accurate time-wise?
Thank you in advance,

Mike Faynberg
0 Kudos
Message 1 of 5
(2,829 Views)
Hi Mike-

It sounds like you're trying to perform an output of a single cycle of a waveform and looking for a reliable way to stop the output.

If you are generating a finite array of data for output then you can simply specify "DAQmx_Val_FiniteSamps" as the sampleMode parameter and indicate that number of samples in the sampsPerChanToAcquire. Both of these parameters are covered in the DAQmxCfgSampClkTiming section of the DAQmx C Reference Help at Start>>Programs>>National Instruments>>NI-DAQ on your start menu.

With this method you will need to also use "DAQmxWaitUntilTaskDone" after starting the task to allow time for the output cycle to complete before clearing or stopping the task, etc. This function is also described in detail in the help file.

I hope this helps!

Thanks-
Tom W
National Instruments
Message 2 of 5
(2,812 Views)
Hi Tom,
and thank you for your reply. Yes I am trying to output a single cycle of a waveform asynchronously and get a notification as accurately (timewise) as possible. What I forgot to mention in my original posting though was that the program is based upon the traditional NI DAQ rather than on the DAQmx. Is it possible to achieve my goal not relying on the Windows timers anyway?

I greatly appreciate your help.

Mike Faynberg
0 Kudos
Message 3 of 5
(2,808 Views)
Mike:



If you are using NI-DAQmx 7.4, take a look at the cdaqmx help file, under Task Configuration/Control->Events, at the DAQmxRegisterDoneEvent or DAQmxRegisterEveryNSamplesEvent.



Does that help?


Well, you managed to get in another posting while I was composing my reply. Do you have to use Traditional NI-DAQ?

Message Edited by WM John Weeks on 07-01-2005 10:00 AM

John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
Message 4 of 5
(2,794 Views)

From John: "Well, you managed to get in another posting while I was composing my reply. Do you have to use Traditional NI-DAQ?"

That's a great question- Mike, is there a specific reason you need to use Traditional NI-DAQ? 

I have attached an example that outputs a single cycle of a buffer that you define; in my case I have built a 5000 point sine wave of amplitude 5V. I think you'll see that NI-DAQmx is much easier to program with and understand.  It also offers increased performance. 

Your card supports NI-DAQmx, so I would strongly suggest you consider using this API for programming. Please let us know if you have any additional questions.

Thanks-

Message Edited by Tom W. on 07-01-2005 01:08 PM

Tom W
National Instruments
0 Kudos
Message 5 of 5
(2,789 Views)