PaddyClarke
Member
Hi,
I have a stand alone inspection unit with no PLC but I can send 24v input signals to the machine PLC to show a good read and a bad read when products are inspected.
I have 2 inputs, I0.0 for a ‘Bad read’ and I0.1 for a good read from the inspection unit.
Rather than reject every ‘bad read’ I want to allow all inspections to pass through but have a serial check running where the machine will stop if the amount of rejects are excessive so the operator can visually inspect.
I would like the code to do the following:
For every bad read, I0.0 I want a counter to increment by 16 and for every good read, I0.1 I want the same value to decrement by 1. So this value will continually be going up and down depending on good and bad reads. When the value reaches 200 I want to use a memory bit M1.0 to insert into the stop rung for the machine.
Any advice on the best type counter to carry out this operation would be appreciated.
Thanks.
I have a stand alone inspection unit with no PLC but I can send 24v input signals to the machine PLC to show a good read and a bad read when products are inspected.
I have 2 inputs, I0.0 for a ‘Bad read’ and I0.1 for a good read from the inspection unit.
Rather than reject every ‘bad read’ I want to allow all inspections to pass through but have a serial check running where the machine will stop if the amount of rejects are excessive so the operator can visually inspect.
I would like the code to do the following:
For every bad read, I0.0 I want a counter to increment by 16 and for every good read, I0.1 I want the same value to decrement by 1. So this value will continually be going up and down depending on good and bad reads. When the value reaches 200 I want to use a memory bit M1.0 to insert into the stop rung for the machine.
Any advice on the best type counter to carry out this operation would be appreciated.
Thanks.