Explanation of the Run, Stop and Program operating modes of the PLC CPU

Programmable Logic Controllers (PLCs) can be put into Run or Stop mode, and sometimes into Program mode, usually using physical or virtual methods. But what do these modes mean and when should you use them?

In this article Consider the issue of actually loading and executing the program into the central processing unit (CPU). When performing these actions, the PLC can switch between operating modes. In this regard, we ask the question – why do these modes exist, and why and when do you need to manually change the mode yourself?

Loading programs into memory (stop mode)

Loading and executing are two completely different processes, even if they appear to be happening at the same time. When overwriting existing PLC memory with a new program, this can be done entirely (the entire program is loaded, no matter how small the versions are), but a more efficient process compares the loaded program and the new program, and then only updates the files with the changes. But no matter what process is used, executing a program is a non-trivial task.

PLC with start and stop modes only

Drawing.  1. PLC having only Run and Stop modes as physical switch options

Drawing. 1. PLC having only Run and Stop modes as physical switch options

The PLC allocates its working memory to perform three tasks: reading input registers, comparing and calculating logic processes in text or ladder stages, and finally updating output registers. To load a program, there must be a temporary stop in reading the program while new data is loaded – to complete this process, the CPU goes into stop mode.

What actually happens in Stop mode?

When the CPU is in stop mode it continues to register input signals. You will still see the input module LEDs illuminate when power is applied to the sensor/button. You will also see all ladder logic input instructions reflecting their actual state while the monitoring function is enabled. However, in stop mode, the CPU does not execute logic or update output. In other words, he just watches and waits without doing anything.

Do not confuse Stop mode with Off or Pause. The PLC is of course still running and when returned to run mode it will restart the logic and initialize any variables/tags as if it were on.

Malfunctions (Stop mode)

A number of failures can cause the CPU to enter stop mode. Not all faults will trigger a shutdown, but all serious CPU-related faults will trigger a shutdown. If the CPU does not detect an I/O module, it may simply be an I/O fault that will not force a stop, but most events that cause the red “fault” LED to appear on the processor will likely also be reflected as a stop event. Once errors have been resolved, the controller may need to manually return to Run mode to begin executing the program again.

Executing logic in Run mode

If you have mastered the previous section on stop mode, then the next mode should be easy to understand. Since the operating mode can usually be switched either by software or by using a switch, it is important to understand when you can and cannot perform each action.

Manual switching to the CPU always puts the PLC into stop mode, no matter what the software says – sort of like an emergency stop button. Returning the switch to run mode will be effective, but only if the software also puts the program into run mode.

Selecting online mode or operating mode

Figure 2. Online/Offline connections (highlighted in green) are completely different from operating mode selection (highlighted in red).

Figure 2. Online/Offline connections (highlighted in green) are completely different from operating mode selection (highlighted in red).

Can I just go offline to stop the PLC?

To change the mode remotely from the software, an online connection to the PLC is required. If you “disconnect” from the PLC, this NOT will put the PLC into stop mode. Moreover, you will no longer be able to change modes remotely until the connection is restored. Going offline will not prevent the PLC from executing commands at all.

Are there more than three operating modes?

Not all PLCs have the same two modes of operation; some have three mode selection options on the physical CPU switch: Prog, Run, and Rem (remote control). However, for example, the Rockwell Studio and Logix Designer development environments have a different set of three modes (Figure 3): Program, Run, and Test… but what does switching these actions mean?

Operating mode as opposed to remote start mode

Figure 3. Run, Rem and Prog allow the user to disable or enable online editing, as well as put the PLC into stop mode

Figure 3. Run, Rem and Prog allow the user to disable or enable online editing, as well as put the PLC into stop mode

So far we have called the stop mode program mode. This allows the PLC to load the program, but also stops the program from executing inside the CPU. In other words, Prog is the same as Stop for other brands.

What is the difference between startup and remote control modes?

By toggling a toggle switch (CompactLogix) or key (ControlLogix) on the front panel of the CPU, system engineers can determine whether the CPU is locked from any remote changes or online editing. Run mode limits the CPU and does not allow online editing of the program. Most often the PLC should be left in Rem mode, which will still execute the program but will allow changes to be made via an online connection. Tags and logic monitoring can still be done in Run mode.

If the PLC is operating correctly through an established online connection, but you are unable to make any changes to the program, make sure the switch is in Rem mode.

This functionality may be used in other terminology. For example, on some Direct Logic PLCs, the switch allows a Term or “remote terminal” position that allows online editing of data, while Run provides a read-only mode for monitoring but without making changes.

Term or terminal mode for online programming

Figure 4: Terminal mode means the same as Rem, allows the PLC to accept online editing

Figure 4: Terminal mode means the same as Rem, allows the PLC to accept online editing

What is the difference between program and test modes?

Test mode can be thought of as a combination of program mode (where the outputs are not powered but mixed with run mode) where the logic is actually executed. If you supply power to the actual input devices, the relay circuit steps will be executed, but the outputs will not be powered.

This mode differs from simulator mode because any subsequent chains that require an output to be turned on will not execute properly since those outputs are never actually powered. This is useful for testing and checking one chain at a time before starting the machine.

Other PLC modes and functions

Some PLCs offer a third option, in which the switch to the CPU itself is not an operating mode, but rather a reset function to clear errors or set parameters after major hardware upgrades. This is usually indicated by the Reset button as the switch position.

Resetting the switch position on some PLCs

Figure 5. Third reset position as shown on some PLCs

Figure 5. Third reset position as shown on some PLCs

Although this guide to PLC modes is not exhaustive in describing all modes of operation available to PLCs, it should be sufficient to identify the basic modes of operation commonly used by PLCs. Either way, with these basics in place, systems engineers and operators can apply best practices to troubleshoot problems and prevent downtime that result from programming a PLC correctly the first time.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *