You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old July 21st, 2021, 04:55 PM   #1
Yashka
Member
United States

Yashka is offline
 
Join Date: Nov 2019
Location: WV
Posts: 66
CCW 13, momentary push button problem

Hi All
Could anyone advise me on how to protect the push button on the screen from occasional touch? I've faced up the problem that I can't control the momentary push button for press and release. This button has itself behavior and I can't use ordinary practice for simple setting some delay on press action. This button is releasing itself after a delay stored in the Hold Time property.

Thanks in advance!
  Reply With Quote
Old July 21st, 2021, 10:37 PM   #2
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 3,082
So you are saying you cannot use the debounce pattern (e.g. here, and the image below) to wait for a press long enough to be considered non-occasional-touch?


How about double-click logic (at least Xms and no more than X+Yms between two presses)? Or press once, which brings up an "Are you sure?" query.







__________________
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
  Reply With Quote
Old July 22nd, 2021, 12:28 AM   #3
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 3,082
Clumsy but functional slow double-click detection, ignores single clicks and too-fast double-clicks.

See here for code in operation; assumed HMI writes a 1 to value of BOOLEAN tag [HMI Target] whenever screen button is touched; PLC overwrites [HMI Target] with a 0 immediately after.

xxx.png
__________________
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
  Reply With Quote
Old July 22nd, 2021, 01:25 PM   #4
Yashka
Member
United States

Yashka is offline
 
Join Date: Nov 2019
Location: WV
Posts: 66
Thanks all, but I need to exactly long-press action emulate due to personnel requirements.
  Reply With Quote
Old July 22nd, 2021, 01:53 PM   #5
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 3,082
Quote:
Originally Posted by Yashka View Post
Thanks all, but I need to exactly long-press action emulate due to personnel requirements.

But you said the "button is releasing itself after a delay stored in the Hold Time property."


Is that Hold Time property longer than the required long-press duration?
__________________
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
  Reply With Quote
Old July 22nd, 2021, 02:29 PM   #6
Snyd1
Member
United States

Snyd1 is offline
 
Join Date: Jun 2018
Location: there
Posts: 156
Quote:
Originally Posted by Yashka View Post
Thanks all, but I need to exactly long-press action emulate due to personnel requirements.
Not sure I completely get what you are trying to accomplish. Do you need something like a two hand control type where operator needs to hold the button until the process completes? A little better discription of what you are trying to achieve might be helpful.
  Reply With Quote
Old July 22nd, 2021, 02:36 PM   #7
Snyd1
Member
United States

Snyd1 is offline
 
Join Date: Jun 2018
Location: there
Posts: 156
Quote:
Originally Posted by drbitboy View Post
But you said the "button is releasing itself after a delay stored in the Hold Time property."


Is that Hold Time property longer than the required long-press duration?
I believe he is talking about the setting for like a PV800 in CCW.

"Hold Time

Specifies the length of time a momentary push button remains in the next state after being released. To ensure each state is read, the hold time must exceed the scan time of the controller. Hold time values are 0, 50, 250, 500, 750 or 1,000 milliseconds. The default is 500 milliseconds."

edit: Possibly a latched pushbutton would allow him to program the exact duration he is looking to achieve to get around the momentary pushbuttons hold time

Last edited by Snyd1; July 22nd, 2021 at 02:41 PM.
  Reply With Quote
Old July 22nd, 2021, 03:23 PM   #8
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 3,082
Quote:
Originally Posted by Snyd1 View Post
I believe he is talking about the setting for like a PV800 in CCW.

"Hold Time

Specifies the length of time a momentary push button remains in the next state after being released. To ensure each state is read, the hold time must exceed the scan time of the controller. Hold time values are 0, 50, 250, 500, 750 or 1,000 milliseconds. The default is 500 milliseconds."

edit: Possibly a latched pushbutton would allow him to program the exact duration he is looking to achieve to get around the momentary pushbuttons hold time
hold time: minimum length of time the 1 is written by the HMI to the PLC, even if the button-press time is shorter than the hold time

Cf. here.

So if the OP of this thread is using a PanelView, then they should be able
  • to reduce the hold time to, say, 50ms, and
  • to start, and continue to run, a TON timer in the PLC when the value becomes 1, and
  • to only accept the TON's .Q becoming 1 as an indication of a sufficiently long button press.


If they are not using a PanelView, then perhaps the Hold Time value has a different meaning.
__________________
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
  Reply With Quote
Old July 22nd, 2021, 03:31 PM   #9
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 3,082
The original query was how to protect the (touch-)screen button from an occasional touch; one solution would be a plastic cover and some hinges.
__________________
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
  Reply With Quote
Old July 23rd, 2021, 03:03 AM   #10
parky
Member
United Kingdom

parky is offline
 
parky's Avatar
 
Join Date: Oct 2004
Location: Midlands
Posts: 3,350
I have done this many times (if I read the OP correctly), on one system we had a problem where the operator would press the wrong button (on a hold i.e. alarm or other) three buttons would appear, resume, resume No checks & abort
Even though the abort would then ask the question "are you sure", they still aborted when they did not want to, this was down to a couple of things, we found some of the operators could not read English very well, the buttons were coloured so should have been obvious & relied on see/do attitude, purely just pressed the wrong buttons etc.
I have done it a couple of ways, in the HMI, the button is true while pressed & a 3 second timer in the PLC before the process aborted, same thing but on release so they had to hold the button for 3 seconds & release. Unfortunately even if you make it difficult for them to do it accidently they still do it.
One of the favourites was I didn't do anything it just stopped, well that did not happen, unbeknown to them I logged the operator logon, and buttons pressed in a database, very embarrassing for them in the meetings when presented with the evidence.
  Reply With Quote
