Well using PLC means making an Industrial Project which would control, count or operate some device...
what you can do is control a conveour belt using PLC in such a way that if the project being passed is invalid then the invalid count be generate and that product be dropped down and the rest process keep on continuing...
the things required will be
1 DC Motor, Belt Drive ---For the conveour Belt
1 Inductive Proximity Sensor to check for invalid product (inductive for now)
1 IR Sensor, located after the Inductive Proximity in order to count the passed products.
1 Hydraulic cylinder/Solanoid.
How to Make...
Make The conveour
Connect the DC Motor Control Switch to operate from PLC Output
Place the inductive sensor at about 1/4th of the belt
Place the IR Sensor at about 2/4th half of the belt
connect the output of the inductive sensor to the PLC Input
connect the output of the IR sensor to the PLC Input
Connect the Hydraulic/Solanoid energizer to the output of PLC
How to Program...
When Program Start, the DC Motor Control Switch should turn the conveour on by taking the output high...
then keep on sensing for Inductive Input PIN and IR PIN
If Inductive PIN high then Energise the Hydraulic/Solainoid output PIN high for about a sec or 2...+...add a counter variable which would count the value of Invalid items
If IR PIN high then add a send counter variable which will show the counts of valid items...
Best Regards