Jump to content

Long Press Button Implementation (counter reset)


Recommended Posts

  • MVP 2023

OK.  Let's break this down to the separate things needed to achieve this.

1).  Push a button.

2).  Count a period of time that the button is pushed for.

3).  At the end of that period of time turn on an output.

4).  The output does the required action and then resets.  It might even show something on a screen that says it has happened ok and you can now stop pressing the button.

Hmmmm.  Well that would either be a timer, or a count incrementing in value, continuing to do so whilst the button is held on, and then resetting ready to do it all again on next long push.

It's over to you now to work on this idea.

cheers, Aus

Link to comment
Share on other sites

  • 4 weeks later...

It’s not “pre coded”. Fairly simple to construct however. Link display element ( touch feild) to a memory bit (MB1), in ladder use NO contact to drive timer coil, second net: use a PTC (positive transistional contact) to drive a reset integer function —[R]—

 

     MB1                             T1

——| |————————(   )——

 

       T1                                C1  (or T)

—-|P|————————[R]——

 

alternatively I believe timer can "self one shot" but would repeat cyclically if button was held longer than usual:

     MB1         T1            T1

——| |———|/|———(   )——

 

       T1                                C1  (or T)

—--| |————————[R]——

 

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.

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