07-25-2011 12:39 PM
TVR, There is nothing wrong in your situation.
A latch action button only gets reset when it is "Read" by the code. In your case, the terminal for your button is outside your while loop and only gets read a single time at the very beginning of your program. If you want the button to pop back up, you need to move it into the event case so that it has an opportunity to be read.
This is a well documented and often asked about question regarding latch action buttons and event structures.
07-25-2011 01:28 PM
Thank you! I was under the impresion that capturing the event and using the NewVal was equivalent to reading the control. Obviously it is not. Moving the control to inside the while loop gives the desired results. I greatly appreciate your help.
08-09-2011 10:33 AM
Hello fdinoff and future readers,
National Instruments has documented this bug in Corrective Action Request #283801, and plans to implement a solution in future releases of LabVIEW. This Discussion Forum thread will be added to the documentation on this bug, and will help us make sure we address all instances of the bug.Thank you so much for bringing this to our attention., and for chosing National Instruments products.
~kgarrett
08-22-2011 12:27 PM
Hi, I've also come across this bug and seeing that its not my fault (this time) helps with my sanity.. thanks to all previous contributors from me!
How do we know when this corrective action request has been fulfilled, and which versions/patches we need for it to work.
Thanks.
08-23-2011 04:31 PM
Hi anothersunnyday,
Generally, if you want to check the status of a Corrective Action Request, you would contact NI Support and inquire about it by referencing its number (283801 in this case). We can not say for certain what version in which the fix for this issue will be implemented. However, this has been brought to the attention of our developers, and you can check this by looking in the release notes to see if this is included in the bug fix list. Hope this helps.
~kgarrett
08-14-2012 02:49 AM
I still seem to have this problem in LV 2012.0f1 on both a 64 bit system. In fact, this bug bit me during my CLD test at NIWeek 2012! I had to add a case structure to ignore the event that is fired when the button is pressed again to turn it off.
Is this CAR still open?
08-14-2012 03:04 AM
The VI in message 1 seems to work correctly in 2012f1 (32bit). I have not tried the other codes posted here.
08-14-2012 05:44 AM
I realized that my problem was similar but slightly different. I get the loss of the latching action when you put the cluster into an array and then attempt to read that control in a loop or event structure. I made a new thread about it here on this forum since this topic's issue seems to be solved.