LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Communication

Solved!
Go to solution

Hello community!

I am trying to do serial communication with LabVIEW. I am using very simple program of read and write. I get the result as shown in following picture. What I want is to get the result given in the following format as shown in picture took from pdf. Please assist how I can change the output string to those meaningful values as given in details of following picture.

0 Kudos
Message 1 of 5
(1,238 Views)

Hello Rahman,

 

The output which you have shared looks like a hex code. I don't know the exact details that you are looking for from the picture you have shared. b-But you can search "hex to ascii" in order to learn string conversion of the codes you receive in output.

0 Kudos
Message 2 of 5
(1,202 Views)

Hi Rahman,

 

right-click the "read buffer" string indicator and select a different display mode…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 5
(1,176 Views)

Could you attach the full PDF?  Either we're not seeing enough of the message you supplied or you are showing the wrong message.  I'm also worried about this message since it seems to mix ASCII and binary/raw/hex data formats.  Again, we need a lot more information in order to really help.


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
0 Kudos
Message 4 of 5
(1,131 Views)
Solution
Accepted by topic author Rahman009

Data described in the doc start at the 5th byte of the read buffer, which is 47 hex = G (ASCII) = header byte.

Next byte (Gauge type) is 49 hex = I (ASCII) = Ion Gauge.

Next byte (Gauge number) is 31 hex = 1 (ASCII) = Ion Gauge 1

Next byte (Gauge status) is 40 hex = 0100 0000 bin, that is only bit 6 is high, as stated in the doc

Next byte (Gauge error) is 40 hex = 0100 0000 bin, that is only bit 6 is high, as stated in the doc

 

To extract a given character (e.g. Gauge type), use the String Subset function.

To extract a value (e.g. Gauge status), use String to Byte Array function then pick the desired value from the resulting U8 array.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 5 of 5
(1,124 Views)