Ask our Experts
Didn't find what you are looking for? Ask our experts!
New Community Ranking System
Our Community ranking system has recently been updated. You may notice changes in user rankings and receive system messages or notifications. If you have questions about how the new ranking works, please refer to the announcement post for more details (click here).
A forum for topics related to the scope of Modicon PAC offers and ecosystem along the whole lifecycle: Modicon M580 and 340, EcoStruxure Control Expert, EcoStruxure Process Expert (Unity Pro) and more.
Search in
Please select a country to continue with beta search.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-12-10 09:23 AM
Welcome,
There doesn't seem to be CONTINUE instruction available in Structured Text in Control Expert. How would you continue to next loop iteration without this instruction?
Thanks,
ciupol
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-12-16 11:18 PM
You are right.
There is no CONTINUE instruction available in Structured Text in Control Expert.
There is only EXIT function but it has different behavior.
CONTINUE is like JUMP to END inside particular loop.
Such instructions are about to avoid in Control Systems logic if possible.
What is your need to use it ?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2026-01-07 09:13 PM
Hi, As Marian mentioned best to avoid any loop functions in ST. Any time sensitive functions in the PLC like PID control EF blocks are affected since loops changes the PLC scan time and make it inconsistent. Correct way is to use the PLC scan as your loop and use IF..THEN..ELSE statements and counter variable to manage the loop count.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2026-09-23 12:24 PM
Hello ciupol,
What you are asking for is actually simple to implement.
One way is to allow jump and label in the project settings. You place a label just before the loop ending statement and jump to it (with an appropriate condition) from a desired point inside the loop.
Another way is to use a condition by itself (An IF-THEN-END_IF statement) that expands from a certain point to the end of the loop. If the condition is met, the inner part of the IF statement is executed. If not, execution hits the the loop ending statement, skipping the inner IF statement part. Generally speaking, I disagree with the recommendation to avoid using loop statements. Frequently, they are required with no easy substitution. I am attaching a solution for systematic Sudoku Solving Algorithm with some documentation and simple operator screen visualization. It demonstrates a technique for breaking very long process into manageable small loops.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2026-09-24 09:45 AM
Thanks for your response. Labels and JUMP instruction was the solution I used but as you probably know in general using JUMP statements is not considered good programming practice. But obviously it is the easiest solution if CONTINUE is not available. I avoided using IF statement as I would have to nest multiple IFs and it would be hard to follow (at least for me).
I also disagree with the statement that the loops should be avoided. Especially in my case where all my controllers are hot standby and that means that MAST task is periodic and not cyclic. The scan time is determined and running a loop will not change it (unless of course the loop has some unbelievable large number of repetitions). There is nothing better to look through an array than FOR loop.
Your sudoku solver application is super funny. I really like it. I saw on the other thread that you used to work for Schneider. If you have more applications like this it would be great if you can share. It is a great way to train new people in PLC programming.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2026-09-28 12:28 PM
Hello @ciupol,
Indeed there are several other developed applications worth sharing.
Here is one of the earliest. It implements a data logger for real values and stores the records on the SD card. Originally developed for M340 PLC, it should also works for M580. If I am not wrong, the application can be tested while Control Expert is running in simulation mode (I do not remember the location where the data is stored on the local disk).
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2026-10-02 01:14 PM
Hello again ciupol,
I figured out another way you may wish to use as a replacement for the missing CONTINUE command.
The idea is to insert a "Transparent" REPEAT statement that will wrap the entire content inside a FOR loop block. "Transparent" means that the UNTIL condition is always true so it actually does not interfere with the FOR loop execution. With this arrangement, placing an EXIT statement at some location will break the inner REPEAT-UNTIL loop while the FOR loop will continue to run its next index.
Example - A loop that skips even index values
====================================
Link copied. Please paste this link to share this article on your social media post.
You’ve reached the end of your document
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.