Sequencers - SQI, SQL, SQO

Reksio

Member
Join Date
Nov 2015
Location
Chicagoland
Posts
5
Hi All,
I need some clarification on sequencers, I researched this forum but haven't been able to find a good explanation, including the ones with examples.
First of all, I'm using them on a Compact logic L45, second I know it is a form of shift register just don't understand the whole mechanism. So I have the SQO instruction (for the sake of example lets do it in binary)
SQO:
Array:01010101
Mask:11111111
Destination:00000000
Control:00000000
Length:1
Position:1
First of all, what is the purpose of: array, mask,destination, control,length, position elements?
This is the way I understand it: array is the one we use in programming - namely during the steps we determine if each bit is activated or not. Mask stays always the same. Destination is the result of each comparison. So what is control? Length is the size of the memory area we want to operate on, step is the offset?
Also how are these instruction different SQI,SQL,SQO?
Please abstain from using poor examples, or opinions.
 
Reksio,

Years ago there were devices known as a rotary drum switches that used a
circular paper tape to control the machinery. I have seen these tapes control 32 different valves based on the sequence of the input sequencer.
With the advent of the plc, came sequencers to help industry.

SQI - input, SQL - load, SQO - output.

I will let more experienced forum members answer your questions.
I will say that once you learn sequencers, it is easy to program a machine and
make it run. But from a maintenance technician standpoint, they are very difficult to troubleshoot, and even harder to modify. We do not allow sequencer programming into this facility for that reason.

james
 
I should be more specific about the questions, so SQO executes AND operation on array and mask value, and we stores result in destination.
What is the purpose of Control array element? And what does it mean SQI- input, SQL - load, SQO - output? If we can execute bitwise AND, and then shift using SQO instruction, what is the purpose of load and input (which strangely seem just as a reverse of output operation)?
 
Last edited:
I should be more specific about the questions, so we execute AND operation on some array, and we store result in destination.
What is the purpose of Control array element?
Based on the highlighted portion above, it seems that the FAL would be better suited to what you're doing. The control element handles the administrative work of the instruction, ie. when to turn on the DN bit, declaring errors, detecting false-to-true transition, etc.
 
Sequencers

If you would like more information on the subject you can download the Rockwell publication 1756-RM003O-EN-P, Logix5000 Controllers
General Instruction Reference Manual and look at Chapter 10
 
I know in the past I found a great example of how to use sequencers on this site, but cant seem to locate it now.

You can use the built in instructions, or you can manipulate the value of an integer for your various states.

You can then use compare instructions to trigger events based on the integer values/ranges.

here is a short example in ST

"seal sequencer" is your integer value, and obviously I am comparing the value to "some_seq_value_#" to know when to execute some logic.

"seq_value_command_#" is where I manipulate the value to indicate the completion of a step.

This may not be for you, but just another way.

seq. example.GIF
 
Last edited:
array
This is an array of elements in a single tags that the sequencer will step thru. Example arraySQ[0] the first step of an SQO would take arraySQ[1] AND it with mask and place the results in destination.

mask
As mentions above it is just an AND bit mask. Some people use this to enable or disable functions of there sequencer.

destination
For each step of the sequencer it will take your array[base value] plus the current step number and extracts that value from array then AND's it with the mask and places the results here.

control
This is simply a single tag or a tag array element with the Control type. For sequencers that use SQI and a corresponding SQO will use the same control word. Also if you need more then 1 DINT wide SQO then use a second SQO with the same control word and they will run in parallel.

length
Total number of steps you want your sequencer to be. So say you want 10 steps then array has to be from element 0 to 10

position
Simply the current step in the sequence. You can also think of this as an indirect pointer to the current element in array.

Hope that helps.
 
Last edited:
At the technical college I teach at, we covered sequencers and developed a program using one that controlled an imaginary washing machine. We simulated the motors and solenoids with lamps. We used switches to simulate the conditional inputs. The values in the array elements are determined by what your process dictates in each step. The number of array elements are determined by the number of "steps" in the controlled process.
First, we designated bits in the Destination word that would control individual discreet outputs. After determining which outputs would be ON (or True) for each step in the process, we were able to designate the value of the Destination word in each step. The number of steps dictated the number of array elements that were needed and the Length value in the sequencer. (For example, we designated the first 6 bits of the destination word to control 6 discreet output points. In step 1, we needed the first and third bits ON to turn on the corresponding outputs. So the value of the first array element was 5 or 000101.) In this manner, we determined the value that the destination word would need to be for each subsequent step. Using the tag editor, we entered the desired value in each array element. At this point, the sequencer is set up. All that was left was to determine the code needed for advancing the sequencer position. When step 1 was done, we send a TRUE to the sequencer enable (for 100 msec) and the sequencer would advance to step 2. The value of the second array element would then transfer to the destination word. This, in turn, would turn on the output bits desired for the second step of the process.
The mask value was entered at 63 or 111111 so that only the first 6 bits' values were moved to the destination word. Also, we could only make this work by making all data handled by the sequencer (destination word and array elements) in DINT format. All of the examples in our text book showed the Destination as an output module but we could never get that to work.
I hope this helps. At least, the students seemed to understand when it was explained to them, in this manner.
 

Similar Topics

I am trying to program the traffic control simulation on logixpro using sequencers. I have done the previous simulations with the stop light but i...
Replies
1
Views
1,788
First of all, I want to thank everyone for all the help on previous questions. My new job is proving to be a challenge (in a good way)and your...
Replies
10
Views
5,072
hi, I looked on google and faq but with no result.. My questions are: -how do i call a subroutine from structured text? -i was looking at the...
Replies
3
Views
2,017
I was wondering how I might go about using my sequencer in such a way that I can set a time at each step or positon in the sequence. What will be...
Replies
1
Views
1,571
I have an application that is controlling traffic lights using sequencers and a timer. Problem is, I don't want the timer to start timing and the...
Replies
3
Views
8,865
Back
Top Bottom