11-06-2006 01:33 PM
11-07-2006 05:41 PM
Hi Quintin,
It sounds like you are trying to accomplish a "Finite Retriggerable Pulse Train" to time analog acquisition. This is set up in an example (Help>>Find Examples) by the name of "Multi-Function-Ctr Retrigg Pulse Train Generation for AI Sample Clock.vi". A search for 'retriggerable' in the Example Finder is an easy way to find this example.
This example only starts and stops each task once. This is the most efficient way to achieve this functionality since there is overhead involved in restarting a task. This example uses a hardware signal to control when the counter pulse restarts or retriggers. If you do not have a hardware signal you can use a digital line to generate one.
Alternatively you can set up the analog input to be continuous, and setup a finite pulse train with your counter. You can then use software timing to start and start and stop the counter task repeatedly. The analog task only needs to be started once. Use the DAQmx Timing function to specify the counter as your clock for your analog task.
Please test the above example to see if it suits your application. This should help to address the timeout problem. Specifying a continuous AI task, a sufficient timeout period, and sufficient number of samples to acquire for the read (-1 for 'do not timeout' and 'read all available samples') may help when working with this example.
Hope this helps,
Jennifer O
Applications Engineer
National Instruments