A pallet high-bay warehouse with one storage and retrieval machine. This page runs the core of the PLC library in your browser: axis profiles, the eight-step single cycle, rack booking, and telegram checks against an emulated material flow computer.
New pallets arrive on the in-feed, pass the I-point and wait on the transfer station. The emulated material flow computer orders each one into the nearest free place. After every third store it orders the oldest pallet back out, so stores and retrievals alternate like in a real warehouse. Retrieved pallets leave over the out-feed.
The buttons on the left send the faulty telegrams from the interface test, or fail the travel drive mid-job. Watch the PLC answer in the telegram log.
The plant is a tree of nodes. One Cyclic() call on the root runs every node, and each device returns eBusy, eDone or eError to the sequence that commands it.
FB_Hrl root mode node, built from HrlConfig.json ├─ FB_Srm RBG01 single cycle, manual jog, homing, stop │ └─ I_Axis ×3 FB_Axis (simulated profile) or FB_AxisNc (NC PTP) ├─ FB_ConveyorZone Infeed one standard block, └─ FB_ConveyorZone Outfeed different parameters FB_Rack which place holds which pallet, size from the config FB_MfrInterface checks every telegram before anything moves FB_MfrLinkTcp TCP server to the real MFR, fixed-length telegram codec FB_TeachIn guided teach-in with tolerance check FB_Diag fault list: cause and remedy FB_SafetyInterface drive enable and restart lock from the safety controller FB_HmiBridge TwinCAT HMI operator page
This page runs the crane with simulated axes, the conveyors, the rack and the telegram checks. Configuration, NC axes, the TCP link, teach-in, the safety interface and the HMI are in the TwinCAT project.
A transport order only starts the RBG if every check passes. Otherwise the PLC answers TERR with a status code and nothing moves.
| Check | Status |
|---|---|
| Sequence number is the expected next one | 40 |
| Order number is not active or just finished | 41 |
| Source and target exist | 42 |
| RBG is free and not faulted | 43 |
| Source place holds a pallet | 11 |
| Target place is free | 10 |
| The pallet at the source is the ordered one | 44 |
| TDON acknowledged within 5 s | 30 |
FEM 9.851 measures an RBG by its double cycle: store at P1 (1/5 of the rack length, 2/3 of its height), travel empty to P2 (2/3 length, 1/5 height), retrieve there, return to the station. With travel 3.0 m/s, hoist 1.5 m/s and a 1.10 m fork, the calculation gives 52.4 s, about 69 double cycles per hour. A unit test runs the same two jobs on the simulated RBG and requires the measured time to stay within 5 % of that figure.
This page is a JavaScript port of the core PLC logic for viewing; everything on it is simulated. The TwinCAT project in the repository is the actual program: configurable from a JSON file, on simulated or NC axes, with a TCP link to the material flow computer, teach-in, diagnostics, a safety interface and a TwinCAT HMI page, covered by 59 TcUnit tests that run on the soft-PLC. It has not run on real hardware; the safety function itself belongs in a safety controller.