From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Integer to hex converstion with hex display for device communication

Solved!
Go to solution

Hello everyone,

 

i am trying to communicate with a device that only recognizes the commands if i use a constant in hex display "format(?)". Now i want to feed it an integer from my program but the integer to hex function doesn't seem to give out its results in the hex display format as when i display its output in a hex display i get some wired result where 4000000=3030 3044 3039. Could someone please explain to me what the whole hex display thing is all about and how to cope with it? As you can probably tell by my question i am rather new to Labview.

 

Regards,

Phillip

0 Kudos
Message 1 of 3
(1,824 Views)
Solution
Accepted by topic author PTimmer

Hi Phillip,

 

I guess your device expects the value 4000000 (=4e6) as a I32 value in the datastream…

 

Just typecast to string (or use FlattenToString to get more options)!

Best regards,
GerdW


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

Thanks mate flatten to string seems to be the solution 

0 Kudos
Message 3 of 3
(1,798 Views)