v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "User:Jjdorf/Logic Gates"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
m
(Added a rotation sensor, with credit to the original source, with slight modifications for maintenance.)
Line 1: Line 1:
 
I'll be using this as a spot to keep all my preferred logic designs in one spot.  Each design will specify the power requirements, build requirements, and build order, including the point when an input needs to be hooked up to things.
 
I'll be using this as a spot to keep all my preferred logic designs in one spot.  Each design will specify the power requirements, build requirements, and build order, including the point when an input needs to be hooked up to things.
 
==Rotation Sensor==
 
==Rotation Sensor==
To be designed and fully tested.
+
Modified from: [[DF2010:Mechanical logic]]
 +
 
 +
    XXX      XXX
 +
  S%>#D    .  .
 +
    XXX      XXX
 +
 +
XXXXXX    XXXXXX
 +
Xo  D    Xo  D
 +
XXXXXX    XXXXXX
 +
 
 +
Both doors (D) are ordinarily forbidden under normal operation.  A water drain path is a good idea if maintenance is ever necessary on the bottom floor.  The mechanical input (S) provides the power to the pump.  Enough power must be available at this point to drive the pump (10 units) when the signal gear or axle is functioning.  The pressure plate (o) on the bottom layer is set to 0-3 water level.  The screw pump (%>) pumps away from the signal mechanism, towards a floor grate (#).
 +
===Building===
 +
* First, construct or dig the walls and floors.  If constructing, do NOT build floors at the empty space tiles (.), channel the same tiles if digging from the rock.
 +
* Build the pressure plate on the bottom layer, then link it to whatever is needed.  Forbid the Bottom level door.  Build the grate.
 +
* Build the screw pump, pumping toward the grate and away from the signal line direction.
 +
* Designate a pond at the grate tile, filling the bottom layer full (all four tiles to 7/7 water).
 +
* Hook the pump up to the signal mechanism.  Test with whatever logic is needed if desired.  The sensor is finished.
 +
===TODO===
 +
Verify that a signal gear or axle can be placed at (S) and still allow water to be pumped.  If this is not possible, adjust the design to put the gear one z-level above the pump, making sure to channel the floor to allow power transfer.
 +
===Pros/Cons===
 +
The pressure plate requires 100 steps to switch off, but switches on immediately.  The sensor is water tight and should not evaporate under normal operation, allowing it to be disconnected from an infinite water source.
 +
 
 
==RAM==
 
==RAM==
 
Random Access Memory, basic cell structure:
 
Random Access Memory, basic cell structure:
Line 12: Line 33:
 
  Do<%HD        .  
 
  Do<%HD        .  
 
  XXXXXX    XXXXXX
 
  XXXXXX    XXXXXX
 
+
 
     XXX      XXX
 
     XXX      XXX
 
   MX D      X   
 
   MX D      X   
Line 31: Line 52:
 
This cell does not have any "circuitry" to disable or enable the output of the cell based on addressing concerns, so if you add this to an addressable memory system, that gearing will be needed.  It should be, simply, an addition of another gear before a rotation sensor.
 
This cell does not have any "circuitry" to disable or enable the output of the cell based on addressing concerns, so if you add this to an addressable memory system, that gearing will be needed.  It should be, simply, an addition of another gear before a rotation sensor.
 
===Pros/Cons===
 
===Pros/Cons===
The most important benefit of this design is the complete lack of evaporation, negating the need for an infinite water supply under routine operation.  Not needing an infinite water supply means you can move this to a safely walled off portion of the map, preventing all building destroyers from infiltrating through it.  It is also somewhat more compact within a z-level than other designs.  The drawbacks are twofold: it requires more power to operate, and it requires three z-levels.
+
The most important benefit of this design is the complete lack of evaporation, negating the need for an infinite water supply under routine operation.  Not needing an infinite water supply means you can move this to a safely walled off portion of the map, preventing all building destroyers from infiltrating through it.  It is also somewhat more compact within a z-level than other designs.  Finally, the cell is, fundamentally, only two tiles wide, not considering power hookup.  The walls can be shared with adjacent memory cells or other constructions.  The drawbacks are twofold: it requires more power to operate, and it requires three z-levels.

Revision as of 02:15, 23 April 2010

I'll be using this as a spot to keep all my preferred logic designs in one spot. Each design will specify the power requirements, build requirements, and build order, including the point when an input needs to be hooked up to things.

Rotation Sensor

Modified from: DF2010:Mechanical logic

   XXX       XXX
 S%>#D     .  .
   XXX       XXX

XXXXXX    XXXXXX
Xo   D    Xo   D
XXXXXX    XXXXXX

Both doors (D) are ordinarily forbidden under normal operation. A water drain path is a good idea if maintenance is ever necessary on the bottom floor. The mechanical input (S) provides the power to the pump. Enough power must be available at this point to drive the pump (10 units) when the signal gear or axle is functioning. The pressure plate (o) on the bottom layer is set to 0-3 water level. The screw pump (%>) pumps away from the signal mechanism, towards a floor grate (#).

Building

  • First, construct or dig the walls and floors. If constructing, do NOT build floors at the empty space tiles (.), channel the same tiles if digging from the rock.
  • Build the pressure plate on the bottom layer, then link it to whatever is needed. Forbid the Bottom level door. Build the grate.
  • Build the screw pump, pumping toward the grate and away from the signal line direction.
  • Designate a pond at the grate tile, filling the bottom layer full (all four tiles to 7/7 water).
  • Hook the pump up to the signal mechanism. Test with whatever logic is needed if desired. The sensor is finished.

TODO

Verify that a signal gear or axle can be placed at (S) and still allow water to be pumped. If this is not possible, adjust the design to put the gear one z-level above the pump, making sure to channel the floor to allow power transfer.

Pros/Cons

The pressure plate requires 100 steps to switch off, but switches on immediately. The sensor is water tight and should not evaporate under normal operation, allowing it to be disconnected from an infinite water source.

RAM

Random Access Memory, basic cell structure:

  PXXX       XXX
 H%>#D     . .. 
   XXX       XXX

XXXXXX    XXXXXX
Do<%HD        . 
XXXXXX    XXXXXX

   XXX       XXX
  MX D       X  
   XXX       XXX

Each door (D) is a simple access door for internal maintenance. Under normal circumstances, they should be forbidden entirely. The grate (#) is there for completeness and safety when priming the cell with water. If desired it could be omitted. The pumps (%> and <%, pointing the direction of pumping, specifically, the % tile is walkable) are simple constructions, no special qualities. Make them of whatever material is available. The top level hatch (H) is the RESET signal (R). The pressure plate (o) is set to detect only 7-7 water. The middle level hatch is the SET signal (S). The walls (X) can be carved from rock or constructed as needed. Power (P) is supplied through axles or gears. The cell draws 21 units of power when connected with an axle, 25 when using a gear. The output gear of the memory (M) can technically be placed wherever you need it to be.

Building

  • The first step is to construct the walls and floor, or carve the same. If constructing, you should NOT build floors in the empty spaces (. on the right floor plan layout). If digging from solid rock, channel open space at those places instead. If constructing, you can build a wall instead of a door on the bottom layer.
  • Build all doors, forbidding the bottom most door, the top level hatch and grate and the pressure plate. Build the screw pump on the middle z-level.
  • Build the screw pump on the top z-level only after the first pump. Meanwhile, fill the bottom most tile with water by designating a pond on the location the hatch goes in the middle layer. Fill the bottom tile to 7 water, then remove the pond designation.
  • Build the hatch on the middle layer.
  • Link the pressure plate to the output gear (M). Link the SET and RESET hatches, remembering that the SET hatch turns the memory on, and the CLEAR hatch turns it off. Forbid the doors on the middle layer.
  • Fill the middle layer with water from the grate tile on the top layer, until the open spot of the pump and the SET hatch are both covered in 7 water, then remove the pond designation.
  • Forbid the door on the top layer, Connect to a power source that provides at least 20 + your connector, then stick a fork in it. It's done.

Maintenance

You can adjust the connections of the hatches as well as the pressure plate as needed. Constructing some extra levers, even if on demand, will allow you to easily adjust things. If you build a water drainage system, you won't even have to worry about the excess water in the system when you open the hatch side of the middle layer. Just remember to refill the cell if you had to go in there.

Notes

This cell does not have any "circuitry" to disable or enable the output of the cell based on addressing concerns, so if you add this to an addressable memory system, that gearing will be needed. It should be, simply, an addition of another gear before a rotation sensor.

Pros/Cons

The most important benefit of this design is the complete lack of evaporation, negating the need for an infinite water supply under routine operation. Not needing an infinite water supply means you can move this to a safely walled off portion of the map, preventing all building destroyers from infiltrating through it. It is also somewhat more compact within a z-level than other designs. Finally, the cell is, fundamentally, only two tiles wide, not considering power hookup. The walls can be shared with adjacent memory cells or other constructions. The drawbacks are twofold: it requires more power to operate, and it requires three z-levels.