LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HR2000+ Outputs Multiple Intensities Per Wavelength (LabView 2021)

Solved!
Go to solution

I'm having issues with my UV-Vis spectra output from an Ocean Optics HR2000+ through LabView 2021 (Windows 11 computer).  When my spectra are output in Excel, I get integer wavelengths with multiple copies per wavelength, e.g.

Wavelength      Intensity

199                   720

199                   760

199                   680

199                   700

200                   915

200                   902

 

I believe the wavelengths are supposed to read as doubles with nonzero decimals but I can't find where the integer form is coming from. I increased decimal points displayed in Excel and all wavelengths read ###.00000000, so it's not a question of display but a rounding/casting issue somewhere.  I have checked the sub-VIs for take spectral waveform and calculate wavelength from pixel number, both treat wavelength/pixel as doubles.  Where should I be looking to make sure the wavelength gets passed into Excel as a double with nonzero decimal?  Thanks!

0 Kudos
Message 1 of 4
(861 Views)

It is most likely rounding when you export to spreadsheet / Excel. But, you have to post your code for anyone to know for sure.

0 Kudos
Message 2 of 4
(847 Views)

My bad, here it is.  The UV-Vis spectra are also super messy, although I'm not sure if that's related (instead of a smooth curve, vertical whiskers along the entire length - looks more like a seismograph that got hooked up to a blender than a UV-Vis spectrum)

0 Kudos
Message 3 of 4
(817 Views)
Solution
Accepted by topic author JuliaGUIUC

When you convert the the DBL to a string you are using "Number to Decimal String". The name is a bit confusing, but if you look at the output it gives you a "decimal integer string". 

 

You want to use "Number to Fractional String" for non-integer values.

Message 4 of 4
(784 Views)