Jump to content

Screen changes / button issue


Recommended Posts

Hi there,


I was making some buttons that would allow me to go from screen to screen and when I do this with buttons "normally", so that the button sets a bit and that bit triggers an action to change the screen, all is OK, as changing the screen this way (via the action itself, maybe?) seems to reset the bit back to being zero when the screen changes.


The trouble came when I wanted to change screen, but only if someone pressed a button for a certain amount of time, as a kind of integrated "safety" – I don’t want them to press the button accidentally when it does something important or when it takes them to a place that I don’t want them fiddling around in accidentally.


So I use a button to set a bit when it’s pushed and reset the bit when it’s released. That button press bit counts down a timer when it’s set. When the timer’s .Out bit is set (i.e. it’s counted down), I then use that to set the screen change bit. I note that as soon as the screen changes, the screen change bit is toggled back to zero, but the button pressed bit remains set, despite the fact that I can’t be pressing that button any more, as the screen’s changed and so the button’s not available to be pushed any more.


To me this seems like a bug, as changing the screen should be like releasing the button (as I say, the button’s not available to be pushed any more) and so the button press bit should be reset. Any ideas?

Link to comment
Share on other sites



If the button is not actually released, the bit will stay set.  I understand your reasoning as to why it should reset, and it may be possible, so I would suggest to writing an e-mail into support@unitronics.com stating this issue.


However, as a solution, I suggest setting a project-level action to change the screen upon release of the button AND when the timer is set.  The ladder should be set up as follows:

1 12 2015 2 23 55 PM


Another solution would be to reset the "button" bit when the screen is displayed.  For instance, when looking at the screen you wish to load, there should be an "Is Active" bit.  In the ladder, upon positive transition of the "Is Active" bit, reset the "button" bit.


Let me know if this helps.

Link to comment
Share on other sites

Thank you for your reply.


I thought the manual resetting of the button bit (just after changing the screen change bit) was the way to go. Changing the screen when the button's released seems like a less intuitive thing for the user to do; they'd have to wait for X seconds and then release the button. But if released early, it wouldn't change the screen and might leave them confused, so it would really require another item on the screen to say when it's OK to release the button.


The first way (manual resetting of the screen change bit), the screen changes, and that tells them when to stop poking the screen.


It still seems funny to me that the button isn't considered to be released when it's no longer available to push. I'm not sure what circumstances you'd want to consider a button pushed if you'd moved to a screen where it no longer could be.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...