LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ASCII to HEX

Hi fei,

I included some examples in your vi to illustrate my comments...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 11 of 14
(970 Views)
Great,Thank you very much!
0 Kudos
Message 12 of 14
(962 Views)
I use MCU to send some data to PC.For example,I want send a decimal number ''100'',I send it with HEX format "63".And I want the number I received is 100(DEC) or 63(HEX).
I think the string received in PC actually is "d"(the ASCII of d is 100),and the value displayed in the chart is 13 .
I know there are somewhere wrong,but I don't know where ,and how to convert it to the number 100.
0 Kudos
Message 13 of 14
(959 Views)
Hi fei,

100d = 64h Smiley Wink (char 'd' is correct)

Do you send the value 100 by just one byte containing this value (64h)? Then you have to convert your string to array of u8. If the number format is different to u8 you have to implement the proper conversion (as shown: typecast, math routine, and much more).



Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 14
(954 Views)