Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 69620

Extracting Information From a Hexadecimal String and Converting it into Decimal

$
0
0

Hi Everyone!

I progressed now able to communicate with my inverter, I would like to represent the data that is received from the inverter in decimals. The strings that will be received would be in this format(more or less), for example "0203 0400 1800 0049 34". I want to omit the first 6 digits and last 4 digits which I had done it by using the string subset function twice(omitting the beginning, inverting and omitting and inverting again) which leaves the "00 18 00 00" part so here I want to represent the things that are not 00 in decimals. 18 in hex supposed to be 24 need to make a VI somehow.

 

First 6 and last 4 digits needs to be omitted can be done by only one "string subset" function if the mid part is a certain length which can be done because the length of the data part is in the hex message where( 02 is the address in hex, 03 is the function in hex and 04 is the amount of bytes which means 00 18 00 00 would be the data part and the last 4 digits/2 bytes is crc16 error check. So I can extract 04 in hex but can not convert it to an integer. below I'm attaching my VI which I tried couple of different things which no one had worked.

Thanks for help in advance


Viewing all articles
Browse latest Browse all 69620

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>