1
0
Fork 0

ECAM warnings for the GEN 1 / 2 fault

This commit is contained in:
legoboyvdlp R 2020-10-14 18:08:18 +01:00
parent 68593890bf
commit 293270f57e
5 changed files with 392 additions and 1 deletions

View file

@ -90,8 +90,14 @@ var warningNodes = {
navTerrFault: props.globals.initNode("/ECAM/warnings/timer/nav-gpws-terr-fault"), navTerrFault: props.globals.initNode("/ECAM/warnings/timer/nav-gpws-terr-fault"),
}, },
Flipflops: { Flipflops: {
apuGenFault: props.globals.initNode("/ECAM/warnings/flipflop/apu-gen-fault"),
apuGenFaultOnOff: props.globals.initNode("/ECAM/warnings/flipflop/apu-gen-fault-on-off"),
bleed1LowTemp: props.globals.initNode("/ECAM/warnings/logic/bleed-1-low-temp-flipflop-output"), bleed1LowTemp: props.globals.initNode("/ECAM/warnings/logic/bleed-1-low-temp-flipflop-output"),
bleed2LowTemp: props.globals.initNode("/ECAM/warnings/logic/bleed-2-low-temp-flipflop-output"), bleed2LowTemp: props.globals.initNode("/ECAM/warnings/logic/bleed-2-low-temp-flipflop-output"),
gen1Fault: props.globals.initNode("/ECAM/warnings/flipflop/gen-1-fault"),
gen2Fault: props.globals.initNode("/ECAM/warnings/flipflop/gen-2-fault"),
gen1FaultOnOff: props.globals.initNode("/ECAM/warnings/flipflop/gen-1-fault-on-off"),
gen2FaultOnOff: props.globals.initNode("/ECAM/warnings/flipflop/gen-2-fault-on-off"),
pack1Ovht: props.globals.initNode("/ECAM/warnings/flipflop/pack-1-ovht"), pack1Ovht: props.globals.initNode("/ECAM/warnings/flipflop/pack-1-ovht"),
pack2Ovht: props.globals.initNode("/ECAM/warnings/flipflop/pack-2-ovht"), pack2Ovht: props.globals.initNode("/ECAM/warnings/flipflop/pack-2-ovht"),
}, },

View file

