07-28-2023 11:34 AM - edited 07-28-2023 11:36 AM
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!
Solved! Go to Solution.
07-28-2023 11:59 AM - edited 07-28-2023 12:00 PM
It is most likely rounding when you export to spreadsheet / Excel. But, you have to post your code for anyone to know for sure.
07-28-2023 08:29 PM
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)
07-31-2023 11:32 AM
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.