LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -200279 with simultaneous analog input (different devices) and digital output.

Hi guys,

 

I am a beginner in Labview and have been dealing with this problem for a couple of weeks now and just can't seem to get it completely right, I have a feeling there are a few small bugs in my code/hardware setup.

 

I am running an scxi-1000 chassis with a 1600 module and 1302C along with a 1303 accesory for temperature measurements, this is connected to four thermoucouples. Unfortunately I have a limited number of modules available so I am also using a PCI-6221 DAQ card with an scb-68 breakout box used for a digital output and analog input voltage channel. Attached is my labview program. When I run the code at a 50 Hz sampling rate it runs with no errors but the data file comes out extremely wrong, this is also attached. When I run the code at 100 Hz I get error-200279 after a few loops. I used to have 2 daqmx timing VIs (one for each input), but the same error would eventually happen, I have also tried increasing the buffer size on said timing VI. I am also using an old computer (Pentium IV) could this effect the program?

 

I have learned a lot going through forms for similar problems to mine but I just can't get it to for an extended period of time, I have posted my simplest code.

 

Thanks in advance,

 

Luca

Download All
0 Kudos
Message 1 of 12
(3,321 Views)

 

Why do you have both a SCXI-1600 and a PCI-6221 DAQ?

0 Kudos
Message 2 of 12
(3,309 Views)

Unfortunately we do not have the hardware to run everything on one DAQ, unless we took temperature measurements using input channels on the scb-68, but we require very accurate temperature measurements so we want to use the SCXI-1303. Could this hardware configuration be the problem? 

0 Kudos
Message 3 of 12
(3,305 Views)

What is likely happening is that the Collector VI is getting a really large array inside of it.  Growing arrays can make your program really slow, causing your DAQ buffer to overrun.  I recommend looking into the Producer/Consumer instead of using the collector.  The idea is to use a queue to pass the data from one loop to another parallel loop that does the logging.  So the logging happens as you gather data, keeping your memory more managable.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 12
(3,304 Views)

Ok this makes sense. I have made the suggested modifications but still getting the same error with sampling rates of 100 Hz or higher. Could you check that I have implemented the queue VIs properly (new file attached)? Also when running at 50 Hz in debug mode it does not look like the second while loop (with the dequeue element) comes into play until I hit the stop button, once I hit the stop button I get the following error:

 

Error 1 occurred at Dequeue Element in FinalCombined_2.vi

Possible reason(s):

LabVIEW: An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
=========================
NI-488: Command requires GPIB Controller to be Controller-In-Charge.

 

This leads me to believe I have programmed the queue elements incorrectly.

Thanks for your help, any suggestions are greatly appreciated.

 

Luca

0 Kudos
Message 5 of 12
(3,285 Views)

The two loops have data dependency. That means that an output from one loop is used as an input to the other loop. The way LabVIEW's dataflow paradigm works is that any node (such as a loop) will only produce data at its outputs after it has completed execution and that a node can only run when data is present at all its inputs.

 

So the second loop will not start running until the first loop has stopped. And the second loop will stop at the end of the first iteration because Stop is True.

 

Data Dependency.png

 

As for the timing, it appears that you are using software timing. something in the 50 to 100 Hz range is not unusual for software timing.   If your hardware has the capability, use hardware timing.

 

Lynn

0 Kudos
Message 6 of 12
(3,269 Views)

I see, I thought a F signal would be sent for every loop iteration. Thank you.

 

Going back to the original problem I am trying to configure this aquisition to be hardware timed, I stripped away most of the VI to work on just a single input, I decided to use Dev1 (PCI-6221 DAQ card) because I could find the timing information more easily, however I noticed that even when running this simplified VI without any data processing  I still get error 200279 after a few iterations of the loop.. I have looked at several example VIs and they dont appear to do anything differently, I feel like I am missing some basic concept of data aquisition using daqmx. 

0 Kudos
Message 7 of 12
(3,232 Views)

Hey,

 

The code you attached to your most recent post works when I run it. Are you trying to run the code with highlight execution?  Can you go to Help>>Find Examples and select Hardware Input and Output>>DAQmx>>Analog Input and run the continuous voltage example for one channel without any modifications?

 

Regards,

David R
Systems Engineer
National Instruments
0 Kudos
Message 8 of 12
(3,209 Views)

Ok, after restarting the computer this simple program works. I now want to build it to handle two analog inputs from two separate devices, as shown in the previous attachments. In order to do this do I have to use two timing VIs? Or can the timing be set with one VI as I would like them to be synchronized.

 

Thanks again for all the responses. 

0 Kudos
Message 9 of 12
(3,192 Views)

Hello,

 

To have both devices synchronized and hardware timed, you will need to physically share a sample clock and a start trigger between the two devices.  In other words, you will need to export a sample clock and a start trigger from one device's PFI lines, wire them to the other device, and import them on the other device in software.  You can export the AI sample clock and start trigger of one device to PFI lines of your choosing with the DAQmx Export Signals VI.  You can then set the sample clock source and digital edge trigger source of the other device to whatever PFI lines to which you have wired the sample clock and trigger pulse lines.

 

Regards,

David R
Systems Engineer
National Instruments
0 Kudos
Message 10 of 12
(3,177 Views)