Modern warehouses use conveyors, scanners, robotic arms, mobile robots, sorters, and sensors to move goods quickly and accurately. A programmable logic controller, or PLC, coordinates many of these machines with very reliable timing. Adding machine learning at the PLC edge means some data decisions happen close to the equipment instead of waiting for a remote cloud server.
This matters because milliseconds can affect jam detection, package routing, safety stops, and throughput.
At the edge, sensor signals such as motor current, vibration, barcode reads, camera results, and photoeye timing can be analyzed in real time. A trained model may classify a package, predict a conveyor jam, detect an abnormal robot cycle, or estimate when a motor will need maintenance. The PLC still handles deterministic control logic, while the machine learning model provides predictions or scores that the control program can use.
Good system design separates fast safety-critical actions from advisory predictions, then validates every model under real warehouse conditions.
Key Facts
- PLC scan time is the time for reading inputs, running logic, and updating outputs: Tscan = Tinput + Tlogic + Toutput.
- Edge latency is often much smaller than cloud latency because data does not need to travel to a distant server: Ttotal = Tsensor + Tcompute + Tactuate.
- Throughput for a conveyor or sorter can be estimated as throughput = items processed / time.
- Classification accuracy is accuracy = correct predictions / total predictions.
- Predictive maintenance often uses features such as vibration RMS, motor current, temperature, and cycle count to estimate failure risk.
- A common control pattern is sensor data to ML inference to PLC decision logic to actuator output.
Vocabulary
- PLC
- A programmable logic controller is an industrial computer that reads inputs, runs control logic, and switches outputs for machines.
- Edge computing
- Edge computing processes data near the machine or sensor instead of sending all data to a distant server.
- Machine learning inference
- Machine learning inference is the use of a trained model to make a prediction from new input data.
- AGV or AMR
- An AGV or AMR is a mobile warehouse robot that transports goods, with AMRs usually having more flexible navigation.
- Predictive maintenance
- Predictive maintenance uses data patterns to estimate when equipment is likely to fail or need service.
Common Mistakes to Avoid
- Treating machine learning as a replacement for PLC logic is wrong because PLCs are still needed for reliable timing, interlocks, and machine control.
- Ignoring scan time is wrong because an accurate model can still be unusable if inference takes longer than the control cycle allows.
- Training only on clean test data is wrong because warehouse sensors experience dust, vibration, lighting changes, damaged labels, and unusual package positions.
- Using ML predictions directly for safety stops is wrong because safety functions require certified hardware, validated logic, and fail-safe design.
Practice Questions
- 1 A PLC has an input read time of 2 ms, logic time of 6 ms, ML inference time of 12 ms, and output update time of 2 ms. What is the total scan cycle time, and can it meet a 25 ms response requirement?
- 2 A sorter processes 18,000 packages in a 6 hour shift. What is the average throughput in packages per hour and packages per minute?
- 3 A warehouse model predicts conveyor jams with 94 percent accuracy, but it sometimes misses rare jams involving crushed boxes. Explain why accuracy alone may not be enough to judge whether the model is safe and useful.