LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read Spectra.vi for Ocean Optics USB2000+ takes too long! (~80ms)

Hi there!

 

I'm using the ni driver package for ocean optics spectrometers with the USB2000+.

I want to take spectra as fast as every 20 ms, but it takes four times as long only to read out one single spectrum, as can be seen in the picture of the attached example vi.

 

 

Hopefully someone has any idea to acceleratate this task 🙂

 

PS: In a manual for triggering the spectrometer i've read you can trigger it as fast as every ~ 3ms - what's the use of that, if the data readout is that slow?

0 Kudos
Message 1 of 9
(3,211 Views)

Hey, You are reading the "User Data" with the Property Node "USB Raw". There you should get two Numbers: hi(x): 0 or 128  and lo(x): 4118. lo(x) is the referencenumber of the usb2000+ and hi(x) is the speed I think 0 is the faster possibility. Is it possible to choose it on your device, a switch maybe? Otherwise you can try to change it inside the read-vi. 

Did you try to ask Ocean-Optics, maybye they have an idea.

 

Gregor

0 Kudos
Message 2 of 9
(3,174 Views)

I can't see in your code where you are setting your integration time.  What is the default integration time?  Is it 80ms?

0 Kudos
Message 3 of 9
(3,167 Views)

If the integration time isn't set manually it's 6000 µs by default.

I've tested with shorter integration times too, but that has no influence.

 

We've also learned, that the execution-time of the vi varies from day to day. Execution times of 40 ms and 60 ms have been observed as well.

Can temperature differences of the spectrometer cause such variations?

0 Kudos
Message 4 of 9
(3,153 Views)

Can you tell if the device is being run as high speed of full speed?

0 Kudos
Message 5 of 9
(3,134 Views)

I guess it's High Speed.

 

But anyways, the transfer of 2048 doubles (= Intensity values of the pixels) with full speed takes only

(2048 * 64) / 15 000 000 = 0,00873813333 sec

So that should be responsible for only 10 % of the time.

0 Kudos
Message 6 of 9
(3,118 Views)

You are quite right.

 

(2048 pixels per spectrum X 16 bits per pixel) / 12,000,000 bits per second = 2.73 milliseconds per spectrum.

 

Even if we throw LOTS of overhead in, this is not going to do it.  I am thinking it must be something in your system.  I gets speeds more like 4 ms per spectrum when I do a speed test with a USB2000+ 

 

James

0 Kudos
Message 7 of 9
(3,113 Views)

Perhaps it's firmware related?

I have still the old(est?) firmware 1.00.

Which firmware do you use?

0 Kudos
Message 8 of 9
(3,101 Views)

Wow, this is some pretty old firmware.  I did most of my testing with 3+ but I have been told that the older firmware is supposed to be faster than the newer firmware so I'm not really sure about that.

0 Kudos
Message 9 of 9
(3,091 Views)