LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NXG and System Latching Buttons Don't Release

Hi All,

 

I've observed what I believe to be an issue that's been bugging me for a while, or perhaps I'm misunderstanding something.

 

I observe that NXG and System buttons set to Latch when Released mechanism don't actually reset in my application. They actually don't reach their "state" when chosen to switch when released either. I have them placed in the event structure. I considered there could be an issue of having multiple buttons handled by the same case, so I separated them out as well. The behavior remains.

 

System and NXG buttons have 6 states (see nxg options.PNG). I believe the first two items in the top row are OFF and ON. I believe this to be the case because when you're just in the editor menu and click on/off, these are the two colors that it toggles between. So the other states, I'm presuming to be for transitions. 

 

I decided to make a little "study" and changed these states to distinguishable colors and recorded what states the button goes through (see Color Flow.pdf). 

Latch when released:

In red is what I assume for these colors to be ON/OFF. The blue is what you observe in the application (ignoring the first click). It remains in the green state, going through the red state.  As I was doing this test, once in a blue moon (20+ clicks) it would sometime go into the expected OFF state - interesting.

 

latch when released.PNG

 

Switch when released:

Again, the red is my expectation for ON and OFF. After the first click, it goes from off to the red state and then it continues as labeled in the diagram.

The ON/OFF states appear to be the white and green, T > F goes through the black state, F > T goes through the red state.

 

switch when released flow.PNG

 

Lastly, as noted in the document, when I shutdown the application, the button actually resets to what ON and OFF should be.

 

I can A - change the picture states to look like the expected ON/OFF or B - use switch and the reset it myself. However, that defeats the purpose of having a latching action available. Am I missing something? Of course, the other buttons behave as anticipated.

 

Before someone else says it - I am choosing these buttons because they look better. Pleasant/modern looking GUIs make the user experience better.

 

I attached my sample VI (developed in LV 2019 SP1, 64-bit) but can save it in other versions should anyone be interested. It's a pretty easy thing to recreate. Attaching screenshots as well.

 

Thanks for any help.

0 Kudos
Message 1 of 9
(1,043 Views)

As soon as I posted this, I tried to customize a new button to appear to work correctly. Well.. now they all work!  As anticipated. Also suggesting that some of those states are transitions for mouse over (which I've read somewhere). Here's the thing. This has not worked correctly for me countless times. Most often, once I build the EXE this behavior occurs. Has anyone dealt with this?

0 Kudos
Message 2 of 9
(1,038 Views)

A latched button won't return to its false state until you read it.  Any chance those troublesome controls are not sitting in the event case that calls it?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 9
(999 Views)

Hi Bill, all except two are in their corresponding event case of the event structure, but those two were just an experiment. (I included two buttons that are just in the while loop and have no event case because I found on a forum that this helped them with a similar issue. It didn't work, no surprise there.)

0 Kudos
Message 4 of 9
(991 Views)

@TheresaM wrote:

Hi Bill, all except two are in their corresponding event case of the event structure, but those two were just an experiment. (I included two buttons that are just in the while loop and have no event case because I found on a forum that this helped them with a similar issue. It didn't work, no surprise there.)


Wow, isn't that just weird!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 9
(983 Views)

It really is. It's surprising just how repeatable this issue is too when it comes to this style of a button. By some miracle, it worked as expected for one run yesterday, but now it's back to the behavior I typically see. I hope someone can share some insight. I saw on some thread that maybe there's an issue with LabVIEW, but I have seen this issue across different versions.

0 Kudos
Message 6 of 9
(950 Views)

I've seen peculiar issues with Silver controls and indicators, but to my knowledge, NXG and System controls behaved themselves.  But I guess my knowledge has gaps.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 9
(945 Views)

Hi Bill,

 

So, I still haven't found a reason for these issues. BUT, I made an interesting discovery today that I wanted to share.

 

Here's the usual buggy scenario: I click on my latching NXG/System button and it doesn't actually release. Here's the discovery, when I scroll with my mouse button - it finally releases! Interestingly enough, not to the default state, meaning if my latching button is false by default, after clicking and reading it (placed inside the event case structure), it should reset back to false. With this "scroll workaround," it swaps between resetting to the other state. So first time around I click on it, scroll, it resets to True. Then I click on it, scroll, it resets to False. etc.

 

I think this is very interesting. I would love to know how the six states of these buttons were actually intended to function, maybe that's where the answers to this "bug" lie.

Message 8 of 9
(905 Views)

@TheresaM wrote:

Hi Bill,

 

So, I still haven't found a reason for these issues. BUT, I made an interesting discovery today that I wanted to share.

 

Here's the usual buggy scenario: I click on my latching NXG/System button and it doesn't actually release. Here's the discovery, when I scroll with my mouse button - it finally releases! Interestingly enough, not to the default state, meaning if my latching button is false by default, after clicking and reading it (placed inside the event case structure), it should reset back to false. With this "scroll workaround," it swaps between resetting to the other state. So first time around I click on it, scroll, it resets to True. Then I click on it, scroll, it resets to False. etc.

 

I think this is very interesting. I would love to know how the six states of these buttons were actually intended to function, maybe that's where the answers to this "bug" lie.


Wow - that is really strange!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 9
(898 Views)