///// START OF VIDEO SCHEMA ///// ///// END OF VIDEO SCHEMA /////

What Is a Sequencer in PLC Programming?

See how a sequencer helps a PLC run steps in the right order.
What Is a Sequencer in PLC Programming?
Listen to this article

In this article, I will introduce you to the concept of a sequencer in PLC programming. By the end of the article, you will be able to;

  • Explain what a sequential process is,
  • Explain what a sequencer is in the context of PLC programming,
  • List the components that make up a sequencer

Let’s get started by talking about sequential processes.

Sequential processes

In industrial automation, many processes are sequential. A sequential process is a process that has steps that must be completed in a specific order.

In our course, CODESYS: Programming Sequencers, we use the example of a mixing process. In a typical mixing process, a tank is filled with two liquids until a setpoint is reached. Once the tank is filled, an actuator mixes the contents of the tank for a defined period of time. Finally, the mixed liquid is discharged from the tank.

This is a sequential process because the steps must be completed in a specific order. The contents of the tank can’t be mixed if the tank is not filled, and the contents of the tank should not be discharged if they are not mixed.

Controls engineers and PLC programmers use a specific piece of software, called a sequencer, to control sequential processes.

CODESYS: Programming Sequencers
Learn how to design, program, and test sequencers in CODESYS.

Let’s look at the structure of a sequencer.

Sequencers

A sequencer is a piece of code that is used to control a sequential process.

Some programming environments, like Rockwell Automation’s Studio 5000 Logix Designer, have dedicated instructions for controlling sequencers, but most PLC programmers write the logic for a sequencer from scratch.

A sequencer can be a very simple or very complex piece of code, depending on the process being controlled. Regardless of its complexity, all sequencers are fundamentally built from the same components. The components used to build a sequencer are;

  • Steps
  • Transitions
  • Actions
Sequencer diagram with steps, actions, and transitions.

Let’s look at each of these components in detail to see how a sequencer is built.

Steps

A step is a logical part of a sequential process. As a general rule, one action should happen during a step.

In our mixing tank example, we could break the process down into the following steps:

  • The Idle step, where nothing is happening.
  • The Filling step, where the tank is being filled.
  • The Mixing step, where the tank’s contents are being mixed.
  • The Discharging step, where the tank’s contents are being emptied.

As you can see, dividing a sequential process into steps helps us to describe the process in a structured way.

Transitions

Transitions define when the process moves from one step to another.

In our mixing tank example, the process moves from the Idle step to the Filling step when a start button is pressed, from the Filling step to the Mixing step when the tank has been filled, and from the Mixing step to the Discharging step when the contents have been mixed.

Finally, the process moves from the Discharging step to the Idle step if there is a stop request active, otherwise, it moves to the Filling step. As you can see, transitions can include conditions to affect which step is activated.

Actions

Finally, actions define what the PLC does when a certain step is active. Actions are what let the PLC control the sequential process.

In our mixing tank example, the PLC opens the fill valves when the Filling step is active, activates the actuator when the Mixing step is active, and opens the discharge valve when the discharging step is active.

Mixing tank process and sequencer steps.

Programming sequencers

In the previous section, we designed a sequencer by defining its steps, transitions, and actions. Once you have designed a sequencer, you can implement it in PLC code. Since programming sequencers is such a common task, there are some design patterns that you can use to program your sequencer.

By following these design patterns, you ensure that your code is readable and well organized, which helps to make sure that it can be debugged and extended in the future.

In our course, CODESYS: Programming Sequencers, we go through the exact steps involved in designing, programming, and testing a sequencer using CODESYS, a free, full-featured PLC Development Environment with a built-in PLC simulator.

At the end of the course, you will know how to build sequencers in CODESYS and will have built a project to prove it.

Wrap-Up

In this article, I explained what a sequential process is, what a sequencer is, and how to design a sequencer to control a sequential process. I also explained that you can learn how to program sequencers in CODESYS in our course, CODESYS: Programming Sequencers.

Just a quick reminder: If you want to train your team with RealPars courses, don’t forget to check out realpars.com/business.

FAQS

Frequently asked questions

What is a sequencer in PLC programming?
Why do we use sequencers in automation?
What are the main parts of a sequencer?
Can I use a sequencer for any process?
What does a transition do in a sequencer?

Learn from Industry Experts

Start Learning for Free