LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do i true/false a text input?

Hi - I was just wondering how to check if a hex command matches what I am expecting by using case structure? I see that the input is a boolean but I want to check if the output from a VISA Write function returns the hex code: AA 55 and if true then  execute something in the case structure...Thanks!
0 Kudos
Message 1 of 3
(2,668 Views)
The case structure accepts a variety of inputs, plus you can declare a default case for everything that doesn't match. The case structure selector label for strings can only display the key in regular ascii, so the thing to do is create a string constant and set it up for hex display. Enter your hex number (two bytes) and then set up the display for normal ascii. then copy the ascii to the clip board and paste it into the case selector. Oh, wire a string to the case input before you do that.
0 Kudos
Message 2 of 3
(2,657 Views)


@NewMachine wrote:
...  I want to check if the output from a VISA Write function returns the hex code: AA 55 and if true ...

Alternative method: The "Equal?" function can be used to compare strings.
=====================================================
Fading out. " ... J. Arthur Rank on gong."
0 Kudos
Message 3 of 3
(2,640 Views)