LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

converting serial data for indicator

Solved!
Go to solution

I have a simple VI that I am using to read streams of data from a serial device.

 

The data is in a three byte code where the first byte is an "O" and the 2nd byte is

data and the third byte is a don't care end character.

 

What I hope to do is grab the value of the 2nd byte and use this value to set a ring indicator.

 

The two problems that I am having is the data sometimes looks like garbage and I am not able

to convert this to a number that the Double ring indicator (knob) accepts...

 

Here is what I am seeing:

lb.JPG

0 Kudos
Message 1 of 3
(2,319 Views)
Solution
Accepted by topic author Japper

Change the knob to be a U8.  That would make more sense since you are only using a single byte.  Take your string and use the String to Byte Array.  You will now have an array of U8.  Use Array Index to get the second byte and wire it to your knob.

 

I would also change the display style of the string indicator to be Hex values.  The data will make more sense then.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 3
(2,312 Views)

That did the trick.

 

Thank you very much!

0 Kudos
Message 3 of 3
(2,287 Views)