Stationeers

Stationeers

Not enough ratings
H2 Combuster with Aux Function
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
292.229 KB
29 Dec, 2024 @ 4:58am
29 Dec, 2024 @ 5:25am
3 Change Notes ( view )

Subscribe to download
H2 Combuster with Aux Function

Description
This script was written to control my entire base from my H2 Combustor on Mimas.​

#this script will control an H2 combuster along with a myriad of simple devices. #For the h2 combuster, the script cycles IDLE->COOLING->PURGE WATER->PURGE GAS #at each step, the routine DoAux is called, which controls all the other devices alias unit db define wtrVlv $3a8d #digital valve leading to open condensation valve define outVlv $3a8a #digital valve leading to vent define lever $3cd2 #lever to set idle/working state #the following devices are detailed as they are used in the DoAux routine define mixer $ba3 define fuel $3a6e define sensor $3cbc define cooler $139d define n2Can $1447 define n2Reg $142e define o2Can $15c5 define o2Reg $a99 define battery $156d define generator $14bd define growlight $491e alias timer r15 define molsPerBatch 60 #moles of water to make in output network define maxBatchPressure 6000 #alternative to mole limit define drainTemp 380 #temp to start letting water into greenhouse define purgeTemp 240 #temp to purge to prevent CO2 from solidifying define cycleTime 1000 #total time in ticks for growlight cycle define darkTime 400 #ticks of cycle to be dark Finish: sd wtrVlv On 0 #begin in idle state sd outVlv On 0 s unit Mode 0 DoIdle: yield #hold idle while lever is closed jal DoAux ld r0 lever Open bnez r0 StartBurning j DoIdle StartBurning: s unit Mode 1 #start burning fuel to make water DoBurning: yield jal DoAux l r0 unit TotalMolesOutput l r1 unit RatioWaterOutput l r2 unit RatioSteamOutput mul r1 r1 r0 mul r2 r2 r0 add r0 r1 r2 bgt r0 molsPerBatch StartCooling l r0 unit PressureOutput bgt r0 maxBatchPressure StartCooling j DoBurning StartCooling: s unit Mode 0 #wait for radiative cooling WaitCooling: yield jal DoAux l r0 unit TemperatureOutput blt r0 drainTemp StartDraining j WaitCooling StartDraining: sd wtrVlv On 1 #start draining water from system WaitDraining: yield jal DoAux l r0 unit TemperatureOutput blt r0 purgeTemp StartPurging j WaitDraining StartPurging: sd wtrVlv On 0 #purge leftover gasses sd outVlv On 1 WaitPurging: yield jal DoAux l r0 unit PressureOutput blt r0 5 Finish #return to check if idle j WaitPurging DoAux: ld r0 fuel Pressure #mix fuel if pressure low slt r0 r0 8000 sd mixer On r0 ld r0 sensor Temperature #run vent if greenhouse temp is high sgt r0 r0 295 sd cooler On r0 ld r0 battery Mode #run generator if battery around half full slt r0 r0 4 sd generator On r0 ld r0 n2Can Pressure #control air and jetpack canister filling slt r0 r0 8000 sd n2Reg On r0 ld r0 o2Can Pressure slt r0 r0 8000 sd o2Reg On r0 select timer timer cycleTime timer #control growlight sgt r0 timer darkTime sd growlight On r0 sub timer timer 1 j ra
1 Comments
boblefurieu 24 Apr @ 3:35am 
Lack of description, What devices we need ? How should mount those together? Is this script automatically stop the combuster when the output is full (to prevent pipe burst) ?