LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save an instantaneous reading

Hi all, 

 

I am using a wavemeter to read the wavelength of our laser. The front panel and block diagram are given below. When it receives a signal, i.e., a string from the meter, it gives a reading like 390.00 nm. Otherwise, it shows 0 for the reading. Since the laser signal is weak, it can't constantly receive the signal and give reading. So what I see is alternative reading (like 390.00 nm) or no signal (0). I wonder how to save this instantaneous reading. I have tried to add an array but failed. I also couldn't find similar questions online. The vi is attached for your reference. Thank you.

beyonddd_0-1594676716826.png

beyonddd_1-1594676730700.png

 

 

0 Kudos
Message 1 of 2
(1,259 Views)

But indicators on the pink string wires between Search Split String and String Subset, and between String Subset and Fract/Exp String to Number, then run it.

 

Your code is looking for the the comma and everything after it, then the string after you've eliminated those first two characters.

 

Guess what you have?  "o signal"    That gets converted to zero since they aren't number.

 

You need to use some other string parsing functions.  Perhaps a Regex or Match Pattern to get it.  Or even a simple "Scan from String" with a Format Code of "VAL$ %f".

 

 

0 Kudos
Message 2 of 2
(1,218 Views)