LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Path Control: switching between "Valid Path" and "Not a Path" does not trigger Value Change Event?

Highlighted

I have got a VI with a Path control on the front panel. In the block diagram there is an Event Structure that handles the Value Change event of that control. When switching between the two selections "Valid Path" and "Not a Path", the Value Change event does NOT fire.

 

In addition, when reading the terminal of the Path control elsewhere (for instance, in the Timeout event), changing selections "Valid Path" or "Not a Path" has no effect, the read value is NOT updated.

 

I am using LabVIEW 2013 (version 13.0f3 64-bit).

0 Kudos
Message 1 of 10
(2,065 Views)
Highlighted

This issue is not limited to Events: For instance, when passing the value of the Path control terminal into a Path indicator terminal within a Loop Structure, changes to the selections "Valid Path"/"Not a Path" are NOT reflected in the indicator.

 

Reading from a Local Variable instead of the terminal does not change that behaviour. But when reading the value by a property node, the selection IS reflected.

0 Kudos
Message 2 of 10
(2,058 Views)
Highlighted

Please attach a VI that shows what you are doing.  It is much easier to debug code than it is to debug a paragraph.

0 Kudos
Message 3 of 10
(2,053 Views)
Highlighted

@RavensFan wrote:

Please attach a VI that shows what you are doing.  It is much easier to debug code than it is to debug a paragraph.


Sure, here it is:

__bug-path-event__-0.png__bug-path-event__-1.png__bug-path-event__-2.png

0 Kudos
Message 4 of 10
(2,038 Views)
Highlighted

Its working for me.  You must not be clicking off the control.  Try changing the path and selecing empty space on the VI.



-Matt
0 Kudos
Message 5 of 10
(2,034 Views)
Highlighted

Okay, I can see what you are talking about now.  That you can click on the symbol on the left part of the control.  Changing that setting is not firing an event for me either.

 

I don't know whether this is a bug or expected behavior.  But I also don't know what is the purpose of being able to choose a Path or <Not a Path>.  I never new that existed and can't figure out a reason why I would need it.

0 Kudos
Message 6 of 10
(2,032 Views)
Highlighted

Wow, i didnt know that was an option either and it is also not working for me either.  I was mistaken. At the same time i have no idea why a user would ever want to use that.



-Matt
0 Kudos
Message 7 of 10
(2,030 Views)
Highlighted

I used this setting in order for the user to be able to define whether or not to store some recorded data: (Valid Path means to store the data there; Empty Path means to use some default path of the application; Not a Path means to not store any data).

Anyway, changing this selection means an actual change of the path value (similar to the Increment(Decrement buttons of Numeric controls), but the terminal does not show that appropriately. To me this looks like unintentional behaviour.

0 Kudos
Message 8 of 10
(2,021 Views)
Highlighted

@aschipfl wrote:

I used this setting in order for the user to be able to define whether or not to store some recorded data: (Valid Path means to store the data there; Empty Path means to use some default path of the application; Not a Path means to not store any data).

Anyway, changing this selection means an actual change of the path value (similar to the Increment(Decrement buttons of Numeric controls), but the terminal does not show that appropriately. To me this looks like unintentional behavior.


Describing it that way, I'd agree with you and lean towards bug.

 

I would never have used the valid, empty, not a path as a differentiator in my program logic.  It is a little too hidden for me.  I've been using LabVIEW for over 10 years and never knew that control was clickable in that way.  I may have accidentally clicked on it along the way, but it is a rather small area to the edge of what is usually a long control for me  But if that shortcut popped up, I would have not paid attention to it much.

 

I would use alternative logic such as a boolean to decided whether to log or not.  Then use the value of the path to determine whether to log to a given file, or log to the default file.

0 Kudos
Message 9 of 10
(2,006 Views)
Highlighted

If you want to continue to use the same logic, you could add another button that triggers an event case, and in that event case wire "Not a path" to the "Value (Signaling)" property of the path control.  That will both trigger the event and allow the value to update in the indicator.   It would have the added bonus that it's more obvious than clicking on that symbol that vaguely resembles a squared-off percent sign.

Message 10 of 10
(1,985 Views)