06-14-2006 08:08 AM
06-15-2006 05:00 PM - edited 06-15-2006 05:00 PM
Hello AJ,
Are you working off of the shipping examples installed with NI-DAQmx at \Program Files\National Instruments\MeasurementStudioVS2003\VCNET\Examples\DAQmx? That call should work to stop the task. How are you determining that the task is not stopped?
In order to "pause" your analog input, you can stop the task and then start it again.
The other method is to use a counter as a sample clock for your analog input operation and set the counter up to use an external pause trigger. The problem with this method is that you need to provide an external pause trigger. You could use one of your digital lines to create the trigger signal. However, you cannot create a pulse train with the counter of the USB-6009, so you would need to have different hardware, such as an M Series device.
Regards,
Laura
Message Edited by Laura F. on 06-15-2006 05:03 PM
06-16-2006 07:21 AM
06-19-2006 04:18 PM
Hi AJ,
In the code that you posted, I don't see what sort of delay you have between the stop function and the read function. If the delay is not long, you may not be able to see this on your graph. When you run the example ContAcqVoltageSamples_IntClk, does the stop button work to stop the acquisition?
Thanks,
Laura
06-20-2006 07:23 AM
06-21-2006 04:19 PM
Hi AJ,
You do have to remove the event handler, like in the example, or the event that indicates data is ready will still occur and your program will still acquire data. One second does not seem too short to reload the event handler if needed. Have you found that this is not the case? You do not need to create the channels or setup the sample clock timing again until you clear the task.
The other way to pause an acquisition is to use a counter the way I described in my first post, but you would need different hardware.
Regards,
Laura