mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
#173 dump excess steam on opening emergency coolant
This commit is contained in:
parent
523ac91c3b
commit
fbb992ff12
@ -19,7 +19,7 @@ local iocontrol = require("coordinator.iocontrol")
|
||||
local renderer = require("coordinator.renderer")
|
||||
local sounder = require("coordinator.sounder")
|
||||
|
||||
local COORDINATOR_VERSION = "v0.11.3"
|
||||
local COORDINATOR_VERSION = "v0.11.4"
|
||||
|
||||
local print = util.print
|
||||
local println = util.println
|
||||
|
@ -238,7 +238,7 @@ local function init(parent, id)
|
||||
local rcs_tags = Div{parent=rcs,width=2,height=14,x=29,y=9}
|
||||
|
||||
local c_flt = IndicatorLight{parent=rcs_annunc,label="RCS Hardware Fault",colors=cpair(colors.yellow,colors.gray)}
|
||||
local c_emg = TriIndicatorLight{parent=rcs_annunc,label="Emergency Coolant",c1=colors.gray,c2=colors.white,c3=colors.yellow}
|
||||
local c_emg = TriIndicatorLight{parent=rcs_annunc,label="Emergency Coolant",c1=colors.gray,c2=colors.white,c3=colors.green}
|
||||
local c_cfm = IndicatorLight{parent=rcs_annunc,label="Coolant Feed Mismatch",colors=cpair(colors.yellow,colors.gray)}
|
||||
local c_brm = IndicatorLight{parent=rcs_annunc,label="Boil Rate Mismatch",colors=cpair(colors.yellow,colors.gray)}
|
||||
local c_sfm = IndicatorLight{parent=rcs_annunc,label="Steam Feed Mismatch",colors=cpair(colors.yellow,colors.gray)}
|
||||
|
@ -3,9 +3,9 @@
|
||||
"bootloader": "0.2",
|
||||
"comms": "1.4.0",
|
||||
"reactor-plc": "v0.12.1",
|
||||
"rtu": "v0.12.1",
|
||||
"supervisor": "v0.13.1",
|
||||
"coordinator": "v0.11.3",
|
||||
"rtu": "v0.12.2",
|
||||
"supervisor": "v0.13.2",
|
||||
"coordinator": "v0.11.4",
|
||||
"pocket": "alpha-v0.0.0"
|
||||
},
|
||||
"files": {
|
||||
@ -183,8 +183,8 @@
|
||||
"lockbox": 100797,
|
||||
"reactor-plc": 75545,
|
||||
"rtu": 83090,
|
||||
"supervisor": 269955,
|
||||
"coordinator": 179370,
|
||||
"supervisor": 271106,
|
||||
"coordinator": 179369,
|
||||
"pocket": 335
|
||||
}
|
||||
}
|
@ -47,7 +47,7 @@ function turbinev_rtu.new(turbine)
|
||||
unit.connect_input_reg(turbine.getEnergyFilledPercentage)
|
||||
|
||||
-- holding registers --
|
||||
unit.connect_holding_reg(turbine.setDumpingMode, turbine.getDumpingMode)
|
||||
unit.connect_holding_reg(turbine.getDumpingMode, turbine.setDumpingMode)
|
||||
|
||||
return unit.interface()
|
||||
end
|
||||
|
@ -25,7 +25,7 @@ local sna_rtu = require("rtu.dev.sna_rtu")
|
||||
local sps_rtu = require("rtu.dev.sps_rtu")
|
||||
local turbinev_rtu = require("rtu.dev.turbinev_rtu")
|
||||
|
||||
local RTU_VERSION = "v0.12.1"
|
||||
local RTU_VERSION = "v0.12.2"
|
||||
|
||||
local RTU_UNIT_TYPE = types.RTU_UNIT_TYPE
|
||||
|
||||
|
@ -14,7 +14,7 @@ local svsessions = require("supervisor.session.svsessions")
|
||||
local config = require("supervisor.config")
|
||||
local supervisor = require("supervisor.supervisor")
|
||||
|
||||
local SUPERVISOR_VERSION = "v0.13.1"
|
||||
local SUPERVISOR_VERSION = "v0.13.2"
|
||||
|
||||
local print = util.print
|
||||
local println = util.println
|
||||
|
@ -523,7 +523,7 @@ function unit.new(reactor_id, num_boilers, num_turbines)
|
||||
---@nodiscard
|
||||
---@return integer lim_br100
|
||||
function public.a_get_effective_limit()
|
||||
if not self.db.control.ready or self.db.control.degraded or self.plc_cache.rps_trip then
|
||||
if (not self.db.control.ready) or self.db.control.degraded or self.plc_cache.rps_trip then
|
||||
self.db.control.br100 = 0
|
||||
return 0
|
||||
else
|
||||
|
@ -6,11 +6,15 @@ local util = require("scada-common.util")
|
||||
|
||||
local plc = require("supervisor.session.plc")
|
||||
|
||||
local qtypes = require("supervisor.session.rtu.qtypes")
|
||||
|
||||
local TRI_FAIL = types.TRI_FAIL
|
||||
local DUMPING_MODE = types.DUMPING_MODE
|
||||
local PRIO = types.ALARM_PRIORITY
|
||||
local ALARM_STATE = types.ALARM_STATE
|
||||
|
||||
local TBV_RTU_S_DATA = qtypes.TBV_RTU_S_DATA
|
||||
|
||||
local IO = rsio.IO
|
||||
|
||||
local PLC_S_CMDS = plc.PLC_S_CMDS
|
||||
@ -754,16 +758,38 @@ function logic.handle_redstone(self)
|
||||
-- if auto control is engaged, alarm check will SCRAM on reactor over temp so that's covered
|
||||
self.valves.emer_cool.close()
|
||||
|
||||
-- set turbines to not dump steam
|
||||
for i = 1, #self.turbines do
|
||||
local session = self.turbines[i] ---@type unit_session
|
||||
local turbine = session.get_db() ---@type turbinev_session_db
|
||||
|
||||
if turbine.state.dumping_mode ~= DUMPING_MODE.IDLE then
|
||||
session.get_cmd_queue().push_data(TBV_RTU_S_DATA.SET_DUMP_MODE, DUMPING_MODE.IDLE)
|
||||
end
|
||||
end
|
||||
|
||||
if self.db.annunciator.EmergencyCoolant > 1 and self.emcool_opened then
|
||||
log.info(util.c("UNIT ", self.r_id, " emergency coolant valve closed"))
|
||||
log.info(util.c("UNIT ", self.r_id, " turbines set to not dump steam"))
|
||||
end
|
||||
|
||||
self.emcool_opened = false
|
||||
elseif enable_emer_cool or self.emcool_opened then
|
||||
self.valves.emer_cool.open()
|
||||
|
||||
-- set turbines to dump excess steam
|
||||
for i = 1, #self.turbines do
|
||||
local session = self.turbines[i] ---@type unit_session
|
||||
local turbine = session.get_db() ---@type turbinev_session_db
|
||||
|
||||
if turbine.state.dumping_mode ~= DUMPING_MODE.DUMPING_EXCESS then
|
||||
session.get_cmd_queue().push_data(TBV_RTU_S_DATA.SET_DUMP_MODE, DUMPING_MODE.DUMPING_EXCESS)
|
||||
end
|
||||
end
|
||||
|
||||
if self.db.annunciator.EmergencyCoolant > 1 and not self.emcool_opened then
|
||||
log.info(util.c("UNIT ", self.r_id, " emergency coolant valve opened"))
|
||||
log.info(util.c("UNIT ", self.r_id, " turbines set to dump excess steam"))
|
||||
end
|
||||
|
||||
self.emcool_opened = true
|
||||
|
Loading…
Reference in New Issue
Block a user