LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Greater or equal compare - cannot use variable type in case structure

Good afternoon,
I got a small issue during my first steps in labview (V7.x) - I would like to do a greater or equal commparison
between two double variables I did also find the corresponding vi-module, but I cannot use its output value -
there seems to be a problem with the variable type.
The reason, I want to connect this output to a case structure (with True or False selector) -
Why is it not possible to feed an output of the mentioned function to a case structure ?
Are there any alternative solutions ?
Thank you
0 Kudos
Message 1 of 6
(3,060 Views)
Are you sure that you are comparing two scalars and not two different arrays or a cluster? The output when comparing two numbers is a Boolean that you can connect to a case statement. Post your VI or a picture of it so someone can troubleshoot what's gone wrong.
0 Kudos
Message 2 of 6
(3,053 Views)
You should be able to do what you described. Exactly what happens when you try? If you get broken wires, you may have accidentally misconnected something. With context help turned on place the wiring tool over a wire and the help window will tell you what type of signal the wire carries and describe errors, if any. Are you by chance using arrays?

Tell us more details about your attempts and post your vi. Someone will be able to help.

Lynn
0 Kudos
Message 3 of 6
(3,051 Views)
All connections are Ok so far - but you guyes are right - there seems to be a mismatch with the data types:
On the wire, the context help is showing me the error message: The type of source is 1D array of boolean (True/False)
and the type of the sink is boolean (True/False) --
anyway I don't know why the type of the source is 1D array, because I just connected two simple double numbers to
the vi....see the attached image.
 
Thanks 
0 Kudos
Message 4 of 6
(3,049 Views)
Look at the orange line coming from below.  Notice how it is a thin line below the loop border, then it goes through a box with brackets in it, then it becomes a thick line.  The box with brackets is called "indexing".  What this does is to take each value from each loop iteration, and make an array out of all values.  The thick line represents the array.  If you want to compare only the last value produced by the loop, right click on the box and select disable indexing.  The box will turn into a solid color orange, and your broken wire will be fixed.
- tbob

Inventor of the WORM Global
Message 5 of 6
(3,042 Views)
Thank's that's a real hint !
0 Kudos
Message 6 of 6
(3,015 Views)