commit
3c778a4c6f
62
filtration.ic10
Normal file
62
filtration.ic10
Normal file
@ -0,0 +1,62 @@
|
||||
alias mud_sensor d0
|
||||
alias tank d1
|
||||
alias purge_button d2
|
||||
alias purge_pump d3
|
||||
alias filter_unit d4
|
||||
alias filter_display d5
|
||||
|
||||
alias mud_temp r0
|
||||
alias mud_press r1
|
||||
alias filter1 r2
|
||||
alias filter2 r3
|
||||
alias tank_press r4
|
||||
alias button r5
|
||||
alias temp_run r6
|
||||
alias press_run r7
|
||||
alias filter_run r8
|
||||
alias purge_run r9
|
||||
|
||||
define max_press 58000 # 58MPa?
|
||||
define max_temp 313 # 40C
|
||||
|
||||
s purge_pump Setting 100 # Max throughput
|
||||
s filter_display Color 4 # Red
|
||||
|
||||
start:
|
||||
yield
|
||||
s purge_pump On 0
|
||||
ls filter1 filter_unit 0 Quantity
|
||||
ls filter2 filter_unit 1 Quantity
|
||||
beqz filter1 swap_filter_1
|
||||
beqz filter2 swap_filter_2
|
||||
s filter_display On 0
|
||||
l purge_run purge_button Setting
|
||||
bgtz purge_run purge
|
||||
j filter
|
||||
|
||||
swap_filter_1:
|
||||
s filter_display Setting 1
|
||||
s filter_display On 1
|
||||
j filter
|
||||
|
||||
swap_filter_2:
|
||||
s filter_display Setting 2
|
||||
s filter_display On 1
|
||||
j filter
|
||||
|
||||
filter:
|
||||
l mud_temp mud_sensor Temperature
|
||||
l tank_press tank Pressure
|
||||
slt temp_run mud_temp max_temp
|
||||
slt press_run tank_press max_press
|
||||
and filter_run temp_run press_run
|
||||
s filter_unit On filter_run
|
||||
j start
|
||||
|
||||
purge:
|
||||
yield
|
||||
s filter_unit On 0
|
||||
l tank_press tank Pressure
|
||||
s purge_pump On 1
|
||||
bgtz tank_press purge
|
||||
j start
|
Loading…
Reference in New Issue
Block a user