LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean ignoring value in event case

Hi everyone,

sorry if the title wasn't clear enough.

After upgrading to Labview 2022 Q3, something strange happens.

 

I have a boolean control, set on "switch on release".

It's a cancel button, which is supposed to close the vi in its event case.

It is set on "switch on release" and not on "latch on release" because i need to call it via Value signaling from somewhere else in the code.

What happens is that after clicking on it, it ignores the false setting in its event case and stays on true.

I've always used boolean controls this way (it's practical) and this never happened.

 

If i run the code with the light bulb turned on, it seems to "ignore" the code inside the event case and brings the true value to the conditional stop of the while loop, stopping the vi.

 

 

Download All
0 Kudos
Message 1 of 7
(1,589 Views)

Edit: this doesn't even happen every time, it happens randomly...

0 Kudos
Message 2 of 7
(1,580 Views)

Everything works as expected in LabVIEW 2020. The Cancel button is set to False in this event case before vi stops... 🤔

LV2020.png

0 Kudos
Message 3 of 7
(1,572 Views)

Works every time in 2022Q3. Ran it 20 times.

Certified LabVIEW Architect
0 Kudos
Message 4 of 7
(1,566 Views)

It seems like it happens when the boolean control is grouped in the front panel with another boolean control. I have 2 booleans indeed and they were grouped, it even happened (just once) that after clicking the cancel button, both the cancel and the save buttons were set to true and stayed on true. That scaries me off a bit to be honest...

I don't know this happens, it is strange indeed... 

0 Kudos
Message 5 of 7
(1,545 Views)

Ideas:

- Does it happen more frequently of lots of controls are grouped?

     - Maybe even try with lots of default data

- Is it the same if the Value property is set instead?

- Is there a better way to do this? I'm sure there is but now and then I have done like this and it has worked, but I did not have any grouped controls I guess.

 

Certified LabVIEW Architect
0 Kudos
Message 6 of 7
(1,533 Views)

I've made an attempt with grouping tons of controls and setting the value property instead of the local variable, but i cannot reproduce the problem anymore.

And yes, there probably is a better way of doing this, but it is so practical to use the value signaling property that I somehow got used to it.

 

So basically at this point I cannot reproduce the problem anymore: could it be something like my pc was running slower (cpu busy maybe) for some reasons and that had an impact on LabVIEW as well? Unfortunately I didn't check the task manager when that happened.

0 Kudos
Message 7 of 7
(1,513 Views)