Skip to content

Machine States

Tarik Viehmann edited this page Jun 20, 2024 · 2 revisions

All machines are in state IDLE per default. Once an instruction is received the state will change either to BROKEN (if the instruction is invalid according to the rules) or PREPARED. The remaining state transition can vary slightly from machine to machine.

Base Station

After being in state PREPARED, the base station will immediately switch to state PROCESSING and dispense a base of the requested color. Once the base is on the conveyor, the state will change to PROCESSED. Then the conveyor belt moves the base to the requested side and reports READY-AT-OUTPUT. Once the base is picked up again, the state will go to WAIT-IDLE, followed by IDLE after 5 seconds.

As dispensing a base is a rather quick operation, the states PREPARED and PROCESSING can easily be missed in scenarios where the network connection is unstable.

Ring Station and Cap Station

After being in state PREPARED, the ring/cap station will start the conveyor belt. Once a workpiece is sensed in the middle of the station, the state changes to PROCESSING. The machine operation is performed (mounting a ring/cap or retrieving a cap). Once the operation is finished, the machine state changes to PROCESSED and the conveyor belt is started again to transport the workpiece to the output. Upon reaching the output, the state changes to READY-AT-OUTPUT. Once the workpiece is picked up again, the state will go to WAIT-IDLE, followed by IDLE after 5 seconds.

Delivery Station

After being in state PREPARED, the delivery station will immediately switch to state PROCESSING and start the conveyor belt. Once the workpiece is sensed on the conveyor belt, the state switches to PROCESSED and shortly after to WAIT-IDLE. The state will go back to IDLE after 5 seconds.

The states of the delivery station can switch quite fast, hence some state might not be observed under poor network conditions.

Storage Station

Storing operation

After being in state PREPARED, the storage station will start the conveyor belt. Once a workpiece is sensed in the middle of the station, the state changes to PROCESSING. Then the storing operation is started. Once it is completed, the state switches to PROCESSED, directly followed by WAIT-IDLE. 5 seconds later, machine is IDLE again.

Retrieval operation

After being in state PREPARED, the storage station will switch to PROCESSING. Once the requested workpiece is retrieved to the conveyor belt, the state changes to PROCESSED. The conveyor belt is started. Upon reaching the output, the state changes to READY-AT-OUTPUT. Once the workpiece is picked up again, the state will go to WAIT-IDLE, followed by IDLE after 5 seconds.