LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to show the Str() value in Hex

Solved!
Go to solution

HI,

 

I'm using the following command in a vi and would like to see an Hex presentation.

                 "My number is  "  + str(number1 + number2)

The parameters number1 and number2 are in Hex but the result of str is the value in decimal. 

 

Is there a way to force it to show in Hex?

 

I have tried  str((number1 + number2), "%$.13f")   but it didn't work.  I still get a value in decimal.

(I don't' really understand the meaning of this formatting.  I saw it somewhere and thought it might do the job)

 

Can anybody give an explanation to this formatting?

 

Thanks

Rafi

0 Kudos
Message 1 of 2
(2,686 Views)
Solution
Accepted by topic author Rafi2003

The format you want is %x. The format specifiers are specified in the LabVIEW Help.

 

Format Specifier Syntax

Format Specifiers Syntax Elements

Message 2 of 2
(2,684 Views)