PLC Sequencer Programming - Tutorial on SQI SQO Instructions in RSLogix 5000 Ladder Logic [Part 1]

preview_player
Показать описание
PLC Sequencer Programming - Tutorial on SQI SQO Instructions in RSLogix 5000 Ladder Logic [Part 1]

Programming a Sequencer in Ladder Logic on a PLC is an advanced skill. It’s a technique which utilizes SQI and SQO instructions in order to create a sequence of events which is based on specific steps & allows the PLC to follow a prescribed sequence of events. Although the squencer isn’t something you’d expect to use on a regular basis, it’s an advanced technique which shines in specific applications.

In this tutorial, we will be going over the use cases of a sequencer, how the SQI and SQO instructions are setup as well as a practical example of a sequencer.

The Sequencer Implementation Strategy
At the core, the sequencer is built from three components: Inputs, Outputs & Step Logic. The inputs are used to determine what’s currently energized and how it enables the sequencer. The outputs are used to identify what needs to be enabled at each step of the sequence. Lastly, the step logic is what will control what’s required to transition from one step to another and which outputs need to be set in a specific step.

A sequencer will work best in applications which are defined by multiple steps which are dependant on each other. As you develop PLC based applications, you will develop an intuition on where to use sequencers. A general rule of thumb is that if you have a process with 3 steps or less, you may implement a simple routine which goes through a series of MOV Instructions instead of a sequencer. As you go beyond this limit, the sequencer will be the preferred method of choice.

PLC Programmers have gotten used to implementing a sequencer through the use of MOV Instructions as mentioned above. Although this technique isn’t advised for larger applications; here’s an example of how this works:

An integer is created & will be used to store the current step of the sequence.
A MOV Instruction is used to change the step of the sequence by writing a specific value into the integer created above.
An EQU Instruction is used to compare the value to a constant & allow certain actions to be carried out accordingly.
Once the actions have been completed, the next step is initiated.
The process is repeated until there aren’t any steps or the sequence is reset.

Find us on social media:

Other Cool Content:
PLC Input Output Mapping / Buffering | IO Addressing Basics in RSLogix Studio 5000 Allen Bradley

PLC HMI Programming Project | Development Tutorial Beginners Ladder Logic Diagram RSLogix | Part 3

RSLogix & Studio 5000 Produced and Consumed Tags | PLC Data Concentrator SCADA, Messaging, EtherNet

HMI Development | FactoryTalk View Studio ME Rotation Animation Tutorial | Pump Fan Motor Program

PLC Vlog#1 - Which PLC Hardware to Buy, When to Invest & What You Should Know before Purchasing PLCs

Relevant Search Terms
plc sequencer tutorial, plc sequence programming, plc sequencer function, plc sequencing, plc sqo, sqo rslogix 500, plc sequential logic, plc sequencing,
Рекомендации по теме
Комментарии
Автор

The good thing about using MOVs or latching individual bits of a DINT for a sequencer is that you can normally see the problem in ladder. Anyone capable of going online can just scroll down until they see the last MOV instruction and see what is keeping the rung from moving to the next step. They don't have to decode masks or other crap that is going on inside this function.

This isn't that much different than doing things Bitwise, and while it may be a great way to program some things it is also a hot mess to decode if you don't know what's going on. You can comment all you want, but typically someone has to sit you down and walk you through it.

DonkeyDongDoug
Автор

For sure a "numerical sequencer", or state machine as it is normally called, is far easier to troubleshoot. The biggest advantage to using traditional state machine is that new logic can be added in between existing logic. This could be done using SQI/SQO, but it's not natural if the original programmer didn't leave spare steps. Here are other advantages to this "unprofessional" method.
- Typically state machine functions are grouped 100-199 for this, 200-299 for that, and so on. This makes it very easy to troubleshoot. Nobody in their right mind numbers the states 1-2-3. At least they are 10-20-30.
- When a fault occurs in a state machine, the fault can be captured easily by negating the state or copying the state value to a variable that matches the HMI.
- Where multiple stations use identical logic, the state machine can be kept in an array, where the index chooses the station. This simplifies visualizations and indexed logic.
- A LIM instruction cleanly identifies a range of states.
- Code is cross-compatible with other brands of PLCs, including the dirt-cheap models.
- Decision-based sequence loops and sequence branches are essential in many applications. For example, executing a group of states a few times in a row, or breaking out of a sequence after an event. Think "do while" or "do loop".
- Sequence parallel operation where the state machine branches and starts one or more other state machines, then continues after the others are complete.
- Numbers are far easier to comprehend than bits. Though bits are easier to see, you have to find which bit is illuminated to know where you are in the sequence. The number helps you find the spot in the code much faster.
- Nothing is hidden in a table where you have you expand and collapse variables in a data table you see what is going on. This process is slow and confusing, even in this video.
- The act of using an SQO to activate multiple threads of logic is supremely bad news because you cannot cross-reference your way from output to input. It is nearly a criminal act to obfuscate logic in this way. How can you expect an average electrician to troubleshoot a system when the code heads down such a dark alley?
- In 25 years of machine building and service work, I've only seen one system use the SQI/SQO instructions. The implementation was "cool", but it's a pain in the ass to work on.