@ -1139,6 +1139,72 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(acBusEssShedAtc); ECAM_controller.warningReset(acBusEssShedAtc);
} }
if (gen1fault.clearFlag == 0 and warningNodes.Flipflops.gen1Fault.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) {
gen1fault.active = 1;
if (!warningNodes.Flipflops.gen1FaultOnOff.getValue()) {
gen1faultGen.active = 1;
} else {
ECAM_controller.warningReset(gen1faultGen);
}
if (systems.ELEC.Switch.gen1.getBoolValue()) {
gen1faultGen2.active = 1;
gen1faultGen3.active = 1;
} else {
ECAM_controller.warningReset(gen1faultGen2);
ECAM_controller.warningReset(gen1faultGen3);
}
} else {
ECAM_controller.warningReset(gen1fault);
ECAM_controller.warningReset(gen1faultGen);
ECAM_controller.warningReset(gen1faultGen2);
ECAM_controller.warningReset(gen1faultGen3);
}
if (gen2fault.clearFlag == 0 and warningNodes.Flipflops.gen2Fault.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) {
gen2fault.active = 1;
if (!warningNodes.Flipflops.gen2FaultOnOff.getValue()) {
gen2faultGen.active = 1;
} else {
ECAM_controller.warningReset(gen2faultGen);
}
if (systems.ELEC.Switch.gen2.getBoolValue()) {
gen2faultGen2.active = 1;
gen2faultGen3.active = 1;
} else {
ECAM_controller.warningReset(gen2faultGen2);
ECAM_controller.warningReset(gen2faultGen3);
}
} else {
ECAM_controller.warningReset(gen2fault);
ECAM_controller.warningReset(gen2faultGen);
ECAM_controller.warningReset(gen2faultGen2);
ECAM_controller.warningReset(gen2faultGen3);
}
if (apuGenfault.clearFlag == 0 and warningNodes.Flipflops.apuGenFault.getValue() and (phaseVar2 <= 3 or phaseVar2 == 6 or phaseVar2 >= 9)) {
apuGenfault.active = 1;
if (!warningNodes.Flipflops.apuGenFaultOnOff.getValue()) {
apuGenfaultGen.active = 1;
} else {
ECAM_controller.warningReset(apuGenfaultGen);
}
if (systems.ELEC.Switch.genApu.getBoolValue()) {
apuGenfaultGen2.active = 1;
apuGenfaultGen3.active = 1;
} else {
ECAM_controller.warningReset(apuGenfaultGen2);
ECAM_controller.warningReset(apuGenfaultGen3);
}
} else {
ECAM_controller.warningReset(apuGenfault);
ECAM_controller.warningReset(apuGenfaultGen);
ECAM_controller.warningReset(apuGenfaultGen2);
ECAM_controller.warningReset(apuGenfaultGen3);
}
if ((athr_offw.clearFlag == 0) and athrWarn.getValue() == 2 and phaseVar2 != 4 and phaseVar2 != 8 and phaseVar2 != 10) { if ((athr_offw.clearFlag == 0) and athrWarn.getValue() == 2 and phaseVar2 != 4 and phaseVar2 != 8 and phaseVar2 != 10) {
athr_offw.active = 1; athr_offw.active = 1;
athr_offw_1.active = 1; athr_offw_1.active = 1;

View file

@ -212,9 +212,27 @@ var warnings = std.Vector.new([
var dcBusEssShedIcing = warning.new(msg: " AVOID ICING CONDITIONS", colour: "c"), var dcBusEssShedIcing = warning.new(msg: " AVOID ICING CONDITIONS", colour: "c"),
# AC ESS BUS SHED # AC ESS BUS SHED
var acBusEssShed = warning.new(msg: "ELEC DC ESS BUS SHED", colour: "a", aural: 1, light: 1, isMainMsg: 1), var acBusEssShed = warning.new(msg: "ELEC AC ESS BUS SHED", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var acBusEssShedAtc = warning.new(msg: " -ATC..............SYS 2", colour: "c"), var acBusEssShedAtc = warning.new(msg: " -ATC..............SYS 2", colour: "c"),
# GEN 1 FAULT
var gen1fault = warning.new(msg: "ELEC GEN 1 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var gen1faultGen = warning.new(msg: "-GEN 1......OFF THEN ON", colour: "c"),
var gen1faultGen2 = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"),
var gen1faultGen3 = warning.new(msg: "-GEN 1..............OFF", colour: "c"),
# GEN 2 FAULT
var gen2fault = warning.new(msg: "ELEC GEN 2 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var gen2faultGen = warning.new(msg: "-GEN 2......OFF THEN ON", colour: "c"),
var gen2faultGen2 = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"),
var gen2faultGen3 = warning.new(msg: "-GEN 2..............OFF", colour: "c"),
# APU GEN FAULT
var apuGenfault = warning.new(msg: "ELEC APU GEN FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var apuGenfaultGen = warning.new(msg: "-APU GEN....OFF THEN ON", colour: "c"),
var apuGenfaultGen2 = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"),
var apuGenfaultGen3 = warning.new(msg: "-APU GEN............OFF", colour: "c"),
# Autothrust # Autothrust
var athr_offw = warning.new(msg: "AUTO FLT A/THR OFF", colour: "a", aural: 1, light: 1, isMainMsg: 1), var athr_offw = warning.new(msg: "AUTO FLT A/THR OFF", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var athr_offw_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"), var athr_offw_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),

View file

@ -341,6 +341,34 @@
<rate_limit sense="decr">100</rate_limit> <!-- Instant --> <rate_limit sense="decr">100</rate_limit> <!-- Instant -->
<rate_limit sense="incr">1.0</rate_limit> <!-- 1 second --> <rate_limit sense="incr">1.0</rate_limit> <!-- 1 second -->
</actuator> </actuator>
<actuator name="/ECAM/warnings/timer/gen-1-fault-set">
<description>Timer for the ECAM system</description>
<input>/ECAM/warnings/logic/gen-1-fault-set</input>
<rate_limit sense="decr">100</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.1818</rate_limit> <!-- 5.5 seconds -->
</actuator>
<actuator name="/ECAM/warnings/timer/gen-2-fault-set">
<description>Timer for the ECAM system</description>
<input>/ECAM/warnings/logic/gen-2-fault-set</input>
<rate_limit sense="decr">100</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.1818</rate_limit> <!-- 5.5 seconds -->
</actuator>
<actuator name="/ECAM/warnings/timer/apu-gen-fault-set">
<description>Timer for the ECAM system</description>
<input>/ECAM/warnings/logic/apu-gen-fault-set</input>
<rate_limit sense="decr">100</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.2</rate_limit> <!-- 5 seconds -->
</actuator>
<actuator name="/ECAM/warnings/timer/apu-gen-fault-reset">
<description>Timer for the ECAM system</description>
<input>/ECAM/warnings/logic/apu-gen-fault-reset</input>
<rate_limit sense="decr">100</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.5</rate_limit> <!-- 2 seconds -->
</actuator>
</channel> </channel>
<channel name="ECAM" execrate="8"> <channel name="ECAM" execrate="8">
@ -1459,4 +1487,178 @@
</switch> </switch>
</channel> </channel>
<channel name="Electrical Warnings" execrate="8">
<switch name="/ECAM/warnings/logic/gen-1-inop">
<default value="0"/>
<test logic="AND" value="1">
/engines/engine[0]/state eq 3
/systems/electrical/relay/gen-1-glc/contact-pos eq 0
</test>
</switch>
<switch name="/ECAM/warnings/logic/gen-1-fault-set">
<default value="0"/>
<test logic="AND" value="1">
/controls/electrical/switches/gen-1 eq 1
/controls/electrical/switches/idg-1-disc eq 1
/ECAM/warnings/logic/gen-1-inop eq 1
</test>
</switch>
<switch name="/ECAM/warnings/logic/gen-1-fault-set-output">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/timer/gen-1-fault-set eq 1
</test>
</switch>
<actuator name="/ECAM/warnings/logic/glc-1-online-2-sec">
<input>/systems/electrical/relay/gen-1-glc/contact-pos</input>
<rate_limit sense="decr">100</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.5</rate_limit> <!-- 2 seconds -->
</actuator>
<switch name="/ECAM/warnings/logic/gen-1-fault-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 1
/ECAM/warning-phase eq 10
/systems/electrical/some-electric-thingie/emer-elec-config eq 1
/ECAM/warnings/logic/glc-1-online-2-sec eq 1
<!-- todo smoke + gen line pb -->
</test>
</switch>
<switch name="/ECAM/warnings/logic/gen-1-fault-on-off-set">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/flipflop/gen-1-fault eq 1
<test logic="AND">
/ECAM/warnings/logic/gen-1-pulse eq 1
/controls/electrical/switches/gen-1 eq 1
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/gen-1-fault-on-off-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warnings/flipflop/gen-1-fault eq 0
/ECAM/warning-phase eq 1
/ECAM/warning-phase eq 10
</test>
</switch>
<switch name="/ECAM/warnings/logic/gen-2-inop">
<default value="0"/>
<test logic="AND" value="1">
/engines/engine[1]/state eq 3
/systems/electrical/relay/gen-2-glc/contact-pos eq 0
</test>
</switch>
<switch name="/ECAM/warnings/logic/gen-2-fault-set">
<default value="0"/>
<test logic="AND" value="1">
/controls/electrical/switches/gen-2 eq 1
/controls/electrical/switches/idg-2-disc eq 1
/ECAM/warnings/logic/gen-2-inop eq 1
</test>
</switch>
<switch name="/ECAM/warnings/logic/gen-2-fault-set-output">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/timer/gen-2-fault-set eq 1
</test>
</switch>
<actuator name="/ECAM/warnings/logic/glc-2-online-2-sec">
<input>/systems/electrical/relay/gen-2-glc/contact-pos</input>
<rate_limit sense="decr">100</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.5</rate_limit> <!-- 2 seconds -->
</actuator>
<switch name="/ECAM/warnings/logic/gen-2-fault-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 1
/ECAM/warning-phase eq 10
/systems/electrical/some-electric-thingie/emer-elec-config eq 1
/ECAM/warnings/logic/glc-2-online-2-sec eq 1
<!-- todo smoke + gen line pb -->
</test>
</switch>
<switch name="/ECAM/warnings/logic/gen-2-fault-on-off-set">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/flipflop/gen-2-fault eq 1
<test logic="AND">
/ECAM/warnings/logic/gen-2-pulse eq 1
/controls/electrical/switches/gen-2 eq 1
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/gen-2-fault-on-off-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warnings/flipflop/gen-2-fault eq 0
/ECAM/warning-phase eq 1
/ECAM/warning-phase eq 10
</test>
</switch>
<switch name="/ECAM/warnings/logic/apu-gen-fault">
<default value="0"/>
<test logic="AND" value="1">
/systems/apu/available eq 1
/systems/electrical/sources/apu/gcu-fault eq 1
</test>
</switch>
<switch name="/ECAM/warnings/logic/apu-gen-fault-set">
<default value="0"/>
<test logic="AND" value="1">
/controls/electrical/switches/apu eq 1
/ECAM/warnings/logic/apu-gen-fault eq 1
</test>
</switch>
<switch name="/ECAM/warnings/logic/apu-gen-fault-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 1
<test logic="AND">
/systems/apu/available eq 1
/controls/electrical/switches/apu eq 1
/systems/electrical/sources/apu/gcu-fault eq 0
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/apu-gen-fault-on-off-set">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/flipflop/apu-gen-fault eq 1
<test logic="AND">
/ECAM/warnings/logic/apu-elec-gen-pulse eq 1
/controls/electrical/switches/apu eq 1
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/apu-gen-fault-on-off-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warnings/flipflop/apu-gen-fault eq 0
/ECAM/warning-phase eq 1
/ECAM/warning-phase eq 10
</test>
</switch>
</channel>
</system> </system>

View file

@ -558,6 +558,39 @@
<output>/ECAM/warnings/logic/apu-bleed-sw-pulse</output> <output>/ECAM/warnings/logic/apu-bleed-sw-pulse</output>
</flipflop> </flipflop>
<flipflop>
<type>monostable</type>
<time>
<value>1.0</value>
</time>
<S>
<not><property>/controls/electrical/switches/apu</property></not>
</S>
<output>/ECAM/warnings/logic/apu-elec-gen-pulse</output>
</flipflop>
<flipflop>
<type>monostable</type>
<time>
<value>1.0</value>
</time>
<S>
<not><property>/controls/electrical/switches/gen-1</property></not>
</S>
<output>/ECAM/warnings/logic/gen-1-pulse</output>
</flipflop>
<flipflop>
<type>monostable</type>
<time>
<value>1.0</value>
</time>
<S>
<not><property>/controls/electrical/switches/gen-2</property></not>
</S>
<output>/ECAM/warnings/logic/gen-2-pulse</output>
</flipflop>
<flipflop> <flipflop>
<type>monostable</type> <type>monostable</type>
<time> <time>
@ -796,4 +829,70 @@
<output>/ECAM/warnings/flipflop/pack-2-off</output> <output>/ECAM/warnings/flipflop/pack-2-off</output>
</flipflop> </flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/warnings/logic/gen-1-fault-set-output</property>
</S>
<R>
<property>/ECAM/warnings/logic/gen-1-fault-reset</property>
</R>
<output>/ECAM/warnings/flipflop/gen-1-fault</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/warnings/logic/gen-1-fault-on-off-set</property>
</S>
<R>
<property>/ECAM/warnings/logic/gen-1-fault-on-off-reset</property>
</R>
<output>/ECAM/warnings/flipflop/gen-1-fault-on-off</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/warnings/logic/gen-2-fault-set-output</property>
</S>
<R>
<property>/ECAM/warnings/logic/gen-2-fault-reset</property>
</R>
<output>/ECAM/warnings/flipflop/gen-2-fault</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/warnings/logic/gen-2-fault-on-off-set</property>
</S>
<R>
<property>/ECAM/warnings/logic/gen-2-fault-on-off-reset</property>
</R>
<output>/ECAM/warnings/flipflop/gen-2-fault-on-off</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/warnings/timer/apu-gen-fault-set</property>
</S>
<R>
<property>/ECAM/warnings/timer/apu-gen-fault-reset</property>
</R>
<output>/ECAM/warnings/flipflop/apu-gen-fault</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/warnings/logic/apu-gen-fault-on-off-set</property>
</S>
<R>
<property>/ECAM/warnings/logic/apu-gen-fault-on-off-reset</property>
</R>
<output>/ECAM/warnings/flipflop/apu-gen-fault-on-off</output>
</flipflop>
</PropertyList> </PropertyList>