Old July 23rd, 2021, 09:24 AM   #11
Yashka
Member
United States

Yashka is offline
 
Join Date: Nov 2019
Location: WV
Posts: 66
Quote:
Originally Posted by drbitboy View Post
hold time: minimum length of time the 1 is written by the HMI to the PLC, even if the button-press time is shorter than the hold time

Cf. here.
Described behavior of the momentary push-button is fully false. It is the root cause of my question due to this type of button is holding pressed only time specified in the Hold Time property. In other words, the press time is independent of a human finger on the screen and it will release after Hold Time property value right along.

Any other types of pushbuttons won't be released until the next press.

And, yes, I'm using Panelview800 via CCW Designer.

P.S. I've already found many stupid bugs in CCW 13, and it seems like the next one in my collection.
  Reply With Quote
Old July 23rd, 2021, 10:26 AM   #12
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 3,082
Quote:
Originally Posted by Yashka View Post
In other words, the press time is independent of a human finger on the screen and it will release after Hold Time property value right along.
By "press time" I assume you mean the duration from the time the HMI writes the 1 to the PLC to the time the HMI writes the 0 to the PLC.

That is different from what @gatenuator saw here. I wonder why either it was changed, or you see something different. Is there a configuration option that controls what [Hold Time] means?

Anyway, getting back to the original question, if the HMI button works as you say, and the operator has no control over the duration of the value being 1, then you are presumably outta luck doing what you want with a single touch.

I am sorry I took so long to understand the problem, but in my defense please note that all earlier explanations been less than unambiguous; until I saw the phrase "independent of a human finger on the screen," and even with that I still have to interpret/assume "press time" to mean "duration of value of 1."
__________________
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
  Reply With Quote
Old July 23rd, 2021, 11:03 AM   #13
parky
Member
United Kingdom

parky is offline
 
parky's Avatar
 
Join Date: Oct 2004
Location: Midlands
Posts: 3,350
I also assumed time pressed, then again I replaced panelviews on our plant so have only a little experience on them I used mainly Beijers, the button press could be while pressed, I preferred this as momentary meant if slow coms it could be missed (had this on one system so in the end used toggle in the hope it would only be pressed once & reset it in the PLC seemed to work ok).
  Reply With Quote
Old July 23rd, 2021, 03:45 PM   #14
Yashka
Member
United States

Yashka is offline
 
Join Date: Nov 2019
Location: WV
Posts: 66
Quote:
Originally Posted by drbitboy View Post
By "press time" I assume you mean the duration from the time the HMI writes the 1 to the PLC to the time the HMI writes the 0 to the PLC.
Yes, I mean exactly it.

Quote:
That is different from what @gatenuator saw here. I wonder why either it was changed, or you see something different. Is there a configuration option that controls what [Hold Time] means?
He's describing the behavior of the version of 20 years old. And, I can change nothing in [Hold Time] means.

Quote:
Anyway, getting back to the original question, if the HMI button works as you say, and the operator has no control over the duration of the value being 1, then you are presumably outta luck doing what you want with a single touch.
Yes, I know, and it's why I did post it question here. I hope that maybe someone also faced u with such a problem and found some solution.

Quote:
I am sorry I took so long to understand the problem, but in my defense please note that all earlier explanations been less than unambiguous; until I saw the phrase "independent of a human finger on the screen," and even with that I still have to interpret/assume "press time" to mean "duration of value of 1."
I'm not a native speaker and I'm sorry for my English. But it was really difficult to describe this issue.
  Reply With Quote
Old July 23rd, 2021, 03:51 PM   #15
Yashka
Member
United States

Yashka is offline
 
Join Date: Nov 2019
Location: WV
Posts: 66
Quote:
Originally Posted by parky View Post
I also assumed time pressed, then again I replaced panelviews on our plant so have only a little experience on them I used mainly Beijers, the button press could be while pressed, I preferred this as momentary meant if slow coms it could be missed (had this on one system so in the end used toggle in the hope it would only be pressed once & reset it in the PLC seemed to work ok).
The property Hold Time was invented exactly for it according to the manual. But the momentary button in common meaning should be controlled by humans finger. It should be 1 while pressed independently of pressed duration and 0 if human while not pressed on it. But here it works wrong for unknown reasons.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Push Button on Siemens web server using html XxLinkxX LIVE PLC Questions And Answers 4 April 22nd, 2019 06:41 AM
PanelView Plus 600 McBacon LIVE PLC Questions And Answers 8 June 24th, 2013 04:23 AM
push button as a toggle switch kaushikelectrical LIVE PLC Questions And Answers 15 December 7th, 2008 11:22 AM
Pointer Question mastabfly1 LIVE PLC Questions And Answers 19 June 20th, 2005 12:19 PM
using ^C in BASIC module ettikudiappan LIVE PLC Questions And Answers 9 November 24th, 2003 10:10 AM


All times are GMT -4. The time now is 10:19 PM.


.