06-28-2011 12:25 PM
Hello All,
I am trying to run a program to monitor 128 devices with Labview. The voltage of the devices is acquired with a PXI-6030E. I use eight 16:1 Multiplexers with their outputs connected to an 8:1 MUX. The 16:1 MUXs are controlled with a PXI6527 Digital I/O card. The subVI in my attached program labeled "Address Lines" is the control for the 16:1 muxs. the 8:1 mux address lines are connected to an arduino uno. the enables for the 16:1s are also connected to the arduino to select which mux is on and which is off. I receive an ERROR 200279 while running my program. This is for a long term experiment. So the DAQ system I have set up must be robust. Is there something I am missing? I want to read only 1 sample of data from each device every hour. This is why I have configured my DAQ Assistant labeled Device Voltage to read 1 sample.
thank you for your help,
S.L.
06-28-2011 12:25 PM
My VI is also attached
06-28-2011 12:47 PM - edited 06-28-2011 12:49 PM
You have the DAQ assistant for reading the data setup to be continuous samples.
Just set it for N samples since you are only intending to read 1 sample.
Even if you weren't getting the buffer overflow error, the problem now is the next time you read 1 sample, you are actually reading data already collected before you would have changed your multiplexor since your DAQ assistant is set up for 1000 samples/second continuously, but only changing the multiplexor once per second.
06-28-2011 12:56 PM - edited 06-28-2011 12:57 PM
Simple enough!
change your acquisition to 1 Sample On demand. The way you have it (Continious) the device is taking readings 1000 times per second and filling the device onboard buffer in a FIFO. When you read 1 sample from the onboard buffer it is the oldest sample available(probably NOT what you wanted). When the FIFO buffer is full it starts overwriting oldest data with newer data. Eventually you request a reading that was overwritten by fresh data since the buffer fills faster than you read it and LabVIEW tells you about that condition (Awful nice to know isn't it?)
By selecting 1 sample on demand you will never fill the buffer and you'll always have the latest data.
Edit: yup Bill's exactly right!
06-28-2011 01:28 PM
Yes. Jeff's 1 sample on deman makes more sense than N samples and N=1.
But one thing you could do is set it to N, and read 1000 samples. That will give you 1 second's worth of data (the same as what you want the time delay to be, so you can eliminate the delay function) and then average the 1000 samples together to reduce any noise that may be in the data you are sampling.
06-28-2011 01:34 PM
Hello,
I do not have the One Sample on Demand option. I am running Labview version 7.0. I set the Task Timing to Acquire 1 Sample, but when I do this, I receive the 200474 error. Taking 1000 samples and averaging them isnt possible since I need just 1 data point for that exact time it was taken. Thank you for the help!
06-28-2011 01:46 PM
Hello,
I looked up the 200474 error, but NI says to just clear. that won't necessarily solve the problem.
Thank you,
S.L.
06-28-2011 01:54 PM - edited 06-28-2011 01:59 PM
OK,
I do not have the One Sample on Demand option...I set the Task Timing to Acquire 1 Sample, but when I do this, I receive the 200474 error
Time to get off the silly Express vi's then and use the DAQmx Palattes. With that old of a DAQmx version you need to expressly start and stop the N sample Tasks (Yup my favorite "Autostart property Bug that wasn't fixed til DAQmx 9.1).
You can use this example to show you how to use the DAQmx vi's
Prior to the loop we create a Task (You can create one in MAX and just use a Task constant to refer to your AI task) set the timing and sample size and commit the task (trust me- it changes what needs to happen behind the scenes inside the loop)
Inside the loop we start the task- read the channel data from the DAQ and stop the task to put the task correctly back in the idle state ready to start again (that's the autostart bug- you need to stop the task expressly)
When all is done we close the task to unreserve its resources and clean up the memory.
Good luck
EDIT: Showing Labels of DAQmx functions
06-28-2011 02:14 PM
Makes sense. Let me modify my program and I will let you know how it goes.
Thanks a lot
Shem
07-05-2011 08:01 PM
I solved my problem. On the DAQ assistant, the stop node must be set to true. It further explains the reasons in the link below! Thanks for the help!
http://digital.ni.com/public.nsf/allkb/485201B647950BF886257537006CEB89