PLC-04 Β· Free project
Batch counter on a packing line
Count boxes past a photo-eye once each, stop at the batch size, and survive a backed-up line.
Free with a free account. Runs in your browser. About 45 minutes for a first attempt.

What you will build
Work order GF-2604. Greenvale Foods, Case conveyor CV-12.
Greenvale Foods (food and drink) needs a controller program for Case conveyor CV-12. Count boxes past a photo-eye, stop the conveyor when a batch is complete and reset for the next batch, counting each box once however long it blocks the eye.
Boxes leave our filling machine on a conveyor and are packed onto pallets in batches of boxes. Start_PB and Reset_PB are momentary push buttons, and Stop_PB is wired normally closed (1 is healthy, 0 is pressed). Box_Eye is a photo-eye across the conveyor that reads 1 while a box is in front of it. Pressing Start runs the Conveyor until Stop is pressed. Each box that passes the eye counts once, however long it sits in front of it: when the line backs up, boxes stop in the beam for several seconds. When the count reaches the batch size, the conveyor stops at once and the Batch_Done lamp lights. Start must not run the conveyor while Batch_Done is lit. Pressing Reset clears the count and the lamp, and the operator then presses Start for the next batch. Stopping the conveyor part way through a batch must not lose the count.
What you will learn
- CTU counters
- Rising-edge detection
- Counter reset
- Seal-in circuits
- Read a short user requirement specification (URS) and turn it into ladder logic
- Prove your program against a numbered factory acceptance test (FAT)
How it goes
- Read the work order and the URS.
- Build the ladder program against the tag table.
- Run the plant and watch it respond.
- Run the FAT and fix whatever fails.
Tools
Ladder editor in the browser
Draw contacts, coils, timers and counters, then run the program.
A working simulated plant
Watch the machine respond as your logic runs.
A tag table
4 inputs and 2 outputs: Start_PB, Stop_PB, Box_Eye, Reset_PB, Conveyor, Batch_Done.
URS and FAT documents
The paperwork a real project starts from, with numbered tests.
Questions
- Is it free?
- Yes. The lab is free to use with a free account. There is nothing to buy to open this scenario.
- Do I need to install anything?
- No. It runs in your browser with the ladder editor and a simulated plant.
- What will I do in PLC-04 Batch counter on a packing line?
- You build and test a program, then check your work against an acceptance test.
- How long does it take?
- A first attempt takes about 45 minutes.
- Do I need experience?
- No. Each work order says what to do step by step, and hints are there if you get stuck.