LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case structure Hex not working

Solved!
Go to solution

Hi all,

 

I have a problem with a case structure using hex display.

If I use a case structure (true/false) in combination with an 'equal?' function, the boolean will light up (top example in my labVIEW file).

However, if I connect the same byte directly to a hex case structure it is not detected, and my boolean2 will not light up.

 

I think that it is something really simple, but I cannot find out what is going wrong.

 

Hopefully someone can help me!

0 Kudos
Message 1 of 4
(1,803 Views)
Solution
Accepted by topic author Bryan_1995

You are typecasting to an I32,  so that winds up being x0500 0000 or decimal 83886080.    Much larger than 5.

 

You need to typecast to U8

 

You can get rid of the upper case structure and just wire the comparison directly to the boolean indicator!

Message 2 of 4
(1,790 Views)

@RavensFan wrote:

You are typecasting to an I32,  so that winds up being x0500 0000 or decimal 83886080.    Much larger than 5.

 

You need to typecast to U8


Thank you! This is the solution for the problem.

 

You can get rid of the upper case structure and just wire the comparison directly to the boolean indicator!


Thanks for the suggestion, I know that this is better. I forgot to delete it when I was trying to simplify the script for making my question more clear.

0 Kudos
Message 3 of 4
(1,780 Views)

@Bryan_1995 wrote:

@RavensFan wrote:

You can get rid of the upper case structure and just wire the comparison directly to the boolean indicator!


Thanks for the suggestion, I know that this is better. I forgot to delete it when I was trying to simplify the script for making my question more clear.


That's understandable.  It definitely helps when you are able to clean up the diagram of items that don't directly affect the problem you are demonstrating.

0 Kudos
Message 4 of 4
(1,775 Views)