LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

help with while loop!!

hii Everyone attached is my code. I'm havign with a small postion of this code in the inner while loop which does Fract/Exp String to Number conversion.
Since I'm running my code in a continuos while loop, everytime I do Visa read the corresponding value of output is shown(string). But when my loop is running idle i.e. no Visa read occures from the serial port(i.e. there is no data to read) the output indicator gives zero as output, which is logical also. But what I want is, I want the last Visa read value  to be displayed continuously whenver Visa read becomes idle.  i.e if Visa read last value was 8776 than it should keep on showing 8776 as the current position instead of zero, until next visa read occures and data is updated.
I hope I'm clear enough,
Looking for replies,
Regards
0 Kudos
Message 1 of 3
(2,838 Views)
Just place the indicator in a case structure so it only gets updated if the VISA read returns values.
0 Kudos
Message 2 of 3
(2,828 Views)
Yeah, That works perfect! Thanks a lot for your ideas! Good Night
0 Kudos
Message 3 of 3
(2,823 Views)