drbitboy
Lifetime Supporting Member
Here is a simulation of the process you can use to drive the limit and photos switches' inputs to drive the control logic. I assume LogixPro has a way for you to toggle the button inputs. You would have to port this to LogixPro and use your own tag ids. It should run on each scan cycle before the control logic. The first-pass bit tests can be removed, in case LogixPro does not have that bit.
The first routine (LAD 5 SIMBOTTLES) alternates large and small bottles, and assumes large bottles are sent to conveyor 3. It also assume photo switch input values are 1 when a bottle is present, so you might have to fix that too.
The second routine (LAD 6 SIM_BOXES) responds to conveyor 2 and conveyor 3 running. The Box Present photo switch input values are 1 when a box is present, and do not come on immediately when their corresponding conveyor starts.
Both routines implement poor-man's clocks by counting alternate scan cycles. This works on a MicroLogix 1100 with a scan time of about 1ms; based on your actual scan time you will want to change which bits are used to drive the switches in the LAD 5 SIMBOTTLES routine, and the counter presets in the LAD 6 SIM_BOXES routine.
The first routine (LAD 5 SIMBOTTLES) alternates large and small bottles, and assumes large bottles are sent to conveyor 3. It also assume photo switch input values are 1 when a bottle is present, so you might have to fix that too.
The second routine (LAD 6 SIM_BOXES) responds to conveyor 2 and conveyor 3 running. The Box Present photo switch input values are 1 when a box is present, and do not come on immediately when their corresponding conveyor starts.
Both routines implement poor-man's clocks by counting alternate scan cycles. This works on a MicroLogix 1100 with a scan time of about 1ms; based on your actual scan time you will want to change which bits are used to drive the switches in the LAD 5 SIMBOTTLES routine, and the counter presets in the LAD 6 SIM_BOXES routine.