2019-10-14 16:48:35 +00:00
<?xml version="1.0"?>
<!-- Copyright (c) 2019 Jonathan Redpath (legoboyvdlp), Joshua Davidson (Octal450) -->
<system name= "A320: Electrical" >
2019-12-28 20:55:18 +00:00
<property value= "0" > /systems/electrical/some-electric-thingie/rat-deploy</property>
2020-10-14 12:51:30 +00:00
<property value= "0" > /systems/electrical/relay/gen-1-glc/contact-pos</property>
<property value= "0" > /systems/electrical/relay/gen-2-glc/contact-pos</property>
2019-12-28 20:55:18 +00:00
2019-10-14 16:48:35 +00:00
<channel name= "Main Electrical" execrate= "8" >
<!-- Battery 1 -->
<fcs_function name= "/systems/electrical/sources/bat-1/volt" >
<function >
2020-05-03 16:13:49 +00:00
<product >
<difference >
<value > 1</value>
<product >
<property > /systems/electrical/sources/bat-1/amps</property>
<value > 0.00016666</value>
</product>
</difference>
<table >
<independentVar lookup= "row" > /systems/electrical/sources/bat-1/percent</independentVar>
<independentVar lookup= "column" > /systems/failures/electrical/bat-1</independentVar>
<tableData >
0 1
0 0.0 0.0
10 24.0 4.0
50 25.5 5.0
100 31.0 7.0
</tableData>
</table>
</product>
2019-10-14 16:48:35 +00:00
</function>
</fcs_function>
2020-05-03 16:13:49 +00:00
<switch name= "/systems/electrical/sources/bat-1/contact" >
<default value= "/systems/electrical/sources/bat-1/contact" />
<test logic= "OR" value= "0" > <!-- discharge protection or switch turned off -->
/controls/electrical/switches/bat-1 eq 0
/systems/electrical/sources/bat-1/volt lt 23
/systems/electrical/sources/bat-1/amps ge 100
</test>
<test logic= "AND" value= "1" > <!-- apu start -->
/controls/electrical/switches/bat-1 eq 1
/systems/apu/start eq 1
</test>
<test logic= "AND" value= "1" > <!-- connect to dc - bat while no other power on the ground -->
2019-10-14 16:48:35 +00:00
/controls/electrical/switches/bat-1 eq 1
2020-05-03 16:13:49 +00:00
/systems/electrical/bus/ac-1 lt 110
/systems/electrical/bus/ac-2 lt 110
/gear/gear[1]/wow eq 1
/instrumentation/airspeed-indicator/indicated-speed-kt lt 100
</test>
<test logic= "AND" value= "1" > <!-- start charging cycle -->
/systems/electrical/sources/bat-1/charge eq 1
</test>
<test logic= "AND" value= "1" > <!-- maintain charging cycle -->
/systems/electrical/sources/bat-1/charge eq 1
/controls/electrical/switches/bat-1 eq 1
/systems/electrical/sources/bat-1/contact eq 1
/systems/electrical/bus/dc-bat gt 27.5
/systems/electrical/sources/bat-1/percent-calc lt 99.9
</test>
<test logic= "AND" value= "0" >
/systems/electrical/sources/bat-1/charge eq 0
</test>
</switch>
<switch name= "/systems/electrical/sources/bat-1/charge" >
<default value= "/systems/electrical/sources/bat-1/charge" />
<test logic= "AND" value= "0" > <!-- end charging cycle -->
/systems/electrical/sources/bat-1/charge eq 1
<test logic= "OR" >
/controls/electrical/switches/bat-1 eq 0
/systems/electrical/bus/dc-bat lt 27.5
/systems/electrical/sources/bat-1/percent-calc ge 99.9
</test>
</test>
<test logic= "AND" value= "1" > <!-- start charging cycle -->
/controls/electrical/switches/bat-1 eq 1
/systems/electrical/sources/bat-1/contact eq 0
/systems/electrical/sources/bat-1/volt lt 26.5
/systems/electrical/bus/dc-bat gt 27.5
</test>
</switch>
<switch name= "/systems/electrical/sources/bat-1/direction" >
<default value= "0" />
2020-05-03 16:24:03 +00:00
<test logic= "AND" value= "0" >
2020-05-03 16:13:49 +00:00
/systems/electrical/sources/bat-1/contact eq 0
2020-10-19 20:18:40 +00:00
/systems/electrical/sources/si-1/inverter-control/relay-2xb eq 0
2020-05-03 16:24:03 +00:00
</test>
<test logic= "AND" value= "1" >
2020-10-19 20:18:40 +00:00
/systems/electrical/sources/si-1/inverter-control/relay-2xb eq 1
2020-05-03 16:13:49 +00:00
</test>
<test logic= "AND" value= "1" > <!-- drain -->
/systems/electrical/sources/bat-1/contact eq 1
<test logic= "OR" >
<test logic= "AND" >
/systems/electrical/bus/dc-bat-src ne 1
/systems/electrical/bus/dc-bat-src ne 2
</test>
/systems/apu/start eq 1
</test>
</test>
<test logic= "AND" value= "-1" > <!-- charge -->
/systems/electrical/sources/bat-1/contact eq 1
/systems/electrical/bus/dc-bat-src ne 3
</test>
</switch>
<fcs_function name= "/systems/electrical/sources/bat-1/percent-calc" >
<function >
<ifthen >
<eq >
<property > /systems/electrical/sources/bat-1/direction</property>
<value > 0</value>
</eq>
<property > /systems/electrical/sources/bat-1/percent-calc</property>
<ifthen >
<eq >
<property > /systems/electrical/sources/bat-1/direction</property>
<value > -1</value>
</eq>
<sum >
<property > /systems/electrical/sources/bat-1/percent</property>
<product >
<quotient >
<value > 2.25</value>
<sum >
<property > /systems/electrical/sources/bat-1/percent</property>
<value > 1</value>
</sum>
</quotient>
<property > simulation/channel-dt</property>
</product>
</sum>
<sum >
<property > /systems/electrical/sources/bat-1/percent</property>
<product >
<quotient >
<value > -0.75</value>
<sum >
<property > /systems/electrical/sources/bat-1/percent</property>
<value > 1</value>
</sum>
</quotient>
<property > simulation/channel-dt</property>
</product>
</sum>
</ifthen>
</ifthen>
</function>
<output > /systems/electrical/sources/bat-1/percent</output>
</fcs_function>
<switch name= "/systems/electrical/sources/bat-1/load-kw" >
<default value= "0" />
<test logic= "AND" value= "0.864" >
/systems/apu/start eq 1
/systems/electrical/sources/bat-1/contact eq 1
</test>
<test logic= "AND" value= "1.15" > <!-- 60 amp * 0.8 * 24V = 1.15kw. Guess -->
/systems/electrical/bus/dc-bat-src ne 1
/systems/electrical/bus/dc-bat-src ne 2
/systems/electrical/sources/bat-1/contact eq 1
</test>
</switch>
<switch name= "/systems/electrical/sources/bat-1/amps" >
<default value= "0" />
<test logic= "AND" value= "40" >
/systems/electrical/sources/bat-1/load-kw ne 0
2020-08-13 18:54:58 +00:00
/systems/electrical/sources/bat-1/direction eq 1
2020-05-03 16:13:49 +00:00
</test>
<test logic= "AND" value= "2" >
/systems/electrical/sources/bat-1/contact eq 1
2020-08-13 18:54:58 +00:00
/systems/electrical/sources/bat-1/direction eq -1
2019-10-14 16:48:35 +00:00
</test>
</switch>
<!-- Battery 2 -->
<fcs_function name= "/systems/electrical/sources/bat-2/volt" >
<function >
2020-05-03 16:13:49 +00:00
<product >
<difference >
<value > 1</value>
<product >
<property > /systems/electrical/sources/bat-2/amps</property>
<value > 0.00016666</value>
</product>
</difference>
<table >
<independentVar lookup= "row" > /systems/electrical/sources/bat-2/percent</independentVar>
<independentVar lookup= "column" > /systems/failures/electrical/bat-2</independentVar>
<tableData >
0 1
0 0.0 0.0
10 24.0 4.0
50 25.5 5.0
100 31.0 7.0
</tableData>
</table>
</product>
2019-10-14 16:48:35 +00:00
</function>
</fcs_function>
2020-05-03 16:13:49 +00:00
<switch name= "/systems/electrical/sources/bat-2/contact" >
<default value= "/systems/electrical/sources/bat-2/contact" />
<test logic= "OR" value= "0" > <!-- discharge protection or switch turned off -->
/controls/electrical/switches/bat-2 eq 0
/systems/electrical/sources/bat-2/volt lt 23
/systems/electrical/sources/bat-2/amps ge 100
</test>
<test logic= "AND" value= "1" > <!-- apu start -->
/controls/electrical/switches/bat-2 eq 1
/systems/apu/start eq 1
</test>
<test logic= "AND" value= "1" > <!-- connect to dc - bat while no other power on the ground -->
/controls/electrical/switches/bat-2 eq 1
/systems/electrical/bus/ac-1 lt 110
/systems/electrical/bus/ac-2 lt 110
/gear/gear[1]/wow eq 1
/instrumentation/airspeed-indicator/indicated-speed-kt lt 100
</test>
<test logic= "AND" value= "1" > <!-- start charging cycle -->
/systems/electrical/sources/bat-2/charge eq 1
</test>
<test logic= "AND" value= "1" > <!-- maintain charging cycle -->
/systems/electrical/sources/bat-2/charge eq 1
/controls/electrical/switches/bat-2 eq 1
/systems/electrical/sources/bat-2/contact eq 1
/systems/electrical/bus/dc-bat gt 27.5
/systems/electrical/sources/bat-2/percent-calc lt 99.9
</test>
<test logic= "AND" value= "0" >
/systems/electrical/sources/bat-2/charge eq 0
</test>
</switch>
<switch name= "/systems/electrical/sources/bat-2/charge" >
<default value= "/systems/electrical/sources/bat-2/charge" />
<test logic= "AND" value= "0" > <!-- end charging cycle -->
/systems/electrical/sources/bat-2/charge eq 1
<test logic= "OR" >
/controls/electrical/switches/bat-2 eq 0
/systems/electrical/bus/dc-bat lt 27.5
/systems/electrical/sources/bat-2/percent-calc ge 99.9
</test>
</test>
<test logic= "AND" value= "1" > <!-- start charging cycle -->
/controls/electrical/switches/bat-2 eq 1
/systems/electrical/sources/bat-2/contact eq 0
/systems/electrical/sources/bat-2/volt lt 26.5
/systems/electrical/bus/dc-bat gt 27.5
</test>
</switch>
<switch name= "/systems/electrical/sources/bat-2/direction" >
<default value= "0" />
2020-05-03 16:24:03 +00:00
<test logic= "AND" value= "0" >
2020-05-03 16:13:49 +00:00
/systems/electrical/sources/bat-2/contact eq 0
2020-10-19 20:18:40 +00:00
/systems/electrical/sources/si-1/inverter-control/relay-2xb eq 0
2020-05-03 16:24:03 +00:00
</test>
<test logic= "AND" value= "1" >
2020-10-19 20:18:40 +00:00
/systems/electrical/sources/si-1/inverter-control/relay-2xb eq 1
2020-05-03 16:13:49 +00:00
</test>
<test logic= "AND" value= "1" > <!-- drain -->
/systems/electrical/sources/bat-2/contact eq 1
<test logic= "OR" >
<test logic= "AND" >
/systems/electrical/bus/dc-bat-src ne 1
/systems/electrical/bus/dc-bat-src ne 2
</test>
/systems/apu/start eq 1
</test>
</test>
<test logic= "AND" value= "-1" > <!-- charge -->
/systems/electrical/sources/bat-2/contact eq 1
/systems/electrical/bus/dc-bat-src ne 3
</test>
</switch>
<fcs_function name= "/systems/electrical/sources/bat-2/percent-calc" >
<function >
<ifthen >
<eq >
<property > /systems/electrical/sources/bat-2/direction</property>
<value > 0</value>
</eq>
<property > /systems/electrical/sources/bat-2/percent-calc</property>
<ifthen >
<eq >
<property > /systems/electrical/sources/bat-2/direction</property>
<value > -1</value>
</eq>
<sum >
<property > /systems/electrical/sources/bat-2/percent</property>
<product >
<quotient >
<value > 2.25</value>
<sum >
<property > /systems/electrical/sources/bat-2/percent</property>
<value > 1</value>
</sum>
</quotient>
<property > simulation/channel-dt</property>
</product>
</sum>
<sum >
<property > /systems/electrical/sources/bat-2/percent</property>
<product >
<quotient >
<value > -0.75</value>
<sum >
<property > /systems/electrical/sources/bat-2/percent</property>
<value > 1</value>
</sum>
</quotient>
<property > simulation/channel-dt</property>
</product>
</sum>
</ifthen>
</ifthen>
</function>
<output > /systems/electrical/sources/bat-2/percent</output>
</fcs_function>
<switch name= "/systems/electrical/sources/bat-2/load-kw" >
2019-10-14 16:48:35 +00:00
<default value= "0" />
2020-05-03 16:13:49 +00:00
<test logic= "AND" value= "0.864" >
/systems/apu/start eq 1
/systems/electrical/sources/bat-2/contact eq 1
</test>
<test logic= "AND" value= "1.15" > <!-- 60 amp * 0.8 * 24V = 1.15kw. Guess -->
/systems/electrical/bus/dc-bat-src ne 1
/systems/electrical/bus/dc-bat-src ne 2
/systems/electrical/sources/bat-2/contact eq 1
</test>
</switch>
<switch name= "/systems/electrical/sources/bat-2/amps" >
<default value= "0" />
<test logic= "AND" value= "40" >
/systems/electrical/sources/bat-2/load-kw ne 0
2020-08-13 18:54:58 +00:00
/systems/electrical/sources/bat-2/direction eq 1
2020-05-03 16:13:49 +00:00
</test>
2019-10-14 16:48:35 +00:00
<test logic= "AND" value= "2" >
2020-05-03 16:13:49 +00:00
/systems/electrical/sources/bat-2/contact eq 1
2020-08-13 18:54:58 +00:00
/systems/electrical/sources/bat-2/direction eq -1
2019-10-14 16:48:35 +00:00
</test>
</switch>
<!-- IDG 1 -->
<pure_gain name= "/systems/electrical/sources/idg-1/drive-rpm-input" >
<input > /engines/engine[0]/n2-actual</input>
<gain > 90.298</gain> <!-- 1% N2 RPM value * 0.604 -->
</pure_gain>
<switch name= "/systems/electrical/sources/idg-1/working" >
<default value= "1" />
<test logic= "OR" value= "0" >
/systems/failures/electrical/idg-1 eq 1
/controls/electrical/switches/idg-1-disc eq 0
</test>
</switch>
<pure_gain name= "/systems/electrical/sources/idg-1/drive-rpm" >
<input > /systems/electrical/sources/idg-1/drive-rpm-input</input>
<gain > /systems/electrical/sources/idg-1/working</gain>
</pure_gain>
<fcs_function name= "/systems/electrical/sources/idg-1/csd-gearbox-ratio-cmd" >
<function >
<quotient >
<value > 12000</value>
<property > /systems/electrical/sources/idg-1/drive-rpm</property>
</quotient>
</function>
<clipto >
2020-10-13 22:19:06 +00:00
<min > 1.315</min>
<max > 2.667</max>
2019-10-14 16:48:35 +00:00
</clipto>
</fcs_function>
<lag_filter name= "/systems/electrical/sources/idg-1/csd-gearbox-ratio" >
<input > /systems/electrical/sources/idg-1/csd-gearbox-ratio-cmd</input>
<c1 > 40</c1>
</lag_filter>
<pure_gain name= "/systems/electrical/sources/idg-1/csd-rpm" >
<input > /systems/electrical/sources/idg-1/drive-rpm</input>
<gain > /systems/electrical/sources/idg-1/csd-gearbox-ratio</gain>
</pure_gain>
<fcs_function name= "/systems/electrical/sources/idg-1/pmg-volt" >
<function >
<product >
<property > /systems/electrical/sources/idg-1/csd-rpm</property>
<quotient >
<value > 115</value>
<value > 12000</value>
</quotient>
</product>
</function>
</fcs_function>
<fcs_function name= "/systems/electrical/sources/idg-1/pmg-hertz" >
<function >
<quotient >
<product >
<property > /systems/electrical/sources/idg-1/csd-rpm</property>
<value > 4</value> <!-- Number of poles in generator -->
</product>
<value > 120</value>
</quotient>
</function>
</fcs_function>
<switch name= "/systems/electrical/sources/idg-1/gcr-relay" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/failures/electrical/gen-1 ne 1
2020-10-13 22:19:06 +00:00
/controls/engines/engine[0]/fire-btn eq 0
/systems/electrical/sources/idg-1/drive-rpm ge 4730
2019-10-14 16:48:35 +00:00
</test>
</switch>
<pure_gain name= "/systems/electrical/sources/idg-1/output-volt" >
<input > /systems/electrical/sources/idg-1/pmg-volt</input>
<gain > /systems/electrical/sources/idg-1/gcr-relay</gain>
</pure_gain>
<pure_gain name= "/systems/electrical/sources/idg-1/output-hertz" >
<input > /systems/electrical/sources/idg-1/pmg-hertz</input>
<gain > /systems/electrical/sources/idg-1/gcr-relay</gain>
</pure_gain>
<!-- IDG 2 -->
<pure_gain name= "/systems/electrical/sources/idg-2/drive-rpm-input" >
<input > /engines/engine[1]/n2-actual</input>
<gain > 90.298</gain> <!-- 1% N2 RPM value * 0.604 -->
</pure_gain>
<switch name= "/systems/electrical/sources/idg-2/working" >
<default value= "1" />
<test logic= "OR" value= "0" >
/systems/failures/electrical/idg-2 eq 1
/controls/electrical/switches/idg-2-disc eq 0
</test>
</switch>
<pure_gain name= "/systems/electrical/sources/idg-2/drive-rpm" >
<input > /systems/electrical/sources/idg-2/drive-rpm-input</input>
<gain > /systems/electrical/sources/idg-2/working</gain>
</pure_gain>
<fcs_function name= "/systems/electrical/sources/idg-2/csd-gearbox-ratio-cmd" >
<function >
<quotient >
<value > 12000</value>
<property > /systems/electrical/sources/idg-2/drive-rpm</property>
</quotient>
</function>
<clipto >
2020-10-13 22:19:06 +00:00
<min > 1.315</min>
<max > 2.667</max>
2019-10-14 16:48:35 +00:00
</clipto>
</fcs_function>
<lag_filter name= "/systems/electrical/sources/idg-2/csd-gearbox-ratio" >
<input > /systems/electrical/sources/idg-2/csd-gearbox-ratio-cmd</input>
<c1 > 40</c1>
</lag_filter>
<pure_gain name= "/systems/electrical/sources/idg-2/csd-rpm" >
<input > /systems/electrical/sources/idg-2/drive-rpm</input>
<gain > /systems/electrical/sources/idg-2/csd-gearbox-ratio</gain>
</pure_gain>
<fcs_function name= "/systems/electrical/sources/idg-2/pmg-volt" >
<function >
<product >
<property > /systems/electrical/sources/idg-2/csd-rpm</property>
<quotient >
<value > 115</value>
<value > 12000</value>
</quotient>
</product>
</function>
</fcs_function>
<fcs_function name= "/systems/electrical/sources/idg-2/pmg-hertz" >
<function >
<quotient >
<product >
<property > /systems/electrical/sources/idg-2/csd-rpm</property>
<value > 4</value> <!-- Number of poles in generator -->
</product>
<value > 120</value>
</quotient>
</function>
</fcs_function>
<switch name= "/systems/electrical/sources/idg-2/gcr-relay" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/failures/electrical/gen-2 ne 1
2020-10-13 22:19:06 +00:00
/controls/engines/engine[1]/fire-btn eq 0
/systems/electrical/sources/idg-2/drive-rpm ge 4730
2019-10-14 16:48:35 +00:00
</test>
</switch>
<pure_gain name= "/systems/electrical/sources/idg-2/output-volt" >
<input > /systems/electrical/sources/idg-2/pmg-volt</input>
<gain > /systems/electrical/sources/idg-2/gcr-relay</gain>
</pure_gain>
<pure_gain name= "/systems/electrical/sources/idg-2/output-hertz" >
<input > /systems/electrical/sources/idg-2/pmg-hertz</input>
<gain > /systems/electrical/sources/idg-2/gcr-relay</gain>
</pure_gain>
<!-- APU gen -->
2020-10-14 14:08:29 +00:00
<pure_gain name= "/systems/electrical/sources/apu/drive-rpm" >
2020-04-14 17:07:01 +00:00
<input > /engines/engine[2]/n1</input>
<gain > 240.34</gain>
2019-10-14 16:48:35 +00:00
</pure_gain>
<fcs_function name= "/systems/electrical/sources/apu/pmg-volt" >
<function >
<product >
2020-10-14 14:08:29 +00:00
<property > /systems/electrical/sources/apu/drive-rpm</property>
2019-10-14 16:48:35 +00:00
<quotient >
<value > 115</value>
<value > 24000</value>
</quotient>
</product>
</function>
</fcs_function>
<fcs_function name= "/systems/electrical/sources/apu/pmg-hertz" >
<function >
<quotient >
<product >
2020-10-14 14:08:29 +00:00
<property > /systems/electrical/sources/apu/drive-rpm</property>
2019-10-14 16:48:35 +00:00
<value > 2</value> <!-- Number of poles in generator -->
</product>
<value > 120</value>
</quotient>
</function>
</fcs_function>
<switch name= "/systems/electrical/sources/apu/gcr-relay" >
<default value= "0" />
<test logic= "AND" value= "1" >
2020-10-14 14:08:29 +00:00
/controls/apu/fire-btn ne 1
2019-10-14 16:48:35 +00:00
/controls/electrical/switches/apu eq 1
/systems/failures/electrical/apu ne 1
2020-10-14 14:08:29 +00:00
/systems/electrical/sources/apu/drive-rpm ge 22800
2019-10-14 16:48:35 +00:00
</test>
</switch>
<pure_gain name= "/systems/electrical/sources/apu/output-volt" >
<input > /systems/electrical/sources/apu/pmg-volt</input>
<gain > /systems/electrical/sources/apu/gcr-relay</gain>
</pure_gain>
<pure_gain name= "/systems/electrical/sources/apu/output-hertz" >
<input > /systems/electrical/sources/apu/pmg-hertz</input>
<gain > /systems/electrical/sources/apu/gcr-relay</gain>
</pure_gain>
<!-- External Power -->
<fcs_function name= "/systems/electrical/sources/ext/output-volt" >
<function >
<ifthen >
<eq >
<property > /controls/electrical/ground-cart</property>
<value > 1</value>
</eq>
<value > 115</value>
<value > 0</value>
</ifthen>
</function>
</fcs_function>
<fcs_function name= "/systems/electrical/sources/ext/output-hertz" >
<function >
<ifthen >
<ge >
<property > /systems/electrical/sources/ext/output-volt</property>
<value > 110</value>
</ge>
<value > 400</value>
<value > 0</value>
</ifthen>
</function>
</fcs_function>
<!-- Static Inverter -->
2020-10-19 20:18:40 +00:00
<switch name= "/systems/electrical/sources/si-1/inverter-control/relay-7xb" > <!-- 7XB -->
2019-10-14 16:48:35 +00:00
<default value= "0" />
2020-10-19 20:18:40 +00:00
<test logic= "OR" value= "1" >
/systems/navigation/adr/output/cas-1 gt 50
/controls/electrical/switches/emer-gen-test eq 1
2019-10-17 19:40:13 +00:00
</test>
2020-10-19 20:18:40 +00:00
</switch>
<switch name= "/systems/electrical/sources/si-1/inverter-control/contactor-power-flow-through-7XB" >
<default value= "0" />
2019-10-14 16:48:35 +00:00
<test logic= "AND" value= "1" >
2020-10-19 20:18:40 +00:00
/systems/electrical/sources/si-1/inverter-control/relay-7xb eq 0
/systems/electrical/sources/bat-1/contact eq 1
/systems/electrical/sources/bat-2/contact eq 1
/systems/electrical/bus/dc-hot-2 ge 23
2019-10-14 16:48:35 +00:00
</test>
<test logic= "AND" value= "1" >
2020-10-19 20:18:40 +00:00
/systems/electrical/sources/si-1/inverter-control/relay-7xb eq 1
/systems/electrical/bus/dc-hot-2 ge 23
2019-10-14 16:48:35 +00:00
</test>
2020-10-19 20:18:40 +00:00
</switch>
<switch name= "/systems/electrical/sources/si-1/inverter-control/contactor-power-flow-to-timer" >
<default value= "0" />
2019-10-14 16:48:35 +00:00
<test logic= "AND" value= "1" >
2020-10-19 20:18:40 +00:00
/systems/electrical/sources/si-1/inverter-control/contactor-power-flow-through-7XB eq 1
/systems/electrical/bus/ac-1 lt 110
/systems/electrical/bus/ac-2 lt 110
/systems/electrical/relay/emer-glc/output lt 110
2019-10-14 16:48:35 +00:00
</test>
</switch>
2020-10-19 20:18:40 +00:00
<actuator name= "/systems/electrical/sources/si-1/inverter-control/timer" >
<input > /systems/electrical/sources/si-1/inverter-control/contactor-power-flow-to-timer</input>
<rate_limit sense= "decr" > 120</rate_limit> <!-- Instant -->
<rate_limit sense= "incr" > 12.5</rate_limit> <!-- 80 milliseconds -->
</actuator>
<switch name= "/systems/electrical/sources/si-1/inverter-control/relay-2xb" > <!-- 2XB --> <!-- CONTROLS DC HOT 2 TO DC ESS, DC HOT 1 to STAT INV -->
<default value= "0" />
<test logic= "OR" value= "1" >
/systems/electrical/sources/si-1/inverter-control/timer eq 1
</test>
</switch>
2019-10-14 16:48:35 +00:00
<fcs_function name= "/systems/electrical/sources/si-1/inverter-gain" >
<function >
2020-10-19 20:18:40 +00:00
<product >
<ifthen >
<eq >
<property > /systems/failures/electrical/stat-inv</property>
<value > 1</value>
</eq>
<value > 0</value>
<quotient >
<value > 115</value>
<property > /systems/electrical/sources/bat-1/volt</property>
</quotient>
</ifthen>
<property > /systems/electrical/sources/si-1/inverter-control/relay-2xb</property>
</product>
2019-10-14 16:48:35 +00:00
</function>
</fcs_function>
2020-10-19 20:18:40 +00:00
<switch name= "/systems/electrical/sources/si-1/inverter-control/contactor-power-flow-to-ac-ess-contactor" >
<default value= "0" />
<test logic= "AND" value= "1" > <!-- todo CB 10XE -->
/systems/electrical/sources/si-1/inverter-control/relay-7xb eq 1
/systems/electrical/relay/ac-ess-feed-1/output lt 110
/systems/electrical/relay/ac-ess-feed-2/output lt 110
</test>
</switch>
2019-10-14 16:48:35 +00:00
<pure_gain name= "/systems/electrical/sources/si-1/output-volt" >
2020-10-19 20:18:40 +00:00
<input > /systems/electrical/sources/bat-1/volt</input>
2019-10-14 16:48:35 +00:00
<gain > /systems/electrical/sources/si-1/inverter-gain</gain>
</pure_gain>
2020-10-13 20:45:48 +00:00
<switch name= "/systems/electrical/sources/si-1/fault" >
<default value= "0" />
<test logic= "OR" value= "1" >
/systems/electrical/sources/bat-1/volt lt 23.5
/systems/electrical/sources/si-1/output-volt lt 110
/systems/electrical/sources/si-1/output-volt ge 120
</test>
</switch>
2019-10-14 16:48:35 +00:00
<switch name= "/systems/electrical/sources/si-1/output-hertz" >
<default value= "0" />
<test logic= "AND" value= "400" >
/systems/electrical/sources/si-1/output-volt ge 110
</test>
</switch>
<!-- Emergency Generator -->
<switch name= "/systems/electrical/some-electric-thingie/rat-deploy" >
2020-01-02 21:13:18 +00:00
<default value= "/systems/electrical/some-electric-thingie/rat-deploy" />
2019-10-14 16:48:35 +00:00
<test logic= "AND" value= "1" >
/instrumentation/airspeed-indicator/indicated-speed-kt gt 100
2020-03-21 13:54:05 +00:00
/sim/time/elapsed-sec gt 30
2019-10-14 16:48:35 +00:00
/systems/electrical/bus/ac-1 eq 0
/systems/electrical/bus/ac-2 eq 0
/controls/electrical/switches/emer-elec-man-on eq 0
</test>
<test logic= "OR" value= "1" >
2019-10-15 15:46:38 +00:00
/controls/hydraulic/switches/rat-man eq 1
2019-10-14 16:48:35 +00:00
/controls/electrical/switches/emer-elec-man-on eq 1
</test>
2019-12-28 20:55:18 +00:00
<!-- <test value="0">
/controls/hydraulic/switches/ground-rat-retraction eq 1
</test> -->
2019-10-14 16:48:35 +00:00
</switch>
<switch name= "/systems/electrical/some-electric-thingie/emer-gen-operate" >
<default value= "0" />
<test logic= "AND" value= "1" >
/controls/electrical/switches/emer-gen-test eq 1
/systems/electrical/bus/ac-1 ne 0
/systems/electrical/bus/ac-2 ne 0
</test>
<test logic= "AND" value= "1" >
2020-07-26 16:56:09 +00:00
/instrumentation/airspeed-indicator/indicated-speed-kt ge 100
2019-10-14 16:48:35 +00:00
/systems/electrical/bus/ac-1 eq 0
/systems/electrical/bus/ac-2 eq 0
gear/unit[0]/WOW eq 0
/controls/electrical/switches/emer-elec-man-on eq 0
</test>
<test logic= "AND" value= "1" >
gear/unit[0]/WOW eq 0
/controls/electrical/switches/emer-elec-man-on eq 1
</test>
</switch>
<switch name= "/systems/electrical/some-electric-thingie/emer-gen-operating-on-rat" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/some-electric-thingie/emer-gen-operate eq 1
2019-10-15 15:46:38 +00:00
/systems/hydraulic/sources/rat/position eq 1
2019-10-14 16:48:35 +00:00
</test>
<test logic= "AND" value= "1" >
/controls/electrical/switches/emer-gen-test eq 1
/systems/electrical/bus/ac-1 ne 0
/systems/electrical/bus/ac-2 ne 0
</test>
</switch>
<kinematic name= "/systems/electrical/sources/emer-gen/coupled-kin" >
<input > /systems/electrical/some-electric-thingie/emer-gen-operating-on-rat</input>
<traverse >
<setting >
<position > 0.0</position>
<time > 0.0</time>
</setting>
<setting >
<position > 1.0</position>
<time > 5.5</time>
</setting>
</traverse>
</kinematic>
<switch name= "/systems/electrical/sources/emer-gen/coupled" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/sources/emer-gen/coupled-kin eq 1
/systems/failures/electrical/emer-gen ne 1
</test>
<test logic= "AND" value= "1" >
/controls/electrical/switches/emer-gen-test eq 1
/systems/failures/electrical/emer-gen ne 1
/systems/electrical/bus/ac-1 ne 0
/systems/electrical/bus/ac-2 ne 0
</test>
</switch>
<!-- Regulated to 115V, no point doing fancy, HYD controls it -->
<switch name= "/systems/electrical/sources/emer-gen/output-volt" >
<default value= "0" />
<test logic= "AND" value= "115" >
/systems/electrical/some-electric-thingie/emer-gen-operate eq 1
/systems/electrical/sources/emer-gen/coupled eq 1
/systems/hydraulic/blue-psi ge 2500
/systems/failures/electrical/emer-gen eq 0
</test>
</switch>
<switch name= "/systems/electrical/sources/emer-gen/output-hertz" >
<default value= "0" />
<test logic= "AND" value= "400" >
/systems/electrical/sources/emer-gen/output-volt ge 110
</test>
</switch>
<!-- Source Relays -->
2020-10-13 23:32:24 +00:00
<switch name= "/systems/electrical/sources/idg-1/gcu-1-powered" >
<default value= "0" />
<test logic= "OR" value= "1" >
/systems/electrical/bus/dc-bat ge 25
/systems/electrical/sources/idg-1/pmg-volt ge 110
</test>
</switch>
2020-10-14 12:51:30 +00:00
<switch name= "/systems/electrical/sources/idg-1/gcu-1-voltage-trip" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/sources/idg-1/gcu-1-voltage-trip eq 1
/controls/electrical/switches/gen-1 eq 1
</test>
<test logic= "AND" value= "1" >
/systems/electrical/relay/gen-1-glc/contact-pos eq 1
<test logic= "OR" >
/systems/electrical/sources/idg-1/output-volt lt 110
/systems/electrical/sources/idg-1/output-volt gt 130
</test>
</test>
</switch>
<switch name= "/systems/electrical/sources/idg-1/gcu-1-frequency-trip" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/sources/idg-1/gcu-1-frequency-trip eq 1
/controls/electrical/switches/gen-1 eq 1
</test>
<test logic= "AND" value= "1" >
/systems/electrical/relay/gen-1-glc/contact-pos eq 1
<test logic= "OR" >
/systems/electrical/sources/idg-1/output-hertz lt 363
/systems/electrical/sources/idg-1/output-hertz gt 433
</test>
</test>
</switch>
2020-10-13 22:19:06 +00:00
<switch name= "/systems/electrical/sources/idg-1/gcu-1-fault" >
<default value= "0" />
<test logic= "OR" value= "0" >
/systems/acconfig/autoconfig-running eq 1
/sim/time/elapsed-sec lt 10
</test>
<test logic= "OR" value= "1" >
2020-10-14 12:51:30 +00:00
/systems/electrical/sources/idg-1/gcu-1-voltage-trip eq 1
/systems/electrical/sources/idg-1/gcu-1-frequency-trip eq 1
2020-10-13 22:19:06 +00:00
/systems/electrical/sources/idg-1/drive-rpm lt 4730
</test>
</switch>
2019-10-14 16:48:35 +00:00
<switch name= "/systems/electrical/relay/gen-1-glc/contact-pos" >
<default value= "0" />
2020-10-14 12:51:30 +00:00
<test logic= "OR" value= "0" >
/sim/time/elapsed-sec lt 10
</test>
2019-10-14 16:48:35 +00:00
<test logic= "AND" value= "1" >
/controls/electrical/switches/gen-1 eq 1
2020-10-14 12:51:30 +00:00
/systems/electrical/sources/idg-1/output-hertz ge 363
/systems/electrical/sources/idg-1/output-hertz le 433
/systems/electrical/sources/idg-1/output-volt ge 110
/systems/electrical/sources/idg-1/output-volt le 130
/systems/electrical/sources/idg-1/gcu-1-fault ne 1 <!-- software trip -->
2019-10-14 16:48:35 +00:00
</test>
</switch>
<switch name= "/systems/electrical/relay/gen-1-glc/output" >
<default value= "0" />
<test value= "/systems/electrical/sources/idg-1/output-volt" >
/systems/electrical/relay/gen-1-glc/contact-pos eq 1
</test>
</switch>
2020-10-13 23:32:24 +00:00
<switch name= "/systems/electrical/sources/idg-2/gcu-2-powered" >
<default value= "0" />
<test logic= "OR" value= "1" >
/systems/electrical/bus/dc-bat ge 25
/systems/electrical/sources/idg-2/pmg-volt ge 110
</test>
</switch>
2019-10-14 16:48:35 +00:00
2020-10-14 12:51:30 +00:00
<switch name= "/systems/electrical/sources/idg-2/gcu-2-voltage-trip" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/sources/idg-2/gcu-2-voltage-trip eq 1
/controls/electrical/switches/gen-2 eq 1
</test>
<test logic= "AND" value= "1" >
/systems/electrical/relay/gen-2-glc/contact-pos eq 1
<test logic= "OR" >
/systems/electrical/sources/idg-2/output-volt lt 110
/systems/electrical/sources/idg-2/output-volt gt 130
</test>
</test>
</switch>
<switch name= "/systems/electrical/sources/idg-2/gcu-2-frequency-trip" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/sources/idg-2/gcu-2-frequency-trip eq 1
/controls/electrical/switches/gen-2 eq 1
</test>
<test logic= "AND" value= "1" >
/systems/electrical/relay/gen-2-glc/contact-pos eq 1
<test logic= "OR" >
/systems/electrical/sources/idg-2/output-hertz lt 363
/systems/electrical/sources/idg-2/output-hertz gt 433
</test>
</test>
</switch>
2020-10-13 22:19:06 +00:00
<switch name= "/systems/electrical/sources/idg-2/gcu-2-fault" >
<default value= "0" />
<test logic= "OR" value= "0" >
/systems/acconfig/autoconfig-running eq 1
/sim/time/elapsed-sec lt 10
</test>
<test logic= "OR" value= "1" >
2020-10-14 12:51:30 +00:00
/systems/electrical/sources/idg-2/gcu-2-voltage-trip eq 1
/systems/electrical/sources/idg-2/gcu-2-frequency-trip eq 1
2020-10-13 22:19:06 +00:00
/systems/electrical/sources/idg-2/drive-rpm lt 4730
</test>
</switch>
2019-10-14 16:48:35 +00:00
<switch name= "/systems/electrical/relay/gen-2-glc/contact-pos" >
<default value= "0" />
2020-10-14 12:51:30 +00:00
<test logic= "OR" value= "0" >
/sim/time/elapsed-sec lt 10
</test>
2019-10-14 16:48:35 +00:00
<test logic= "AND" value= "1" >
/controls/electrical/switches/gen-2 eq 1
2020-10-14 12:51:30 +00:00
/systems/electrical/sources/idg-2/output-hertz ge 363
/systems/electrical/sources/idg-2/output-hertz le 433
/systems/electrical/sources/idg-2/output-volt ge 110
/systems/electrical/sources/idg-2/output-volt le 130
/systems/electrical/sources/idg-2/gcu-2-fault ne 1 <!-- software trip -->
2019-10-14 16:48:35 +00:00
</test>
</switch>
<switch name= "/systems/electrical/relay/gen-2-glc/output" >
<default value= "0" />
<test value= "/systems/electrical/sources/idg-2/output-volt" >
/systems/electrical/relay/gen-2-glc/contact-pos eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/ext-epc/contact-pos" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/sources/ext/output-volt ge 110
/controls/electrical/switches/ext-pwr eq 1
/controls/electrical/ground-cart eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/ext-epc/output" >
<default value= "0" />
<test value= "/systems/electrical/sources/ext/output-volt" >
/systems/electrical/relay/ext-epc/contact-pos eq 1
</test>
</switch>
2020-10-14 14:08:29 +00:00
<switch name= "/systems/electrical/sources/apu/gcu-powered" >
<default value= "0" />
<test logic= "OR" value= "1" >
/systems/electrical/bus/dc-bat ge 25
/systems/electrical/sources/apu/pmg-volt ge 101.5
</test>
</switch>
<switch name= "/systems/electrical/sources/apu/gcu-voltage-trip" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/sources/apu/gcu-voltage-trip eq 1
/controls/electrical/switches/apu eq 1
</test>
<test logic= "AND" value= "1" >
/systems/electrical/relay/apu-glc/contact-pos eq 1
<test logic= "OR" >
/systems/electrical/sources/apu/output-volt lt 101.5
/systems/electrical/sources/apu/output-volt gt 130
</test>
</test>
</switch>
<switch name= "/systems/electrical/sources/apu/gcu-frequency-trip" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/sources/apu/gcu-frequency-trip eq 1
/controls/electrical/switches/apu eq 1
</test>
<test logic= "AND" value= "1" >
/systems/electrical/relay/apu-glc/contact-pos eq 1
<test logic= "OR" >
/systems/electrical/sources/apu/output-hertz lt 361
/systems/electrical/sources/apu/output-hertz gt 435
</test>
</test>
</switch>
<switch name= "/systems/electrical/sources/apu/gcu-fault" >
<default value= "0" />
<test logic= "OR" value= "0" >
/systems/acconfig/autoconfig-running eq 1
/sim/time/elapsed-sec lt 10
</test>
<test logic= "OR" value= "1" >
/systems/electrical/sources/apu/gcu-voltage-trip eq 1
/systems/electrical/sources/apu/gcu-frequency-trip eq 1
</test>
</switch>
2019-10-14 16:48:35 +00:00
<switch name= "/systems/electrical/relay/apu-glc/contact-pos" >
<default value= "0" />
2020-10-14 14:08:29 +00:00
<test logic= "OR" value= "0" >
/sim/time/elapsed-sec lt 10
</test>
2019-10-14 16:48:35 +00:00
<test logic= "AND" value= "1" >
2020-04-14 17:07:01 +00:00
/controls/apu/master eq 1
2019-10-14 16:48:35 +00:00
/controls/electrical/switches/apu eq 1
2020-10-14 14:08:29 +00:00
/systems/electrical/sources/apu/output-volt ge 101.5
/systems/electrical/sources/apu/output-volt le 130
/systems/electrical/sources/apu/output-hertz ge 361
/systems/electrical/sources/apu/output-hertz le 435
2019-10-14 16:48:35 +00:00
/systems/electrical/relay/ext-epc/contact-pos eq 0
2020-10-14 14:08:29 +00:00
/systems/electrical/sources/apu/gcu-fault ne 1 <!-- software trip -->
2019-10-14 16:48:35 +00:00
</test>
</switch>
<switch name= "/systems/electrical/relay/apu-glc/output" >
<default value= "0" />
<test value= "/systems/electrical/sources/apu/output-volt" >
/systems/electrical/relay/apu-glc/contact-pos eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/emer-glc/contact-pos" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/sources/emer-gen/output-volt ge 110
/systems/failures/electrical/emer-gen ne 1
/systems/electrical/relay/ac-ess-feed-1/output lt 110
/systems/electrical/relay/ac-ess-feed-2/output lt 110
</test>
</switch>
<switch name= "/systems/electrical/relay/emer-glc/output" >
<default value= "0" />
<test value= "/systems/electrical/sources/emer-gen/output-volt" >
/systems/electrical/relay/emer-glc/contact-pos eq 1
</test>
</switch>
<!-- AC Bus Tie AC Bus Relays -->
<!-- These outputs are from the AC Bus Tie to the AC Bus -->
<switch name= "/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos" >
<default value= "0" />
<test value= "0" >
/controls/electrical/switches/bus-tie eq 0
</test>
2020-10-19 23:49:41 +00:00
<test logic= "AND" value= "1" > <!-- give power to other side -->
2019-10-14 16:48:35 +00:00
/systems/electrical/relay/gen-1-glc/contact-pos eq 1
/systems/electrical/relay/gen-2-glc/contact-pos eq 0
/systems/electrical/relay/apu-glc/contact-pos eq 0
/systems/electrical/relay/ext-epc/contact-pos eq 0
/controls/electrical/switches/bus-tie eq 1
</test>
2020-10-19 23:49:41 +00:00
<test logic= "AND" value= "1" > <!-- fetch power from other side -->
2019-10-14 16:48:35 +00:00
/systems/electrical/relay/gen-1-glc/contact-pos eq 0
/systems/electrical/bus/ac-bus-tie ge 110
/controls/electrical/switches/bus-tie eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/ac-bus-ac-bus-tie-1/output" >
<default value= "0" />
<test value= "/systems/electrical/bus/ac-bus-tie" >
/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos" >
<default value= "0" />
<test value= "0" >
/controls/electrical/switches/bus-tie eq 0
</test>
2020-10-19 23:49:41 +00:00
<test logic= "AND" value= "1" > <!-- give power to other side -->
2019-10-14 16:48:35 +00:00
/systems/electrical/relay/gen-2-glc/contact-pos eq 1
/systems/electrical/relay/gen-1-glc/contact-pos eq 0
/systems/electrical/relay/apu-glc/contact-pos eq 0
/systems/electrical/relay/ext-epc/contact-pos eq 0
/controls/electrical/switches/bus-tie eq 1
</test>
2020-10-19 23:49:41 +00:00
<test logic= "AND" value= "1" > <!-- fetch power from other side -->
2019-10-14 16:48:35 +00:00
/systems/electrical/relay/gen-2-glc/contact-pos eq 0
/systems/electrical/bus/ac-bus-tie ge 110
/controls/electrical/switches/bus-tie eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/ac-bus-ac-bus-tie-2/output" >
<default value= "0" />
<test value= "/systems/electrical/bus/ac-bus-tie" >
/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos eq 1
</test>
</switch>
<!-- AC ESS Relays -->
2020-10-14 14:32:58 +00:00
<switch name= "/systems/electrical/relay/ac-ess-feed-1/auto-switch" >
<default value= "0" />
<test logic= "OR" value= "1" >
/systems/electrical/bus/ac-1 lt 110
</test>
</switch>
<actuator name= "/systems/electrical/relay/ac-ess-feed-1/auto-switch-timer" >
<input > /systems/electrical/relay/ac-ess-feed-1/auto-switch</input>
<rate_limit sense= "decr" > 100</rate_limit> <!-- Instant -->
<rate_limit sense= "incr" > 0.33333333333</rate_limit> <!-- 3 seconds -->
</actuator>
2019-10-14 16:48:35 +00:00
<switch name= "/systems/electrical/relay/ac-ess-feed-1/contact-pos" > <!-- TODO: via 1XC CB on 123VU -->
<default value= "0" />
<test logic= "AND" value= "1" > <!-- old AC ESS FEED supply mode -->
/controls/electrical/switches/ac-ess-feed eq 0
2020-10-14 14:32:58 +00:00
/systems/electrical/relay/ac-ess-feed-1/auto-switch-timer lt 1
2020-10-19 23:49:41 +00:00
/systems/electrical/relay/emer-glc/output lt 110
2019-10-14 16:48:35 +00:00
/controls/electrical/switches/emer-gen-test eq 0
</test>
</switch>
<switch name= "/systems/electrical/relay/ac-ess-feed-1/output" >
<default value= "0" />
<test value= "/systems/electrical/bus/ac-1" >
/systems/electrical/relay/ac-ess-feed-1/contact-pos eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/ac-ess-feed-2/contact-pos" > <!-- TODO: via 2XC CB on 123VU -->
<default value= "0" />
<test logic= "AND" value= "1" > <!-- old AC ESS FEED supply mode -->
2020-10-14 14:32:58 +00:00
<test logic= "OR" >
/controls/electrical/switches/ac-ess-feed eq 1
/systems/electrical/relay/ac-ess-feed-1/auto-switch-timer eq 1
</test>
2020-10-19 23:49:41 +00:00
/systems/electrical/relay/emer-glc/output lt 110
2019-10-14 16:48:35 +00:00
/controls/electrical/switches/emer-gen-test eq 0
</test>
</switch>
<switch name= "/systems/electrical/relay/ac-ess-feed-2/output" >
<default value= "0" />
<test value= "/systems/electrical/bus/ac-2" >
/systems/electrical/relay/ac-ess-feed-2/contact-pos eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/ac-ess-feed-emer-gen/contact-pos" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/bus/ac-1 eq 0
/systems/electrical/bus/ac-2 eq 0
/systems/electrical/relay/emer-glc/output ge 110
</test>
<test logic= "AND" value= "1" >
/systems/electrical/bus/ac-1 ne 0
/systems/electrical/bus/ac-2 ne 0
/controls/electrical/switches/emer-gen-test eq 1
/systems/electrical/relay/emer-glc/output ge 110
</test>
</switch>
<switch name= "/systems/electrical/relay/ac-ess-feed-emer-gen/output" >
<default value= "0" />
<test value= "/systems/electrical/relay/emer-glc/output" >
/systems/electrical/relay/ac-ess-feed-emer-gen/contact-pos eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/ac-ess-feed-inverter/contact-pos" >
<default value= "0" />
2019-10-24 16:09:32 +00:00
<test logic= "AND" value= "1" >
2020-10-19 20:18:40 +00:00
/systems/electrical/sources/si-1/inverter-control/contactor-power-flow-to-ac-ess-contactor eq 1
2019-10-14 16:48:35 +00:00
</test>
</switch>
<switch name= "/systems/electrical/relay/ac-ess-feed-inverter/output" >
<default value= "0" />
<test value= "/systems/electrical/sources/si-1/output-volt" >
/systems/electrical/relay/ac-ess-feed-inverter/contact-pos eq 1
</test>
</switch>
<!-- AC ESS Shedding -->
<switch name= "/systems/electrical/relay/ac-ess-shed-switch/contact-pos" >
<default value= "1" />
<test logic= "OR" value= "0" > <!-- TODO: confirm these conditions are for galley, NOT ESS -->
2020-10-19 20:18:40 +00:00
/systems/electrical/sources/si-1/inverter-control/relay-2xb eq 1
2019-10-14 16:48:35 +00:00
/controls/electrical/switches/emer-gen-test eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/ac-ess-shed-switch/output" >
<default value= "0" />
<test value= "/systems/electrical/bus/ac-ess" >
/systems/electrical/relay/ac-ess-shed-switch/contact-pos eq 1
</test>
</switch>
2020-05-22 21:04:31 +00:00
<!-- Galleys -->
<fcs_function name= "/systems/electrical/some-electric-thingie/galley-shed-sum" >
<function >
<sum >
<property > /systems/electrical/relay/apu-glc/contact-pos</property>
<property > /systems/electrical/relay/ext-epc/contact-pos</property>
<property > /systems/electrical/relay/gen-1-glc/contact-pos</property>
<property > /systems/electrical/relay/gen-2-glc/contact-pos</property>
</sum>
</function>
</fcs_function>
2019-10-31 18:57:19 +00:00
<switch name= "/systems/electrical/relay/galley-bus-1-shed-switch/contact-pos" >
2020-05-22 21:04:31 +00:00
<default value= "0" />
<test logic= "AND" value= "1" >
2019-10-31 18:57:19 +00:00
/controls/electrical/switches/galley eq 1
2020-05-22 21:04:31 +00:00
<test logic= "OR" >
<test logic= "AND" >
/gear/gear[1]/wow eq 0
/systems/electrical/some-electric-thingie/galley-shed-sum gt 1
</test>
<test logic= "AND" >
/gear/gear[1]/wow eq 1
<test logic= "OR" >
/systems/electrical/relay/apu-glc/output ge 110
/systems/electrical/relay/ext-epc/output ge 110
<test logic= "AND" >
/systems/electrical/relay/gen-1-glc/output ge 110
/systems/electrical/relay/gen-2-glc/output ge 110
</test>
</test>
</test>
2019-10-31 18:57:19 +00:00
</test>
</test>
</switch>
<switch name= "/systems/electrical/relay/galley-bus-1-shed-switch/output" >
<default value= "0" />
<test value= "/systems/electrical/bus/ac-1" >
/systems/electrical/relay/galley-bus-1-shed-switch/contact-pos eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/galley-bus-2-shed-switch/contact-pos" >
2020-05-22 21:04:31 +00:00
<default value= "0" />
<test logic= "AND" value= "1" >
2019-10-31 18:57:19 +00:00
/controls/electrical/switches/galley eq 1
2020-05-22 21:04:31 +00:00
<test logic= "OR" >
<test logic= "AND" >
/gear/gear[1]/wow eq 0
/systems/electrical/some-electric-thingie/galley-shed-sum gt 1
</test>
<test logic= "AND" >
/gear/gear[1]/wow eq 1
<test logic= "OR" >
/systems/electrical/relay/apu-glc/output ge 110
/systems/electrical/relay/ext-epc/output ge 110
<test logic= "AND" >
/systems/electrical/relay/gen-1-glc/output ge 110
/systems/electrical/relay/gen-2-glc/output ge 110
</test>
</test>
</test>
2019-10-31 18:57:19 +00:00
</test>
</test>
</switch>
<switch name= "/systems/electrical/relay/galley-bus-2-shed-switch/output" >
<default value= "0" />
<test value= "/systems/electrical/bus/ac-2" >
/systems/electrical/relay/galley-bus-2-shed-switch/contact-pos eq 1
</test>
</switch>
2020-05-22 21:04:31 +00:00
<switch name= "/systems/electrical/some-electric-thingie/galley-shed" >
<default value= "0" />
<test logic= "OR" value= "1" >
/systems/electrical/relay/galley-bus-1-shed-switch/contact-pos eq 0
/systems/electrical/relay/galley-bus-2-shed-switch/contact-pos eq 0
</test>
</switch>
2019-10-14 16:48:35 +00:00
<!-- AC Bus 1 -->
<switch name= "/systems/electrical/bus/ac-1-src" >
<description > Tell which source is being used for priority purpose</description>
<default value= "0" /> <!-- OFF -->
<test value= "1" > <!-- IDG1 -->
/systems/electrical/relay/gen-1-glc/contact-pos eq 1
</test>
<test value= "2" > <!-- Bus Tie -->
/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos eq 1
</test>
</switch>
<fcs_function name= "/systems/electrical/bus/ac-1" >
<function >
2019-10-17 19:40:13 +00:00
<ifthen >
<eq >
<property > /systems/failures/electrical/ac-1-bus</property>
<value > 1</value>
</eq>
<value > 0</value>
<max >
<property > /systems/electrical/relay/gen-1-glc/output</property>
<property > /systems/electrical/relay/ac-bus-ac-bus-tie-1/output</property>
</max>
</ifthen>
2019-10-14 16:48:35 +00:00
</function>
</fcs_function>
<!-- AC Bus 2 -->
<switch name= "/systems/electrical/bus/ac-2-src" >
<description > Tell which source is being used for priority purpose</description>
<default value= "0" /> <!-- OFF -->
<test value= "1" > <!-- IDG2 -->
/systems/electrical/relay/gen-2-glc/contact-pos eq 1
</test>
<test value= "2" > <!-- Bus Tie -->
/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos eq 1
</test>
</switch>
<fcs_function name= "/systems/electrical/bus/ac-2" >
<function >
2019-10-17 19:40:13 +00:00
<ifthen >
<eq >
<property > /systems/failures/electrical/ac-2-bus</property>
<value > 1</value>
</eq>
<value > 0</value>
<max >
<property > /systems/electrical/relay/gen-2-glc/output</property>
<property > /systems/electrical/relay/ac-bus-ac-bus-tie-2/output</property>
</max>
</ifthen>
2019-10-14 16:48:35 +00:00
</function>
</fcs_function>
<pure_gain name= "/systems/electrical/bus/ac-1-26v" > <!-- TODO: via 5XN1 CB on 123VU, supplies ADIRS -->
<input > /systems/electrical/bus/ac-1</input>
<gain > 0.2260869565</gain>
</pure_gain>
<pure_gain name= "/systems/electrical/bus/ac-2-26v" > <!-- TODO: via 5XN2 CB on 123VU, supplies ADIRS -->
<input > /systems/electrical/bus/ac-2</input>
<gain > 0.2260869565</gain>
</pure_gain>
<pure_gain name= "/systems/electrical/bus/ac-ess-26v" > <!-- TODO: via 4XH CB on 106VU -->
<input > /systems/electrical/bus/ac-ess</input>
<gain > 0.2260869565</gain>
</pure_gain>
<pure_gain name= "/systems/electrical/bus/ac-si-bus" > <!-- feeds landing gear indication, apu fuel pump, some annunciators, a injectors if RAT is out, only if stat inv is on -->
<input > /systems/electrical/sources/si-1/output-volt</input> <!-- TODO: via 12XB CB on 105VU -->
<gain > 1</gain>
</pure_gain>
<fcs_function name= "/systems/electrical/bus/ac-ess" >
<function >
2019-10-17 19:40:13 +00:00
<ifthen >
<eq >
<property > /systems/failures/electrical/ac-ess-bus</property>
<value > 1</value>
</eq>
<value > 0</value>
<max >
<property > /systems/electrical/relay/ac-ess-feed-1/output</property>
<property > /systems/electrical/relay/ac-ess-feed-2/output</property>
<property > /systems/electrical/relay/ac-ess-feed-emer-gen/output</property>
<property > /systems/electrical/relay/ac-ess-feed-inverter/output</property>
</max>
</ifthen>
2019-10-14 16:48:35 +00:00
</function>
</fcs_function>
<pure_gain name= "/systems/electrical/bus/ac-ess-shed" >
<input > /systems/electrical/relay/ac-ess-shed-switch/output</input>
<gain > /systems/electrical/relay/ac-ess-shed-switch/contact-pos</gain>
</pure_gain>
<!-- AC Bus Tie AC Bus Relays (continued) -->
<!-- These outputs are from the AC Bus to the AC Bus Tie -->
<switch name= "/systems/electrical/relay/ac-bus-ac-bus-tie-1/output-tie" >
<default value= "0" />
<test value= "/systems/electrical/bus/ac-1" >
/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/ac-bus-ac-bus-tie-2/output-tie" >
<default value= "0" />
<test value= "/systems/electrical/bus/ac-2" >
/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos eq 1
</test>
</switch>
<!-- AC Bus Tie -->
<switch name= "/systems/electrical/bus/ac-bus-tie" >
<default value= "0" />
<test value= "/systems/electrical/relay/ext-epc/output" >
/systems/electrical/relay/ext-epc/contact-pos eq 1
</test>
<test value= "/systems/electrical/relay/apu-glc/output" >
/systems/electrical/relay/apu-glc/contact-pos eq 1
</test>
<test logic= "AND" value= "/systems/electrical/relay/ac-bus-ac-bus-tie-1/output-tie" >
/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos eq 1
/systems/electrical/bus/ac-1-src ne 2
</test>
<test logic= "AND" value= "/systems/electrical/relay/ac-bus-ac-bus-tie-2/output-tie" >
/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos eq 1
/systems/electrical/bus/ac-2-src ne 2
</test>
</switch>
<!-- Transformer Rectifiers -->
2020-10-19 23:49:41 +00:00
<switch name= "/systems/electrical/sources/tr-1/working" >
<default value= "0" />
<test logic= "OR" value= "0.24347826086956523" >
/systems/failures/electrical/tr-1 ne 1
</test>
</switch>
2019-10-14 16:48:35 +00:00
<pure_gain name= "/systems/electrical/sources/tr-1/output-volt" >
<input > /systems/electrical/bus/ac-1</input> <!-- TODO: via 2PU1 CB -->
<gain > 0.24347826086956523</gain> <!-- AC to DC converter -->
</pure_gain>
<fcs_function name= "/systems/electrical/sources/tr-1/output-amp" > <!-- TODO: make it depend on current draw -->
<function >
<table >
<independentVar lookup= "row" > /systems/electrical/sources/tr-1/output-volt</independentVar>
<tableData >
0 0
27.5 200
</tableData>
</table>
</function>
</fcs_function>
2020-10-19 23:49:41 +00:00
<switch name= "/systems/electrical/sources/tr-2/working" >
<default value= "0" />
<test logic= "OR" value= "0.24347826086956523" >
/systems/failures/electrical/tr-2 ne 1
</test>
</switch>
2019-10-14 16:48:35 +00:00
<pure_gain name= "/systems/electrical/sources/tr-2/output-volt" >
<input > /systems/electrical/bus/ac-2</input> <!-- TODO: via 2PU2 CB -->
<gain > 0.24347826086956523</gain> <!-- AC to DC converter -->
</pure_gain>
<fcs_function name= "/systems/electrical/sources/tr-2/output-amp" > <!-- TODO: make it depend on current draw -->
<function >
<table >
<independentVar lookup= "row" > /systems/electrical/sources/tr-2/output-volt</independentVar>
<tableData >
0 0
27.5 200
</tableData>
</table>
</function>
</fcs_function>
2019-10-17 19:40:13 +00:00
<switch name= "/systems/electrical/sources/ess-tr/working" >
<default value= "0" />
<test value= "0.24347826086956523" >
/systems/failures/electrical/ess-tr eq 0
</test>
</switch>
2019-10-14 16:48:35 +00:00
<pure_gain name= "/systems/electrical/sources/ess-tr/output-volt" >
2020-10-19 23:49:41 +00:00
<input > /systems/electrical/bus/ac-ess</input> <!-- TODO: via 15XE CB -->
2019-10-17 19:40:13 +00:00
<gain > /systems/electrical/sources/ess-tr/working</gain> <!-- AC to DC converter -->
2019-10-14 16:48:35 +00:00
</pure_gain>
<fcs_function name= "/systems/electrical/sources/ess-tr/output-amp" > <!-- TODO: make it depend on current draw -->
<function >
<table >
<independentVar lookup= "row" > /systems/electrical/sources/ess-tr/output-volt</independentVar>
<tableData >
0 0
27.5 200
</tableData>
</table>
</function>
</fcs_function>
<!-- Transformer Rectifier Contactors (Relays) -->
2020-10-19 23:49:41 +00:00
<switch name= "/systems/electrical/relay/tr-contactor-1/fault" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/relay/tr-contactor-1/fault eq 1
/systems/electrical/bus/ac-1 ge 110
</test>
<test logic= "AND" value= "1" >
<test logic= "OR" >
/systems/electrical/sources/tr-1/output-volt lt 25
/systems/electrical/sources/tr-1/output-amp eq 0
</test>
/systems/electrical/bus/ac-1 ge 110
</test>
</switch>
2019-10-14 16:48:35 +00:00
<switch name= "/systems/electrical/relay/tr-contactor-1/contact-pos" >
<default value= "0" />
<test logic= "AND" value= "1" >
2020-10-19 23:49:41 +00:00
/systems/electrical/relay/tr-contactor-1/fault eq 0
2019-10-14 16:48:35 +00:00
</test>
</switch>
<switch name= "/systems/electrical/relay/tr-contactor-1/output" >
<default value= "0" />
<test value= "/systems/electrical/sources/tr-1/output-volt" >
/systems/electrical/relay/tr-contactor-1/contact-pos eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/tr-contactor-1/output-amp" >
<default value= "0" />
<test value= "/systems/electrical/sources/tr-1/output-amp" >
/systems/electrical/relay/tr-contactor-1/contact-pos eq 1
</test>
</switch>
2020-10-19 23:49:41 +00:00
<switch name= "/systems/electrical/relay/tr-contactor-2/fault" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/relay/tr-contactor-2/fault eq 1
/systems/electrical/bus/ac-2 ge 110
</test>
<test logic= "AND" value= "1" >
<test logic= "OR" >
/systems/electrical/sources/tr-2/output-volt lt 25
/systems/electrical/sources/tr-2/output-amp eq 0
</test>
/systems/electrical/bus/ac-2 ge 110
</test>
</switch>
2019-10-14 16:48:35 +00:00
<switch name= "/systems/electrical/relay/tr-contactor-2/contact-pos" >
<default value= "0" />
<test logic= "AND" value= "1" >
2020-10-19 23:49:41 +00:00
/systems/electrical/relay/tr-contactor-2/fault eq 0
<!-- ground service NE 1 -->
2019-10-14 16:48:35 +00:00
</test>
</switch>
<switch name= "/systems/electrical/relay/tr-contactor-2/output" >
<default value= "0" />
<test value= "/systems/electrical/sources/tr-2/output-volt" >
/systems/electrical/relay/tr-contactor-2/contact-pos eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/tr-contactor-2/output-amp" >
<default value= "0" />
<test value= "/systems/electrical/sources/tr-2/output-amp" >
/systems/electrical/relay/tr-contactor-2/contact-pos eq 1
</test>
</switch>
2020-10-19 23:49:41 +00:00
<switch name= "/systems/electrical/relay/ess-tr-contactor/fault" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/relay/ess-tr-contactor/fault eq 1
<test logic= "OR" >
/systems/electrical/bus/ac-ess ge 110
/systems/electrical/relay/emer-glc/output ge 110
</test>
</test>
<test logic= "AND" value= "1" >
<test logic= "OR" >
/systems/electrical/sources/ess-tr/output-volt lt 25
/systems/electrical/sources/ess-tr/output-amp eq 0
</test>
<test logic= "OR" >
/systems/electrical/bus/ac-ess ge 110
/systems/electrical/relay/emer-glc/output ge 110
</test>
</test>
</switch>
<switch name= "/systems/electrical/relay/ess-tr-contactor/contact-pos" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/relay/ess-tr-contactor/fault eq 0
</test>
</switch>
<switch name= "/systems/electrical/relay/ess-tr-contactor/output" >
<default value= "0" />
<test value= "/systems/electrical/sources/ess-tr/output-volt" >
/systems/electrical/relay/ess-tr-contactor/contact-pos eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/ess-tr-contactor/output-amp" >
<default value= "0" />
<test value= "/systems/electrical/sources/ess-tr/output-amp" >
/systems/electrical/relay/ess-tr-contactor/contact-pos eq 1
</test>
</switch>
2019-10-16 18:33:44 +00:00
<!-- DC Bus Tie Relays -->
<switch name= "/systems/electrical/relay/dc-bus-tie-dc-1/contact-pos" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/bus/ac-1 ge 110
/systems/electrical/bus/dc-1 ge 25
/systems/electrical/relay/tr-contactor-1/contact-pos eq 1
</test>
<test logic= "AND" value= "1" >
/systems/electrical/bus/dc-bat ge 25
/systems/electrical/bus/dc-bat-src ne 3
<test logic= "OR" >
/systems/electrical/relay/tr-contactor-1/contact-pos eq 0
/systems/electrical/relay/tr-contactor-2/contact-pos eq 0
</test>
</test>
</switch>
<switch name= "/systems/electrical/relay/dc-bus-tie-dc-1/output" >
<default value= "0" />
<test logic= "AND" value= "/systems/electrical/bus/dc-bat" >
/systems/electrical/relay/dc-bus-tie-dc-1/contact-pos eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/dc-bus-tie-dc-2/contact-pos" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/relay/dc-ess-feed-bat/contact-pos eq 0
/systems/electrical/relay/dc-bus-tie-dc-1/contact-pos eq 0
/systems/electrical/relay/tr-contactor-2/contact-pos eq 1
/systems/electrical/bus/dc-2 ge 25
</test>
<test logic= "AND" value= "1" >
/systems/electrical/bus/dc-bat ge 25
/systems/electrical/bus/dc-bat-src ne 3
<test logic= "OR" >
/systems/electrical/relay/tr-contactor-1/contact-pos eq 0
/systems/electrical/relay/tr-contactor-2/contact-pos eq 0
</test>
</test>
</switch>
<switch name= "/systems/electrical/relay/dc-bus-tie-dc-2/output" >
<default value= "0" />
<test logic= "AND" value= "/systems/electrical/bus/dc-bat" >
/systems/electrical/relay/dc-bus-tie-dc-2/contact-pos eq 1
</test>
</switch>
2019-10-14 16:48:35 +00:00
<!-- DC ESS Relays -->
<switch name= "/systems/electrical/relay/dc-ess-feed-tr/contact-pos" > <!-- TODO: supply via 4PE CB on 106VU, contactor via 5PE on 106VU -->
<default value= "0" />
2019-10-17 19:40:13 +00:00
<test logic= "AND" value= "1" >
<test logic= "OR" >
/systems/electrical/relay/tr-contactor-1/output lt 25
/systems/electrical/relay/tr-contactor-2/output lt 25
/systems/electrical/relay/emer-glc/output ge 110
</test>
2020-10-19 23:49:41 +00:00
/systems/electrical/relay/ess-tr-contactor/output ge 25
2019-10-14 16:48:35 +00:00
</test>
</switch>
<switch name= "/systems/electrical/relay/dc-ess-feed-tr/output" >
<default value= "0" />
2020-10-19 23:49:41 +00:00
<test value= "/systems/electrical/relay/ess-tr-contactor/output" >
2019-10-14 16:48:35 +00:00
/systems/electrical/relay/dc-ess-feed-tr/contact-pos eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/dc-ess-feed-tr/output-amp" >
<default value= "0" />
<test value= "/systems/electrical/sources/ess-tr/output-amp" >
/systems/electrical/relay/dc-ess-feed-tr/contact-pos eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/dc-ess-feed-bat/contact-pos" > <!-- TODO: via 20PC1 80A fuse on 120VU -->
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/relay/dc-ess-feed-tr/contact-pos eq 0
2020-07-26 16:56:09 +00:00
<test logic= "OR" >
/systems/electrical/relay/dc-bus-tie-dc-1/contact-pos eq 0
/systems/electrical/relay/dc-bus-tie-dc-2/contact-pos eq 0
</test>
2019-10-14 16:48:35 +00:00
/controls/electrical/switches/emer-gen-test eq 0
</test>
</switch>
<switch name= "/systems/electrical/relay/dc-ess-feed-bat/output" >
<default value= "0" />
<test value= "/systems/electrical/bus/dc-bat" >
/systems/electrical/relay/dc-ess-feed-bat/contact-pos eq 1
</test>
</switch>
2020-10-19 20:18:40 +00:00
<switch name= "/systems/electrical/relay/dc-ess-feed-inv/contact-pos" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/sources/si-1/inverter-control/relay-2xb eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/dc-ess-feed-inv/output" >
<default value= "0" />
<test value= "/systems/electrical/bus/dc-hot-2" >
/systems/electrical/relay/dc-ess-feed-inv/contact-pos eq 1
</test>
</switch>
2019-10-16 18:18:50 +00:00
<!-- DC Ess Shedding -->
2019-10-14 16:48:35 +00:00
<switch name= "/systems/electrical/relay/dc-ess-shed-switch/contact-pos" >
<default value= "1" />
<test logic= "OR" value= "0" > <!-- TODO: confirm these conditions are for galley, NOT ESS -->
2020-10-19 20:18:40 +00:00
/systems/electrical/sources/si-1/inverter-control/relay-2xb eq 1
2019-10-14 16:48:35 +00:00
/controls/electrical/switches/emer-gen-test eq 1
</test>
</switch>
2019-10-31 18:57:19 +00:00
<!-- DC Service Bus -->
<switch name= "/systems/electrical/relay/dc-svc-bus-contactor-tr/contact-pos" > <!-- TODO: via 1PX CB on 124VU -->
<default value= "0" />
</switch>
<switch name= "/systems/electrical/relay/dc-svc-bus-contactor-tr/output" >
<default value= "0" />
<test value= "/systems/electrical/relay/tr-contactor-2/output" >
/systems/electrical/relay/dc-svc-bus-contactor-tr/contact-pos eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/dc-svc-bus-contactor-bus-2/contact-pos" > <!-- TODO: via 7PN CB on 124VU -->
<default value= "1" />
</switch>
<switch name= "/systems/electrical/relay/dc-svc-bus-contactor-bus-2/output" >
<default value= "0" />
<test value= "/systems/electrical/bus/dc-2" >
/systems/electrical/relay/dc-svc-bus-contactor-bus-2/contact-pos eq 1
</test>
</switch>
2019-10-14 16:48:35 +00:00
<!-- DC Bus 1 -->
<switch name= "/systems/electrical/bus/dc-1-src" >
<description > Tell which source is being used for priority purpose</description>
<default value= "0" /> <!-- OFF -->
<test value= "1" > <!-- TR1 -->
/systems/electrical/relay/tr-contactor-1/output ge 25
</test>
<test value= "2" > <!-- DC BAT -->
/systems/electrical/relay/dc-bus-tie-dc-1/contact-pos eq 1
</test>
</switch>
<fcs_function name= "/systems/electrical/bus/dc-1" >
<function >
2019-10-17 19:40:13 +00:00
<ifthen >
<eq >
<property > /systems/failures/electrical/dc-1-bus</property>
<value > 1</value>
</eq>
<value > 0</value>
<max >
<property > /systems/electrical/relay/tr-contactor-1/output</property>
<property > /systems/electrical/relay/dc-bus-tie-dc-1/output</property>
</max>
</ifthen>
2019-10-14 16:48:35 +00:00
</function>
</fcs_function>
<!-- DC Bus 2 -->
<switch name= "/systems/electrical/bus/dc-2-src" >
<description > Tell which source is being used for priority purpose</description>
<default value= "0" /> <!-- OFF -->
<test value= "1" > <!-- TR1 -->
/systems/electrical/relay/tr-contactor-2/output ge 25
</test>
<test value= "2" > <!-- DC BAT -->
/systems/electrical/relay/dc-bus-tie-dc-2/contact-pos eq 1
</test>
</switch>
<fcs_function name= "/systems/electrical/bus/dc-2" >
<function >
2019-10-17 19:40:13 +00:00
<ifthen >
<eq >
<property > /systems/failures/electrical/dc-2-bus</property>
<value > 1</value>
</eq>
<value > 0</value>
<max >
<property > /systems/electrical/relay/tr-contactor-2/output</property>
<property > /systems/electrical/relay/dc-bus-tie-dc-2/output</property>
</max>
</ifthen>
2019-10-14 16:48:35 +00:00
</function>
</fcs_function>
2019-10-31 18:57:19 +00:00
<fcs_function name= "/systems/electrical/bus/dc-service-bus" >
<function >
<max >
<property > /systems/electrical/relay/dc-svc-bus-contactor-tr/output</property>
<property > /systems/electrical/relay/dc-svc-bus-contactor-bus-2/output</property>
</max>
</function>
</fcs_function>
2019-10-14 16:48:35 +00:00
<!-- DC Bus Tie DC Bus Relays (continued) -->
<!-- These outputs are from the DC Bus to the DC Bus Tie -->
<switch name= "/systems/electrical/relay/dc-bus-tie-dc-1/output-tie" >
<default value= "0" />
<test value= "/systems/electrical/bus/dc-1" >
/systems/electrical/relay/dc-bus-tie-dc-1/contact-pos eq 1
</test>
</switch>
<switch name= "/systems/electrical/relay/dc-bus-tie-dc-2/output-tie" >
<default value= "0" />
<test value= "/systems/electrical/bus/dc-2" >
/systems/electrical/relay/dc-bus-tie-dc-2/contact-pos eq 1
</test>
</switch>
<!-- DC Bat Bus -->
2019-10-15 19:24:51 +00:00
<switch name= "/systems/electrical/bus/dc-bat-src" >
<description > Tell which source is being used for priority purpose</description>
<default value= "0" /> <!-- OFF -->
<test value= "1" > <!-- DC1 -->
/systems/electrical/relay/dc-bus-tie-dc-1/contact-pos eq 1
/systems/electrical/bus/dc-1-src ne 2
</test>
<test value= "2" > <!-- DC2 -->
/systems/electrical/relay/dc-bus-tie-dc-2/contact-pos eq 1
/systems/electrical/bus/dc-2-src ne 2
</test>
2020-04-14 17:07:01 +00:00
<test logic= "OR" value= "3" > <!-- BAT -->
<test logic= "AND" >
2020-07-26 16:56:09 +00:00
/instrumentation/airspeed-indicator/indicated-speed-kt lt 100
2020-04-14 17:07:01 +00:00
<test logic= "OR" >
/controls/electrical/switches/bat-1 eq 1
/controls/electrical/switches/bat-2 eq 1
</test>
/systems/electrical/some-electric-thingie/emer-elec-config eq 1
</test>
<test logic= "AND" >
<test logic= "OR" >
/controls/electrical/switches/bat-1 eq 1
/controls/electrical/switches/bat-2 eq 1
</test>
/systems/apu/dc-bat-three-minutes eq 1
2019-10-15 19:24:51 +00:00
</test>
</test>
</switch>
2019-10-14 16:48:35 +00:00
<switch name= "/systems/electrical/bus/dc-bat" >
<default value= "0" />
2019-10-17 19:40:13 +00:00
<test value= "0" >
/systems/failures/electrical/dc-bat-bus eq 1
</test>
2019-10-14 16:48:35 +00:00
<test logic= "AND" value= "/systems/electrical/relay/dc-bus-tie-dc-1/output-tie" >
/systems/electrical/relay/dc-bus-tie-dc-1/contact-pos eq 1
/systems/electrical/bus/dc-1-src ne 2
</test>
<test logic= "AND" value= "/systems/electrical/relay/dc-bus-tie-dc-2/output-tie" >
/systems/electrical/relay/dc-bus-tie-dc-2/contact-pos eq 1
/systems/electrical/bus/dc-2-src ne 2
</test>
2020-04-14 17:07:01 +00:00
<test logic= "OR" value= "/systems/electrical/sources/bat-1/volt" >
<test logic= "AND" >
2020-07-26 16:56:09 +00:00
/instrumentation/airspeed-indicator/indicated-speed-kt lt 100
2020-04-14 17:07:01 +00:00
/controls/electrical/switches/bat-1 eq 1
/systems/electrical/bus/dc-bat-src eq 3
/systems/electrical/sources/bat-1/volt ge 25
/systems/electrical/some-electric-thingie/emer-elec-config eq 1
</test>
<test logic= "AND" >
/systems/apu/dc-bat-three-minutes eq 1
/controls/electrical/switches/bat-1 eq 1
/systems/electrical/bus/dc-bat-src eq 3
/systems/electrical/sources/bat-1/volt ge 25
</test>
2019-10-15 19:24:51 +00:00
</test>
2020-04-14 17:07:01 +00:00
<test logic= "OR" value= "/systems/electrical/sources/bat-2/volt" >
<test logic= "AND" >
2020-07-26 16:56:09 +00:00
/instrumentation/airspeed-indicator/indicated-speed-kt lt 100
2020-04-14 17:07:01 +00:00
/controls/electrical/switches/bat-2 eq 1
/systems/electrical/bus/dc-bat-src eq 3
/systems/electrical/sources/bat-2/volt ge 25
/systems/electrical/some-electric-thingie/emer-elec-config eq 1
</test>
<test logic= "AND" >
/systems/apu/dc-bat-three-minutes eq 1
/controls/electrical/switches/bat-2 eq 1
/systems/electrical/bus/dc-bat-src eq 3
/systems/electrical/sources/bat-2/volt ge 25
</test>
2019-10-15 19:24:51 +00:00
</test>
2019-10-14 16:48:35 +00:00
</switch>
<!-- DC ESS Bus -->
<fcs_function name= "/systems/electrical/bus/dc-ess" >
<function >
2019-10-17 19:40:13 +00:00
<ifthen >
<eq >
<property > /systems/failures/electrical/dc-ess-bus</property>
<value > 1</value>
</eq>
<value > 0</value>
<max >
<property > /systems/electrical/relay/dc-ess-feed-bat/output</property>
2020-10-19 20:18:40 +00:00
<property > /systems/electrical/relay/dc-ess-feed-inv/output</property>
2019-10-17 19:40:13 +00:00
<property > /systems/electrical/relay/dc-ess-feed-tr/output</property>
</max>
</ifthen>
2019-10-14 16:48:35 +00:00
</function>
</fcs_function>
<pure_gain name= "/systems/electrical/bus/dc-ess-shed" >
<input > /systems/electrical/bus/dc-ess</input>
2020-10-19 20:45:08 +00:00
<gain > /systems/electrical/relay/dc-ess-shed-switch/contact-pos</gain>
2019-10-14 16:48:35 +00:00
</pure_gain>
<!-- Hot Buses -->
<pure_gain name= "/systems/electrical/bus/dc-hot-1" >
2020-05-03 16:13:49 +00:00
<input > /systems/electrical/sources/bat-1/volt</input> <!-- todo CB 12PB1 / 5PB1 -->
2019-10-14 16:48:35 +00:00
<gain > 1.0</gain>
</pure_gain>
<pure_gain name= "/systems/electrical/bus/dc-hot-2" >
2020-05-03 16:13:49 +00:00
<input > /systems/electrical/sources/bat-2/volt</input> <!-- todo CB 12PB2 / 5PB2 -->
2019-10-14 16:48:35 +00:00
<gain > 1.0</gain>
</pure_gain>
<switch name= "/systems/electrical/some-electric-thingie/emer-elec-config" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/bus/ac-1 lt 110
/systems/electrical/bus/ac-2 lt 110
</test>
<test logic= "AND" value= "1" >
/systems/electrical/relay/ext-epc/contact-pos eq 0
<test logic= "OR" >
/controls/electrical/switches/gen-1 eq 0
/systems/failures/electrical/gen-1 eq 1
</test>
<test logic= "OR" >
/controls/electrical/switches/gen-2 eq 0
/systems/failures/electrical/gen-2 eq 1
</test>
<test logic= "OR" >
/controls/electrical/switches/apu eq 0
/systems/failures/electrical/apu eq 1
2020-04-17 22:41:36 +00:00
/engines/engine[2]/n1 lt 94.9
2019-10-14 16:48:35 +00:00
</test>
</test>
</switch>
<switch name= "/systems/electrical/some-electric-thingie/emer-elec-config-generator-1-bustie" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/some-electric-thingie/emer-elec-config eq 1
2019-12-28 17:35:06 +00:00
/systems/electrical/some-electric-thingie/generator-1-pb eq 1
2019-10-14 16:48:35 +00:00
/controls/electrical/switches/bus-tie eq 0
</test>
</switch>
<switch name= "/systems/electrical/some-electric-thingie/emer-elec-config-generator-2-bustie" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/some-electric-thingie/emer-elec-config eq 1
2019-12-28 17:35:06 +00:00
/systems/electrical/some-electric-thingie/generator-2-pb eq 1
2019-10-14 16:48:35 +00:00
/controls/electrical/switches/bus-tie eq 0
</test>
</switch>
<switch name= "/systems/electrical/some-electric-thingie/emer-elec-config-generator-1" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/some-electric-thingie/emer-elec-config eq 1
2019-12-28 17:35:06 +00:00
/systems/electrical/some-electric-thingie/generator-1-pb eq 1
2019-10-14 16:48:35 +00:00
</test>
</switch>
<switch name= "/systems/electrical/some-electric-thingie/emer-elec-config-generator-2" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/electrical/some-electric-thingie/emer-elec-config eq 1
2019-12-28 17:35:06 +00:00
/systems/electrical/some-electric-thingie/generator-2-pb eq 1
2019-10-14 16:48:35 +00:00
</test>
</switch>
<actuator name= "/systems/electrical/some-electric-thingie/static-inverter-timer" >
2020-10-19 23:49:41 +00:00
<input > /systems/electrical/sources/si-1/inverter-control/relay-2xb</input>
2019-10-14 16:48:35 +00:00
<rate_limit sense= "decr" > 100</rate_limit> <!-- Instant -->
<rate_limit sense= "incr" > 0.1</rate_limit> <!-- 10 seconds -->
</actuator>
2019-10-17 19:40:13 +00:00
<!-- Output to Generics to keep FG things working, temporary, until we know what gets power by what bus -->
<switch name= "/systems/electrical/generic-pwr" >
<description > This makes the FG stuff work because we killed the generic electrical</description>
<default value= "0" />
<test value= "/systems/electrical/bus/dc-1" >
/systems/electrical/bus/dc-1 ge 25
</test>
<test value= "/systems/electrical/bus/dc-2" >
/systems/electrical/bus/dc-2 ge 25
</test>
2019-11-04 19:20:56 +00:00
<!-- <output>/systems/electrical/outputs/adf</output>
<output > /systems/electrical/outputs/dme</output> -->
2019-10-17 19:40:13 +00:00
<output > /systems/electrical/outputs/efis</output>
<output > /systems/electrical/outputs/fcp-power</output>
<output > /systems/electrical/outputs/fuel-pump[0]</output>
<output > /systems/electrical/outputs/fuel-pump[1]</output>
<output > /systems/electrical/outputs/fuel-pump[2]</output>
<output > /systems/electrical/outputs/gps</output>
<output > /systems/electrical/outputs/mk-viii</output>
2019-11-04 19:20:56 +00:00
<!-- <output>/systems/electrical/outputs/nav[0]</output>
2019-10-17 19:40:13 +00:00
<output > /systems/electrical/outputs/nav[1]</output>
<output > /systems/electrical/outputs/nav[2]</output>
2019-11-04 19:20:56 +00:00
<output > /systems/electrical/outputs/nav[3]</output> -->
2019-10-17 19:40:13 +00:00
<output > /systems/electrical/outputs/tacan</output>
<output > /systems/electrical/outputs/turn-coordinator</output>
</switch>
2019-10-14 16:48:35 +00:00
</channel>
<!-- Notes -->
<!-- Priority: eng, ext, apu but EXT ON lt stays on even when not feeding a/c -->
<!-- TR 2 fail leads to loss of gnd FLT bus -->
<channel name= "Overhead Lights" execrate= "8" >
<switch name= "/systems/electrical/light/ac-ess-feed-fault" >
<default value= "0" />
<test value= "1" >
/systems/electrical/bus/ac-ess lt 110
</test>
</switch>
2020-01-02 22:07:21 +00:00
<switch name= "/systems/electrical/light/apu-fault" >
2019-10-14 16:48:35 +00:00
<default value= "0" />
<test logic= "AND" value= "1" >
/controls/electrical/switches/apu eq 1
2020-10-14 14:08:29 +00:00
<test logic= "OR" >
/systems/electrical/sources/apu/gcu-fault eq 1
<test logic= "AND" >
/systems/electrical/relay/apu-glc/contact-pos eq 0
/systems/electrical/relay/ext-epc/contact-pos eq 0
/systems/electrical/relay/gen-1-glc/contact-pos eq 0
/systems/electrical/relay/gen-2-glc/contact-pos eq 0
</test>
</test>
/systems/electrical/sources/apu/drive-rpm gt 22800
2019-10-14 16:48:35 +00:00
</test>
</switch>
<switch name= "/systems/electrical/light/bat-1-fault" >
<default value= "0" />
<test value= "1" > <!-- TODO: depends charging current -->
/systems/failures/electrical/bat-1 eq 1
</test>
</switch>
<switch name= "/systems/electrical/light/bat-2-fault" >
<default value= "0" />
<test value= "1" > <!-- TODO: depends charging current -->
/systems/failures/electrical/bat-2 eq 1
</test>
</switch>
<!-- TODO: galley fault when load > 100 -->
<switch name= "/systems/electrical/light/galley-fault" >
<default value= "0" />
</switch>
<switch name= "/systems/electrical/light/gen-1-fault" >
<default value= "0" />
<test value= "1" >
/controls/electrical/switches/gen-1 eq 1
2020-10-13 22:19:06 +00:00
<test logic= "OR" >
/systems/electrical/sources/idg-1/gcu-1-fault eq 1
/systems/electrical/relay/gen-1-glc/contact-pos eq 0
</test>
2019-10-14 16:48:35 +00:00
</test>
</switch>
<switch name= "/systems/electrical/light/gen-2-fault" >
<default value= "0" />
<test value= "1" >
/controls/electrical/switches/gen-2 eq 1
2020-10-13 22:19:06 +00:00
<test logic= "OR" >
/systems/electrical/sources/idg-2/gcu-2-fault eq 1
/systems/electrical/relay/gen-2-glc/contact-pos eq 0
</test>
2019-10-14 16:48:35 +00:00
</test>
</switch>
<switch name= "/systems/electrical/light/idg-1-fault" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/failures/electrical/idg-1 eq 1
2020-10-13 22:19:06 +00:00
/systems/electrical/sources/idg-1/drive-rpm gt 2000
2019-10-14 16:48:35 +00:00
</test>
<test logic= "AND" value= "1" >
/controls/electrical/switches/idg-1-disc-momentary eq 1
</test>
</switch>
<switch name= "/systems/electrical/light/idg-2-fault" >
<default value= "0" />
<test logic= "AND" value= "1" >
/systems/failures/electrical/idg-2 eq 1
2020-10-13 22:19:06 +00:00
/systems/electrical/sources/idg-2/drive-rpm gt 2000
2019-10-14 16:48:35 +00:00
</test>
<test logic= "AND" value= "1" >
/controls/electrical/switches/idg-2-disc-momentary eq 1
</test>
</switch>
<switch name= "/systems/electrical/light/rat-emer-gen-fault" >
<default value= "0" />
2020-01-01 21:30:13 +00:00
<test logic= "AND" value= "1" >
2019-10-14 16:48:35 +00:00
/systems/electrical/relay/dc-ess-feed-tr/output eq 0
/systems/electrical/bus/ac-1 eq 0
/systems/electrical/bus/ac-2 eq 0
position/wow eq 0
</test>
</switch>
</channel>
2019-10-31 18:57:19 +00:00
2019-10-14 16:48:35 +00:00
</system>