Guys,
I know it will be silly but can't get my head around it.
I have 3 conveyors, every one on a separate servo drive, and 2 lifters/lowerators. I need to count boxes in each section of the machine. Every conveyor has slightly different motion profile so different index times. They are off not more than 250ms though
The layout is like this, an arrow indicates a presence sensor, goes high when the box is there.
I need to count how many boxes do I have between each pair of sensors, so:
- 1 to 2
- 2 to 3
- 3 to 4
Whtat I did is:
Rung 1) Conveyor1.PC and Sensor 1 is high - one shot - ADD 1 to C1 (DINT)
Rung 2) Conveyor2.PC and sensor 2 is high - one shot - SUB 1 form C1 (DINT)
Rung 3) Conveyor2.PC and sensor 2 is high - one shot - ADD 1 to C2 (DINT)
Rung 4) Conveyor2.PC and sensor 3 is high - one shot - SUB 1 from C2 (DINT)
Rung 5) Conveyor2.PC and sensor 3 is high - one shot - ADD 1 to C3 (DINT)
Rung 6) Conveyor3.PC and sensor 4 is high - one shot - SUB 1 from C3 (DINT)
It works but only ish.
If I put 1000 boxes on the conveyor 1 and let them go past and all conveyors are empty I would expect C1 C2 and C3 to be zero, however they are not. I'm getting C1 or C3 to be 1 when the conveyors are empty. There is obviously something wrong in my thinking. My brain is fogged ,
Cheers
I know it will be silly but can't get my head around it.
I have 3 conveyors, every one on a separate servo drive, and 2 lifters/lowerators. I need to count boxes in each section of the machine. Every conveyor has slightly different motion profile so different index times. They are off not more than 250ms though
The layout is like this, an arrow indicates a presence sensor, goes high when the box is there.
I need to count how many boxes do I have between each pair of sensors, so:
- 1 to 2
- 2 to 3
- 3 to 4
Whtat I did is:
Rung 1) Conveyor1.PC and Sensor 1 is high - one shot - ADD 1 to C1 (DINT)
Rung 2) Conveyor2.PC and sensor 2 is high - one shot - SUB 1 form C1 (DINT)
Rung 3) Conveyor2.PC and sensor 2 is high - one shot - ADD 1 to C2 (DINT)
Rung 4) Conveyor2.PC and sensor 3 is high - one shot - SUB 1 from C2 (DINT)
Rung 5) Conveyor2.PC and sensor 3 is high - one shot - ADD 1 to C3 (DINT)
Rung 6) Conveyor3.PC and sensor 4 is high - one shot - SUB 1 from C3 (DINT)
It works but only ish.
If I put 1000 boxes on the conveyor 1 and let them go past and all conveyors are empty I would expect C1 C2 and C3 to be zero, however they are not. I'm getting C1 or C3 to be 1 when the conveyors are empty. There is obviously something wrong in my thinking. My brain is fogged ,
Cheers