Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

usb4000 read spectra convert to waveform

Hi,

 

I am working with a usb4000 ocean optics device and I wanted to acquire a set of 10 spectra and determine the average before outputting it to a graph display. So far I have been using the 'read spectra' for the usb4000, averaging all the scans in a loop and simply attempting to output it to a waveform chart. But if I do this my resulting spectrum on the graph does not look accurate.

 

I've attached my file here.

 

Any help would be much appreciated and please let me know if I need to clarify anything!

 

AK

 

0 Kudos
Message 1 of 6
(6,402 Views)

Take a look at these example, and how they take average.

 

https://decibel.ni.com/content/docs/DOC-12597

 

https://decibel.ni.com/content/docs/DOC-16840

 

 

National Instruments
Applications Engineer
0 Kudos
Message 2 of 6
(6,388 Views)

Hi,

 

I don't think the problem has to do with the averaging of the values. I'm more confused about outputting data to a graph. For example there is a "Read spectral waveform" vi which when connected to a "spectral waveform graph" vi outputs the result just fine and I see the spectra on the graph.

 

However in my case, I would like to use the "Read spectra" vi to simply read in a number of spectra data points, and average them across multiple readings THEN display it on a "spectral waveform graph". However I am not sure of how saved data points are typically transmitted to be displayed on a graph wheras the previous vi "read spectral waveform" appears to already do the appropriate conversions for it to display on the graph?

 

I hope this makes my query more clear.

 

Thanks!

0 Kudos
Message 3 of 6
(6,380 Views)

Hi,

 

Never mind I have figured out my mistake!

 

Thanks anyway for your help.

0 Kudos
Message 4 of 6
(6,377 Views)

Nice to hear, good luck.

National Instruments
Applications Engineer
Message 5 of 6
(6,364 Views)

The Wrapper library contains most of the basic spectrometer control functions. You should only use the functions/VIs belonging to the Wrapper library object. These functions comprise the Wrapper API. The only time you may use functions/VIs outside of the Wrapper is if one of the wrapper VIs itself returns an object of a different type.

0 Kudos
Message 6 of 6
(5,474 Views)