LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Indicator needed to get Selector output right

I have a VI that shows some strange behavior. The VI is simply checking the velocity of a carriage to get the state of the carriage (acc dec stop constvel etc). In this VI I'm using some Selectors to choose between  the different states.

 

In the screenshot below, everything works as expected. The output (26) of the middle selector is "Const" since the value of (23) is True.

Selector OK.png

 

But if i delete the indicator A, the output of the middle Selector changes to "Dec" (which is the same as (24) going into the False-input) even if (23) is still TRUE Smiley Mad

Selector Wrong.png

 

What is it that i dont understand?!? Attached is a similar copy of the VI from LV 17.0.1f3 32-bit.

 

PS: I see now that it looks like the problem is the output of the "Less than" function, not the selector.

 

 

0 Kudos
Message 1 of 5
(2,567 Views)

That's a puzzlement.  I can't figure out what's going on either.  My best guess is that the VI is corrupt.  Try rebuilding it from scratch.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 5
(2,519 Views)

Notice the coercion dots on the functions that use the Global Variables.  My guess is that the Global Variables are causing you grief.  Could it be that the "wires" are one type (say, Dbl) and the Globals another (say, Sgl, or Extended)?  Is there a (good) reason to use Globals instead of wires (in Shift Registers, or the output of a VI)?

 

Bob Schor

0 Kudos
Message 3 of 5
(2,515 Views)

When I load it in 2018 it runs as expected, indicator or not.  I suspect the conversion to a newer version fixed it, further supporting the corrupt VI idea.

0 Kudos
Message 4 of 5
(2,507 Views)

@Kyle97330 wrote:

When I load it in 2018 it runs as expected, indicator or not.  I suspect the conversion to a newer version fixed it, further supporting the corrupt VI idea.


Actually, that would point AWAY from the corrupt VI idea.  If the VI was corrupt, it would show up in the newer version as well.  What this actually seems to point to is a bug in the compiler that could have been worked around with the Always Copy, but was correctly fixed by NI with LabVIEW 2018.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 5
(2,481 Views)