LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6008 Acting Erratic

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,
frnzusb6008_FP.GIFusb6008_VI.GIF

0 Kudos
Message 1 of 12
(3,384 Views)

Capture.PNG

 

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 1!.PNG

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

 

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 12
(3,374 Views)

Thanks Jeff for your sugestion, but after making the changes still have the same error more often than before.  Please advice.

 

Thanks again,

frnz

 

usb_6008_VI.GIF

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

Ok, So, we aren't beat yet!

One thing to check and two options on the table.

 

Check the USB in device manager

Capture.PNG

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.


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 12
(3,345 Views)

Are you running Windows xp? If so, there is suppose to be USB patch that helps with high speed usb communication.

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

Hi Jeff,

 

I installed the fix that Joseph indicated below: Microsoft Knowledge Base 969238.  

 

And here are pictures of device manager USB:

DeviceManager.GIFDeviceManager2.GIF

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

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

 

 

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

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.

0 Kudos
Message 8 of 12
(3,271 Views)

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)

1!.PNG

and you could change the log mode to off.  I'm actually not sure if that would reduce the USB load though.....


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 12
(3,267 Views)

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

0 Kudos
Message 10 of 12
(3,243 Views)