1
0
Fork 0

Revise GEN fault engine logic

This commit is contained in:
Jonathan Redpath 2021-11-25 20:39:19 +00:00
parent 8599c12b2a
commit bbedfd3656
3 changed files with 76 additions and 35 deletions

View file

@ -1920,7 +1920,7 @@ var messages_priority_2 = func {
} }
# GEN 1 FAULT # GEN 1 FAULT
if (gen1fault.clearFlag == 0 and warningNodes.Flipflops.gen1Fault.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) { if (gen1fault.clearFlag == 0 and warningNodes.Flipflops.gen1Fault.getValue() == 1 and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) {
gen1fault.active = 1; gen1fault.active = 1;
if (!warningNodes.Flipflops.gen1FaultOnOff.getValue()) { if (!warningNodes.Flipflops.gen1FaultOnOff.getValue()) {
gen1faultGen.active = 1; gen1faultGen.active = 1;
@ -1950,7 +1950,7 @@ var messages_priority_2 = func {
} }
# GEN 2 FAULT # GEN 2 FAULT
if (gen2fault.clearFlag == 0 and warningNodes.Flipflops.gen2Fault.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) { if (gen2fault.clearFlag == 0 and warningNodes.Flipflops.gen2Fault.getValue() == 1 and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) {
gen2fault.active = 1; gen2fault.active = 1;
if (!warningNodes.Flipflops.gen2FaultOnOff.getValue()) { if (!warningNodes.Flipflops.gen2FaultOnOff.getValue()) {
gen2faultGen.active = 1; gen2faultGen.active = 1;

View file

@ -141,39 +141,11 @@
</test> </test>
</switch> </switch>
<switch name="/ECAM/phases/phase-calculation/engine-1-off">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
/ECAM/phases/timer/eng1idle-output eq 0
/controls/engines/engine[0]/cutoff-switch eq 1
</test>
<test logic="OR">
/ECAM/timer/ground-calc eq 1
/ECAM/phases/timer/eng1idle eq 0
</test>
</test>
</switch>
<switch name="/ECAM/phases/phase-calculation/engine-2-off">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
/ECAM/phases/timer/eng2idle-output eq 0
/controls/engines/engine[1]/cutoff-switch eq 1
</test>
<test logic="OR">
/ECAM/timer/ground-calc eq 1
/ECAM/phases/timer/eng2idle eq 0
</test>
</test>
</switch>
<switch name="/ECAM/phases/phase-calculation/engines-1-2-not-running"> <switch name="/ECAM/phases/phase-calculation/engines-1-2-not-running">
<default value="0"/> <default value="0"/>
<test logic="AND" value="1"> <test logic="AND" value="1">
/ECAM/phases/phase-calculation/engine-1-off eq 1 /ECAM/warnings/logic/eng/JE1NORUN eq 1
/ECAM/phases/phase-calculation/engine-2-off eq 1 /ECAM/warnings/logic/eng/JE2NORUN eq 1
</test> </test>
</switch> </switch>

View file

@ -1499,10 +1499,80 @@
<channel name="Electrical Warnings" execrate="16"> <channel name="Electrical Warnings" execrate="16">
<switch name="/ECAM/warnings/logic/eng/engine-1-core-speed-abv-idle-input">
<default value="0"/>
<test logic="OR" value="1">
/engines/engine[0]/n2-actual ge 59.4
</test>
</switch>
<actuator name="/ECAM/warnings/logic/eng/engine-1-core-speed-abv-idle">
<input>/ECAM/warnings/logic/eng/engine-1-core-speed-abv-idle-input</input>
<rate_limit sense="incr">0.03333333333</rate_limit> <!-- 31 -->
<rate_limit sense="decr">1.0</rate_limit>
</actuator>
<actuator name="/ECAM/warnings/logic/eng/eng-1-fire-btn-timer-31">
<input>/controls/engines/engine[0]/fire-btn</input>
<rate_limit sense="incr">0.03225806451</rate_limit> <!-- 31 -->
<rate_limit sense="decr">1.0</rate_limit>
</actuator>
<switch name="/ECAM/warnings/logic/eng/JE1NORUN">
<default value="0"/>
<test logic="OR" value="1">
/controls/engines/engine[0]/cutoff-switch eq 1
<test logic="AND">
/ECAM/warnings/logic/eng/engine-1-core-speed-abv-idle ne 1
<test logic="OR">
/engines/engine[0]/n2-actual lt 59.4
/ECAM/timer/ground-calc eq 1
/controls/engines/engine[0]/fire-btn eq 0
/ECAM/warnings/logic/eng/eng-1-fire-btn-timer-31 ne 1
</test>
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/eng/engine-2-core-speed-abv-idle-input">
<default value="0"/>
<test logic="OR" value="1">
/engines/engine[0]/n2-actual ge 59.4
</test>
</switch>
<actuator name="/ECAM/warnings/logic/eng/engine-2-core-speed-abv-idle">
<input>/ECAM/warnings/logic/eng/engine-2-core-speed-abv-idle-input</input>
<rate_limit sense="incr">0.03333333333</rate_limit> <!-- 31 -->
<rate_limit sense="decr">1.0</rate_limit>
</actuator>
<actuator name="/ECAM/warnings/logic/eng/eng-2-fire-btn-timer-31">
<input>/controls/engines/engine[1]/fire-btn</input>
<rate_limit sense="incr">0.03225806451</rate_limit> <!-- 31 -->
<rate_limit sense="decr">1.0</rate_limit>
</actuator>
<switch name="/ECAM/warnings/logic/eng/JE2NORUN">
<default value="0"/>
<test logic="OR" value="1">
/controls/engines/engine[1]/cutoff-switch eq 1
<test logic="AND">
/ECAM/warnings/logic/eng/engine-2-core-speed-abv-idle ne 1
<test logic="OR">
/engines/engine[1]/n2-actual lt 59.4
/ECAM/timer/ground-calc eq 1
/controls/engines/engine[1]/fire-btn eq 0
/ECAM/warnings/logic/eng/eng-2-fire-btn-timer-31 ne 1
</test>
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/gen-1-inop"> <switch name="/ECAM/warnings/logic/gen-1-inop">
<default value="0"/> <default value="0"/>
<test logic="AND" value="1"> <test logic="AND" value="1">
/engines/engine[0]/state eq 3 /ECAM/warnings/logic/eng/JE1NORUN eq 0
/systems/electrical/relay/gen-1-glc/contact-pos eq 0 /systems/electrical/relay/gen-1-glc/contact-pos eq 0
</test> </test>
</switch> </switch>
@ -1570,7 +1640,7 @@
<switch name="/ECAM/warnings/logic/gen-2-inop"> <switch name="/ECAM/warnings/logic/gen-2-inop">
<default value="0"/> <default value="0"/>
<test logic="AND" value="1"> <test logic="AND" value="1">
/engines/engine[1]/state eq 3 /ECAM/warnings/logic/eng/JE2NORUN eq 0
/systems/electrical/relay/gen-2-glc/contact-pos eq 0 /systems/electrical/relay/gen-2-glc/contact-pos eq 0
</test> </test>
</switch> </switch>
@ -2766,7 +2836,6 @@
<rate_limit sense="decr">100</rate_limit> <rate_limit sense="decr">100</rate_limit>
</actuator> </actuator>
<actuator name="/ECAM/warnings/logic/eng/eng-2-fire-btn-timer"> <actuator name="/ECAM/warnings/logic/eng/eng-2-fire-btn-timer">
<input>/controls/engines/engine[1]/fire-btn</input> <input>/controls/engines/engine[1]/fire-btn</input>
<rate_limit sense="incr">0.1</rate_limit> <rate_limit sense="incr">0.1</rate_limit>