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.31: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.31"). 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|Exceptional|16:06, 11 August 2010 (UTC)}} | + | {{quality|Exceptional|16:06, 11 August 2010 (UTC)}}<!-- |
− | <!-- | ||
*************************** | *************************** | ||
* WORKING IN PROGRESS !!! * | * WORKING IN PROGRESS !!! * | ||
Line 7: | Line 6: | ||
{{av}} | {{av}} | ||
− | Mechanical logic is one discipline of | + | Mechanical logic is one discipline of {{l|computing}} using mechanical {{l|power}} to perform logical operations. In this case powered or unpowered {{l|machine component|machine components}} represent the binary information. |
− | The principles of mechanical logic are simple. | + | The principles of mechanical logic are simple. {{l|Gear assembly|Gear assemblies}} linked to {{l|trigger}}s will be toggled between disengaged and engaged when they receive an on/off signal. In this manner, you can conditionally attach power supply from {{l|windmill}}s or {{l|water wheel}}s to specially arranged gears to build logic gates. You can also connect additional gears or other machine components as load - consuming power - to a linked gear in various configurations. |
− | + | An alternative to using the gates listed here that require an extra load of gears is to use [[Pre-Toggled Mechanical Logic]]. This logic discipline has the benefit of being far easier to power, since it does not rely on extra gears to force a gear to disable in certain circumstances. At present, it does not work with pressure plates, however, but probably only needs a bit of redesigning. | |
− | |||
− | |||
− | |||
+ | == Pros and cons == | ||
− | * | + | * needs a substantial amount of wood to construct power supply |
− | * | + | * needs a substantial amount of {{l|mechanism}}s and therefore {{l|mechanic}}s especially when you base your gates on load |
− | + | * needs {{l|water|fluid}} to build converter to trigger something else than machine components | |
+ | * is very fast because gears don't have a reaction delay of 100 steps | ||
+ | * is very flexible because gears can be toggled and therefore inverting input signals is very easy | ||
+ | * is easy to reconfigure because you don't have to deal with fluid or {{l|creature}}s as you have to when you stick to other computing disciplines | ||
+ | |||
+ | <!-- ToDo --> | ||
+ | <!-- | ||
== General concepts == | == General concepts == | ||
− | |||
=== Load based === | === Load based === | ||
− | |||
− | |||
=== Toggle based === | === Toggle based === | ||
− | + | --> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== 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. Currently, there doesn't exist any | + | 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 doesn't exist any {{l|trigger|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 108: | Line 45: | ||
|- | |- | ||
|{{RTL|#DDD}} | |{{RTL|#DDD}} | ||
− | |{{RTL|#222| | + | |{{RTL|#222|*|#BBB}} |
|{{RTL|#444|÷|#DDD}} | |{{RTL|#444|÷|#DDD}} | ||
|{{RTL|#444|÷|#DDD|►|#00A|center|►|#00A|center}} | |{{RTL|#444|÷|#DDD|►|#00A|center|►|#00A|center}} | ||
− | |{{RTL|#222| | + | |{{RTL|#222|*|#BBB}} |
|{{RTL|#222}} | |{{RTL|#222}} | ||
|- | |- | ||
Line 156: | Line 93: | ||
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 100 steps.{{Verify}} 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…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 100 steps.{{Verify}} This gate is fluid conserving. | ||
− | == | + | ==Mechanical signal-input power-output gates== |
* These gates can be used either by adding a power -> link signal converter (also known as a "rotation sensor"), or directly used to control pumps, such as in other logic gates (the unsourced fluid logic gates use these, for instance). The conventional "rotation sensor" consists of a pump powered by the gate's OUTPUT gear, pumping an infinite supply of water onto a water-sensing pressure plate with an infinite drain. | * These gates can be used either by adding a power -> link signal converter (also known as a "rotation sensor"), or directly used to control pumps, such as in other logic gates (the unsourced fluid logic gates use these, for instance). The conventional "rotation sensor" consists of a pump powered by the gate's OUTPUT gear, pumping an infinite supply of water onto a water-sensing pressure plate with an infinite drain. | ||
* There are certain things important to all the gates: | * There are certain things important to all the gates: | ||
Line 260: | Line 197: | ||
[#000].[#000].[#ff0]O[#aaf]I | [#000].[#000].[#ff0]O[#aaf]I | ||
[#000].[#000].¦ | [#000].[#000].¦ | ||
− | [#0f0]P[#aaf]-* | + | [#0f0]P[#aaf]-*[#aaf]i-[#0f0]P |
− | [# | ||
[#000].[#000].[#aaf]i | [#000].[#000].[#aaf]i | ||
+ | [#000].[#000].¦ | ||
[#000].[#000].[#0f0]P}} | [#000].[#000].[#0f0]P}} | ||
Line 285: | Line 222: | ||
| Yes | | Yes | ||
| Yes | | Yes | ||
− | | | + | | Half |
| 0 | | 0 | ||
|- | |- | ||
Line 292: | Line 229: | ||
| Yes | | Yes | ||
| Yes | | Yes | ||
− | | | + | | Half |
| 0 | | 0 | ||
|- | |- | ||
Line 299: | Line 236: | ||
| Yes | | Yes | ||
| Yes | | Yes | ||
− | | | + | | Full |
| 1 | | 1 | ||
|} | |} | ||
Line 305: | Line 242: | ||
* The XNOR gate is an equality gate: The output is ON when both inputs are equal, and OFF when they are not equal. | * The XNOR gate is an equality gate: The output is ON when both inputs are equal, and OFF when they are not equal. | ||
* This gate may be '''even more complicated''' to build than the XOR gate! | * This gate may be '''even more complicated''' to build than the XOR gate! | ||
− | * First, your 'i's are again gears connected to your two inputs. The extra | + | * First, your 'i's are again gears connected to your two inputs. The two extra Ps to the right and below them are additional power sources, ideally only one windmill each. |
− | * Here's where it gets complicated. The load has to be sufficient to shut down the system when additional power | + | * Here's where it gets complicated. The load has to be sufficient to shut down the system even when ONE of the inputs' additional power supplies are connected. However, when BOTH inputs are on, there needs to be enough power from both additional Ps to bring the system back online. |
* Thus our gate does what it is supposed to: Produce enough power to have the OUTPUT gear be ON when both A and B are either 0 or 1, but not when they are not equal. | * Thus our gate does what it is supposed to: Produce enough power to have the OUTPUT gear be ON when both A and B are either 0 or 1, but not when they are not equal. | ||
− | + | [[Category:DF2010:Computing]] |