Lesson 6 · Plant logic: your first block diagram
Until now orders arrived at a fixed rate. Real plants do not work like that: lines consume material at their own pace and one event triggers the next. Plant logic lets you describe that with connected blocks, without writing any code.
- Time
- 25 min
- Start from
- the checkpoint of lesson 5
- You will learn
- think in sequences: a trigger, some blocks and an end
- add, connect and configure blocks, and read the diagram's status
- make two lines with different rhythms feed from the same pickup
Open your project from lesson 5, or its checkpoint. Prefer to watch first? Video 04 builds a small diagram.
Sequences and blocks
A diagram is made of blocks joined by connections. A trigger block (a timer, for instance) creates a sequence: an independent token that travels from block to block, waits where a block tells it to wait, and disappears at End sequence or at an output left unconnected. Many sequences can be alive at once, even in the same blocks.
- Trigger
- starts a sequence: Periodic timer (at a rhythm), On station drop-off (when something is unloaded), On pickup completed (after loading finishes), Cyclic mission (whenever a source is free) or Start (once). See how to request another pickup, optionally after a wait.
- Flow
- Wait holds the sequence for a time, Prerequisite until a condition is true, Condition chooses between Yes and No.
- Missions
- Generate mission queues one transport; Wait for delivery waits until the sequence's own mission has been delivered.
- Variables
- Plant variable and Update variable keep shared counters and flags (next lesson).
Time in a diagram is simulated time: a block that waits 40 seconds waits 40 seconds of the simulation, however fast you run it.
The Line 1 sequence
Line 1 consumes a pallet every 90 seconds. The sequence is three blocks in a row:
- Open the workspace. Click Plant logic in the header. The diagram is empty and offers Start from an example; ignore it, you will build your own.
- Add the three blocks. In the Blocks list on the left, click Periodic timer, then Generate mission, then End sequence. Each appears on the diagram. Drag a block by its title to put it where you want it: timer on the left, mission in the middle, end on the right.
- Connect them. Click the dot on the right of the timer (its output, Continue), then the dot on the left of Generate mission (its input). Do the same from the mission's output to End sequence. Esc cancels a connection in progress. An unconnected Continue would end the sequence too; End sequence makes it explicit, and it is needed to close a branch, because both outputs of a decision must be connected.
- Configure the timer. Click the timer's title. The panel on the right shows its fields: set Interval (s) to
90and leave First start after (s) at 0. - Configure the mission. Click the mission block. Set Name to
Line 1: generated orders will say which block created them. In Block pickups keep onlyGoods inticked, and in Block drop-offs keep onlyLine 1: untick the other two. - Read the status line. At the bottom of the diagram the status reads Valid workflow. If something is wrong, it counts the issues and names the block concerned.
To copy a whole sequence, drag a rectangle around its blocks, press Ctrl+C and Ctrl+V: the copy keeps its internal connections and lands beside the original. Delete a block or a connection by selecting it and pressing Delete.
The Line 2 sequence
Line 2 consumes more slowly and starts later. Build a second row of three blocks below the first: a Periodic timer with Interval (s) 150 and First start after (s) 30, a Generate mission named Line 2 from Goods in to Line 2 only, and an End sequence. Connect them in order.
The two sequences are independent: they share nothing but the pickup and the fleet, and each fires on its own clock.
Switch it on and run
- Enable the diagram. Set Order generation to Plant logic at the top left. Until you do, the diagram is a draft and the fixed-rate generator keeps working. Once on, the diagram replaces the fixed rate completely.
- Check the scenario. In Simulate, the Pickup and drop-off step now reads From Plant logic: pickups, drop-offs and rates are defined in the blocks. The Interval field is gone from Orders, but the fleet and the dispatch rules stay where they were.
- Run one hour. Press Start run with
1 h. During a run each block shows how many sequences are in it and how many have passed through, and the status line reports the active and completed sequences.
Line 1 asks for 40 orders an hour and Line 2 for 24, so about 64 missions an hour, with the three vehicles at roughly three quarters of their capacity and an empty queue. In the comparison table the Orders column now reads Diagram instead of an interval.
Changing the diagram restarts the simulation, like any scenario change, and Save keeps it in the project. The diagram supports undo and redo like the rest of the project.
- A valid diagram with two rows, the box ticked, and a run of about 64 missions an hour with a queue near zero.
- Add a third sequence for Repack with a timer of 200 s and see the throughput rise. Remove it again.
- Shorten Line 1's timer to 45 s and run again. Which of the two lines suffers first when the fleet saturates? Look at Bottlenecks.
- Set Order generation back to Periodic orders and see that the old fixed-rate generator comes back, with your diagram kept as a draft.
Checkpoint
It contains: 9 paths · 7 stations · 1 traffic zone · 3 AGVs · 6 workflow blocks.
Download the checkpoint (aurora-06-workflow.en.sim)
Open it with Project›Import project. It replaces the project you have open, so save yours first (or open it in a new browser tab). Anything you do from here on is a copy: the checkpoint file itself never changes. Use it to continue from here if you skipped a lesson, or to compare your own project with the expected one.