LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

question about string constant in Hex display format

how to get a plus of 2 string constant which is display in Hex display like attahced, for example I have string "28" and "5D" in Labview which has been in Hex format, the plus of this 2 string should be "85" in Hex. pls help on this, thanks
0 Kudos
Message 1 of 9
(3,650 Views)

Hi Neil Lan,

you can use the TypeCast function.

 

Mike

0 Kudos
Message 2 of 9
(3,642 Views)

Hi Mike

 

I saw the result is "8500 0000" instead of the result "85", do you have any comment.?thanks

0 Kudos
Message 3 of 9
(3,632 Views)
You probably have a 32bit number wired to the type cast type input. Use a U8 constant (will only work if the sum is <= 255).
0 Kudos
Message 4 of 9
(3,618 Views)

This'll work, too.  I'm afraid of casting types... Smiley Surprised

 

 

 

Jm

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Download All
0 Kudos
Message 5 of 9
(3,607 Views)

jcarmody wrote:

This'll work, too.  I'm afraid of casting types... Smiley Surprised


You shouldn't be. After all, it uses less code, and requires less hoops to jump through. 

0 Kudos
Message 6 of 9
(3,603 Views)
thanks, I get it
0 Kudos
Message 7 of 9
(3,595 Views)

Hi Jm,

it will not work, because the string in my example is as required in hex display. Smiley Wink

 

Mike

0 Kudos
Message 8 of 9
(3,581 Views)
I think the confusion may lie in the fact that the OP said "Hex display" as well as "Hex format". Those who have used LabVIEW for a long time know these are 2 different things. However, those who have not used LabVIEW for a long time may take these to mean the same thing, and may interpret it one way, as opposed to the other. That is not incorrect, it's simply not making a distinction that they may not be aware of.
Message 9 of 9
(3,570 Views)