Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Control loop from task is not supported by PCI6229?

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.

 

I made a try just now.
I wired DO 0 to AI 1, AO 0 to AI 0, so I can see them in one chart. It works!!! I put the screen shot attached.
 
There is one point I'm still confused with: the digital output is supposed to be square wave, why what I got in the chart is a triangle wave? This is different from what I see from oscilloscope. For digital signal, when the voltage changes from 0 to 5, the signal should go straight upward without slope. And for analog signal, when the voltage changes, suppose from 1.22 to 4.38, the signal should also go straight in same way.
 
Could you help me out of this?
 
Thanks so much.
 
 
0 Kudos
Message 21 of 26
(1,560 Views)
This is what it looks like while running.
pic attached.
0 Kudos
Message 22 of 26
(1,557 Views)

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

0 Kudos
Message 23 of 26
(1,526 Views)
Hi, Chris_K,
 
Thanks for your advise! It really works!!!
 
I deleted the source to the timing VI in the analog input task thread that is coming from the rest of the output tasks and then it showed what I want.
 
However, there's still a little problem. You can take a look at the attached screen shot: 
 
Problem 1: ①Why does it always start from the right side? ②And this leads to the loss of about half a cycle at the end of the signal which I don't like.
 
Problem 2: ③I want to show relative time on X axis, like 0, 1, 2, 3, ... seconds, instead of those like 9:03:58 2008-3-26. I tried several times to use the property dialog of the chart to fix this but failed. Or maybe I should use "property node"?
 
Attached:
signals.jpg  --  the screen shot along with my problems
efang05.zip -- the latest version of my vi
Download All
0 Kudos
Message 24 of 26
(1,513 Views)

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

 

0 Kudos
Message 25 of 26
(1,490 Views)

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.

0 Kudos
Message 26 of 26
(1,162 Views)