LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial port indicator

Solved!
Go to solution

I have the output of the serial port wired to an indicator and it's configured to display in hexidecimal format. (The output string is converted to an array of uint8 first.) I want to the indicator to maintain the value of the last number it received from the serial port. Currently the indicator resets to zero when nothing is being received over the serial port. How can I change this behavior so that the value is only updated when new data is received from the serial port. Thanks for any help.

0 Kudos
Message 1 of 2
(2,476 Views)
Solution
Accepted by electjh

Place a Case Statement that triggers a refresh of the indication only when Bytes at Port is Greater Than 0 (zero).

 

And, of course, place the indicator inside the TRUE case of the Case Statement.

 

What you can do is wire the output (numeric) of the Bytes at Port directly to the Case Statement.  Make the '1' case default.  You can also use that same case to read the port, thus display the last set of data.  Of course, you can have two wires, one that keeps all of the data that was read (shift register), and the other wire parses the portion that you want to keep in the display, and you wire that output to your indicator.

0 Kudos
Message 2 of 2
(2,473 Views)