PLC Sequencer Instruction with Example

Programming a sequencer is an advanced skill in ladder logic on a PLC. It is a technology that uses SQI and SQO instructions to create a sequence of events based on specific steps and allows the PLC to follow a set sequence of events.

Although Squeenser isn’t something you’d expect to use regularly, it’s an advanced technology that shines in specific applications. In this tutorial, we will go through the use cases of a sequencer, how SQI and SQO instructions are set up as well as a practical example of a sequencer.

For example, a PLC can be used to automate the filling of a tank. When a level sensor is linked to a PLC, the pump can be started when the water level in the tank falls below a specific threshold and stopped when the water level in the tank reaches a certain level.

This is a simple example that does not necessitate the use of a PLC. PLCs can be used to automate similar tasks that can be controlled with logical operations on data from input sensors.

PLCs are commonly employed in industry to automate processes. Many of the duties will be dependent on one another. Some tasks can only be completed after the completion of others. Let me demonstrate this with a simple task that we are all familiar with.

PLC sequencing is a method of repeating a collection of processes in a specific order until no more input signals are detected. It’s commonly utilized in batch activities in industrial automation applications. For each new batch, the same set of processes is repeated in the same order.

An output instruction is the PLC Sequencer Instruction (SQO). SQO instructions can repeat the same precise ON or OFF patterns of outputs over and over again.

In most cases, a sequencer program can accomplish what a conventional program takes 100 words to accomplish.

Sequencers make programming easier and future adjustments easier by setting up a series of events. To control output devices in a sequential manner, use the sequencer output (SQO) command.

PLC Sequencer Instruction

In the above block, we have six parameters

File :

Address of the reference sequencer file.

Mask :

The address of the mask word or file that the instruction uses to transfer data.

Dest :

The address of a SQO’s output word or file to which the instruction transfers data from its sequencer file.

Control :

The status byte of the instruction, the length of the file, and the position in the file are all stored in the address and control element (3 words) of the instruction.

Length :

A number of steps of the sequencer file starting at position 1.

Position :

The command moves data from/to a certain point or step in the sequencer file.

Refer to the below Block,

Block Description :

The SQO instruction travels a step through the programmed sequencer file on successive false-to-true transitions, transmitting step data through a mask to a destination word.

When the sequencer file’s last word is sent, the done bit is set. The command resets the position to step one on the next false-to-true transition.

Let’s have a look at the block using a basic example.

PLC Program

RUNG 0000

The sequencer output block is connected to the start and stop PB using the sequencer input switch.

Data file-Reference sequence file,

B3:0, B3:1, B3:2 & B3:3 are sets to 1 for reference,

When Sequencer input I:0/2 turns ON for the first time,

According to the reference file, O:0/1 turns ON.

Length is 4 & position is 1.

When Sequencer input I:0/2 turns ON for second  time,

According to the reference file, O:0/2 turns ON.

Length is 4 & position is 2.

When Sequencer input I:0/2 turns ON for the third time,

According to the reference file, O:0/3 turns ON.

Length is 4 & position is 3.

When Sequencer input I:0/2 turns ON for the fourth time,

All outputs are in the off condition.

Length is 4 & position is 4.

It s like reset, ready to start from the beginning again.

The Sequencer Implementation Strategy

Basically, the sequencer is built from three components: input, output, and step logic. The input is used to determine what is currently active and how it enables the sequencer.

The output is used to identify what each step of the sequence should be capable of. Finally, the phase logic is what will control what is needed to transition from one phase to another and which outputs need to be set to a specific phase.

A sequencer will work best in applications that are defined by multiple steps that are dependent on each other. As you develop PLC-based applications, you will develop an intuition for using sequencers. A general rule of thumb is that if you have a process of 3 steps or less, you can implement a simple routine that goes through a series of MOV instructions instead of a sequencer.

As mentioned above, PLC programmers have gotten used to implementing a sequencer through the use of MOV instructions. Although this technique is not recommended for large applications; Here is an example of how it works:

An integer is created and will be used to store the current step of the sequence. A MOV instruction is used to change the phase of a sequence by writing a specific value to the integer created above.

An EQU instruction is used to compare a value to a constant and allow certain actions to be performed accordingly. Once the action is completed, the next step is started. The process is repeated until there is no step or the sequence is reset.

Conclusion

Creating a sequencer can be a daunting feat, but it is extremely useful in some applications. Having the knowledge and capability to design such applications can make your application robust, scalable, and easy to understand. If done properly, you and other programmers will be able to review the arrays you’ve created and make changes or troubleshoot applications if necessary.

The sequencer takes advantage of two major instructions: SQI and SQO. By setting the array within each, you can step through the sequence, activating the specific input; The instruction will set the output based on the stage you are in.

Leave a Reply

Your email address will not be published.