I had an idea that I thought would be easy to add into existing ladder logic, but I am finding it very hard. Maybe someone who enjoys a challenge can help.
I have a conveyor that holds 3 items between 2 stations. Station1 produces the item, and places it onto the conveyor. Station1 also notes whether that item is good or bad. Once placed on the conveyor, the conveyor indexes once, moving the last item into Station2. Station2 basically performs either a "reject action" or "no action" depending on whether or not the item was good or bad.
I currently have a bit array for the pass/fail status of the items on each position. bit0 is the new item's position. bit3 is the station2 position. Good item is a low bit. Bad item is a high bit. The bit array is Bit Shift Left when the conveyor indexes.
I also currently have a button that overrides the reject action of the item heading to or already in station2. For example, if bit3 is high and the operator pushes the button, station2 will not perform the reject action that it otherwise would have.
My new idea is to have 4 buttons instead of just 1 button, allowing the operator the option to flip the fate of any of the 4 items at any time. For example, pushing button2 will make the item currently in position2 the opposite of what it currently is. If it currently is bad, it will be treated as good when it reaches station2. If it currently is good, it will be treated as bad when it reaches station2.
Sounds easy, but it's not.
I'm trying to make another 4-bit array. This array carries whether each position has been flipped. The buttons are normal open momentary, performing a "push on push off" action for the appropriate bit. The final action of station2 will be the XOR of the 3rd bit of both arrays (my flip array and the original good/bad array).
The problem I am having is the writing ladder that can both edit the contents of a bit array and also Bit Shift. The 2 things I am trying to do are fighting one another.
Can anyone help? I am using RSLogix 5000, but will accept answers in any variation of ladder logic.
I have a conveyor that holds 3 items between 2 stations. Station1 produces the item, and places it onto the conveyor. Station1 also notes whether that item is good or bad. Once placed on the conveyor, the conveyor indexes once, moving the last item into Station2. Station2 basically performs either a "reject action" or "no action" depending on whether or not the item was good or bad.
I currently have a bit array for the pass/fail status of the items on each position. bit0 is the new item's position. bit3 is the station2 position. Good item is a low bit. Bad item is a high bit. The bit array is Bit Shift Left when the conveyor indexes.
I also currently have a button that overrides the reject action of the item heading to or already in station2. For example, if bit3 is high and the operator pushes the button, station2 will not perform the reject action that it otherwise would have.
My new idea is to have 4 buttons instead of just 1 button, allowing the operator the option to flip the fate of any of the 4 items at any time. For example, pushing button2 will make the item currently in position2 the opposite of what it currently is. If it currently is bad, it will be treated as good when it reaches station2. If it currently is good, it will be treated as bad when it reaches station2.
Sounds easy, but it's not.
I'm trying to make another 4-bit array. This array carries whether each position has been flipped. The buttons are normal open momentary, performing a "push on push off" action for the appropriate bit. The final action of station2 will be the XOR of the 3rd bit of both arrays (my flip array and the original good/bad array).
The problem I am having is the writing ladder that can both edit the contents of a bit array and also Bit Shift. The 2 things I am trying to do are fighting one another.
Can anyone help? I am using RSLogix 5000, but will accept answers in any variation of ladder logic.