I have a specific sequence that needs to be followed and controlled using a single push button. The process is as follows: 1) Press the button to complete a step and advance to the next one. The system then waits for the button to be pressed again. 2) Press the button again to complete the next step and move on to the following one, with the system waiting for the button to be pressed once more. The issue I am encountering is that the button is being pressed too quickly, causing the process to be completed prematurely. I have included a photo for reference. Any assistance would be greatly appreciated. Thank you.
The logic appears to be set up to retrigger the ONS whenever the Step number changes, rather than only when the pushbutton is released and pressed again. Currently, any change to the left of the ONS will reset it, allowing for retriggering. To ensure that only the pushbutton can retrigger the ONS, it should be positioned immediately after (to the right of) your XIC/XIO for the button.OG.
In your case, the issue lies in the oneshot staying active for only one scan, carrying over to the next rung. To address this, a simple solution is to reset the oneshot bit on each rung when advancing to the next sequence step. For example, you can achieve this by using the following logic: ONS Bxx MOV 40 SEQ Var RST ONS. This approach will immediately reset the oneshot rather than waiting for the next scan to start. My method is based on a Mitsubishi version that utilizes a rising pulse, or oneshot, which is reset on each rung to ensure its validity only within that specific rung. Please note that this solution is specific to Mitsubishi software as I do not have access to Allen Bradley software.
If all rungs in the sequence resemble those shown in the screenshot, they will all evaluate as True in order. Operaghost has provided a helpful solution in a previous post. Another option is to delete the second branch on each rung and increase the _StepNo using a push button and a one shot.
Operaghost pointed out a possible issue with the logic, indicating that the ONS may be retriggering each time the Step number changes instead of only when the pushbutton is released and pressed again. To ensure that only the pushbutton can retrigger the ONS, it should be positioned immediately following the XIC/XIO for the button. The pushbutton in question is "gU_LhsCalibration[2].B_Verify," and an Oneshot is being used on the right side. Currently, pressing the Verify button on Step 20 immediately advances to Step 100, when the desired behavior is to progress sequentially from 20 to Verify button to 30 to Verify button, and so on until reaching the process End. Thank you for your response.
In addition to OperaGhost's recommendation, consider placing the PB and oneshot separately at the start of your step sequence. To illustrate, set up your steps 20 and 30 as follows (shortening gU_LhsCalibration[2] tags to tag names after the period): XIC(B_Verify) ONS(Cal1Verify_ONS[1]) OTE(Verify_Trigger)EQU(I_StepNo,20) [ COP(S_StepDesLiteral[1], S_StepDes, 1) , XIC(Verify_Trigger) MOV(30, I_StepNo) ]EQU(I_StepNo,30) [ COP(S_StepDesLiteral[2], S_StepDes, 1) , XIC(Verify_Trigger) MOV(30, I_StepNo) ]This setup ensures that one press of the PB triggers only one step without needing additional oneshots. You must release and press the PB again to move to the next step.
From your description, it seems you might want to consider integrating a debouncing mechanism for your button. Simply put, debouncing insures that only one signal will be registered with each press. This will prevent the unintentional rapid-fire triggering if the button is pressed too quickly. Generally, this can be done using either software or a simple hardware solution depending on your setup. Labs for microcontroller applications often have specific resources on how to implement debouncing that you may find useful.
It sounds like you're dealing with a classic issue of button debounce or user timing! One solution could be to implement a delay after the button press is detected—this would give the user a moment to release the button before the next step is registered. Alternatively, you could add a visual or audio indicator that confirms the step has been completed, ensuring the user knows when to press the button again. Just some thoughts that might help control the pace of your sequence!
It sounds like you're dealing with a classic case of debounce issues! Have you considered implementing a simple debounce mechanism in your code? You could introduce a short delay after each button press registration, which would prevent the system from reading multiple presses too quickly. Additionally, a visual or auditory indication (like a beep or LED flash) after each step could help reinforce that the current step has been completed before moving on. Let me know if you need more details on how to set that up!
✅ Work Order Management
✅ Asset Tracking
✅ Preventive Maintenance
✅ Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Answer: - To control a step-by-step process using a single push button, each press of the button should complete one step of the process and wait for the button to be pressed again to proceed to the next step.
Answer: - Pressing the button too quickly can cause the process to be completed prematurely. Ensure that there is a proper delay or debounce mechanism in place to prevent unintended rapid button presses.
Answer: - You can prevent the button from being pressed too quickly by implementing a debounce algorithm or adding a delay between button presses to ensure the system accurately registers each press and advances to the next step accordingly.
Answer: - When designing a control sequence with a single push button, consider implementing a state machine that tracks the current step, waits for the button press to advance to the next step, and includes mechanisms to handle debounce and prevent premature completion of the process.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.