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 v0.34: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 "v0.34"). 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 19: Line 19:
  
 
* Mechanical logic needs a substantial amount of wood to create and transmit power.
 
* Mechanical logic needs a substantial amount of wood to create and transmit power.
* Mechanical logic still needs converters to trigger something else than machine components, either by applying [[minecart logic]] or by using [[water|fluid]].
+
* Mechanical logic still needs converters to trigger something else than machine components, either by applying [[minecart logic]] or by using [[water|fluid]]. (In previous versions, the only fluid free option was the non-mechanical [[creature logic]].)
 
* Mechanical logic needs a substantial amount of mechanisms, particularly if you stick to [[mechanical logic#Load based|load based mechanical logic]].
 
* Mechanical logic needs a substantial amount of mechanisms, particularly if you stick to [[mechanical logic#Load based|load based mechanical logic]].
  
 
== General concepts ==
 
== General concepts ==
There are two general concepts. The older and less popular one is the so-called load-based mechanical logic. The other one is the so-called toggle-based mechanical logic.  Note that the two can be integrated, however.
+
There are two general concepts. The older and inadvisable one is the so called load-based mechanical logic. The other one is the so called toggle-based mechanical logic.
  
 
=== Load based ===
 
=== Load based ===
Load based mechanical logic uses logic gates with a defined amount of power. They have an additional amount of load in terms of mechanism or other machine components, consuming all of the power if connected. The gates are designed in a way that the load is disconnected while the output is true, and connected while the output is false. Every circuit has to have its own power supply. Compact complex circuits are very difficult to design, because power and load need to be controlled for each circuit, and each gate in a circuit needs to be connected to others it interacts with.  However, the advantage is that load-based mechanical logic computes instantly.
+
Load based mechanical logic uses single logic gates with a defined amount of power. They have an additional amount of load in terms of mechanism or other machine components, consuming all of the power if connected. The gates are designed in a way that the load is disconnected while the output is true, and connected while the output is false. Every logic gate has to have its own power supply. Compact complex logic gates are impossible to design.
  
 
=== Toggle based ===
 
=== Toggle based ===
Toggle based mechanical logic works more like [[fluid logic]], not controlling the flow of fluid but the flow of power. It uses the fact that gears don't have a defined state when receiving an on or an off signal, but toggle between connected and disengaged, independent of the type of signal. It normally uses a central power supply. It is quite easy to create very complex gates with multiple output signals such as, for example, a binary to decimal converter.  The cost of this ease of use and design, however, is that toggle based circuits need to be converted not just for output, but sometimes also for further processing.
+
Toggle based mechanical logic works more like [[fluid logic]], not controlling the flow of fluid but the flow of power. It uses the fact that gears don't have a defined state when receiving an on or an off signal, but toggle between connected and disengaged, independent of the type of signal. It normally uses a central power supply. It is quite easy to create very complex gates with multiple output signals such as, for example, a binary to decimal converter.
  
 
=== Example ===
 
=== Example ===
Line 112: Line 112:
  
 
== Power to signal converter ==
 
== Power to signal converter ==
When you are dealing with mechanical logic, you'll finally want or have to trigger something else than machine components like doors or bridges (or, with toggle-based mechanical logic, another gear assembly). Currently, there exists no trigger in dwarf fortress that reacts on the working state of machine components, that is, the presence or absence of power. The traditional solution to this was to use a hydromechanical power-to-signal converter, remarkably similar to hydromechanical [[Memory_(computing)|memory]].
+
When you are dealing with mechanical logic, you'll finally want or have to trigger something else than machine components like doors or bridges. Currently, there exists no trigger in dwarf fortress that reacts on the working state of machine components, thus power on/off. So, you'll have to convert power via pressure plates, screw pumps and fluid into an on/off signal.
 
<div style="width:1px; white-space:nowrap;">
 
<div style="width:1px; white-space:nowrap;">
 
'''Z 0'''
 
'''Z 0'''
Line 173: Line 173:
 
</div>
 
</div>
 
<br />
 
<br />
When the pump is connected to power, it will suck water from the pressure plate and pump it to the right. The water level on the pressure plate will fall to 0. The plate can be constructed to react on 0…3 water. You can invert it to get an off signal instead setting it to 4…7. In both cases the ''off signal'' will have a delay of about 100 steps. This gate is fluid conserving.
+
When the pump is connected to power, it will suck water from the pressure plate and pump it to the right. The water level on the pressure plate will fall to 0. The plate can be constructed to react on 0&hellip;3 water. You can invert it to get an off signal instead setting it to 4&hellip;7. In both cases the ''off signal'' will have a delay of about 100 steps. This gate is fluid conserving.
  
However, the introduction of minecarts have created alternatives that are more compact and don't require water, largely rendering the hydromechanical PTS device obsolete.  The following minecart-based PTS converter is fast, easy to build, and extraordinarily compact:
+
Since the introduction of minecarts, fluid is no longer necessary. See http://www.bay12forums.com/smf/index.php?topic=114923.0 for various designs.
 
 
[[File:2x2pts.png]]
 
 
 
[http://www.bay12forums.com/smf/index.php?topic=114923.0 Bloodbeard's Minecart Dwarfputing Ideas thread] on the DF forums has other examples of minecart-based PTS.
 
  
 
==Load based Mechanical signal-input power-output gates==
 
==Load based Mechanical signal-input power-output gates==

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)

Templates used on this page: