I have set up multiple buttons on a screen to function as momentary type buttons by using key behaviors Key Down Fire Event and Key Up Fire Event.
On Key 1 Down I fire a calculation event that sets a specific system variable to 1 (for example, Calculate ButtonState_1=PRESSED).
On Key 1 Up I fire a calculation event that sets the same specific system variable to 0 (for example, Calculate ButtonState_1=RELEASED).
On Key 2 Down I fire a calculation event that sets a specific system variable to 1 (for example, Calculate ButtonState_2=PRESSED).
On Key 2 Up I fire a calculation event that sets the same specific system variable to 0 (for example, Calculate ButtonState_2=RELEASED).
Etc.
These work fine individually. However, if a user presses key 1 and holds it, then presses and holds key 2, and then releases key 1 - key 1 will not fire its Key Up event. The user must repress key 1 to get its Key Up event to fire.
This is an issue because the user expects the buttons to act as a momentary types, but can get a button to act as a toggle - which is undesirable.
I am currently using PowerVision Studio V2.3.11157, but I have had this issue since V2.1 using PV750, HV700, PV450, etc.
Multiple button press issue
- asmith_class1
- Posts: 15
- Joined: Tue Jan 18, 2011 8:10 am
- bmcrae
- Enovation Controls Development
- Posts: 75
- Joined: Thu Sep 09, 2010 11:20 am
Re: Multiple button press issue
Sorry for the slow reply. We were investigating if there could be any way this could ever work.
Alas, the design of the 750 will never allow such a use of the buttons. There is no way to get a release event on a key if another key is depressed. We do not support multiple key presses at one time.
Hope this answers your issue.
Brian McRae
FW Murphy
Alas, the design of the 750 will never allow such a use of the buttons. There is no way to get a release event on a key if another key is depressed. We do not support multiple key presses at one time.
Hope this answers your issue.
Brian McRae
FW Murphy
- pbj
- Posts: 10
- Joined: Mon Oct 11, 2010 3:02 pm
Re: Multiple button press issue
We are seeing the same issue with a Key Up Event never being fired if a second button is pressed and held. However, we are finding that the issue goes a little deeper than that. If Button 2 is pressed and held while Button 1 is being held, the Key Down Event for Button 2 is not fired until Button 1 is released (even though Button 1 still does not fire its Key Up event and is "locked on").
A secondary issue is that if Button 1 is held down permanently, be it by user operation or by a switch failure, no other button events will be fired. The Button 1 Key Up Event is fired if no other buttons are being held when it is released, but you can see that this can be a problem if a physical switch failure occurs.
I have attached a PDF containing graphics for both of these situations to further elucidate. Page 1 shows the "latching" condition, and page 2 shows the "missed event" condition.
We request that you look further for a solution as both of these conditions are unacceptable in controls applications.
A secondary issue is that if Button 1 is held down permanently, be it by user operation or by a switch failure, no other button events will be fired. The Button 1 Key Up Event is fired if no other buttons are being held when it is released, but you can see that this can be a problem if a physical switch failure occurs.
I have attached a PDF containing graphics for both of these situations to further elucidate. Page 1 shows the "latching" condition, and page 2 shows the "missed event" condition.
We request that you look further for a solution as both of these conditions are unacceptable in controls applications.
- Attachments
-
- Murphy Display Button Press Bug.pdf
- (88.08 KiB) Downloaded 21 times
- mark.johns
- Posts: 12
- Joined: Thu Apr 14, 2011 10:50 am
Re: Multiple button press issue
Hi,
I worked around this issue by creating different views, with only the active button programmed with "Key up".
Using state machine to change view and fire the message on Key Down, and return on key up.
This way as long as key is down, no other key can interfere. So allowing the Key UP operation to work.
Mark
I worked around this issue by creating different views, with only the active button programmed with "Key up".
Using state machine to change view and fire the message on Key Down, and return on key up.
This way as long as key is down, no other key can interfere. So allowing the Key UP operation to work.
Mark
- Attachments
-
- Hydraulic.jpg (33.7 KiB) Viewed 106 times