09-05-2018 03:32 AM
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.
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
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.
09-05-2018 12:44 PM
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.
09-05-2018 01:00 PM
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
09-05-2018 01:53 PM
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.
09-06-2018 07:08 AM
@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.