Glenfiddich Sign Factory

From MinecraftOnline
Jump to navigation Jump to search
green_industrial.png Glenfiddich Sign Factory
2012-02-10 21.32.30.png

-=GSF=- Producing high quality signs for Freedonia since 2012

About
Owner getplayerhead.sh?nosefish&16.png nosefish
Contributors Glen Team (materials)
Category Industrial
Underground? Partly
Public? Yes
Started 2012-02-06
Completed 2012-02-15
Location
Coordinates X=382
Y=64
Z=2589
Dimension Overworld
Settlement Glenfiddich
Map Link


This automated factory crafts signs from logs harvested in the factory-owned tree harvester or pre-made planks using the storage cart crafting feature of Craftbook. It is controlled by a finite state machine (well, something very similar to a FSM), aided by several counters and some helper circuits. It is located in the Bowmore district of Glenfiddich.

Operating Instructions

  1. Put as many planks in the chest labelled "Planks" as you want or use the tree harvester next to the factory. Obviously, you will need at least 8 planks. One tree produces at least 16 planks.
  2. Empty all other chests in the production area.
  3. Go into the control room.
  4. Press the STOP button.
  5. Wait for the pumpkin above the button to light up.
  6. Press the RESET button. Any leftover products from the last run will be dispensed onto the collection point.
  7. Wait a few seconds until you hear a sound.
  8. Press the START button.
  • When the output chest is full, you will hear a sound and the pumpkin labelled "Chest Full" will blink. Press the Dispense Products button and get the products from the collection point, conveniently stacked.
  • You can press the Dispense Products button any time when the sign crafting cart is not running. The products will be dispensed onto the collection point and the counter will be reset.
  • When the input chest is empty, the pumpkin labelled "Planks" will stay lit and you will no longer hear the piston sound. Add more planks to the chest and the factory will continue automatically.
  • If you want to stop the machine before it is out of planks, press the STOP button and wait until the pumpkin above the button lights up. Then press RESET and empty all chests in the production area. Don't forget to collect your signs!
  • Do not leave the general area while the machine is running. If the area is unloaded, you will have to reset and start over.
  • Do not enter the production area while the factory is running. If you accidentally block a cart, you will have to start over.
  • If you have any questions, suggestions, or encounter a problem, please contact getplayerhead.sh?nosefish&16.png nosefish.

Screenshots


Technical Documentation

Production Area

The production area holds a counting dispensers for sticks, feeding the two production lines (one for turning planks into sticks, one for making signs).

