Initial commit
This commit is contained in:
parent
e2368d82c6
commit
2a50ecf864
32
cooling_tower_drain.ic10
Normal file
32
cooling_tower_drain.ic10
Normal file
@ -0,0 +1,32 @@
|
||||
# Automatically evacuates cooling-tower when temp
|
||||
# is below 40C (39.85C)
|
||||
# needs a volume pump and a gas analyzer
|
||||
|
||||
alias sensor d0
|
||||
alias pump d1
|
||||
|
||||
alias pipe_temp r0
|
||||
alias pipe_press r1
|
||||
alias temp_go r2
|
||||
alias press_go r3
|
||||
alias pump_go r4
|
||||
|
||||
define temp_thresh 313 # 39.85C
|
||||
|
||||
# Sets volume pump max capacity
|
||||
l pipe_press pump Maximum
|
||||
s pump Setting pipe_press
|
||||
|
||||
start:
|
||||
yield
|
||||
# Loads cooling-tower pressure and temp
|
||||
l pipe_temp sensor Temperature
|
||||
l pipe_press sensor Pressure
|
||||
# Checks if temp is below threshold
|
||||
slt temp_go pipe_temp temp_thresh
|
||||
sgtz press_go pipe_press
|
||||
# If cooling-tower has pressure, and temp is safe..
|
||||
and pump_go temp_go press_go
|
||||
# ...activate pump
|
||||
s pump On pump_go
|
||||
j start
|
63
gas_mixer.ic10
Normal file
63
gas_mixer.ic10
Normal file
@ -0,0 +1,63 @@
|
||||
# Gas-mixing script. Needs two source-tanks and an
|
||||
# output tank, a gas-mixer, a (turbo) volume pump,
|
||||
# and a Kit (Button, moment type) to trigger purge.
|
||||
# Gas mixer ratio is manually set!
|
||||
|
||||
alias tank_a d0
|
||||
alias tank_b d1
|
||||
alias tank_out d2
|
||||
alias mixer d3
|
||||
alias pump d4
|
||||
alias button d5
|
||||
|
||||
alias tank_a_press r0
|
||||
alias tank_b_press r1
|
||||
alias tank_out_press r2
|
||||
alias tank_a_ok r3
|
||||
alias tank_b_ok r4
|
||||
alias tank_out_ok r5
|
||||
alias mixer_run r6
|
||||
alias purge_activate r7
|
||||
|
||||
# Stops mixing if either input-gas is below 500kPa
|
||||
define press_in_min 500
|
||||
# Stops mixing if output-tank is "full"
|
||||
define press_out_max 58000
|
||||
|
||||
# Sets purge pump to max output
|
||||
l tank_a_press pump Maximum
|
||||
s pump Setting tank_a_press
|
||||
|
||||
start:
|
||||
yield
|
||||
s pump On 0 # Ensures purge pump is off
|
||||
# Checks is purge is activated
|
||||
l purge_activate button Setting
|
||||
bgtz purge_activate purge
|
||||
|
||||
# Loads tank pressures
|
||||
l tank_a_press tank_a Pressure
|
||||
l tank_b_press tank_b Pressure
|
||||
l tank_out_press tank_out Pressure
|
||||
|
||||
# Checks if pressures are within tolerances
|
||||
sgt tank_a_ok tank_a_press press_in_min
|
||||
sgt tank_b_ok tank_b_press press_in_min
|
||||
slt tank_out_ok tank_out_press press_out_max
|
||||
|
||||
and mixer_run tank_a_ok tank_b_ok
|
||||
and mixer_run tank_out_ok mixer_run
|
||||
|
||||
# Activates mixer if all is ok
|
||||
s mixer On mixer_run
|
||||
j start
|
||||
|
||||
purge:
|
||||
yield
|
||||
s mixer On 0 # Turns mixer off
|
||||
# Gets output tank pressure
|
||||
l tank_out_press tank_out Pressure
|
||||
s pump On 1 # Activates purge pump
|
||||
# Runs pump until tank is empty
|
||||
bgtz tank_out_press purge
|
||||
j start
|
Loading…
Reference in New Issue
Block a user