Plant logic
By default the simulator creates one order at a fixed interval, rotating through the selected pickup and drop-off pairs. Plant logic replaces that rule with a block diagram, so orders can follow production times, events at stations, conditions and counters.
When to use it
- Several production lines with different rhythms and stations.
- A transport that must start when another one is delivered (chained moves).
- A source that must be served again only once it is empty (cyclic replenishment).
- Orders that depend on the state of the plant: free AGVs, queued missions, a stock counter.
If a fixed interval between orders is enough, stay with the periodic generator in Orders and timing.
Sequences, blocks and connections
A diagram is made of blocks joined by connections. A trigger block (Start, Periodic timer, On station drop-off, Cyclic mission) creates a sequence: an independent token that travels from block to block along the connections, waits where a block tells it to wait, and ends at End sequence.
- Each output (on the right of a block) has exactly one connection. Connect it to the input (on the left) of the next block.
- Every output must be connected; use End sequence to finish a branch.
- Many sequences can run at the same time, even through the same blocks. Several connections entering one block do not synchronise sequences.
- Variables are shared by all sequences and start at zero.
- Time only advances with the simulation: every duration is in simulated seconds.
Block reference
Triggers
| Block | Settings | Behaviour |
|---|---|---|
| ▶ Start | — | Starts one sequence at time zero. |
| ◷ Periodic timer | Interval (s), First start after (s) | Starts a new sequence at each interval, even if the previous one is still running. |
| ↧ On station drop-off | Drop-offs to observe | Starts a sequence each time any AGV completes an unload at one of the selected stations. Arrivals, pickups and parking returns do not trigger it. |
| ↻ Cyclic mission | Block pickups, Block drop-offs, Delay while source is free (s) | For each selected source with no pending or active mission (from any block), waits the delay and generates a transport to a reachable drop-off (drop-offs rotate). Repeats by itself. |
Flow and conditions
| Block | Settings | Behaviour |
|---|---|---|
| ◴ Wait | Duration (s) | Holds the sequence for a production or processing time. |
| ⊣ Prerequisite | Check, Comparison, Value | Holds the sequence until the condition is true. It does not reserve AGVs or resources. |
| ◇ Condition | Check, Comparison, Value | Evaluates the condition once and continues on the Yes or No output. |
| # Update variable | Variable, Operation (Set / Increment), Value | Sets or increments a shared counter. Increments can be negative. |
| ■ End sequence | — | Ends this sequence. Other sequences and vehicles continue. |
Prerequisite and Condition can check Free AGVs, Pending missions, Active missions, Completed missions or a Plant variable, with the comparisons ≥, ≤, =, > and <. Variable names have up to 40 characters: letters, numbers, spaces and underscores.
Missions
| Block | Settings | Behaviour |
|---|---|---|
| ⇢ Generate mission | Block pickups, Block drop-offs | Each time a sequence passes, queues one transport, rotating through the reachable pickup/drop-off pairs. The allocator chooses the AGV. |
| ⚄ Random mission | Block pickups, Block drop-offs | Generates one order: a random pickup with at least one reachable drop-off, then a random reachable drop-off. The same pair can repeat. |
| ✓ Wait for delivery | — | Waits until the last mission generated by this sequence has been unloaded, not every mission. It needs a mission block before it on every incoming branch. |
Load and unload times, fleet, speeds and the AGV selection rule stay in Simulate›Scenario.
Using the editor
- Open the workspace. Click Plant logic in the header. An empty diagram offers Start from an example.
- Add blocks. Drag a block from the Blocks palette onto the diagram, or click it to add it.
- Connect. Click the output port on the right of a block, then the input port on the left of the next block. Esc or Cancel connection aborts.
- Configure. Select a block to edit its name and settings in Block properties. Station lists show only stations with the right role.
- Check. The status line reports Valid workflow or the number of issues to fix before starting; each issue names the block concerned.
- Enable. Tick Use workflow to generate orders. While it is off, the diagram is a draft and the periodic generator is used.
| Action | How |
|---|---|
| Zoom / pan | Wheel to zoom, middle button to pan; Fit frames the diagram |
| Select several blocks | Drag a rectangle with the left button; Shift/Ctrl+click adds or removes a block |
| Move a group | Drag one of the selected blocks |
| Copy / paste | Ctrl+C copies blocks with their internal connections; Ctrl+V pastes them beside the existing ones |
| Delete | Select a block or a connection and press Delete, or use the delete button in its properties |
Changes to the diagram restart the simulation from zero and are saved in the project with Save. The diagram supports undo and redo like the rest of the project.
Watching it run
While the simulation runs, each block shows how many sequences are currently in it and how many have passed through. The status line shows whether the logic is Running or Ready / paused, the number of active and completed sequences and any warnings. Generated orders name the block that created them, for example M12 (3 → 7) from “Line A”.
If the logic hits a runtime problem, such as a loop with no waiting time, Simulate shows an error: open Plant logic, fix the diagram or press Reset.
Common patterns
Production line with a queue limit (the built-in example)
Every minute a sequence starts, waits until no more than five missions are pending, generates a transport and waits for it to be delivered before a 10 s processing time.
Chained transports
Every time something is unloaded at station 1, a new transport from 1 to 2 is created. Station 1 needs both Pickup and Drop roles, and the first delivery to it must come from another sequence of the diagram.
Serve a source whenever it is free
A transport from 1 starts 30 s after the source has no mission pending or active. No timer or loop connection is needed.
Random demand when a vehicle is free
Connect the No output of the Condition to a second End sequence. Random choices use the browser's random generator, so two runs are not identical.
A serial loop
A Periodic timer can start overlapping sequences. For strictly one-after-another work, use Start and connect the last Wait back to the first work block. Always put a Wait in the return connection: a loop with no waiting time is stopped as an instant loop.
More complete studies built on these patterns are in the Scenario cookbook.
Limits
- 200 blocks and 400 connections per diagram.
- 500 running sequences and 1000 pending orders: beyond these, new starts are suspended until the queue clears.
- 200 instantaneous transitions per simulation step.