Testing the Accuracy of a Sequence Loop with EQU and MOV Instructions

Question:

Hello, I have developed a sequential loop using EQU and MOV instructions and would like to ensure that it is functioning correctly. I have included a visual representation of the sequence. The sequence consists of two actions performed in succession, with a 2-second delay between each action. Each action is repeated four times. The initial setup of the sequence is not a concern for me, as the Phase_running and Start bits are for testing purposes. My main focus is on verifying the accuracy of the sequence loop. After testing it on my PLC, it appeared to be working properly. I plan to incorporate this sequence loop into a larger sequence and want to confirm that the logic is correct. Thank you for any insights. - Lespoils

Top Replies

To enhance the efficiency of your programming logic in Studio5000, consider adding an ONS instruction to the Start button rung to prevent continuous writing of 10 to the sequence. Alternatively, include an EQU statement in the rung to ensure the Sequence is equal to 0, avoiding potential restarts mid-sequence. Implementing event-driven checks by arranging the sequence in reverse order, with Sequence 10 as the last rung and Sequence 30 as the first, can compel the processor to evaluate the entire code before proceeding to the next step. Additionally, adjusting the scan order of the counter RES and prioritizing it as the first branch, followed by MOV 0 to Sequence as the last branch, can optimize performance. Alternatively, consider creating a separate rung stating Sequence = 0 RES counter to maintain logic consistency and ensure the counter resets when the Sequence is 0.

To improve the clarity of the code, consider the following suggestions. The code can be organized by separating different functions onto individual rungs for better visibility. Additionally, combining cascading timers into a single timer with a specific duration can streamline the code's functionality. It may be beneficial to keep certain instructions on separate branches or rungs for clarity. For example, a 4000ms timer named TIMER12 can replace TIMER1 and TIMER2, triggering the action when TIMER12.ACC surpasses 1999. The same concept can be applied to TIMER3 and TIMER4. The Start button serves as the initiation for a Start/Stop Circuit pattern, with the Stop condition being a combination of Counter.DN and Phase_Running. Seal-in and OTE write to a Runbit, while the activities of Actions 1 and 2 can be triggered based on specific conditions. The XIO instructions on the feed rungs to the TONs can be removed, as the sequence of Counter.DN values will reset the timers accordingly. Similarly, the XIO instructions on the feed branches to the TONs are redundant due to the advancement of the SEQUENCE value resetting the timer. Overall, organizing the code into clear rungs and optimizing the use of timers can enhance the functionality and readability of the program.

There is no need for a oneshot instruction; simply insert an equals 0 condition in the initial rung to ensure it is only triggered once when the sequence is at 0. This will prevent multiple executions and ensure efficient programming.

I appreciate everyone for their prompt and informative responses. I will review the recommended changes tonight when I return home. I am intrigued by the concept of reducing timers and resetting the counter at the beginning of the sequence once it is completed. This is precisely the information I was seeking! I will make these adjustments tonight and share the updated program afterwards. Thank you very much. -Lespoils

In an unconventional move, I would suggest isolating the Phase running contacts in a separate routine and only triggering it when necessary. This way, each time you move to a new Step, you can easily keep track of where to resume if you need to pause the process.

Hi Lespoils, it sounds like you've got a solid handle on your process, and you're being meticulous in ensuring everything runs smoothly, which is admirable. I suggest perhaps running your loop in a controlled or simulated environment first, just to ascertain that it won't misbehave when included in the larger sequence. Another helpful strategy is to build in safety checks or error traps in your sequence to catch any potential problems. This way, you can troubleshoot and correct them efficiently. Remember, good error prevention is always better than damage control.

Hey Lespoils, glad to hear you're making progress with your sequence loop. Seems like you're quite clear on your requirements. It's hard to pinpoint and provide an accurate feedback without looking at the actual code, but based on what you've described, it sounds like you're on the right track. A timing test is a good first step to confirm that the delay is functioning as expected. For the sequence accuracy, you might want to consider a step-by-step debug to verify that each action is executing as intended. Also, review your logic for any possible exceptions or error conditions that you might not have accounted for. Remember, thorough testing is key especially when you're integrating this into a larger sequence.

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)

FAQ: 1. How can I test the accuracy of a sequence loop using EQU and MOV instructions?

Answer: - To test the accuracy of a sequence loop, you can visually represent the sequence, ensure the correct timing between actions, and verify that each action is repeated as intended. Additionally, testing the sequence on a PLC can help confirm its proper functioning.

FAQ: 2. What are some key components to consider when verifying the accuracy of a sequence loop?

Answer: - Key components to consider include the timing between actions, the number of repetitions, the initial setup for testing purposes, and ensuring the logic of the sequence loop is correct before incorporating it into a larger sequence.

FAQ: 3. How can I incorporate a tested sequence loop into a larger sequence with confidence?

Answer: - To incorporate a tested sequence loop into a larger sequence with confidence, you should thoroughly verify the accuracy of the loop, ensure it functions as intended on a PLC, and validate that the logic aligns with the requirements of the larger sequence to avoid any issues during integration.

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  â†’