02-06-2013 11:53 AM
Hi Everyone,
Why this VI is not working correctly? It works very erratic. Sometimes works one time and the second and third time does not work properly (too slow) and it gives me an error:
Error -200279 occurred at DAQmx Read (Analog Wfm 1Chan Nsamp).vi:1
Possible reason(s):
Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.
Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.
Property: RelativeTo
Corresponding Value: Current Read Position
Property: Offset
Corresponding Value: 0
Task Name: _unnamedTask<1>
In order to work I have to close VI and open it again. Sometimes works 3 times in a row and the 4th time fails (too slow and Error -200279).
Is there a timing issue when VI is stopped in the middle of taking some data?
I am using DAQ USB-6008 and LV8.5.1
Thanks very much,
frnz
02-06-2013 12:12 PM - edited 02-06-2013 12:17 PM
This will help. Now, how have you configured that express vi? Probably not the most effecient way to log data (and very lossy as well).
TDMS format will stream to disc very effeciently. Express vis are notorious for undesirable timing. try adding this
before the DAQmx start and get rid of the Express.vi
That should allow your loop to keep up with the acquisition rate.
Another bottleneck is that comparision followed by convert to DD. Just rightclick the comparision and select Comparision Mode>Compare aggragets. and you get a scalar boolean
02-06-2013 01:19 PM
Thanks Jeff for your sugestion, but after making the changes still have the same error more often than before. Please advice.
Thanks again,
frnz
02-06-2013 01:38 PM
Ok, So, we aren't beat yet!
One thing to check and two options on the table.
Check the USB in device manager
Lets make sure the hub is at high speed and no one else is consuming a lot of bandwidth (and the 6008 isn't consuming 100%)
Once we know that we can decide if we should increase the buffer size (Bandwidth is available) or decrease the sample rate.
02-06-2013 01:48 PM
Are you running Windows xp? If so, there is suppose to be USB patch that helps with high speed usb communication.
02-06-2013 02:56 PM
Hi Jeff,
I installed the fix that Joseph indicated below: Microsoft Knowledge Base 969238.
And here are pictures of device manager USB:
02-06-2013 06:38 PM
Hi Jeff and Joseph,
I am still having a problem with this code. Is there another way to take measurements as my previuos code? Is there a better way to do it?
Is it my system that is causing these problems? I am using XP/SP3 and I have installed the fix that Joseph indicated above: Microsoft Knowledge Base 969238. Also, I am not able to get the same device manager info as you have posted above.
I just want to read a couple of channels using the USB-6008 and be able to save the test data using low level VIs (not express VIs).
Thanks again for your help.
frnz
02-07-2013 09:00 AM
I have the following suggestion:
1. Reduce the sample rate to 10 samples /sec.
See if error persists
2. Try 100 samples / sec and see cpu load
Do some kind of variation from above and see if this continues.
02-07-2013 09:23 AM
Its pretty difficult to see if that's a USB 1.0, 2.0 or 3.0 (not likely 3.0 on XP). but you are definatly transfering data slower than the USB is transfering it.
In addition to Joeseph's suggestions read the buffer size then doulbe it! (the buffer node is burried pretty deep)
and you could change the log mode to off. I'm actually not sure if that would reduce the USB load though.....
02-07-2013 03:35 PM
Thanks Jeff and Joseph,
This is what I have tried:
I re-installed windows XP in my desktop PC, installed USB patch as recommended by NI. Re-installed LV 8.5.1 and DAQmx 9.3, and problem still persist. I downloaded latest version of LV 2012 on my old laptop (XP), installed USB patch and the first code shown above with the express VIs works just fine every time!
As per these test results, I wonder if DAQmx 9.3 or LV 8.5.1 have some issues with USB-6008 or handling USB communication with this device? Or maybe the combination of LV 8.5.1 and DAQmx 9.3 causes some issues with USB-6008???
Does anyone know about this kind of issues?
Is there a different DAQmx version that works with LV 8.5.1 and supports USB-6008?
Any thoughts anyone? I would like to continue using LV 8.5.1 as I cannot upgrade to latest LV 2012 at the moment.
Thanks,
frnz