How do I stop button controls responding to both mouse down and mouse up?

Hi,
On my front panel I have several buttons which are all set to 'Switch Until Release' type. I've come across the problem where they sometimes stick on even when the mouse has been released (see earlier posting) and this has been confimed by NI as a LV bug.
To get round this I manually write FALSE to the button controls once my LV prog has read them but I now find that some of the buttons having been cleared go true again on the release of the mouse button as though the mouse release can also set them true.
Is there any way I can stop them responding to the mouse release?
Thanks,
Dave.

Dave123 wrote:
I'd like to use latch when released buttons but I'm using local variables of the buttons so I can read the current values of them in different parts of the program.
So to simulate latch when released I've written my program to set to FALSE the state of the button once it has read that it has been pressed.
This sounds like a very bad idea if other parts of the code need to react on the state of a pseudo-latch action boolean. There is simply no guarantee that other parts of the code even see the transition due to possible race conditions. What if the boolean gets reset before the other code can read it? What if the other code reads the true multiple times because it loops faster than 200ms?
How many other places do you possibly need to read it? Maybe you can use latch action combined with an event structure to cause parallel code to react to the value change? (see attached example, LabVIEW 7.0). Maybe you should rethink your code, there might be better alternatives.
Dave123 wrote:
Keep the toggle button held down for a second or two, release it and you should see the button goes true again (and is promptly cleared in the case). Why does a mouse button release set the button to true?
Easy! In this case, you should use "switch when pressed" as mechanical action. You use switch until released, which confuses LabVIEW.
Switch when released does two things: (1) It switches to true as long as you keep the button pressed. (2) When you release the button, it switches to off. Now, if your code inverts the switch via a local variable while it is still pressed, the release tries to invert the current state and turns it off-to-on again by mistake.
This might be a slight flaw (bug) in the LabVIEW code. Releasing the button should force a FALSE to the button, not an iversion of the current state.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
ButtonForceClearExampleMOD.vi ‏26 KB

