08-10-2005 03:17 PM
08-11-2005 12:07 PM
08-11-2005 01:55 PM
The analog output stops itself after 5ms without polling. If I poll the status the analog output runs continuous.
See example code.
08-11-2005 03:06 PM
samadams,
The problem you are seeing when you don't poll, is that your VI finnishes execution immediatly. When you poll, you have a loop running which keeps the VI running until you press stop. When the VI finnishes running all tasks created in it are destroyed. This will stop the generation. Your VI should work just fine if you either add a loop with nothing but a stop button and wait ms timer to your false case, or if you completely removed the polling you are doing in your true case. However, it is amost always preferrable to use some sort of polling in your loop so that you can recieve notification if your task errors. I have modified your VI to illistrate my point.
Hope this helps,
Dan
08-11-2005 03:13 PM
samadams,
Here's one more modification where I've made the option to poll configurable (if you decide that you don't want to poll the task).
Dan
08-12-2005 07:46 AM
Thanks for passing along your knowledge.
The vi stopping execution was causing the task to be destroyed.
I will keep this in mind when testing future code blocks.
08-12-2005 07:55 AM
One more question. How do you get the actual frequency generated by the analog output?
I am using a PXI chassis and only certain multiples of the clock frequency are available at higher (10khz or more ) frequencies.
Traditional daq had a indicator of the sample clock rate used.
I would like to know how to get this with Daqmx.
See attached example code snippet.
08-12-2005 09:08 AM
08-12-2005 09:39 AM
Thanks ryan.
This part of the code is sucessfully completed (converted to Daqmx) Thanks for your help!
08-28-2006 11:23 AM