SQO problem

joaco1993

Lifetime Supporting Member
Join Date
Sep 2014
Location
newyork
Posts
237
Im having some problems with the SQO. I dont know why when its runing, the position of my control variable R6_1_POS goes from 1 to 8 to 25 to 15 , instead of going 1 , 2 ,3 , 4 ,5 ,6..... till 39

I attach img.

N37_17 is DINT constant = 601 and cip1_seq_ctrl is a 2 dim DINT array [625,50]...


thanks!

joaco.png
 
You should have a one-shot in front of the SQO or a bit that you pulse everytime you want the SQO to move a position. Then when you reach position 39 reset the SQO this will move it back to position 0
 
Hi Mat , I dont understand much the one-shot thing...but why does the .pos value jump from 1 to 7 and then to 24 instead of going 1 , 2 , 3 , 4 ...
 
the thing is that I had the sqo in a PLC5 and im having problems translating it...

there I show you the one i had in plc 5 which works..

joaco2.png
 
What values are being moved into R6_1_POS? I can't see the rest of your code. Should R6_1_POS be replaced by R6[1].POS?
 
Chances are you have points in your process that don't always follow a specific sequence due to some exception. Your process may need to skip a step or back up to a certain step. So somewhere else in your program you will have an instruction pair that moves a new value into the sequencer .POS word and updates N37[3].

Do a cross reference on R6_1_POS and R6[1].pos and see where the value is being adjusted.
 
Taking a second look at this, there is something that appears to be not quite right about your intial array addressing. You should be marking the beginning point of the array and that shouldn't be changing. Unless you are doing something really out of the ordinary your source should be cip1_seq_ctr[N37_17,0]or something like that, otherwise your sequencer source will change every time the sequencer advances. The sequencer will use the .POS as an offset from the base address. Take a look again and compare it to the PLC/5 version.

If you look at the SQO help in RSLogix5000 it specifically says "Do not use Control.POS in the [array] subscript."


Edit to add one last thing: You will do yourself a favor if you will move past the old PLC/5 address paradigm and use meaningful tag names. So instead of R[6].3 you can create a tag of type CONTROL and name the tag something like MainSequencer or ProcessSeqencer or JoacoSequencer or whatever name actually means something to your particular process. It will make the program easier to follow and it is easier to remember.
 
Last edited:
yes thats exactly what I was doing wrong... but if I put: cip1_seq_ctr[N37_17,0] how does the sequencer knows that it should start from the 0 , and not from the N37_17=601...

and do 601 602 603.... etc
 
I tried using cip1_seq_ctr[N37_17,0] but stil goes from 1 to 7 and so on ....

I`ll have to take a deep look...

thanks anyway !
 
Then do the cross reference I mentioned earlier. Something is changing the value, possibly because there are exceptions to a truly linear sequence in the process.

If that doesn't turn up anything then zip your program and attach it to a post. We'll help you figure it out.
 
Last edited:

Similar Topics

I'm working on my final project in my PLC2 class. We have AB SLC 500. The idea I had required the use of multiple sequencers. At least three...
Replies
1
Views
2,718
I have a program that I've used 100 times. SQO settings: File N7:0, Mask 0FFFFh, Dest B3:1, Control R6:0, Length 8, Pos 2. Length & Position...
Replies
48
Views
956
Hello I am trying to make a program work with a sqo instruction .The process has 5 steps ,and a starting step of zero.There should be 8 sec...
Replies
17
Views
1,049
I am working on a machine that is using the SQO instruction to step through a cycle, but I am getting lost following it. I have not worked with...
Replies
18
Views
3,457
I have an air press that I built ages ago, and it has been running forever. It was originally designed with Rotary Cams and Air actuated buttons...
Replies
1
Views
1,504
Back
Top Bottom