04-24-2006 01:59 PM
04-25-2006 11:35 PM
Hey Megaman,
Sounds like you're pretty close to solving the problem. Also, thanks for providing such a high level of detail! Because you described the issue so thoroughly, it is much easier to answer your questions.
To start with, the PXI-4462 is not capable of doing a hardware-timed trigger re-arm. Thus, to re-trigger each aquisition, you will simply need to stop and restart the task for each iteration of the while loop. FYI, this is in contrast to our high-speed digitizers (PXI-5122 for example), which are capbable of re-arming the start trigger in hardware. In your case specifically, the sequence of function calls will something like the following:
1) DAQmx Create Task
2) DAQmx Configure Timing
3) DAQmx Configure Trigger
...start of while loop...
4) DAQmx Start Task
5) DAQmx Read
6) DAQmx Stop
....end of while loop...
Notice that it is only necessary to configure the start trigger once, before the while loop. Also, notice that the trigger can be re-armed simply by stopping and restarting the loop. In fact, I imagine that the error you reported was occuring when trying to configure the trigger while the loop is already running - which would be an expected error.
In conclusion, all you need to do to re-arm the trigger is to start the DAQmx task at the beginning of the while loop, and stop the task at the end. I think this should solve the issue, but certainly let me know if you have any further questions!
Regards,
David Hall | Applications Engineering | National Instruments
04-26-2006 04:25 PM
Thanks for your reply! I am already implimenting of the steps you mentioned in the e-mail. I noticed when I run the VI in continuous mode and start and stop the task each time it slows down the data aquisition, but as you said it does retrigger every single time. I have set up the progrqam to allow the user to select between finite sampling and continous sampling since there are advantages to both. Your reply confirms that I'm doing everything the way I should and that my program should and does run smoothly and efficiently. Thanks again for all your help. It is greatly appreciated.