LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does the string indicator revert to default value when it's not being used?

Can anyone explain to me why one of the two string indicators in the attached VI reverts to it's default value (empty) when the case structure is false?
0 Kudos
Message 1 of 6
(2,553 Views)
Very strange!!!!  I created the same code in LV8.2 and it doesn't do this.  When false, the strings remain unchanged.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 6
(2,543 Views)
Well, I just created the same code in LV8.5 and it still doesn't show the bug.  Same as with 8.2, the strings remain unchanged when false.  You must have done something special to cause this behavior.
- tbob

Inventor of the WORM Global
Message 3 of 6
(2,542 Views)
I actually originally noticed this odd behaviour in a much larger VI, so I gradually stripped it down trying to find the problem, and the VI attached was the result. I'm still stumped, and I've been unable to recreate it!
0 Kudos
Message 4 of 6
(2,540 Views)
I see the same thing in 8.5 with your VI. If I copy everything to a new VI, the problem goes away. How was string 1 originally created?

Robot Sad
Message 5 of 6
(2,527 Views)

String 1 is wired to the connector pane...that's why you're seeing this behavior.  Disconnect String 1 from the connector pane and it will behave just like String 2.  Likewise, connect String 2 to the connector pane and you'll see it get blanked out too.  I'm not really sure why we empty the value when it's wired to the connector pane, but the behavior goes back to LabVIEW 8.0, maybe earlier.

-D

Message 6 of 6
(2,522 Views)