PLC Counter C0: K5, RST C0 and /C0 Interlocks
A counter accumulates events, not elapsed time. The real behavior therefore depends on how you create the pulse and where you define the reset boundary.
C0 K5 means “done after five events”
If a product-detect pulse increments C0 with a preset of K5, the C0 done contact turns ON at the fifth valid event. The useful design question is not only the preset value, but what exactly counts as one event.
/C0 is useful for “allow until target” logic
/C0 stays true before the preset is reached and opens after completion. That naturally fits a feeder that should run until five accepted events have been counted.
|----[ PLS M100 ]----------[ C0 K5 ]-----|
|----[/C0 ]----------------( Y0 )--------|
|----[ C0 ]----------------( Y1 )--------|
|----[ X1 ]----------------[ RST C0 ]----|Reset defines the batch boundary
Many machines should not automatically start a new batch the moment a count is complete. Tie RST C0 to a clear state such as discharge complete, operator acknowledgement or next-material-ready.
Treat sensor input as an event source
A noisy or long-held sensor can create unintended counts depending on the instruction and input logic. Use a one-shot, debounce or minimum-event-spacing rule when the physical meaning must be “one object equals one count.”