Jump to content

HMI button not resetting


Recommended Posts

Just curious if anybody else has experienced this issue.

I have an HMI button that needs to be "pressed & held" to run a process.  The button is setting a bit on "press" and resetting the bit on "release".  This all works fine, except in the case of an "action" causing an HMI change while the button is pressed, this causes the button to never release, or at least the bit never gets reset.  My ladder code has to monitor for an HMI change and reset the bit when this happens, which seems a bit clunky compared to how smooth most things operate with Unistream.  Or am I missing something simple....


Link to comment
Share on other sites

When you switch to a different HMI screen, the screen unloads, and a new screen loads instead.

The release event will never happen.


I'm not sure what actions you are doing in press and what actions in release. Are you switching the HMI screen in the release, or in the press?

If you are doing it in the press, then you can set the bit on the press, change the screen, and on Ladder have a code like:

When Bit, then reset Bit, and do whatever you want to do next.


If you are doing the HMI screen change on release, then try having the Bit reset before the change screen action,


BTW, the same thing will happen, for example, in  Windows WPF application, if a control registered to mouse  left button down event, and up event, and on the down event it unloads (removes) itself from the visual tree and add a different control, then the mouse up event will caught on the new control.

Link to comment
Share on other sites

The button is setting a bit on press and resetting the same bit on release.  A manual machine process is being activated when a particular HMI is loaded, and the button is being actively pressed by the user, this particular button does not initiate a change screen.   The problem as described happens only when the following steps happen:  user is pressing button to activate manual process, a critical machine fault occurs (emergency stop etc.) while HMI button is being pressed, the critical fault triggers an "action", the "action" unloads the process screen.  In this scenario the bit linked to the button is not reset, and if no steps are taken to reset the bit otherwise, the manual machine process will resume when the process HMI is again loaded.

It is not a problem to reset the bit with code, I was mainly wondering if the button functioning in this manner is as the developers intended.

Link to comment
Share on other sites

  • MVP 2023

I think the point is that the button does not get released because it no longer exists on the HMI screen. No release can happen if it's no longer on the screen. This is normal for these kinds of things. A similar thing happens when you are calling a subroutine that has a direct coil that is activated by some condition or bit. If you stop calling the subroutine, the coil remains on regardless of the activation condition.

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...