A counting dispenser consists of an input chest with a chest dispenser ([MC1202], dispensing onto a wooden pressure plate. The pressure plate triggers a chest collector ([MCX203]) to move the item into the output chest, and a transmitter ([MC1110]) to notify the counters of the event. This setup enables the factory not only to provide just the right amount of materials to the production lines for successful crafting, but also to detect when the input chest is empty and pause production until it has been refilled.

The production lines are straightforward: A [deposit] block for raw materials at the output chest of dispensers, a block of dark grey wool that triggers the crafting, a [collect] block for the (intermediate) product, and another [collect] block for waste that sometimes results from operator mistakes or bugs.

The table below lists the transmitter/receiver bands used to control the production area:

Transmitter/Receiver bands in the Production Area
band type comment
1Pl Receiver Try to dispense 1 plank. If successful, triggers PlC.
PlC Transmitter Dispensed 1 plank. Used by the counters.
CrSt Receiver Start the storage minecart on line 1 to craft sticks from 2 planks.
StCr Transmitter The stick crafting cart has finished its run.
CrSg Receiver Start the storage minecart on line 2 to craft a sign from 6 planks and 1 stick.
SgCr Transmitter The sign crafting cart has finished its run.


Control Room

Four buttons - RESET, START, STOP, Dispense Products - are all that is needed to operate the facility. The "Product Collection Point", onto which the products are placed when pressing the respective button, is also in this room.

Transmitter/Receiver bands in the Control Room
band type comment
RST Transmitter Triggered by the RESET button. Resets all parts of the machine. The state machine will enter Q0.
START Transmitter Triggered by the START button, turns the machine on.
STOP Transmitter Triggered by the STOP button. Machine will go into OFF state.
ClCst Transmitter Triggered by the Dispense Products button.
empty Receiver Dispense content of the output chest onto the product collection point.


(Ac)counting Tower

The stone brick tower contains the four counter circuits that count the occurrences of various events during production. When a counter has reached its limit, the output stays on until it is reset, either through the reset band of that counter or by the global RESET band.

Bands used by the Counters
input output reset limit comment
PlC C2Pl PlCrst 2 Count planks for sticks.
PlC C6Pl PlCrst 6 Count planks for sign.
SgC C3Sg 3Sgrst 3 Count 4 sign crafting runs, after which new sticks have to be crafted. (named 3Sgrst for historical reasons.
SgC Full empty 54 Count 54 sign crafting runs, after which the output chest is full and has to be emptied by a worker.


Pit of States and Transitions

A deep hole in the ground next to the factory holds the state machine. You can watch it operate through the glass roof. The current state is indicated by the pumpkins on the façade above the pit. From right to left: Q0...Q5, Chest Full. The OFF state is indicated by a pumpkin above the Emergency Shutdown-button

When activating a transmitter with the band toQX, X∈{0...5}, state QX becomes the active one. Before entering the new state, Qrst is briefly activated to exit the previous state. The OFF state is different in that it is activated by the band STOP and does not respond to Qrst. It can only be exited by pressing the RESET button (band RESET).

States
band comment
Q0 Initial state, waiting for START.
Q1 Preparing two planks.
Q2 Crafting sticks.
Q3 Preparing six planks.
Q4 Crafting a sign.
Q5 Checking crafting count / deciding whether to craft sticks next or another sign.


Transitions
condition actions next state comment
Q0 ∧ START 2Pl Q1 First, dispense two planks.
Q1 ∧ C2Pl PlCrst, 3Sgrst, CrSt Q2 When two planks are in the chest, reset counters and craft sticks.
Q2 ∧ StCr 6Pl Q3 When the sticks have been crafted, dispense six planks.
Q3 ∧ C6Pl PlCrst, CrSg Q4 When the planks are in the chest, reset the counters and craft a sign.
Q4 ∧ SgCr - Q5 Wait for the crafting to finish.
Q5 ∧ ¬C3Sg ∧ ¬Full 6Pl Q3 If less than four signs have been crafted and the output chest is not yet full, craft another sign.
Q5 ∧ C3Sg ∧ ¬Full 2Pl Q1 If four signs have been crafted and the output chest is not full, craft sticks and then a sign
STOP - OFF When the STOP button is pressed, enter the OFF state immediately.
¬Q4 ∧ ClCst empty - Not a transition, but depends on state and there was space. Dispenses products and resets counter if a sign is not being crafted.


Helper Circuits

to be written later


Nosefish's Notes

  • There are probably several ways to achieve the same result with much simpler circuits. For this project, I chose the FSM approach just to see if I could make it work.

Before the update to 1.2.3, the factory had some interesting quirks:

  • Wood->Planks crafting did not work well enough. The amount of unwanted by-products like wooden bowls sometimes exceeded the number of planks that were produced by the storage cart.
  • Crafting sticks from 2 planks resulted in 3 sticks and, strangely, one stone sword. If you want one or more of those superfluous stone swords from testing, visit Hellview Castle.
  • A second counting dispenser was used to count sticks (1 stick) as a workaround for bugs.

Ideas for Improvements

  • use 6 plank counters dispensing only one plank each. Would speed up production considerably. Not enough room at this location, though. Also, building the control circuits would be much simpler and therefore less fun. Will not implement this here.