HMI Buttons - Set while button pressed

Jieve

Member
Join Date
Feb 2012
Location
USA
Posts
274
Hello guys,

A while ago, a couple people on this forum mentioned in a post that they try to avoid where possible using the "Set while button pressed" option for HMI pushbuttons because some touch screen drivers time out after a while. I was told it's better to set the bit via the HMI then to reset the bit in the program immediately after it is used. If the button needed to be activated longer, a timer could be used (I'm guessing a pulse timer?). But what happens in the case where you actually do want to have the HMI button held down for an operator-decided variable amount of time?

Also, how common is this driver timeout issue? I mentioned it to a previous co-worker who said in his 10 years of programming he had never come across it. Would someone be able to post a really simple code that shows how you typically reset the HMI bits after they are used, under different circumstances (with timer use, without?)

Any input would be greatly appreciated.
 
Hello,

> I was told it's better to set the bit via the HMI then
> to reset the bit in the program immediately after it is > used.

IMHO, that is good practice, where possible, regardless of the HMI handling the user action. As well as separating all HMI writes into a section of memory/data that is only written by the HMI.

While I recommend, if possible, users always use "on mouse up" to issue commands. This allows the user to drag his/her finger off the button if the button was selected by mistake, changed mind, etc.

But in this case, same button set/reset, the option would be to set the bit "on mouse down" and clear it "on mouse up".

The caveat about touchscreens timing out still applies and you might want to put a timer somewhere that clears the bit after X time or some condition satisfied.

I have seen mechanized doors that open/close only while the user is pressing the button. This allows the door to be commanded ajar.

Many factors are involved when determining the best method to utilize.

Some touchscreens will timeout and some have an adjustable time. This is to cover the case where someone leans a broom up against the screen. How the touchscreen handles that case is not written in stone.

My2c.
 
Last edited:
Guys thanks for the responses.

I'm using mostly Siemens HMIs but the more widely applicable the information the better.

Mark- thank you for that informative information. So for pushbuttons that directly actuate devices such as motor contactors or spring return solenoid valves while the button is pressed, programming in a timer to automatically reset is best practice then? What hmi timeout times are common, or how long would you say is reasonable for the average timer to run?

Thanks!
 
Hello,

>reset is best practice then?
> What hmi timeout times are common...

Only you can answer after evaluation of the particular devices/users/safety/etc..
 
A while ago, a couple people on this forum mentioned in a post that they try to avoid where possible using the "Set while button pressed" option for HMI pushbuttons because some touch screen drivers time out after a while. I was told it's better to set the bit via the HMI then to reset the bit in the program immediately after it is used.

I generally agree with this approach. The only drawback is that while watching the ladder logic, you may never see the bit from the HMI go true. This is usually a non-issue if your logic is built so that the activation of the button causes other logic to "seal in" or otherwise remain active long enough to monitor.

If the button needed to be activated longer, a timer could be used (I'm guessing a pulse timer?). But what happens in the case where you actually do want to have the HMI button held down for an operator-decided variable amount of time?

If you need to use the duration of a button press in your control scheme then the method above won't work. In those cases, the best you can do is have a maximum time limit after which you can reset (clear, zero) the address of the momentary button.

This would be, for example, like a conveyor jog function. You want the operator to be able to jog the belt up to, say 1 minute, but you want the belt to stop as soon as the button is released. For this type of "jog" button, I program it normally (no unlatch in the PLC), and make sure to disable it or clear the bit when the mode changes or when the time limit for the device is reached.

I think I can find some logic that does the basic "stuck button" avoidance, not sure if we have any examples of where a timer is used.

HMI_PB_Logic_000.jpg
 
I was told it's better to set the bit via the HMI then to reset the bit in the program immediately after it is used.


I know alot of people say this practise must be used but i have one issue with this that i saw and stopped doing it all together.
Lets say theres a break in communications and the operator presses a couple of buttons. Those commands are set. So as soon as the communication is fine again multiple commands are activated at once. This can be avoided with coding but still dont like it
 
You mean loss of communication between the HMI and PLC? Based on Okie's code, what they mean is, latch the bit in the program, not set the bit in the HMI itself. If there's no HMI communication, the hmi bit in the program is never latched.

Or you mean the operator pressed the buttons before the communication break?
 
Last edited:
Yes what OKIE is doing is right. I have seen people setting the bit in the hmi or scada and resetting it from the plc
 

Similar Topics

Hi all, I am having an issue where some of my HMI push Buttons and Indicators go in to error when I navigate to a new screen. I am using a...
Replies
16
Views
460
Hi Guys, what could cause HMI Button names in runtime to be showing 'text' instead of their real names. (TIA Portal - Comfort Panel)? I will...
Replies
4
Views
1,665
Hi, I have to replace an old Exor Tline HMI with a siemens HMI. I was able to upload the project from the HMI but it appears to have not uploaded...
Replies
2
Views
1,227
Hello, Controllogix 5572 with Studio 5000 v33 and FactoryTalk View SE v12. Is there a way to force I/O bits using HMI pushbuttons? I've tried...
Replies
6
Views
2,878
Hello, When it comes to process control (e.g starting/pausing/stopping a batch or sanitation function) with HMI pushbuttons, what is the...
Replies
11
Views
2,986
Back
Top Bottom