LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

single precision to hex string

Hello, 

 

I was wondering how to typecast a SGL Or DBL into a hex string? I tried number to hex, and format into string, etc but can't seem to figure it out. 

 

The stirring doesnt need a sgl/dbl and is fine but the heating needs to work at a decimal point. since the device must multiply the heating by 10 (inputting 80 degrees gives out 800 to the device and it sets it to 80 degrees) turning it into a hex string shouldn't be a problem but i can't seem to figure this out. 

 

Any help would be appreciated. 


Thanks

0 Kudos
Message 1 of 6
(3,325 Views)

Why not just typecast the the single precision number to a string (after multiplying by 10) just like you typecast the U16 to a string in the bottom portion?

0 Kudos
Message 2 of 6
(3,318 Views)

as in replace the U16 with a SGL in between the numeric array and the type cast (in between the concatenating strings) ? i tried that but it doesn't work.

0 Kudos
Message 3 of 6
(3,306 Views)

nevermind i put a U16 between 2 typecasts and converted the numbers. thanks for your help anyway!

0 Kudos
Message 4 of 6
(3,296 Views)

I meant like this which most closely represents what you did for the U16 conversion at the bottom half of your code.

 

 

0 Kudos
Message 5 of 6
(3,292 Views)

i originally tried that but the device wouldn't read this command so instead i put a U16 convertor in between 2 typecasts after the multiplication sign. thus proceeding with the original commands. 

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