LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ocean Optics USB4000 Spectrometer

Hey all,

 

I have a few questions regarding the Labview/Omnidriver for the USB4000.  So far, I've been working with only one spectrometer, but will be making the jump to two USB4000s soon.  My concern is: Is it possible to simultaneously set different acquisition parameters (ie. integration time, scans to avg and etc) and acquire a spectrum for each spectrometer (so simultaneous acquire two spectra, one from each spectrometer).  How would I go about doing this using the VIs provided with the omnidriver library?

 

Thanks,

 

Kevin

0 Kudos
Message 91 of 277
(4,041 Views)

Hi,

 

Omnidriver can support multiple spectrometers doing simultaneous acquisition.  When opened, the spectrometers are assigned an ID number that you pass to subvis to operate on any particular spectrometer.  The only snag here is that you must open and close ALL spectrometers at the same time.  If you are running multiple spectrometers from different programs simultaneously, you can accidently close a spectrometer before you are done with it.  There are methods to deal with this (check in/check out approach). 

 

But since you are going to have to make changes to your code to support multiple spectrometers anyway, you may want to take this opportunity to switch to the new LabVIEW drivers developed by Ocean Optics and National Instruments.  These new NI-VISA based drivers have all the functionality of Omnidriver, don't require the Java Run-time Engine, and handle multiple spectrometers FAR more gracefully.  Having worked with both the original LV drivers and Omnidriver, I can say the NI-VISA drivers are MUCH easier to work with.  The new drivers can be found at:

 

http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=7833BD4A31DA1274E04400144FB7D2...

 

JasonP - CLD

 

 

Message 92 of 277
(4,031 Views)

Hi

I agree that the new NI driver may have benefits to warrant switching fro OmniDriver. When I tried it on XP it worked as expected. Problem I have is that at workI have to work with LV7.1 on Windows 2000 and I cant get the Visa to work with USB. Anyone know if it is possible to use this driver on that configuration?

Mario

 

0 Kudos
Message 93 of 277
(4,012 Views)

Hello,I've been following this awesome thread for some time. Thanks for all of the info that you have all provided, especially Jason P for the driver info!

 

I've been trying to write some code to run a USB4000 and I've run into some problems. I've tried to recreate some of the driver .vis from those released on the IDN so that I could use them in LabView 7.1. I've attached a zipped folder with said recreations, plus an example vi (called Single Spectrum Test.vi) that should start a visa session, get a full intensity vs wavelength waveform, and then close the visa session. However, I am thus far unable to get the spectrum. My problem seems to be isolated in the 'Read Spectra' sub-vi. If I use a smaller byte count (say, 40 instead of 64 for the 'full speed' packets), I can get a partial spectrum, but not ever with the full 64 (or 512, in the case of hi-speed USB). Also, the vi never seems to close down the spectrometer fully - the vi crashes if I try to run it a second time. The only solution I've found is to unplug and replug in the USB cable into the USB4000. If anybody could pinpoint just where my code fails and perhaps make a suggestion as to how to fix it, I would greatly appreciate it! Ultimately I would like to drop this code into a larger program that would take continuous spectra at some user-adjustable rate.

 

Thanks,

~Dave

0 Kudos
Message 94 of 277
(3,868 Views)

Hi, thank you all for the ideas. I am trying to build some more advanced program with simillar functions as in SpectraSuite but I would like to include wavelength and intensity calibration, Planck Distribution fit and other functions. For the begining I prepared this program able to see spectrum, average it, smooth it and using calibration function to see calibrated spectra. The problem is, that if integration times are very small, the loop with averaging function is longer and therfore there are som blind spaces in spectrum. I am not sure if there is a way to solve this problem. I would appreciate any suggestions about my code.

 

Thanks a lot again, Ivan

 

 

0 Kudos
Message 95 of 277
(3,757 Views)

http://www.oceanoptics.com/technical/engineering/USB4000%20OEM%20Data%20Sheet.pdf

 

Pages 15 and 19 relate to the reading of spectra.

 

The mode of operation depends on whether you have USB2 or USB 1.1 Port on the PC.

 

I have no device so I can't comment on reading from two pipes simultaneously but it seems less than trivial.

 

Shane.

0 Kudos
Message 96 of 277
(3,749 Views)

Hi all,

 

Is there a way to operate the Spectrometer without using Omnidriver? 

0 Kudos
Message 97 of 277
(3,715 Views)

Hi, I found out that there is a 5nm difference between data loaded by SpectraSuite and by Ni drivers - see HG1 Mercury Argon calibration source spectrum comparison in attachment. Calibration coefficients are loaded from spectrometer so I don't understand why there is this difference.

 

Cheers, Ivan

0 Kudos
Message 98 of 277
(3,701 Views)

It depends on whether you count each and every pixel and also whether you number the first pixel 1 or 0.

 

IIRC, OceanOptice discards a few pixels at the edge of the spectrum so you need to take that into account when calculating the wavelength of any given pixel.  Pixel numbering is most often NOT simply 0,1,2,3,4....

 

Shane.

 

PS according to the data sheet I linked to earlier

Pixels 0..4 are "not usable"

Pixels 5..17 are "optical black pixels"

Pixels 18..20 are "Transmission pixels"

Pixels 21..3668 are your actual DATA pixels

 

Message Edited by Intaris on 02-26-2010 07:30 AM
Message 99 of 277
(3,697 Views)

Hello again,

 

Well, I am unable to detect where my code fails. The VISA read call in my 'read spectra.vi' (attached in my previous post) keeps timing out. Unfortunately, I am stuck on LabVIEW 7.1. Would it be possible for one of the applications engineers to recompile the USB4000 drivers available on IDnet so that they run from LV 7.1?

 

Cheers,

~Dave

0 Kudos
Message 100 of 277
(3,639 Views)