Corrupted_Nova
Member
Hello all,
I'm a student in an advanced level PLC programming class. A project that I'm working on moves boxes through a sorting station and onto one of three lines. Photo-eyes monitor the status of a line; if a line is low on boxes, the sorting station adjusts so the infeed conveyor pushes a group of 6 onto that line. The sorting station consists of two solenoids attached to two "flappers" - similar to a pinball machine. I should also mention that I have control over when to release the infeed conveyor, and that it releases in groups of 6.
My problem is setting up the flappers to do "first come, first served". Multiple lines could be low at once, so I need to do make sure they're handled appropriately.
I know that a register is the way to go for this, but I'm not sure how to implement it. Here's how I envision it:
-3 lines means the register needs to only be 3 bits big
-When line 1 is empty and needs to be filled, put a "1" in B3:4/1 (B3 is the hypothetical register).
-When line 2 is empty and needs to be filled, put a "1" in B3:4/2.
-When line 3 is empty and needs to be filled, put a "1" in B3:4/3.
If any of the lines are full (IE the photoeye is blocked), put a 0 into the lines respective slot.
I was thinking of having a counter sort through the register (IE B3:4/[C5:0.ACC]). If it finds a 1, fill that line. If it finds a 0, move on. Is this the best implementation though? I think what I'm getting caught up on is how to cycle through the register. Because the lines empty at random, there's no good way to do it that my inexperienced mind can think of.
The software I'm using is RSLogix5000. If anyone could point anything out to me, I'd be eternally grateful.
I'm a student in an advanced level PLC programming class. A project that I'm working on moves boxes through a sorting station and onto one of three lines. Photo-eyes monitor the status of a line; if a line is low on boxes, the sorting station adjusts so the infeed conveyor pushes a group of 6 onto that line. The sorting station consists of two solenoids attached to two "flappers" - similar to a pinball machine. I should also mention that I have control over when to release the infeed conveyor, and that it releases in groups of 6.
My problem is setting up the flappers to do "first come, first served". Multiple lines could be low at once, so I need to do make sure they're handled appropriately.
I know that a register is the way to go for this, but I'm not sure how to implement it. Here's how I envision it:
-3 lines means the register needs to only be 3 bits big
-When line 1 is empty and needs to be filled, put a "1" in B3:4/1 (B3 is the hypothetical register).
-When line 2 is empty and needs to be filled, put a "1" in B3:4/2.
-When line 3 is empty and needs to be filled, put a "1" in B3:4/3.
If any of the lines are full (IE the photoeye is blocked), put a 0 into the lines respective slot.
I was thinking of having a counter sort through the register (IE B3:4/[C5:0.ACC]). If it finds a 1, fill that line. If it finds a 0, move on. Is this the best implementation though? I think what I'm getting caught up on is how to cycle through the register. Because the lines empty at random, there's no good way to do it that my inexperienced mind can think of.
The software I'm using is RSLogix5000. If anyone could point anything out to me, I'd be eternally grateful.