How to Create a High Output from Buttons Using a Specific Keypress Sequence

Question:

Hello everyone! I’m seeking your assistance with my project. I have five buttons connected to the inputs, and I need the output to go high only after a specific button sequence is entered—specifically, the combination of 1-2-1-5-3. Any other combinations should trigger a reset. Could you please guide me on how to achieve this? Thank you in advance for your help!

Top Replies

What personal experiences have you explored?

Hello, sir. Thank you for responding. I've experimented with numerous combinations. I believe activating the output is straightforward; however, arranging it in a specific order poses a challenge.

Could you create a diagram by hand, sir, or something similar for reference purposes?

Visit our latest article on building a PLC program to discover an engaging Simon game that showcases random sequences for you to replicate. Test your memory and improve your sequencing skills as you match the displayed patterns. This interactive feature could significantly enhance your understanding and application of sequences in PLC programming. Best regards!

How can you determine if multiple buttons are pressed simultaneously? One effective method is to utilize an array. For instance, if only button "1" is activated, you would insert the value "1" into the array. Similarly, if only button "2" is pressed, you would place "2" into the array. You can continue this process until you have added five values. Once the array reaches this count, you can evaluate whether it contains the desired numbers. If it doesn’t match your criteria, you can clear the array and restart the process. Implementing this solution is relatively straightforward and shouldn't pose significant challenges.

More Replies →

Streamline Your Asset Management
See How Oxmaint Works!!

✅   Work Order Management

✅   Asset Tracking

✅   Preventive Maintenance

✅   Inspection Report

We have received your information. We will share Schedule Demo details on your Mail Id.

To add a comment, please sign in or register if you haven't already..   

Frequently Asked Questions (FAQ)

Ready to Simplify Maintenance?

Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.

Request Demo  →