Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias dPump d0 #Pump Being tested
- alias dAnal d1 #Gas Analyzer
- move r0 0 #Default conventions to have readily accessible 0 and 1 to write to devices
- move r1 1
- alias rHousing r2 #Place to store data to/from db (IC Housing/Self)
- alias rPumpSett r3 #Volume displacement setting for pump, 0-100L
- alias rP1 r4 #Current Pressure from analyzer
- define targPress 2500
- move rPumpSett 50
- #Reset Header (prevents code from advancing until reset signal [db < 0] stops
- begin:
- l rHousing db Setting
- bltz rHousing begin
- #Code Main Body -- simple code, makes sure sensors are on, sets volume setting, runs pump until pressure >= target
- s dAnal On r1
- s dPump Setting rPumpSett
- s dPump On r1
- main:
- l rP1 dAnal Pressure
- blt rP1 targPress main
- s dPump On r0 #target pressure reached/exceeded. shut off pump
- #Reset Footer (stops program from ending/continuing so long as reset signal [db < 0] is *not* active)
- s db Setting r1 #Return that code has finished #write back 1 as a return code on the housing to inform proctor that code has finished.
- end:
- l rHousing db Setting
- bltz rHousing begin
- j end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement