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.

Editing 40d:Mechanical logic

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.

You are editing a page for an older version of Dwarf Fortress ("Main" is the current version, not "40d"). Please make sure you intend to do this. If you are here by mistake, see the current page instead.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{Quality|Fine|13:08, 23 October 2013 (UTC)}}
 
 
{{av}}
 
{{av}}
 
Machine logic uses the also new system of gears, axles, windmills, and waterwheels to solve problems.  Power sources (windmills and waterwheels) transfer power to machine parts (axles and gears).  If there is not enough power in a system to allow all the parts to move, it will shut down entirely.  Individual gears can also be shut down by levers to interrupt or otherwise alter the transfer of power throughout the machine.  All sorts of logic gates can be created based on those rules alone.  Currently four have been created in a proof-of-concept sort of way in a relatively quick and cheap manner:
 
Machine logic uses the also new system of gears, axles, windmills, and waterwheels to solve problems.  Power sources (windmills and waterwheels) transfer power to machine parts (axles and gears).  If there is not enough power in a system to allow all the parts to move, it will shut down entirely.  Individual gears can also be shut down by levers to interrupt or otherwise alter the transfer of power throughout the machine.  All sorts of logic gates can be created based on those rules alone.  Currently four have been created in a proof-of-concept sort of way in a relatively quick and cheap manner:
Line 17: Line 16:
  
 
==Mechanical Logic==
 
==Mechanical Logic==
Mechanical Logic is a faster, more reliable replacement for [[Computing|Water Logic]].  It is also somewhat more complex, requiring massive amounts of wood, stone, and mechanical power.  Unlike the above examples, these designs require constant power, or they will not function correctly.
+
Mechanical Logic is a faster, more reliable replacement for {{L|Computing|Water Logic}}.  It is also somewhat more complex, requiring massive amounts of wood, stone, and mechanical power.  Unlike the above examples, these designs require constant power, or they will not function correctly.
  
 
The following examples operate on these design rules
 
The following examples operate on these design rules
Line 26: Line 25:
 
* Gearboxes, when supplied a Trigger High, thusly begin to transmit a Logic High signal
 
* Gearboxes, when supplied a Trigger High, thusly begin to transmit a Logic High signal
  
Note that there are several flaws with Mechanical Logic.  As noted, large amounts of wood, stone, and massive amounts of power are required.  Secondly, the system operates on the concept of the 'rotation sensor'  Obviously, this does not exist in Dwarf Fortress at this time, and there are no plans for such a device to exist - therefore, a surrogate unit is required.
+
Note that there are several flaws with Mechanical Logic.  As noted, large amounts of wood, stone, and massive amounts of power are required.  Secondly, the system operates on the concept of the 'rotation sensor'  Obviously, this does not exist in Dwarf Fortress at this time, and there are no plans for such a device to exist- therefore, a surrogate unit is required.
  
Now, there is one device we can use: a pressure pad.  Therefore, we simply need to convert mechanical energy into pressure - for example, using a [[Screw pump]].
+
Now, there is one device we can use: a pressure pad.  Therefore, we simply need to convert mechanical energy into pressure- for example, using a {{L|Screw Pump}}.
 
  ░░░░░░░
 
  ░░░░░░░
 
  ░≈%>^_░
 
  ░≈%>^_░
Line 36: Line 35:
 
The pump draws from a constantly-filled tile on the left, and pushes right.  The pressure pad there then acts as the 'sensor' for whether there is rotation present.  Finally, the pit on the right acts as a drain- when the pump stops, the water drains out and the pad resets (no rotation).  The lower pad shown is used as an 'inverse' out.
 
The pump draws from a constantly-filled tile on the left, and pushes right.  The pressure pad there then acts as the 'sensor' for whether there is rotation present.  Finally, the pit on the right acts as a drain- when the pump stops, the water drains out and the pad resets (no rotation).  The lower pad shown is used as an 'inverse' out.
  
