LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Switch until released function changed?

Solved!
Go to solution

So, I changed laptop and needed to reinstall LabVIEW and everything else to keep working, didn't have physical media on hand, so I download lv from site and didn't realize NI now shoehorns lv 2016 as the de-facto download, whether you want to upgrade or not; I tend to wait a few months to switch software precisely because of problems like this.

 

Either way, I am doing a simple save to xml basic VI to check feasibility, and add a boolean button to trigger the adding of single element to an array that will later be stored as xml, nothing fancy. I change mechanical action to "switch until released" because I was expecting the old funcionality which, unless I'm mistaken, used to be:

-User (me) presses button, probably holds it

-Button lights up, depresses, but still sends a false

-User releases button

-A single, 1-time true impulse is sent to whatever

 

Now however, I find it that tapping the button lightly sends roughly 1,4k items to the array, so it seems functionality was changed to "send true till user releases button". After my rant, could anyone please tell me if this is a bug or intended behaviour? Where can I find the old "switch until released" boolean?

0 Kudos
Message 1 of 9
(3,536 Views)
Solution
Accepted by topic author Daikataro

I think you are looking for the latch when released action.

 

http://zone.ni.com/reference/en-XX/help/371361M-01/lvconcepts/boolean_controls_and_indicators/

 

Edit: to answer your question about is it intended? I would say yes because the value is switching to true and continues to be true until you release it.

Matt J | National Instruments | CLA
Message 2 of 9
(3,523 Views)

I see... so any idea why I had been able to use "switch until released" the way I described in literally every previous version of lv, but not now? Specially since latched actions are not local-variable compatible.

0 Kudos
Message 3 of 9
(3,518 Views)

Not sure, is the boolean control triggering a value change event that many times or is it being used as the case selector for a case structure. The second would be expected to me and is what I thought you were doing when I originally read the post. If you are looking for a value change event I would only expect two events.

 

I don't have LabVIEW in front of me but let me know if it is triggering multiple events so I can try it out tomorrow.

Matt J | National Instruments | CLA
0 Kudos
Message 4 of 9
(3,501 Views)

It is being used as a selector for a case structure, I'm fairly certain it would only trigger a value change event for an event structure twice. Problem is, I was used to switch until released working the way I depicted earlier, with the true coming only after I release the button, I would try it on the 15 machine but can't find the charger, will do tomorrow.

0 Kudos
Message 5 of 9
(3,481 Views)

Are you sure you weren't using "switch when released"?

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 6 of 9
(3,474 Views)

Fairly certain, yes, I have the distinct memory of using the topmost right corner option and it working the way I described. Will check on lv2015 machine this afternoon to see if this is indeed, a change of the behavior.

0 Kudos
Message 7 of 9
(3,437 Views)

@Daikataro wrote:

Fairly certain, yes, I have the distinct memory of using the topmost right corner option and it working the way I described. Will check on lv2015 machine this afternoon to see if this is indeed, a change of the behavior.


If it was a change, I'd say it was a bug fix.  The way you describe that it is working now is what I would expect from "switch until released".  The way you described it working before is what I would expect from "switch when released".  (Look at the little pictures.)

 

Maybe the order of the pictures changed?

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 8 of 9
(3,413 Views)

I just wrote the following PushButton program and ran it on LabVIEW 2015, where it worked "like a pushbutton", i.e. it was "true" as long as the control was pressed.  I then closed it, opened it in 2016, and it behaved exactly the same way.

 

My conclusion is that nothing (about this control) has materially changed.

PushButton.png

Bob Schor

0 Kudos
Message 9 of 9
(3,383 Views)