Repeater: различия между версиями

Материал из Dwarf Fortress Wiki
Перейти к навигацииПерейти к поиску
м (Замена текста — « - » на « — »)
(обновление)
Строка 1: Строка 1:
'''Генератор импульсов''' — устройство, генерирующее периодически команды включить-выключить. Существует несколько конструкций таких устройств, использующие жидкость или животное, нажимающее на нажимные плиты.
'''Генератор импульсов''' — устройство, генерирующее периодически команды включить-выключить. Существует несколько конструкций таких устройств, использующие жидкость или животное, нажимающее на нажимные плиты.


Строка 6: Строка 5:
Всегда оставляйте возможность аварийной остановки и доступа дварфов для модификации или починки.
Всегда оставляйте возможность аварийной остановки и доступа дварфов для модификации или починки.
{{заготовка}}
{{заготовка}}
===На базе жидкости===
===Wave repeater===
The simplest (non-borg) repeater is simply a wave traveling through a channel, as described in this [http://www.bay12forums.com/smf/index.php?topic=68659.0 forum] post.
{{diagram|spaces=yes|\
╔══════╗  ╔══════╗
║[#F0F]^.....║-->║[#0FF]7[#0FF]7[#0FF]7[#0FF]7[#0FF]7[#0FF]6║
╚══════╝  ╚══════╝
}}
 
A single 6/7 water tile flows through the channel, occasionally triggering a pressure plate set to trigger on 0-6/7 water.  To get the right amount of water in it, it's simplest to fill it all the way, then designate it as a [[Activity_zone#Water_source|water source]] (and perhaps another location as a [[Activity_zone#Pit/pond|pond]]) until a dwarf takes away a single [[bucket]] full of water.
 
As designed (5 tiles of non-triggering water, 1 tile of triggering water), this setup triggers rapidly, on par with the repeaters described below.  Counter-intuitively, making it smaller, or removing more water, slows the action of the repeater.  This is because the pressure plate never gets a chance to recover from its triggering, for which it needs 100 ticks.
 
It's possible to make a design that can be easily started and stopped, even one that conserves water, but such systems are complex, when the beauty of this design is its simplicity.  If it needs to be stopped for maintenance, one is probably best off simply dropping another bucket of water in it.
 
===Генератор импульсов на жидкостной логике===


One example [[fluid logic]] repeater (described on the [http://www.bay12games.com/forum/index.php?topic=33563.msg495183#msg495183 forum] by [http://www.bay12games.com/forum/index.php?action=profile;u=16168 AncientEnemy]) is as follows:
The traditional repeater design is probably this [[fluid logic|fluid]]-based one, described on the [http://www.bay12games.com/forum/index.php?topic=33563.msg495183#msg495183 forum] by [http://www.bay12games.com/forum/index.php?action=profile;u=16168 AncientEnemy]):


  ≈≈≈≈≈ — вода или ручей
  ≈≈≈≈≈ — бесконечный источник воды
  ═╗≈╔═ — wall to channel out after construction
  ═╗≈╔═ — wall to channel out after construction
   ╠F╣  — запорный [[Floodgate|шлюз]] ''(связан с внешним рычагом)''
   ╠F╣  — запорный [[Floodgate|шлюз]] ''(связан с внешним рычагом)''
   ║#║  — тайл [[Bridge|моста]] (связан с нажимной плитой)
   ║#║  — 1-тайловый [[drawbridge|подъёмный мост]] (связан с нажимной плитой)
   ║p┼  — [[Pressure plate|нажимная плита]] (срабатывает на уровень воды 7/7) и дверь для доступа
   ║p┼  — [[Pressure plate|нажимная плита]] (срабатывает на уровень воды 7/7) и дверь для доступа
   ╠F╣  — [[Floodgate|шлюз]] (связанный с нажимной плитой)
   ╠F╣  — [[Floodgate|шлюз]] (связанный с нажимной плитой)
   ╚═╝
   ╚═╝


This repeater toggles fairly slowly, about once every 300 steps, making it suitable for operating [[bridge|bridges]], [[floodgate|floodgates]], and [[Trap#Upright Spear/Spike|upright spikes]]. As an added bonus, the bottom wall (immediately beyond the floodgate) can be removed and connected to a cistern whose water level will be automatically maintained at a level between 3 and 4 deep.
So long as the shutoff [[floodgate]] isn't closed, [[water]] from an infinite source flows on to the pressure plate, causing the raising [[bridge]] to block access to the water source and destroy water in the circuit, while the opening of the southern floodgate compensates for the space taken up by this bridge. This water destruction mechanic means that, unlike many fluid logic circuits, this repeater needs no drainage.  The single pressure plate works both to regulate the repeater, and as output.
 
===Goblin repeater===
 
This is not as regular a repeater, but just as reliable in the long run.
 
A goblin or creature is placed (via [[Activity_zone#Pit.2FPond|pitting]]) in a loosely circular hall with one [[door]] and one [[bridge#Drawbridges|drawbridge]] leading to a single path out. Beyond these is the bait — an exit, a [[restraint|restrained]] animal, or just your fortress in general — something the creature wants<sup>1</sup>.  One path is open, and the goblin heads that way to kill the animal. A pressure plate is stepped on, which shuts one path and opens the other<sup>2</sup> (and triggers an exterior system).  The goblin reconsiders his path, and heads back around for the other hallway — where the process is repeated.
 
# For instance, if using a [[rhesus macaque]], some item of value would suffice to attract the creature.
# Doors and drawbridges open alternately when connected to a [[trigger]].


                A              A = bait animal (or similar)
This repeater toggles fairly slowly, about once every 300 steps, making it suitable for operating repeating bridges, floodgates, and [[Trap#Upright Spear/Spike|upright spikes]].   Off signals tend to follow on signals about 200 ticks later. As an added bonus, the southern wall can be removed and connected to a [[reservoir|cistern]] whose water level will be automatically maintained at a level between 3 and 4 deep-- perfect for [[swimmer|swimming]]!
  ╔════════════╝  ╚═══════════╗
  ║          ┼║  ┼          ║  ┼ = access (bridge or door), currently open
   ║  ╔═════════════════════╗ ║  ┼║= access, currently shut
  ║  ║                    ║  ║ 
  ║  ╚═════════════════════╝  ║  P = pressure plate
  ║    g ->    P            ║  g = goblin, w/ current path
  ╚═══════════════════════════╝


The only caveat is to make sure there is enough room between the pressure plate and door/bridge, to give them time to shut well before the goblin gets there.  Additional mechanized doors or a cage trap may be desired if you ever wish to "turn off" the repeater without killing the goblin/creature (by safely isolating it).
For an alternate water-based repeater, consider the design at [[User:SL/Logic_Gates#Repeater]] which demonstrates a two level, hybrid repeater.


===Репитер на помпах===
===Гоблинский генератор импульсов===
Designs based on [[creature logic]] are also possible.  The following example is compact, reliable, and fairly predictable.


Данный генератор сигналов ограничен скоростью восстановления [[pressure plate|нажимной плиты]]. Базовая конфигурация требует 4 [[screw pump|помп]] и 4 [[pressure plate|нажимных плит]], но возможны модификации, в зависимости от необходимых шагов автомата.
{{diagram|spaces=yes|\
  ╔═╗ 
═══╝[#FF0]¢╚══
[#F00]p[#FF0]¢[#FF0]^[#FF0]¢[#00F]¢[#F0F][#00F]^[#00F]¢[#F00]p
══╗[#00F]¢╔═══
  ╚═╝  }}


[http://www.bay12games.com/forum/index.php?topic=34407.msg572324#msg572324 Обсуждение на форуме] с описанием и развитием идеи.
A captured goblin placed between the two pressure plates drives this system in his attempts to reach map edge through paths {{Raw Tile|¢p|#F00|#000}}.  {{Raw Tile|^|#FF0|#000}} is linked to all {{Raw Tile|¢|#FF0|#000}}, and {{Raw Tile|^|#F0F|#00F}} is linked to all {{Raw Tile|¢|#00F|#000}}, as well as to output. This gives the goblin a path away from his constrained tile every 100 ticks. Delays in picking up path tend to make it run a cycle every 250 ticks. with on and off signals separated by about 120 ticks. Its rate of repetition can be doubled by hooking both {{Raw Tile|^|#FFF|#000}} to output, although this leads to close placement of on and off signals.


[http://mkv25.net/dfma/movie-1370-pump-basedautorepeater DFMA ролик], показывающий работу.
==Создание часов==


См. также: [http://df.magmawiki.com/index.php/User:MrFake/NStepCyclicRepeater StepCyclicRepeater]]
Although the law of big numbers means that, over large enough intervals, the preceding irregular repeaters can be used to run a clock, designs that generate perfect clock signals are also possible.


См. также: [http://df.magmawiki.com/index.php/User:SL/Logic_Gates#Repeater Repeater] с дизайном более компактных повторителей.
Данный [[mechanical logic|механически]]-жидкостный генератор импульсов будет отправлять регулярные сигналы с частотой, определяемой скоростью восстановления [[pressure plate|нажимной плиты]]. Базовая конфигурация требует 4 [[screw pump|помп]] и 4 [[pressure plate|нажимных плит]], но возможны модификации, в зависимости от числа необходимых отдельных этапов.


{|
{|
Строка 81: Строка 84:
|}
|}


{{Raw Tile|÷|#0f0|#000}}{{Raw Tile|÷|#008000|#000}} — помпа, качает со светлой стороны на тёмную. {{Raw Tile|^|#f00|#000}} нажимная плита, соединённая с шестернёй {{Raw Tile|☼|#f00|#000}}, вода выше 1/7 нажимает её. Цвета плит и шестерёнок лишь указывают на связи. В игре они все будут выглядеть как {{Raw Tile|^|#f0f|#000}} и {{Raw Tile|☼|#c0c0c0|#000}}. Постройка помпы после питающей шестерни или шестерни после управляющей нажимной плиты создаёт задержку в 1 шаг. Если строить строго помпы, затем шестерни, затем плиты, то вся система работает с периодом 400 шагов. Если в обратном порядке, то за 408. Для запуска генератора понадобится 2 ведра воды, вылитые на одну плиту. Это делается через разметку [[pond|пруда]].
{{Raw Tile|÷|#0f0|#000}}{{Raw Tile|÷|#008000|#000}} — помпа, качает со светлой стороны на тёмную. {{Raw Tile|^|#f00|#000}} - нажимная плита, которая высвобождает шестерню {{Raw Tile|☼|#f00|#000}}, когда вода глубиной 1-7 давит на неё. Цвета плит и шестерёнок лишь указывают на связи друг с другом. В игре они все будут выглядеть как {{Raw Tile|^|#f0f|#000}} и {{Raw Tile|☼|#c0c0c0|#000}}. Постройка помпы после питающей шестерни или шестерни после управляющей нажимной плиты создаёт задержку в 1 шаг. Если строить строго помпы, затем шестерни, затем плиты, то вся система работает с периодом 400 шагов. Если в обратном порядке, то за 408. Для запуска генератора понадобится 2 ведра воды, вылитые на одну плиту. Это делается через разметку [[pond|пруда]].
 
The device as depicted uses 47-62 power during operation, and requires 62 power for startup.  Drive train to power may, of course, lead to higher requirements.  Once the two units of water are introduced to the system, water is conserved perfectly.
 
См. также: [http://dwarffortresswiki.org/index.php/User:MrFake/NStepCyclicRepeater NStepCyclicRepeater]] for generalizable n-step clock generator instructions.
 
[http://dwarffortresswiki.org/index.php/User:Hash/SelfPoweredHaltableRepeater SelfPoweredHaltableRepeater] demonstrates clock generation with integrated water [[water_wheel#perpetual_motion|reactor]].
 
[http://www.bay12games.com/forum/index.php?topic=34407.msg572324#msg572324 Forum thread] has more description and explanations.
 
[http://mkv25.net/dfma/movie-1370-pump-basedautorepeater DFMA movie] shows the action of pump-based clock generation.
 
===Задержка===
Clock generation is closely related to the concept of delay: making a signal reach a target a certain amount of time after it is created.  Any non-mechanical circuit introduces delay in a signal-- the simplest form of delay is an identity gate.  The clock signal generator described above is unique in that it introduces a consistent delay.  Any consistent delay can be used for clock generation.  There are three known consistent intervals in Dwarf Fortress with which to fashion a clock signal generator: the reset delay associated with a pressure plate sending a ''close'' signal; the rate with which a creature [[gravity|falls]]; and the amount of time that a screw pump will continue to pump after losing power.  Any (or all) of these delays can be involved in a clock signal generator.


{{Category|Конструкции}}
{{Category|Конструкции}}
{{Category|Компьютеры}}
{{Category|Компьютеры}}
См. также: [http://df.magmawiki.com/index.php/User:Hash/SelfPoweredHaltableRepeater SelfPoweredHaltableRepeater]


[[en:Repeater]]
[[en:Repeater]]

Версия от 04:33, 4 марта 2013

Генератор импульсов — устройство, генерирующее периодически команды включить-выключить. Существует несколько конструкций таких устройств, использующие жидкость или животное, нажимающее на нажимные плиты.

Жидкостные системы используют способность воды перетекать с плиты на плиту и разницу высот, а также насосы. Животные нажимают плиты, стараясь найти путь через периодически закрывающийся лабиринт (двери, шлюзы, мосты).

Всегда оставляйте возможность аварийной остановки и доступа дварфов для модификации или починки.

Данная статья помечена как не оконченная.
Вы можете прочитать эту статью на английском или помочь проекту её переводом.

Wave repeater

The simplest (non-borg) repeater is simply a wave traveling through a channel, as described in this forum post.

╔══════╗ ╔══════╗ ║[#F0F]^.....║-->║[#0FF]7[#0FF]7[#0FF]7[#0FF]7[#0FF]7[#0FF]6║ ╚══════╝ ╚══════╝


A single 6/7 water tile flows through the channel, occasionally triggering a pressure plate set to trigger on 0-6/7 water. To get the right amount of water in it, it's simplest to fill it all the way, then designate it as a water source (and perhaps another location as a pond) until a dwarf takes away a single bucket full of water.

As designed (5 tiles of non-triggering water, 1 tile of triggering water), this setup triggers rapidly, on par with the repeaters described below. Counter-intuitively, making it smaller, or removing more water, slows the action of the repeater. This is because the pressure plate never gets a chance to recover from its triggering, for which it needs 100 ticks.

It's possible to make a design that can be easily started and stopped, even one that conserves water, but such systems are complex, when the beauty of this design is its simplicity. If it needs to be stopped for maintenance, one is probably best off simply dropping another bucket of water in it.

Генератор импульсов на жидкостной логике

The traditional repeater design is probably this fluid-based one, described on the forum by AncientEnemy):

≈≈≈≈≈ — бесконечный источник воды
═╗≈╔═ — wall to channel out after construction
 ╠F╣  — запорный шлюз (связан с внешним рычагом)
 ║#║  — 1-тайловый подъёмный мост (связан с нажимной плитой)
 ║p┼  — нажимная плита (срабатывает на уровень воды 7/7) и дверь для доступа
 ╠F╣  — шлюз (связанный с нажимной плитой)
 ╚═╝

So long as the shutoff floodgate isn't closed, water from an infinite source flows on to the pressure plate, causing the raising bridge to block access to the water source and destroy water in the circuit, while the opening of the southern floodgate compensates for the space taken up by this bridge. This water destruction mechanic means that, unlike many fluid logic circuits, this repeater needs no drainage. The single pressure plate works both to regulate the repeater, and as output.

This repeater toggles fairly slowly, about once every 300 steps, making it suitable for operating repeating bridges, floodgates, and upright spikes. Off signals tend to follow on signals about 200 ticks later. As an added bonus, the southern wall can be removed and connected to a cistern whose water level will be automatically maintained at a level between 3 and 4 deep-- perfect for swimming!

For an alternate water-based repeater, consider the design at User:SL/Logic_Gates#Repeater which demonstrates a two level, hybrid repeater.

Гоблинский генератор импульсов

Designs based on creature logic are also possible. The following example is compact, reliable, and fairly predictable.

╔═╗ ═══╝[#FF0]¢╚══ [#F00]p[#FF0]¢[#FF0]^[#FF0]¢[#00F]¢[#F0F][#00F]^[#00F]¢[#F00]p ══╗[#00F]¢╔═══ ╚═╝


A captured goblin placed between the two pressure plates drives this system in his attempts to reach map edge through paths ¢p. ^ is linked to all ¢, and ^ is linked to all ¢, as well as to output. This gives the goblin a path away from his constrained tile every 100 ticks. Delays in picking up path tend to make it run a cycle every 250 ticks. with on and off signals separated by about 120 ticks. Its rate of repetition can be doubled by hooking both ^ to output, although this leads to close placement of on and off signals.

Создание часов

Although the law of big numbers means that, over large enough intervals, the preceding irregular repeaters can be used to run a clock, designs that generate perfect clock signals are also possible.

Данный механически-жидкостный генератор импульсов будет отправлять регулярные сигналы с частотой, определяемой скоростью восстановления нажимной плиты. Базовая конфигурация требует 4 помп и 4 нажимных плит, но возможны модификации, в зависимости от числа необходимых отдельных этапов.

Level 0 Level -1 Level -2
██[#ff0]☼███ █[#00f]☼[#c0c0c0]☼[#c0c0c0]☼[#808000]═[#808000]═ ███[#c0c0c0]☼[#f00]☼█ ███[#0f0]☼██ ██████
█[#000]█[#0f0]÷[#008000]÷[#000]██ █[#008000]÷██[#0f0]÷█ █[#0f0]÷██[#008000]÷█ █[#000]█[#008000]÷[#0f0]÷[#000]██ ██████
█[#f00]^██[#0f0]^█ ██████ ██████ █[#ff0]^██[#00f]^█ ██████

÷÷ — помпа, качает со светлой стороны на тёмную. ^ - нажимная плита, которая высвобождает шестерню , когда вода глубиной 1-7 давит на неё. Цвета плит и шестерёнок лишь указывают на связи друг с другом. В игре они все будут выглядеть как ^ и . Постройка помпы после питающей шестерни или шестерни после управляющей нажимной плиты создаёт задержку в 1 шаг. Если строить строго помпы, затем шестерни, затем плиты, то вся система работает с периодом 400 шагов. Если в обратном порядке, то за 408. Для запуска генератора понадобится 2 ведра воды, вылитые на одну плиту. Это делается через разметку пруда.

The device as depicted uses 47-62 power during operation, and requires 62 power for startup. Drive train to power may, of course, lead to higher requirements. Once the two units of water are introduced to the system, water is conserved perfectly.

См. также: NStepCyclicRepeater] for generalizable n-step clock generator instructions.

SelfPoweredHaltableRepeater demonstrates clock generation with integrated water reactor.

Forum thread has more description and explanations.

DFMA movie shows the action of pump-based clock generation.

Задержка

Clock generation is closely related to the concept of delay: making a signal reach a target a certain amount of time after it is created. Any non-mechanical circuit introduces delay in a signal-- the simplest form of delay is an identity gate. The clock signal generator described above is unique in that it introduces a consistent delay. Any consistent delay can be used for clock generation. There are three known consistent intervals in Dwarf Fortress with which to fashion a clock signal generator: the reset delay associated with a pressure plate sending a close signal; the rate with which a creature falls; and the amount of time that a screw pump will continue to pump after losing power. Any (or all) of these delays can be involved in a clock signal generator.