Similar Messages

  • How do you stop Voice Control?

    How do you stop Voice Control?

    Unfortunately, "Stop pressing and holding the Home button" only works if it is an intentional action. Obviously, this is not the problem. The problem occurs when the button is depressed and held ACCIDENTALLY! Like, when your iPhone or iPod is in your pocket, or purse. This is how butt-dialing occurs: the button gets depressed, the voice control comes on, and then the imperfect software mis-registers the next random sound as a voice command, resulting in a random call to a random contact.
    It is a very annoying "feature" to say the least. And the fact that it cannot be disabled only makes it more infuriating.

  • How do I stop calls from ringing on both of my iPhone's?

    i have a personal iPhone 5s with AT&t and a company iPhone 5s with Verizon.  I just updated both to 8.1 and now when a call comes in it will ring and if I do not pick it up right away it starts to ring the other one.  How do I stop this?  I have to reboot them and it stops doing it for a while but then it will do it again after a while.

    On the phone you do not want to receive calls on, go to Settings > FaceTime > iPhone Cellular Calls OFF.

  • [Forum FAQ] How to use parameter to control the Expand/Collapse drill-down options in SSRS report?

    In SQL Server Reporting Services (SSRS), drill-down is an action we can apply to any report item to hide and show other report items. They all are ways that we can organize and display data to help our users understand our report better. In this article,
    we are talking about how to use parameter to control the Expand/Collapse drill-down options in SSRS report.
    Consider that the report has a dataset (dsSales) with following fields: SalesTerritoryGroup, SalesTerritoryCountry, CalendarYear, SalesAmount.
    1. The report has the following group settings:
    Parent Group: SalesTerritoryGroup
     Child Group: SalesTerritoryCountry
      Child Group: CalendarYear
       Details: SalesAmount
    2. Add three parameters in the report:
    GroupExpand:
    Available Values: “Specify values”
    Label: Yes           Value: Yes
    Label: No            Value: No
    Default Values: “Specify values”
    Value: Yes
    CountryExpand:
    Available Values: “Specify values”
    Label: Yes           Value: =IIF(Parameters!GroupExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No","No","Yes")
    YearExpand:
    Available Values: “Specify values”
    Label: Yes          
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No","No","Yes")
    3. Right click SalesTerritoryCountry icon in the Row Groups dialog box, select Group Properties.
    4. Click Visibility in the left pane. Select “Show or hide based on an expression” and type with following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", False, True)
    Select “Display can be toggled by this report item” option, and select “SalesTerritoryGroup” in the drop down list.
    5. Use the same method setting CalendarYear, (Details) drill-down with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", False, True)
    =IIF(Parameters!YearExpand.Value="Yes", False, True)
    6. Click SalesTerritoryGroup text box in the tablix. Select InitialToggleState property in the Properties dialog box, and type following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", True, False)
    7. Use the same method setting SalesTerritoryCountry, CalendarYear text box with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", True, False)
    =IIF(Parameters!YearExpand.Value="Yes", True, False)
    After that, when we preview the report, we can use these three parameters to expand/collapse drill-down.
    Note:
    In our test, we may meet following issue. We can check the expression of InitialToggleState property to troubleshooting the issue.
    Applies to
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012

    In SQL Server Reporting Services (SSRS), drill-down is an action we can apply to any report item to hide and show other report items. They all are ways that we can organize and display data to help our users understand our report better. In this article,
    we are talking about how to use parameter to control the Expand/Collapse drill-down options in SSRS report.
    Consider that the report has a dataset (dsSales) with following fields: SalesTerritoryGroup, SalesTerritoryCountry, CalendarYear, SalesAmount.
    1. The report has the following group settings:
    Parent Group: SalesTerritoryGroup
     Child Group: SalesTerritoryCountry
      Child Group: CalendarYear
       Details: SalesAmount
    2. Add three parameters in the report:
    GroupExpand:
    Available Values: “Specify values”
    Label: Yes           Value: Yes
    Label: No            Value: No
    Default Values: “Specify values”
    Value: Yes
    CountryExpand:
    Available Values: “Specify values”
    Label: Yes           Value: =IIF(Parameters!GroupExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No","No","Yes")
    YearExpand:
    Available Values: “Specify values”
    Label: Yes          
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No","No","Yes")
    3. Right click SalesTerritoryCountry icon in the Row Groups dialog box, select Group Properties.
    4. Click Visibility in the left pane. Select “Show or hide based on an expression” and type with following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", False, True)
    Select “Display can be toggled by this report item” option, and select “SalesTerritoryGroup” in the drop down list.
    5. Use the same method setting CalendarYear, (Details) drill-down with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", False, True)
    =IIF(Parameters!YearExpand.Value="Yes", False, True)
    6. Click SalesTerritoryGroup text box in the tablix. Select InitialToggleState property in the Properties dialog box, and type following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", True, False)
    7. Use the same method setting SalesTerritoryCountry, CalendarYear text box with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", True, False)
    =IIF(Parameters!YearExpand.Value="Yes", True, False)
    After that, when we preview the report, we can use these three parameters to expand/collapse drill-down.
    Note:
    In our test, we may meet following issue. We can check the expression of InitialToggleState property to troubleshooting the issue.
    Applies to
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012

  • How can I stop pop ups on my mac book pro and i pad

    How can I stop pop ups on my mac book pro and my new ipad 4H.

    For MacBook Pro:
    http://support.apple.com/kb/ph11946
    http://browsers.about.com/od/safar1/ss/How-To-Enable-The-Pop-Up-Blocker-In-Safar i.htm
    http://www.lbl.gov/ehs/training/webcourses/globalAssets/CourseRequirements/disab lePopups/disablepopups.html
    For Ipad 4H:
    http://browsers.about.com/od/safar1/ss/How-To-Enable-The-Pop-Up-Blocker-In-Safar i_8.htm
    hope it helps

  • I have about 1000 contacts on my iPhone 4 after syncing with iCloud there are only about 120 contacts on iCloud How can I have the same info on both the iCloud and my iPhone

    Hi
    I have about 1000 contacts on my iPhone 4 after syncing with iCloud there are only about 120 contacts on iCloud How can I have the same info on both the iCloud and my iPhone

    On the iPhone tap Settings > iCloud
    Switch Contacts off then back on then reset the device.
    Hold the On/Off Sleep/Wake button and the Home button down at the same time for at least ten seconds, until the Apple logo appears.

  • TS3217 Wher's my water has stopped working. We have both the free and paid versions on the IPAD2 and the paid version stopped working suddenly. I updated both the free and paid versions and the IOS and it still does not work(the free version works).

    Where's my water suddenly stopped working. We have both the free and paid version installed and the free one works. The paid version fails during initilazation. Bothe have been updated from Itunes and the IPAD was rebooted. My wife playes it every day and yesterday it failed to run, any suggestions?

    Are they apps?
    See:
    iOS: Troubleshooting applications purchased from the App Store
    Contact the developer/go to their support site if only one app.
    Restore from backup. See:
    iOS: How to back up              
    Restore to factory settings/new iPod/iPad
    BTW this is the iPod touch forum

  • Why has facetime stopped recording calls unless I close it down and restart it?

    Facetime has stopped recording calls unless I close it down and restart.  Any solutions?

    Try the standard fixes to rule out a hardware problem:
    - Reset. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup
    - Restore to factory defaults/new iPod.

  • Control 2 macs with 1 keyboard and mouse

    I have two iMacs, 27 inch 10.7 and 24 inch with 10.6. Side by side. The two communicate wirelessly using Apple Wi fi.
    I want to use one keyboard and mouse for both.
    I have downloaded "synergy" on both computers, however, attempts to control both have failed.
    I know that Apple screen sharing is an option, but I would prefer to use "synergy" or a similar program.
    (I vaguely recall controlling both computers in the past, but cannot recall how I did it.)
    Help? Control two Macs with one keyboard and mouse. That is my goal.
    Thanks.

    Try the software Teleport from Abyssoft. http://www.abyssoft.com/software/teleport/
    I just installed Teleport on Macbook Air and Macbook Pro and am now working on both with a single wireless keyboard and glidepad simply by dragging mouse from one screen to the other.

  • How can I get mouse pressed and mouse released positions on the desktop whi

    Hello All,
    I am generating a Frame using Swing API. My requirement is I need to capture the mouse pressed and mouse released positions, whenever user drags the mouse on desktop region (i.e. outside of the Frame). I require these points to find the rectangle region user has generated starting from mouse pressed to mouse released position. I need to pass that rectangle to Robot class in order to capture that desktop region.
    Can anybody help me out how can I achieve this using java on MAC, Linux and Windows platforms?
    Thanks in advance.
    Regards,
    VPKVL

    VPKVL wrote:
    DarrylBurke wrote:
    Can't be done in Java.I don't think that there is something which can't be done using java. When searched over net, found few applications which are using java for implementing this feature but not free, asking for license fee. I checked by downloading the demo version.
    Just want to know the hint how it can be achieved so that I can move further on that lines.
    Your thoughts ?They use JNI with the OS API.

  • HT3887 my bluetooth says 'Not Available' how do i get it to work again. I have restarted the computer several times and have replaced the batteries in both the keyboard and mouse and yet it still is not working! please help

    my bluetooth says 'Not Available' how do i get it to work again. I have restarted the computer several times and have replaced the batteries in both the keyboard and mouse and yet it still is not working! please help

    I have had the same problem. It was cured by turning computer off and/or restarting it. I am not sure  if once was enough. I think shutting down must cut out whatever it is that blocks bluetooth. Good luck

  • How do I install bootcamp so I half both my ssd and hdd?

    How do I install bootcamp so I half both my ssd and hdd for windows and lion?

    Sorry about that one. There are THREE not just two, about SSDs, and the iMac SSD + hdd one.... well  that one was private (not sure why).
    Most questions have been asked/answered, multiple more than once, times, and therefore: public bookmarks and search please. (some gets asked almost daily, a few multiple times in one DAY of all things).
    I'd like to see pdf guide and error messages, faq and how to articles re-written, updated, and checked for errors.
    www.apple.com/support/bootcamp is where I usually send people to seek out the pdf and do some readiing and backups. you will need backup no matter what.
    Windows won't install iwth two drives/devices with GPT so you have to remove or reformat the data drive for now.

  • How can I get emails to stay in both my laptop and iPad?

    How can I get emails to stay on both my laptop and iPad?
    Currently when I turn on my laptop it draws all the emails from my iPad!
    Thanks

    Go to Settings>Mail>Gmail>>Advanced. Do you  have an an item for Deleted Messages Remove? What options are available.?
    Also in Settings>Mail>Gmail  does the Host Name for incoming server have a POP in it?

  • How do I edit the contacts files on both my iPad and iPhone?

    How do I edit the contacts files on both my iPad and iPhone?

    Open Contacts, select a contact, then tap Edit in the upper right corner.

  • Mouse enter and mouse leave not detected in small controls

    Look at the attached VI. There is a thin boolean with mouse enter and mouse leave events which are not always detected when moving over the control quickly. I'm not sure whether this behavior originates from LV (7.0) or from the way XP handles the mouse movement, but I would definitely call this a bug in the sense that the mouse does "enter" and "leave" the control and the events are not fired.
    My guess is that windows does not register all the points that mouse goes through, but only does so periodically. If it happens that 2 adjacent points are on 2 different sides of the control, LV can't recognize the enter and leave events. But that's just a guess.
    Try to take over the world!
    Attachments:
    event bug1.vi ‏26 KB

    I put together a quick test, but I'm not sure what the results mean.
    Lynn, one of the tests uses windows API (although you can run the other one).
    Shane, sorry, only 7.1 on this PC.
    Message Edited by tst on 07-12-2005 08:38 PM
    Try to take over the world!
    Attachments:
    event bug25.vi ‏40 KB

Maybe you are looking for

  • Problems with msi p35 neo 2

    Default problems with msi p35 neo 2     pc works fine when using windows and the net and emails     only when using 3d mark or games do i ever get problems     just help in getting the hole story 6 months ago got a msi neo2 install all my old compone

  • How to Create Object Panoramas

    I would like to create a complete 360 degree quicktime panorama of an object. I want the user to be able to spin the object around as well as view the bottom and top of the object. Is there any recommended software or tutorials on how to do this? Tha

  • Technical Service in Argentina?

    In English: Hello, I live in Argentina, I want to know how to do to officially support the IPhone in my country, as operators are authorized by Apple to sell but do not give any kind of support to its users, so I want to know who I have to talk to do

  • To invoke bussiness rules engine from ADF

    hi all, To invoke the business rule engine running on the SOA server, from the application module. can you please any one help me in this.

  • LightRoom 4 feature

    One thing missing from LightRoom 4 is the ability to have a slpit window in the development module where you can have the color checker and a target picture showing at the same time but separate making it sooo much simpler to see what happening when