Difference between revisions of "Carsten Milkau/Dual-Atmosphere Airlock"
From Unofficial Stationeers Wiki
< User:Carsten Milkau
(Restructuring) |
(→Vent direction: Vent direction: equality comparison is a more straightforward explanation than a NOT gate) |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 13: | Line 13: | ||
* [[Kit (Logic Switch)|Switch]] | * [[Kit (Logic Switch)|Switch]] | ||
− | * [[Carsten Milkau/RS-Latch]] | + | * [[User:Carsten Milkau/RS-Latch]] |
=== Current Atmosphere === | === Current Atmosphere === | ||
− | [[Carsten Milkau/D-Latch]] | + | [[User:Carsten Milkau/D-Latch]] |
+ | |||
+ | <pre>if (internal_pressure > vacuum_pressure) | ||
+ | then current_atmosphere = current_atmosphere | ||
+ | else current_atmosphere = target_atmosphere</pre> | ||
=== Door sensor === | === Door sensor === | ||
− | * [[Carsten Milkau/OR Gate]] | + | * <del>[[User:Carsten Milkau/OR Gate]]</del> |
− | * [[Carsten Milkau/NOT Gate]] | + | * [[Kit (Logic I/O)#Batch Reader|Batch Reader]] |
+ | * [[User:Carsten Milkau/NOT Gate]] | ||
+ | |||
+ | <pre>num_open_doors = read_sum(airlock_door open) | ||
+ | doors_closed = (num_open_doors = 0)</pre> | ||
=== Door control === | === Door control === | ||
Line 35: | Line 43: | ||
then (doors closed) | then (doors closed) | ||
else Zero | else Zero | ||
+ | |||
+ | * atmosphere 0: max(atmosphere1, any door open) = Zero | ||
+ | * atmosphere 1: atmosphere1 > any door open | ||
=== Vent direction === | === Vent direction === | ||
− | [[ | + | [[Kit (Logic Processor)#Compare Unit|Compare Unit]] |
+ | |||
+ | <pre>if (my target atmosphere) | ||
+ | then pressurize | ||
+ | else depressurize</pre> |
Latest revision as of 08:18, 22 July 2018
Contents
Structure[edit]
Piping[edit]
Electronics[edit]
Constants[edit]
- Zero
- "Vacuum" pressure
Target Atmosphere[edit]
Current Atmosphere[edit]
if (internal_pressure > vacuum_pressure) then current_atmosphere = current_atmosphere else current_atmosphere = target_atmosphere
Door sensor[edit]
num_open_doors = read_sum(airlock_door open) doors_closed = (num_open_doors = 0)
Door control[edit]
if (my atmosphere) then (internal pressure >= external pressure) else Zero
Vent activation[edit]
if (my atmosphere) then (doors closed) else Zero
- atmosphere 0: max(atmosphere1, any door open) = Zero
- atmosphere 1: atmosphere1 > any door open
Vent direction[edit]
if (my target atmosphere) then pressurize else depressurize