LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ocean Optics USB4000 Spectrometer

Hello again,

 

Can anyone explain to me why the VISA Read is in a for loop?  While trying to figure out how to speed this thing up some I pretty much found the VISA loop to be the bottle neck.  I used a USB2000+ and removed the for loop and just set it to a single read of 4097 bytes.  With an integration time of 1 ms, I reduced my averge time from ~4.5ms per scan to ~2.2 ms per scan.

 

I am not familiar with the VISA drivers, so I really don't understand why this increases the speed so much or even why it was in a loop like this in the first place.

 

Does anyone have any insight on this?

0 Kudos
Message 151 of 286
(4,201 Views)

Hello James,

       Most LabVIEW Plug and Play Instrument Drivers are not developed with performance as the primary goal.  Plug and Play Instrument Drivers are meant to be easy to use, troubleshoot, and modify.  If you have performance improvements for this instrument driver, please email us at instrument.drivers@ni.com.

 

Thanks,

 

NathanT

0 Kudos
Message 152 of 286
(4,190 Views)

I am in search of a method to determine when the spectrometer has finished an integration.

 

I'd like to use hardware triggering to get precise time resolution, and I need to grab data off the spectrometer as soon as possible after each integration in order to make way for the next one. OceanOptics tells me that there will be problems if two HW triggers arrive without the data being extracted between them.

 

Do any of the IDNet driver functions provide a method of determining when a new scan is completed and the data is available?

0 Kudos
Message 153 of 286
(4,061 Views)

The read spectra function will come back as soon as it has data and it will wait at that VI untill data is completly returned by the spectrometer.

0 Kudos
Message 154 of 286
(4,055 Views)

Thanks, James. I will try that.

 

In the meantime, I've run into another problem. The first time I tried to read a hardware-triggered spectrum, my trigger wasn't working right, so it never sent a pulse to the spectrometer. Eventually, I got an "Instrument not synchronized" error. I tried unplugging it and plugging it back in, but now the computer won't recognize the device as a USB4000. It comes up in found new hardware as "USB Device" and no drivers will apply to it.

 

Anyone seen this before?

0 Kudos
Message 155 of 286
(4,026 Views)

What does it show up as in device manager?

0 Kudos
Message 156 of 286
(4,014 Views)


"USB Device" under Other Devices with a big yellow question mark.

 

I have two more of these spectrometers, and I just tried another one in the same USB port. It works fine.

 

I got a chance to try out the hardware triggering as well, now that I have my triggering electronics fixed. It worked great. I tested it up to 10 Hz. Probably could go higher, but I didn't want to risk missing a trigger and possibly putting the good one in the same condition as the one I just screwed up.

0 Kudos
Message 157 of 286
(4,007 Views)

The hardware trigger should not have caused this error.  What I mean is, this happens all the time.  When you put the device into hardware trigger mode then don't send a trigger, there is no way out of this mode.  You must send a trigger.  But stuff happens and no trigger comes is common.  People just unplug the device as you did and it does not cause this problem.  What ever happened was some fort of random event I would guess.

 

You can fix it yourself or try to send it in to OOI.

 

Anyway, sounds like firmware got corrupted.  You can go to ocean optics website.  Unplug your spectrometer.  Download the EZ USB programmer.  Install it.  This will install oceanoptics drivers on you machine also.  This program can rewrite the firmware to your device.  plug the spectrometer in and the ocean optics drivers should get associated with the device.  Open USBProgrammer and your device should be listed as unprogrammed OOI USB device.  Select it.  Click the program button  A file dialog will appear.  Go to C:\Program Files\Ocean Optics\USBProgrammer\Firmware\USB4000

look for a file that says usb4000*.iic.  The * means I don't know what the entire file name is.  Select it.  Takes about 2 min to program.  DO NOT interrupt it while its programming.

Message 158 of 286
(3,999 Views)

James,

 

Thanks a lot for the suggestion. I haven't tried it yet, but will tomorrow.

 

This does have relevance to my application. Not trying to call my users indecisive, but I anticipate it frequently being set to stand by for a trigger and none arriving...

 

Is there any way that you know of to reset the spectrometer in software? Perhaps setting the trigger mode back to normal?

 

Do you know how long the spectrometer/VI will wait for a trigger to arrive before generating some kind of timeout error? Is there some kind of timeout logic in the spectrometer, or is the VISA read the only routine that will time out?

 

Max

0 Kudos
Message 159 of 286
(3,986 Views)

Hi,

 

I'm working on a Windows 7 64 bits platform and it works really properly!

But, I have few questions:

 

1) I don't understand why there is a difference (3.5nm shift) between the returned spectrum under labview and the real spectrum of my source (a laser, so I'm sure of the real wavelength!)

2) Does anyone know how to correct electric dark noise?

 

 

Thanks

0 Kudos
Message 160 of 286
(3,974 Views)