So I have wrote up a queueing sequence for a set of conveyors on one of my food production lines. The way the conveyors function is all the product comes out of a freezer and then splits into 3 identical conveyors legs to go to their respective machines to be packaged into sleeves, boxes, cases, then all go to the same palletizer. All 3 legs converge back together at the same location on their way to the palletizer. The goal of the queueing that I have wrote is to make it to where if the kickoff totes are filling up a "cycle stop" button can be pressed to stop the conveyor leg for 10 seconds in order to change out the totes then the leg restarts automatically. Also, there can not be more than 1 leg stopped at a time. The code that I have wrote was pulled off of the merge programming for the 3 conveyors going to the palletizer converging into 1. The problem I have with it is the conveyor legs will not stop in the order that their respective "cycle stop" buttons are pressed. The code works fine on the conveyors merging because there are multiple photo eyes that are used for location of boxes.
I wasn't sure what the best way to upload my code to here so I used the snipping tool and its all in the word document. The logic is from my personal controller and IO setup in my office. Currently the way it is it will work but questions may come up at some point as to why it isn't in order that the buttons were pressed and its also possible for the line to expand and may need more added to it.
When the buttons are pressed in order of input 0, 1, 2 it will cycle as 0, 2, 1. When pressed as 2, 1, 0 it will cycle in that order. When pressed as 1, 0, 2 it will cycle as 1, 2, 0. And finally 1, 2, 0 will cycle in that order. Tag CSQue is data type INT[5].
I wasn't sure what the best way to upload my code to here so I used the snipping tool and its all in the word document. The logic is from my personal controller and IO setup in my office. Currently the way it is it will work but questions may come up at some point as to why it isn't in order that the buttons were pressed and its also possible for the line to expand and may need more added to it.
When the buttons are pressed in order of input 0, 1, 2 it will cycle as 0, 2, 1. When pressed as 2, 1, 0 it will cycle in that order. When pressed as 1, 0, 2 it will cycle as 1, 2, 0. And finally 1, 2, 0 will cycle in that order. Tag CSQue is data type INT[5].