Permalink
Browse files

configure flux range, cancel the other alarm loops on blowout

  • Loading branch information...
rambo committed May 10, 2012
1 parent 94214c3 commit 4a5eba25e178e9e5dd9c1f2d049b8880607fe9ca
Showing with 8 additions and 6 deletions.
  1. +6 −6 software/middleware/middleware.py
  2. +2 −0 software/middleware/middleware.yml
@@ -63,8 +63,6 @@ def __init__(self, config, launcher_instance, **kwargs):
well_path = "/fi/hacklab/reactorsimulator/engine/reactor/mwell/%d/%d" % coords
self.bus.add_signal_receiver(self.neutron_report, dbus_interface = 'fi.hacklab.reactorsimulator.engine', signal_name = "emit_neutrons", path=well_path)
self.bus.add_signal_receiver(self.temp_report, dbus_interface = 'fi.hacklab.reactorsimulator.engine', signal_name = "emit_temp", path=well_path)
- # This is used for autoranging the neutron flux meters
- self.max_neutron_avg = 0.0
def config_reloaded(self):
# Transpose the rod servo map to something more usable
@@ -267,10 +265,10 @@ def neutron_report(self, x, y, neutrons, *args):
y = int(y)
neutron_avg = float(sum(neutrons))/float(len(neutrons))
#print "neutron_report: neutron_avg=%f" % neutron_avg
- if neutron_avg > self.max_neutron_avg:
- self.max_neutron_avg = neutron_avg
- print "neutron_report: self.max_neutron_avg updated to %f" % self.max_neutron_avg
- self.led_gauge("well_%d_%d_neutrons" % (x,y), neutron_avg, self.max_neutron_avg)
+# if neutron_avg > self.max_neutron_avg:
+# self.max_neutron_avg = neutron_avg
+# print "neutron_report: self.max_neutron_avg updated to %f" % self.max_neutron_avg
+ self.led_gauge("well_%d_%d_neutrons" % (x,y), neutron_avg, self.config['neutron_gauge']['max_avgflux'])
def temp_report(self, x, y, temps, *args):
"""Calculates the average temp of the well and passes that to the corresponding led-gauge, max level comes from config"""
@@ -292,6 +290,8 @@ def red_alert_reset(self, *args):
self.nm('stop_sequence', 'red_alert0')
def blowout(self, *args):
+ # Cancel the other alarms
+ self.nm('stop_sequence', 'cell_melt_alarm0')
self.nm('stop_sequence', 'red_alert0')
# TODO: make these configurable
return self.play_sample('steam_release.wav')
@@ -1,5 +1,7 @@
temp_gauge:
max_temp: 950
+neutron_gauge:
+ max_avgflux: 3.5
led_gauge_map: #keys are well coordinates, values define the led locations
well_1_2_neutrons:
board: rod_control_panel

0 comments on commit 4a5eba2

Please sign in to comment.