Note that in all the examples, "M" is used to denote a rotation sensor - just affix a gearbox instead and route that to one of these units, "P" is used just to say where Power is supposed to be applied, and "X", "Y", and "Z" are just to show that in a multi-part logic gate, which 'sensor' links to which gearbox internally.  "o" is a gearbox that does not have any trigger connections, and is used for visual clarity.
+
Note that in all the examples, "M" is used to denote a rotation sensor- just affix a gearbox instead and route that to one of these units, "P" is used just to say where Power is supposed to be applied (though not all of these have P where it should be), and "X", "Y", and "Z" are just to show that in a multi-part logic gate, which 'sensor' links to which gearbox internally.  "o" is a gearbox that does not have any trigger connections, and is used for visual clarity.
 
 
Note that because of the above logic rules, rotation sensors linked to gear assemblies must be linked ''while active'' - either set the pressure plates to be triggered by creatures of any weight and enable civilians (so that the mechanic is standing on the plate and triggering it while completing the link), or use a second lever to pre-toggle the destination gear assemblies.
 
  
 
==Unclocked Logic==
 
==Unclocked Logic==
Line 45: Line 42:
 
===(N)OR Gate===
 
===(N)OR Gate===
  
  P→**→M O
+
  **→M O
  AB
+
  AB
  
 
===(N)AND Gate===
 
===(N)AND Gate===
  
    A
+
  A
  P→o*o→M O
+
  →o*o→M O
  o*o
+
  o*o
    B
+
  B
  
 
===(In)equal===
 
===(In)equal===
 
When Input A != Input B, O goes LOW.  Invert Y and Z to change this
 
When Input A != Input B, O goes LOW.  Invert Y and Z to change this
  
    A          !A
+
  A          !A
  P→o*o→M Z P→o*o→M Y
+
  →o*o→M Z   →o*o→M Y
  o*o        o*o
+
  o*o        o*o
    B          !B
+
  B          !B
 
   
 
   
  YZ
+
  YZ
  P→**M O
+
  **M O
  
 
===AND NOT===
 
===AND NOT===
 
When A is HIGH and B is LOW, O goes HIGH
 
When A is HIGH and B is LOW, O goes HIGH
  
    A
+
  A
  P→o*oM O
+
  →o*oM O
  o*o
+
  o*o
    !B
+
  !B
  
  
Line 78: Line 75:
 
===NOT or BUFFER===
 
===NOT or BUFFER===
  
  P→*→M O
+
  *→M O
  A
+
  A
  
 
===SELECT===
 
===SELECT===
Line 85: Line 82:
 
O will be either B is A is HIGH, or C otherwise.  In other words, IF-THEN-ELSE
 
O will be either B is A is HIGH, or C otherwise.  In other words, IF-THEN-ELSE
  
  B!A
+
B!A
  P→*
+
  *
  o→M O
+
  o→M O
  P→*
+
  *
  CA
+
CA
  
 
===DISTRIBUTOR===
 
===DISTRIBUTOR===
Line 102: Line 99:
  
 
===S/R LATCH===
 
===S/R LATCH===
 +
P = Power
 
S = Set
 
S = Set
 
R = Reset
 
R = Reset
Line 112: Line 110:
 
===OSCILLATOR===
 
===OSCILLATOR===
  
  P→*M O
+
  *M O
  !O
+
  !O
  
 
===(AND-NOT) OR===
 
===(AND-NOT) OR===
Line 233: Line 231:
 
A, B are bits in.  C is Carry in, O is bit out
 
A, B are bits in.  C is Carry in, O is bit out
  
    A          !A
+
  A          !A
  P→o*o→M Z P→o*o→M Y
+
  →o*o→M Z   →o*o→M Y
  o*o        o*o
+
  o*o        o*o
    B          !B
+
  B          !B
 
   
 
   
  YZ
+
  YZ
  P→**M X     
+
  **M X     
 
   
 
   
    X          !X
+
  X          !X
  P→o*o→M V P→o*o→M U
+
  →o*o→M V   →o*o→M U
  o*o        o*o
+
  o*o        o*o
    C          !C
+
  C          !C
 
   
 
   
  VU          C
+
  VU          C
  P→**M O   P→o*oM W
+
  **M O     →o*oM W
              o*o
+
            o*o
              Z
+
              Z
 
   
 
   
  P→**→ Carry (Out)
+
  **→ Carry (Out)
  ZW
+
  ZW
 
    
 
    
  
{{Category|Guides}}
+
[[Category:Guides]]
{{Category|Computing}}
+
[[Category:Computing]]

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)