Ab sqi/sqo

TL140

Lifetime Supporting Member
Join Date
Jun 2014
Location
South Carolina
Posts
152
hi guys,

I have been task with modifying a machine. We are taking out some cameras and putting in photoeyes for part present sensors. There are 3 other fixtures that serve the same purpose, with the exact same logic in them, and they use photoeyes. Why they put cameras on the third fixture? No idea. It's overkill for a part present sensor. especially since the other fixtures have proved fantastic for functionality. The cameras have proved nothing but trouble and have caused tremendous amounts of downtime for us. The resolution is a bit low, and the area is not well lit. Therefore the ambient lighting from dayshift to nightshift has proved problematic. Anyways, enough about the cameras..

I have taken my time with making sure the logic is correct and like the other subroutines, but there is one thing i'm unsure about.

I found a rung with a SQI and SQO on it. I have a vague sense of what they do, but I wanted to make sure because this project could be this maintenance man's ticket to engineering.

So the SQI is basically a IF-THEN statement checking conditions, and the SQO is basically a MOV command with an increment for position?

All the numbers seem to be in a pattern. The arrays have the sequence with the first two numbers the same, the third number has bit [X].10 turned on, and then the fourth bit is the same as the first two.
 
you didn't say which platform you're working with - but give this a try ...

Right-Click the SQO instruction and select "Display Special" ...
 
Last edited:
The SQI is a masked compare with indirect addresses and a control register to handle the pointer position. The index used in the file and mask elements is common to the whole instruction. The SQI is a masked move with indirect addresses and a built in counter, also using one control register to handle the postiion, length, and done bits. It is a common practice to use the same control register for an SQI instruction preceding an SQO (or group of them).

The SQI compares the source to the file but only the bits that are true in the mask. The file and the mask are indexed, so that they step through a sequence. The bits that are zero in the mask are not compared between the source and the file. The source is not indexed. The source is usually mapped bits from real world conditions.

The SQO, on false to true transitions, increments the pointer and then mask moves the source at the pointer position through the mask at the pointer position to the destination location.

These instructions can save a ton of logic when used properly in a sequence that goes step by step in the same order with a lot of different transition conditions that need to be met for each step to advance. They can also be used for all sorts of other things, so we'd have to see your particular instance up close to get more specific.
 
The SQO, on false to true transitions, increments the pointer and then mask moves the source at the pointer position through the mask at the pointer position to the destination location.

These instructions can save a ton of logic when used properly in a sequence that goes step by step in the same order with a lot of different transition conditions that need to be met for each step to advance. They can also be used for all sorts of other things, so we'd have to see your particular instance up close to get more specific.

Thanks for the awesome explanation. I was reading the manual mentioned earlier and it says something about having to increment externally if used together. I have two SQIs ANDED and on the same rung the SQOs ORED. Both sets represent a different register, but it seems to increment fine without additional logic?
 
If they have a unique control structure, but they always receive the same false to true rung condition, they can stay in sync.

Your description is common. It basically means that they needed more "width" for the sequencer than one DINT (32 bits). By putting two SQI in series you get up to 64 input conditions, and with two SQO in parallel, you have 64 output bits.

In my opinion, the best way to understand a sequencer is with a separate excel sheet with all the bits commented. I think I posted an example at MrPLC for the RSLogix500 series which included a DDE link to allow you to read edit the sequencer from excel. It was done many years ago and would need modification to work with RSLogix5000, and for the dynamic updates to work, you'd need a licensed version of RSLinx (Lite won't do DDE/OPC).

If I recall, I didn't actually use sequencer instruction, but used MVM and MOV with indirect addresses so I could externally manipulate the position, but the principle is the same.

http://forums.mrplc.com/index.php?app=downloads&showfile=854

Paul

The manual
 

This looks like the drum switch sequencer block from CLICK. Velico also has it too. I've worked with drum switches before in ancient equipment.

So basically in a sense, all the slots are basically added in their binary equivalent to form a decimal number for the function block to use?

Oh P.S. The project was a success! it works and has done fine for one shift. Lets hope its not a fluke.
 

Similar Topics

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...
Replies
10
Views
5,076
I am a student at LWIT in Kirkland washington and am trying to work on a couple labs for my PLC class. I have the pdf's from Allen Bradley and...
Replies
3
Views
6,905
Hi All Does anyone have a code snippet on how to use SQI,SQO Instruction. i have few elements and the operator should select which one will...
Replies
0
Views
1,858
Hello All, It will be great help if anybody tell me about SQO and SQI use and where and how they should be used. A real time example is really...
Replies
1
Views
1,925
Hi folks I'm currently upgrading a control system that's nearly 20 years old from a 1756-L61 last programmed using version 20 logix5000 to a...
Replies
1
Views
1,338
Back
Top Bottom