A picture detailing how the PLC works

PLC Operating Mode

As you may know, the operating mode of a PLC is based on cyclic scanning. This means that the PLC continuously scans the entire program from start to finish, left to right, in a sequential manner, and repeats this process over and over again.

Although this concept seems straightforward, many beginners still make mistakes during actual programming due to a weak understanding of the fundamentals. So, how exactly does the cyclic scanning work in a PLC? To better explain this, we can use a two-way circuit as an example.

Two-Way Circuit

A two-way circuit is a simple but effective concept. For instance, consider a circuit where pressing a button toggles a light on and off. The first time you press the button, the light turns on; the second time, it turns off. This is known as a divide-by-two circuit.

There are various ways to implement such a circuit, but for the purpose of this article, we’ll focus on using basic logic instructions to demonstrate the PLC’s working mode. In the example, the button is connected to X0, and the lamp is connected to Y0. You can refer to the diagram below for a clearer understanding.

PLC Cyclic Scanning Process

Sometimes, a picture is worth a thousand words. Here’s a visual representation of the PLC's scanning process.

Don’t worry if it’s not clear at first—there are detailed breakdowns below.

The following four figures illustrate the process of pressing the button for the first time.

- The light turns on.

Figure 1: Program status before the button is pressed.

Figure 2: Button is pressed, and the first scan cycle begins.

Figure 3: The button is fully pressed (not released yet), and the PLC starts the second scan cycle.

Figure 4: Program status after the button is released.

Now, let’s look at the process of the second button press and release.

- The light turns off.

Figure 1: Program status before the second button press.

Figure 2: Second button press, and the first scan cycle begins.

Figure 3: The button is pressed again, and the PLC starts the second scan cycle.

Figure 4: Program status after the button is released.

Understanding the cyclic scanning mechanism is essential for mastering PLC programming. It helps avoid common errors and ensures your control logic behaves as expected. Whether you're new to PLCs or looking to refine your skills, studying these processes will greatly improve your ability to design reliable and efficient systems.

SMD LED

Wuxi Ark Technology Electronic Co.,Ltd. , https://www.arkledcn.com