LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why can't I wire an OR statement output to the conditional?

In my program I have a greater than and a less than comparison. If either are false, I want to stop the program. I wired the outputs of the greater than and less than statements to an OR statement. I then wired the output of the OR statement to the conditional of a While Loop that I changed to 'continue if true.' A broken wire appears and it said the problem was that the source is a 1-D array of boolean and the type of sink is Boolean and I don't think this is correct, shouldn't I be able to wire them? Can anyone help me out?

Thanks in advance.
0 Kudos
Message 1 of 4
(2,707 Views)
Look back along your chain of boolean functions to see where the array might be coming from. Is the comparison in a loop so it's being auto-indexed to create an array? Have the context help open (Ctrl-H) and make sure you're using the logic functions you think you are. With the wiring tool selected, context help will show you the type of data on each wire you point to. Work your way back along the wires to see where one becomes an array.
If you can't see the problem, can you post your VI?
0 Kudos
Message 2 of 4
(2,707 Views)
Right click on the greater than/less than comparison nodes. Make sure
"Compare Aggregates is selected". It sounds like you have an array
connected to the comparison nodes. Is that what you want?



SHarrison wrote:
> In my program I have a greater than and a less than comparison. If
> either are false, I want to stop the program. I wired the outputs of
> the greater than and less than statements to an OR statement. I then
> wired the output of the OR statement to the conditional of a While
> Loop that I changed to 'continue if true.' A broken wire appears and
> it said the problem was that the source is a 1-D array of boolean and
> the type of sink is Boolean and I don't think this is correct,
> shouldn't I be able to wire them? Can anyone help me out?
>
> Thanks
in advance.
0 Kudos
Message 3 of 4
(2,707 Views)
And yet another suggestion;

Insert in the wire leaving yout compare nodes a "OR array elements" (found on boolean palette).

THis will produce a true if any of the previous compares was true. Let these wres flow to the OR gate and you should be running.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 4
(2,707 Views)