Stationeers-IC10/precision_gas_mixer_H2_O2.asm

86 lines
1.9 KiB
NASM
Raw Permalink Normal View History

2024-07-30 10:52:08 +00:00
# H2/O2 Volume Pump Gas Mixer
# Uses 2 Volume pumps instead of a gas mixer
# No need to worry about temperatures throwing...
#...mix ratios off. -Prevents Over pressure.
# You will need 1 Pipe Analyser and 2 Volume pumps.
alias H2o2Analyser d0
alias O2Pump d1
alias H2Pump d2
# ----------Change desired values here-------------
# Currently set for H2/o2 fuel mix.
# If you adujst the max tank pressure then you must
#...modify the the settings below that accordingly.
define O2Ratio 0.34#Set desired O2 ratio
define H2Ratio 0.66 #Set desired H2 ratio
define MaxPres 20000 #Set desired tank pressure
define MaxH2Pres 19800 #Keep below MaxPres
define MinTransPres 19500 #Keep below MaxH2Pres
define MinPres 19000 # Set tank minimum pressure
define PumpHighSetting 10.0 #H2Pump max setting
#--------------------------------------------------
alias O2 r0 #Ratio
alias H2 r1 #Ratio
alias Pres r2 #Pressure
alias H2PumpSetting r3
alias CurrentO2Setting r4
alias CurrentH2Setting r5
alias LowH2Setting r6
checkO2:
2024-07-30 10:55:17 +00:00
s H2o2Analyser On 1
l H2PumpSetting H2Pump Setting
2024-07-30 10:52:08 +00:00
mul CurrentO2Setting H2PumpSetting 0.75
2024-07-30 10:55:17 +00:00
s O2Pump Setting CurrentO2Setting
l O2 H2o2Analyser RatioOxygen
2024-07-30 10:52:08 +00:00
blt O2 O2Ratio o2PumpON
bgt O2 O2Ratio o2PumpOFF
j checkH2
checkH2:
2024-07-30 10:55:17 +00:00
l Pres H2o2Analyser Pressure
2024-07-30 10:52:08 +00:00
bge Pres MinTransPres setLOW
blt Pres MinTransPres setHIGH
resumePresCheck:
2024-07-30 10:55:17 +00:00
l Pres H2o2Analyser Pressure
2024-07-30 10:52:08 +00:00
bge Pres MaxH2Pres h2PumpOFF
H2RatioCheck:
2024-07-30 10:55:17 +00:00
l H2 H2o2Analyser RatioVolatiles
2024-07-30 10:52:08 +00:00
blt H2 H2Ratio h2PumpON
bgt H2 H2Ratio h2PumpOFF
j checkO2
o2PumpON:
2024-07-30 10:55:17 +00:00
s O2Pump On 1
2024-07-30 10:52:08 +00:00
j checkH2
o2PumpOFF:
2024-07-30 10:55:17 +00:00
s O2Pump On 0
2024-07-30 10:52:08 +00:00
j checkH2
h2PumpON:
2024-07-30 10:55:17 +00:00
s H2Pump On 1
2024-07-30 10:52:08 +00:00
j checkO2
h2PumpOFF:
2024-07-30 10:55:17 +00:00
s H2Pump On 0
2024-07-30 10:52:08 +00:00
j checkO2
pumpsOFF:
2024-07-30 10:55:17 +00:00
s O2Pump On 0
s H2Pump On 0
2024-07-30 10:52:08 +00:00
j checkO2
setLOW:
abs CurrentH2Setting PumpHighSetting
mul LowH2Setting CurrentH2Setting 0.5
2024-07-30 10:55:17 +00:00
s H2Pump Setting LowH2Setting
2024-07-30 10:52:08 +00:00
j resumePresCheck
setHIGH:
2024-07-30 10:55:17 +00:00
s H2Pump Setting PumpHighSetting
2024-07-30 10:52:08 +00:00
j resumePresCheck