I have seen several other "interesting" state machine types.
- Bit sequencers that advance from one bit in an integer to the next. Siemens programmers seen to love this, but it is bad for many reasons.
- Shift registers, which also have many failings.
- Numerical state machines where the value rises or falls based on permissives. These are a hassle. I learned this technique from a guy at HP who was software engineer on a project with many programmers. It worked very well for him.

Anyway, this video is a nice example of using the SQI/SQO instructions.

microdesigns
Автор

Thank you very much! I was having an issue with an SQO and could not get a valve open during our step 10 production mode. With your video I was able to find it in the data table and fix the issue. Your video was awesome!

kellyvalentine
Автор

Would the SQI and SQO be a good application for controlling the steps of a servo. Say I need to pull material to three different steps and at each step I have there is a process that has to happen before the next step. Like sandblasting, then cutting, the pull and release then go back to home and start over again?

MasterMando
Автор

Ive been wanting to try these instructions for a filter backwash but i always default to the old school way of incrementing a value and using EQU and MOV blocks. Might try these next filter job i get

WhiskeyKilo
Автор

How about slowing down there speedy so that we can learn something?

hendrioosthuizen
Автор

Hi, COuld you please advice, do you have any combination of numbers program samples such like 1-6 input and 4 digit output valves with condition.

sudhandiramanisundaram
Автор

I'm working on an implementation now where I saw this as an option, but I don't think it's right for me. Application is multiple batch processes running on multiple tanks. Tanks all have matching I/O and processes are all the same. Tactic I am taking is building an array of states with the outputs, then building an array of requirements with the inputs.

Procedures are defined as array steps with a states and requirements selected from the arrays mentioned. As program cycles through states and requirements are copied from the arrays to the current state and current requirements for a given tank. From there, just add an incrementor for each tank and use that to pull data from the arrays.

It allows all the tanks to run concurrently using different sequences all at different steps. By having the states and requirements in an array, they can be reused on various steps as well, heavily cutting down on the amount of memory required for all these things.

I'm still interested in this functionality, but it doesn't appear great for scalability.

Gravybagel
Автор

Can the SQI instruction use OR logic to advance the state? For example, the tank level setpoint is reached OR the operator presses the manual advance button?

karenmurdoch
Автор

FOR GOODNESS SAKE! Please make a far simpler explanation for us beginners! I'm just trying to figure out how to get these instructions working for my simple class assignment; I'm not trying to program an entire brewery or bakery yet lol

anewthemathias
Автор

Sir how can we use this sqi and sqo instruction as sequencer for conveyor belt

ChochoMomoAnime
Автор

Can you please tell the difference between AOL and UDT.

ChochoMomoAnime
Автор

how may steps can be programmed before you have to start a new array?

KMC_Shooting
Автор

sir how to create week in rslogix 5000 i mean sunday monday ...

pk_hemmane
Автор

Kind of irks me to hear you call the step sequencer or number sequencer, unprofessional. Over years of experience, I've found that that type of sequencer is the easiest for those on the floor to troubleshoot and other to add processes or paths too. I mean, would PACML be the most professional sequence using that logic. If thats so, I prefer unprofessional. Some benefits too the simple sequencer is that it can be restrated started easily mid sequence, or even run backwards with little extra code, if that puts the process in a better stopping condition.

guinnessx
Автор

I've been programming PLCs now for 20 years and I've seen a sequencer implemented maybe They have no good reason to exist. A competent programmer can create a much more coherent sequencer from scratch and not use any more lines of code than one would use implementing a sequencer

Justinsatiable
Автор

im confused because at 7:40 you change the array for SeqAr[1] but the you go back to the logic and the SQI is looking at DeqAr[0] yet it seems to still work and wait for both input 1 and 2 to be true before moving to the next position

pissoff