SQO instruction

Those were some great examples that i will definatly use. The problem now is the travel. Currently because all of the material is fixed to a silo, during travel of the cart, it can go from silo 3 to silo 7 (example)directly without stopping. If is stops on a silo, an alarm will sound for 30 seconds before it can travel. My issue all along is to make the cart logic determine the next silo to fill and travel directly to that silo without stopping. That's how the cart travels: tags: cart_current_position = cart_current_position. when the two tag values are equal, the cart stops.
 
So what's the best way to travel to the silos being filled by the same material? Material A = 0 and B = 1. Looking down the row of silos would be ex. 110000111100. How can i make it travel to the silos a value of "1" only, skip the silos that are "0"'s and move on to the next "1" Or better yet, I would like to make the silo material type a DINT for future expansion of material. I somehow need to filter out the values I don't want to fill and travel on to the next correct silo
 
One way to find the next file to fill is to create a subroutine that sequentially looks at all the Silos. As soon as it it finds one that needs filling it sets NextSiloToFill to that silo number and returns.

The subroutine would have 12 rungs, each would look like
XIC Silos[0].NeedsFilling MOV 1 NextSiloToFill RET

While the last rung would indicate that no silo needs to be filled.

Because the subroutine exits as soon as a match is found and doesn't scan the remaining rungs you want to make sure you do not use any OTE outputs that might be left in the last state. You might use something like a -1 value for NextSiloToFill to indicate that no silo needs filling to avoid this problem.

edit:
After thinking about it for a few minutes I see a potential problem. If Silo 2 and 9 needs filling then 2 will fill first. If while 2 is filling silo 4 needs filling then it gets filled next. Then silo 1 might reach a fill point so it gets filled. Meanwhile silo 9 starves. Whether that is a realistic scenario or not is up to you, you know your system and I might be picturing something completely different.

A couple of ways around that might be to pick the silo that most needs filling instead of the next sequential one. Or you could load a FIFO with the silo numbers so that they get serviced in order of when the .NeedsFilling bit is set.
 
Last edited:
That's exactly what i was looking for TConnolly. A sequencial order is perfect. The silos are so large anyway that it takes several hours to drop enough in level for it to reach the need to fill mark. The cart is very large also so not having to travel back and forth is better on the mechanical side of it. Thanks for getting me in the right direction. I'll let you know how it turns out.
 

Similar Topics

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,493
how does an sqo instruction work with no bit to trigger the next step
Replies
7
Views
1,860
Can someone help converting an SQO in a SLC150 to RSLogix500? See attached JPG also attached the program. Thanks
Replies
4
Views
2,021
I am converting Old SLC 150 Program in an RSLogix 500 I am finding a problem in the understanding of the following instruction can some body help...
Replies
2
Views
1,678
Hi again, im not sure if this sqo will work and cant test it yet. cip1_seq_ctrl4 is a 2 dim array [542,150] N37_14 is a dint that goes from 525...
Replies
1
Views
1,415
Back
Top Bottom