03-21-2008 01:30 PM
As you said:
In order to read in a voltage into LabVIEW you must use a analog input task, even if you are generating the analog output from the same VI. If you want to display the digital information in the same graph at the analog data you can read in the digital output with an additional channel on you current analog input. This way you can easily display both signals on the same graph.
03-21-2008 02:09 PM
03-24-2008 09:56 PM
Hi eFang, I was just looking at your code, and you are exporting the counter pulse to synchronize all you outputs, as well as the sample clock for your analog input task. This means that you are getting only one sample per output pulse. If you increase the sample rate of the analog input task you should be seeing the results that you desire. Currently you have it set to 1000s/S, but you are sending it a clock from the rest of the tasks. Basically just delete source to the timing VI in the analog input task thread that is coming from the rest of the output tasks (it is unnecessary to synchronize the analog input task with the output tasks) and your acquisition should be as desired.
Chris_K
03-26-2008 08:29 AM
03-27-2008 09:14 PM
Hi efang, have a look at the following link. It tell you how to ignore the initial timestamp that is causing your chart to display the date even when you set your values.
Also to help fix the sampling problem that you are having, add a 0.5s initial delay (terminal is on the bottom of the VI icon) on the CO Pulse Freq VI in your first thread.
Chris_K
06-28-2012 04:08 PM
Hi,
I am trying to control the timing of a timed loop. So far I have tried several approaches via software and that worked great except the loop time in a few instances missed 1-2 ms. I want to make sure the timing is right. I have tried to provide an external clock using the DAQ I have. The system I use is NI USB-6212. It has two counters and DIO and AIO but I keep getting errors. I have tried two different approaches. One was to directly use the "DAQmx Create Timing Source.vi" set in Frequency mode and when I did that, I got Error 200077. THen I found a post of somone saying that some times that is not possible and an alternative is to use the same vi but set in Control Loop From Task mode. This one gave me Error 200452. For this one as you will see in my attachement the suggestion was to use an AI then the timing from it and then use this task for the DAQmx Creat Timing Source.
I am not sure what is the issue or if I need to set something differently.
Please let me know if you can help me with this.
I will try to keep working on this, but if any of you would have any suggestion I will be very happy to look into that.
Thank you in advance,
best, Massimo.