Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 200077 (Frequency) and Error 200452 (Control Loop From Task) occurred at DAQmx Create Timing Source.vi

Solved!
Go to solution

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 Error200452. 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 1 of 4
(4,033 Views)
Solution
Accepted by topic author massic76

Massimo,

 

I believe the errors you are seeing are a result of your USB-6212 hardware not supporting the control loop from task functionality.  I have an M series PCI card that is able to run with both of your attached VIs with no problem (albeit they still have +/- 1ms variation on occaision).  When I try to use a simulated USB 6212 I get the same error codes that you do.  Unfortunately it is just a case of a lack of hardware capability.

 

Regards,

National Instruments
0 Kudos
Message 2 of 4
(4,023 Views)

Hi Chris,

 

thank you! You are right and thank you for taking the time to help me out with this. I was suspecting that and you confirmed it. Can I ask you how difficult is to simulate a piece of NI hardware? I have never done it and I wonder if it is a helpful thing to do to test whether or not it is my hardware and if the code would work with other hardware.  For instance, would you mind sharing the code you used with the simulated DAQ?

 

Thank you again and please let me know.

 

Best, Massimo.

 

 

0 Kudos
Message 3 of 4
(4,020 Views)
Massimo,

I only needed to use the code you provided, and pointed to the simulated hardware. Simulating a device is very easy with DAQmx: open up Measurement & Automation Explorer (Start >> programs >> National Instruments), right click on "Devices and Interfaces" and select "Create New". Then select 'Simulated DAQmx device' (should have a yellow icon) from the list, after which you can select the model you would like to simulate.

If you have other questions let me know.

Regards,
National Instruments
0 Kudos
Message 4 of 4
(4,018 Views)