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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.