#566 interrupt auto control on unformed/faulted induction matrix
This commit is contained in:
@@ -17,7 +17,7 @@ local WASTE = types.WASTE_PRODUCT
|
||||
---@enum AUTO_SCRAM
|
||||
local AUTO_SCRAM = {
|
||||
NONE = 0,
|
||||
MATRIX_DC = 1,
|
||||
MATRIX_FAULT = 1,
|
||||
MATRIX_FILL = 2,
|
||||
CRIT_ALARM = 3,
|
||||
RADIATION = 4,
|
||||
@@ -81,7 +81,7 @@ function facility.new(config)
|
||||
ascram_reason = AUTO_SCRAM.NONE,
|
||||
---@class ascram_status
|
||||
ascram_status = {
|
||||
matrix_dc = false,
|
||||
matrix_fault = false,
|
||||
matrix_fill = false,
|
||||
crit_alarm = false,
|
||||
radiation = false,
|
||||
@@ -599,7 +599,7 @@ function facility.new(config)
|
||||
self.waiting_on_ramp or self.waiting_on_stable,
|
||||
self.at_max_burn or self.saturated,
|
||||
self.ascram,
|
||||
astat.matrix_dc,
|
||||
astat.matrix_fault,
|
||||
astat.matrix_fill,
|
||||
astat.crit_alarm,
|
||||
astat.radiation,
|
||||
|
||||
@@ -528,13 +528,19 @@ function update.auto_safety()
|
||||
|
||||
local astatus = self.ascram_status
|
||||
|
||||
-- matrix related checks
|
||||
if self.induction[1] ~= nil then
|
||||
local db = self.induction[1].get_db()
|
||||
|
||||
-- clear matrix disconnected
|
||||
if astatus.matrix_dc then
|
||||
astatus.matrix_dc = false
|
||||
log.info("FAC: induction matrix reconnected, clearing ASCRAM condition")
|
||||
-- check for unformed or faulted state
|
||||
local i_ok = db.formed and not self.induction[1].is_faulted()
|
||||
|
||||
-- clear matrix fault if ok again
|
||||
if astatus.matrix_fault and i_ok then
|
||||
astatus.matrix_fault = false
|
||||
log.info("FAC: induction matrix OK, clearing ASCRAM condition")
|
||||
else
|
||||
astatus.matrix_fault = i_ok
|
||||
end
|
||||
|
||||
-- check matrix fill too high
|
||||
@@ -580,7 +586,7 @@ function update.auto_safety()
|
||||
end
|
||||
|
||||
if (self.mode ~= PROCESS.INACTIVE) and (self.mode ~= PROCESS.SYSTEM_ALARM_IDLE) then
|
||||
local scram = astatus.matrix_dc or astatus.matrix_fill or astatus.crit_alarm or astatus.gen_fault
|
||||
local scram = astatus.matrix_fault or astatus.matrix_fill or astatus.crit_alarm or astatus.gen_fault
|
||||
|
||||
if scram and not self.ascram then
|
||||
-- SCRAM all units
|
||||
@@ -604,14 +610,14 @@ function update.auto_safety()
|
||||
self.status_text = { "AUTOMATIC SCRAM", "facility radiation high" }
|
||||
|
||||
log.info("FAC: automatic SCRAM due to high facility radiation")
|
||||
elseif astatus.matrix_dc then
|
||||
elseif astatus.matrix_fault then
|
||||
next_mode = PROCESS.MATRIX_FAULT_IDLE
|
||||
self.ascram_reason = AUTO_SCRAM.MATRIX_DC
|
||||
self.status_text = { "AUTOMATIC SCRAM", "induction matrix disconnected" }
|
||||
self.ascram_reason = AUTO_SCRAM.MATRIX_FAULT
|
||||
self.status_text = { "AUTOMATIC SCRAM", "induction matrix fault" }
|
||||
|
||||
if self.mode ~= PROCESS.MATRIX_FAULT_IDLE then self.return_mode = self.mode end
|
||||
|
||||
log.info("FAC: automatic SCRAM due to induction matrix disconnection")
|
||||
log.info("FAC: automatic SCRAM due to induction matrix disconnected, unformed, or faulted")
|
||||
elseif astatus.matrix_fill then
|
||||
next_mode = PROCESS.MATRIX_FAULT_IDLE
|
||||
self.ascram_reason = AUTO_SCRAM.MATRIX_FILL
|
||||
|
||||
@@ -22,7 +22,7 @@ local supervisor = require("supervisor.supervisor")
|
||||
|
||||
local svsessions = require("supervisor.session.svsessions")
|
||||
|
||||
local SUPERVISOR_VERSION = "v1.5.12"
|
||||
local SUPERVISOR_VERSION = "v1.5.13"
|
||||
|
||||
local println = util.println
|
||||
local println_ts = util.println_ts
|
||||
|
||||
Reference in New Issue
Block a user