LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Retain data in String Display untill new data is delivered in RS-232

I am using Labview 8.6 on Windows XP OS and acquiring signal from RS-232 through COM1 port to which I have connected non NI instrument. My instrument sends data for flash of second and it displayed into String Indicator for flash of second. How to hold this data untill I get new data from instrument. I have tried to select "re-initialise to default value" and "make current value default" but none of them getting selected. I want data to be retained untill new data comes. I have enclosed VI as well as Picture file. Pl advice. 

Download All
0 Kudos
Message 1 of 3
(2,318 Views)

Your VI appears to be based on the basic serial example and this is not a very good example, quite frankly. You have the termination character enabled and you are also using the VISA Bytes at Serial Port. You should never use VISA Bytes at Serial Port when your device is sending a termination character. You simply use an arbitrary high number for the byte count. The VISA Read will automatically terminate when the term character is detected. If your device is always sending, this should be all that you need. For a device that requires a command before transmitting data, your VI is backwards in that you are doing a read before a write.

0 Kudos
Message 2 of 3
(2,311 Views)
-Looks you are sending or running the while loop every 5ms, are you sure you want this fast? This is the reason the data comes in flash(i think 5ms)
-I use shift register to store something from previous iterations generally.
-You need to keep case structure to check when new data comes and when it does, replace the value in that string.
-else pass previous value to string.
Thanks
uday
0 Kudos
Message 3 of 3
(2,300 Views)