# Legacy Electrical System {{< callout context="caution" title="IMPORTANT!" icon="outline/alert-triangle" >}} The components and parameters outlined on this page are for the V1.00 electrical system used by aircraft in Microsoft Flight Simulator 2020. For all modern Microsoft Flight Simulator 2024 aircraft, you should be using the V2.00+ system, which is explained here: [systems.cfg - \[ELECTRICAL\]](electrical_info.htm) {{< /callout >}}   This section controls everything related to the aircraft electrical systems. An electrical system is defined by its components, of which there are 5 types: - **circuits**: A circuit consumes power, requiring current to function (see [Circuits](../../../programming-apis/simvars/aircraft-simvars/aircraft-electrics-variables/#general--buses1) for governing SimVars). - **batteries**: A battery is a power source with a set capacity in ampere hours (see [Batteries](../../../programming-apis/simvars/aircraft-simvars/aircraft-electrics-variables/#general--buses2) for governing SimVars). - **alternators**: The alternator is a power source dependent on an engine/{{< glossterm >}}apu{{< /glossterm >}}'s {{< glossterm >}}rpm{{< /glossterm >}} (see [Alternators](../../../programming-apis/simvars/aircraft-simvars/aircraft-electrics-variables/#general--buses3) for governing SimVars). - **external power**: This is an external power source which delivers power as long as it is available (see [External Power](../../../programming-apis/simvars/aircraft-simvars/aircraft-electrics-variables/#externalpowern) for governing SimVars). - **buses**: a bus is what creates connections between systems and sub-systems (see [General / Buses](../../../programming-apis/simvars/aircraft-simvars/aircraft-electrics-variables/#general--buses) for governing SimVars). {{< callout context="caution" title="IMPORTANT!" icon="outline/alert-triangle" >}} A system only exists if at least one bus is defined. {{< /callout >}} Each of these components can be defined multiple times as parameters within the `[ELECTRICAL]` configuration header. For how to access the information that these parameters add to an aircraft, please see the section on [SimVars And RPN](../../../programming-apis/simvars/simulation-variables/#SimVars).   Parameter Description Type Required `Major` What version of the electrical system you are using. Can be one of the following: 1. **0**: This is for aircraft using the legacy FSX electrical system. When using this version, none of the components are used, only the parameters listed here: [Deprecated FSX Parameters](legacy-electrical/#Deprecated) 2. **1**: This should be used for those aircraft imported from Microsoft Flight Simulator 2020. When using this version, all the parameters listed below are valid, but only the following components can be used - circuits, batteries, alternators, external power, buses. 3. **2**: This is the most up to date version of the electrical system only the components [listed here](modular-electrical-system-information/) can be used to define the electrical system. Integer Yes `Minor` Not currently used. Should be set to 0. Integer Yes `circuit.N` The aircraft circuit hash table. You can define multiple circuits for an aircraft, starting at `N` = 1. Details on the circuit map contents are given here: `circuit.N` [Hash Map](../cfg-files-general-information/#hash-map) Yes `battery.N` The aircraft battery hash table. You can define multiple batteries for an aircraft, starting at `N` = 1. Details on the map contents are given here: `battery.N` [Hash Map](../cfg-files-general-information/#hash-map) (see for more information) Yes `alternator.N` The aircraft alternator hash table. You can define multiple alternators for an aircraft, starting at `N` = 1. Details on the map contents are given here: `alternator.N` [Hash Map](../cfg-files-general-information/#hash-map) Yes `externalpower.N` The aircraft external power supply hash table. You can define multiple external power supplies for an aircraft, starting at `N` = 1. Details on the map contents are given here: `externalpower.N` [Hash Map](../cfg-files-general-information/#hash-map) Yes `bus.N` The aircraft bus hash table. You can define multiple buses for an aircraft, starting at `N` = 1. Details on the map contents are given here: `bus.N` [Hash Map](../cfg-files-general-information/#hash-map) Yes `curve.N` A list of values. You can define multiple curves for an aircraft, starting at `N` = 1, and the curves can be used in multiple different parameters. Details on the table contents are given here: `curve.N` [List](../cfg-files-general-information/#list) of Values Yes `procedure.N` A List of values used to create a set of actions that can either be manually triggered or triggered when entering a given context. You can define multiple procedures for an aircraft, starting at `N` = 1. Details on the table contents are given here: `procedure.N` [Hash Map](../cfg-files-general-information/#hash-map) No `max_battery_voltage` The maximum battery voltage. Float Yes `generator_alternator_voltage` The generator alternator voltage. Float Yes `max_generator_alternator_amps` The maximum alternator amperage. Float Yes `alternators` Set to TRUE (1) to indicate that alternators are available, or FALSE (0) otherwise. Bool Yes `num_batteries` The number of batteries available. Integer Yes `electric_always_available` Set to TRUE(1) to always enable electrical equipment, otherwise set to FALSE(0). Bool Yes `battery_capacity_pct_to_voltage` Can be used to override default settings for correspondence between % Max Battery Capacity and voltage. Table No `battery_max_capacity_amph` Can be used to override the default Battery Capacity (in {{< glossterm >}}ah{{< /glossterm >}}). Default is 24 or 42 depending on Battery Voltage. Float No `battery_charging_current` Controls the battery's charging current (In Amps). Default is 10% of the capacity. Float No `apu_pct_rpm_per_second` Controls the speed at which the {{< glossterm >}}apu{{< /glossterm >}}'s RPM increases. Default is 0.4. Float No `navcom1` Can be used to override default settings for the NAVCOM1 electrical circuit. [List](../cfg-files-general-information/#list) of Values Defines the electrical circuit used by the given system. Requires a list of three values where: - the first is the bus on which this circuit was connected, one fo the following values: 1. 0: MAIN BUS 2. 1: AVIONICS BUS 3. 2: BATTERY BUS 4. 3: HOT BATTERY BUS 5. 4: GENALT 1 BUS 6. 5: GENALT 2 BUS 7. 6: GENALT 3 BUS 8. 7: GENALT 4 BUS 9. 8: GENALT 5 BUS 10. 9: GENALT 6 BUS 11. 10: GENALT 7 BUS 12. 11: GENALT 8 BUS - the second is the Max Amps supported by the circuit. - the third is the min voltage for the circuit to be operative. Default values are: 0, 15, 0.7 \* `max_battery_voltage` No `navcom2` Can be used to override default settings for the NAVCOM2 electrical circuit. `navcom3` Can be used to override default settings for the NAVCOM3 electrical circuit. `flap_motor` Can be used to override default settings for the flaps motor circuit. `gear_motor` Can be used to override default settings for the landing gear motor circuit. `autopilot` Can be used to override default settings for the autopilot circuit. `avionics_bus` Can be used to override default settings for the avionics bus circuit. `avionics` Can be used to override default settings for the avionics circuit. `pitot_heat` Can be used to override default settings for the pitot heat circuit. `additional_system` Can be used to override default settings for the additional systems circuit. `marker_beacon` Can be used to override default settings for the marker beacon circuit. `gear_warning` Can be used to override default settings for the gear warning circuit. `fuel_pump` Can be used to override default settings for the fuel circuit. `starter1` Can be used to override default settings for the engine 1 starter circuit. `starter2` Can be used to override default settings for the engine 2 starter circuit. `starter3` Can be used to override default settings for the engine 3 starter circuit. `starter4` Can be used to override default settings for the engine 4 starter circuit. `light_nav` Can be used to override default settings for the navigation light circuit. `light_beacon` Can be used to override default settings for the beacon light circuit. `light_landing` Can be used to override default settings for the landing light circuit. `light_taxi` Can be used to override default settings for the taxi light circuit. `light_strobe` Can be used to override default settings for the strobe light circuit. `light_panel` Can be used to override default settings for the panel light circuit. `light_cabin` Can be used to override default settings for the cabin light circuit. `light_recognition` Can be used to override default settings for the recognition light circuit. `light_wing` Can be used to override default settings for the wing light circuit. `light_logo` Can be used to override default settings for the logo light circuit. `prop_sync` Can be used to override default settings for the prop-sync circuit. `auto_feather` Can be used to override default settings for the auto-feather circuit. `auto_brakes` Can be used to override default settings for the auto-brake circuit. `standby_vacuum` Can be used to override default settings for the standby vacuum circuit. `hydraulic_pump` Can be used to override default settings for the hydraulic pump circuit. `fuel_transfer_pump` Can be used to override default settings for the fuel transfer pump circuit. `propeller_deice` Can be used to override default settings for the propellor de-ice circuit. `directional_gyro` Can be used to override default settings for the directional gyro circuit. `directional_gyro_slaving` Can be used to override default settings for the directional gyro slaving circuit.     ### circuit.N Circuits are the most used electrical components, and the circuit hash map is comprised of the following multiple `key:value` pairs, separated by the `#` symbol. This hash map takes the following form: ``` cpp circuit.N = Type:: #Connections: #Power: #Name: `` Note that you may have more than one circuit of the same type, in which case you would increment the parameter, starting from 1. A full example of a single circuit definition would be like this: ` language-cpp circuit.1 = Type:CIRCUIT_GENERAL_PANEL:1 #Connections:bus.1 #Power:0.5,1,20.0 #Name:General_Panel_Main ``
KeyValueDescriptionRequired
TypeList

List that contains the type of circuit being created along with an identifying index for the circuit type (in case you wish to define multiple circuits of the same type). You can find a complete list of the available variables here: Circuit Types.

Additionally, when defining a type, you also give it an index value so that different circuits of the same type can be identified. For example:

circuit.15 = Type:CIRCUIT_FUEL_PUMP:1#Connections:bus.2#Power:3,5,20#Name:Fuel_P_L1
circuit.16 = Type:CIRCUIT_FUEL_PUMP:2#Connections:bus.2#Power:3,5,20#Name:Fuel_P_L2
circuit.17 = Type:CIRCUIT_FUEL_PUMP:3#Connections:bus.2#Power:3,5,20#Name:Fuel_P_R1
circuit.18 = Type:CIRCUIT_FUEL_PUMP:4#Connections:bus.2#Power:3,5,20#Name:Fuel_P_R2
Yes
ConnectionsList

List of the different buses that this circuit is connected to, eg:

Connections: bus.1, bus.3

You can find more information from the following section: Connections

Yes
PowerList

This list of three values is related to the power consumption, where:

  • 1st value: A minimum Watt consumption
  • 2nd value: A maximum/ideal Watt consumption
  • 3rd value: A minimum voltage

Here is an example of how this key/value pair is structured:

Power:10.0, 15.0, 20.0

You can find a full and detailed explanation of what these values refer to from the following section: circuit.N - Power

Yes
NameStringThe name of the circuit. This is an identifier name and is only added for debugging purposes. Cannot contain special characters or spaces.No
    #### [circuit.N](#circuit) - Type When defining circuits for the electrical system, the first parameter of the hash-map that is a variable that defines the **type** of circuit. The table below shows all the variables that correspond to each of the available types as well as a brief description of what that circuit controls.  
TypeDescription
CIRCUIT_ADC_AHRS

Circuit checked for ADC and AHRS system availability, no effect on sim

CIRCUIT_ADF_DME

Circuit checked for ADF and DME system availability, no effect on sim

CIRCUIT_APU_STARTER

Circuit controlling APU starter state

CIRCUIT_AUDIO

Circuit checked for audio system availability

CIRCUIT_ATTITUDE_INDICATORCircuit checked for attitude indicator availability (if electrical)
CIRCUIT_AUTO_BRAKES

Circuit controlling auto brakes

CIRCUIT_AUTO_FEATHER

Circuit controlling auto feathering

NOTE: Please see the for more information.

CIRCUIT_AUTOPILOT

Circuit checked for autopilot availability

CIRCUIT_AVIONICS

Circuit checked for avionics availability

CIRCUIT_AVNFAN

Circuit checked for avionics fan system availability, no effect on sim

CIRCUIT_COM

Circuit checked for COM system availability

CIRCUIT_DIRECTIONAL_GYRO

Circuit checked for directional gyro system availability

CIRCUIT_DIRECTIONAL_GYRO_SLAVING

Circuit checked for directional gyro slaving system availability

CIRCUIT_ELECTRIC_ENGINECircuit controlling the electric engine (if available).
CIRCUIT_FIS

Circuit checked for FIS system availability, no effect on sim

CIRCUIT_FLAP_MOTOR

Circuit turned on when flaps are moving (if electrical)

CIRCUIT_FUEL_PUMP

Circuit controlling electrical fuel pumps. See the section on for more information.

CIRCUIT_FUEL_TRANSFER_PUMP

Circuit controlling electrical fuel transfer pumps

CIRCUIT_FUEL_VALVECircuit controlling a [FUEL_SYSTEM] valve. See the section on for more information.
CIRCUIT_GEAR_MOTOR

Circuit turned on when landing gears are moving (if electrical)

CIRCUIT_GEAR_WARNING

Circuit checked for gear warning system availability

CIRCUIT_GENERAL_PANEL

Circuit checked for general power availability

CIRCUIT_GPS

Circuit checked for avionics GPS system availability

CIRCUIT_HYDRAULIC_PUMP

Circuit controlling electric hydraulic pumps

CIRCUIT_INVALID

Invalid circuit which has no direct impact on sim state

CIRCUIT_LIGHT_BEACON

Circuit controlling beacon light state

CIRCUIT_LIGHT_CABIN

Circuit controlling cabin light state

CIRCUIT_LIGHT_GLARESHIELD

Circuit controlling glareshield light state

CIRCUIT_LIGHT_LANDING

Circuit controlling landing light state

CIRCUIT_LIGHT_LOGO

Circuit controlling logo light state

CIRCUIT_LIGHT_NAV

Circuit controlling navigation light state

CIRCUIT_LIGHT_PANEL

Circuit controlling panel light state

CIRCUIT_LIGHT_PEDESTAL

Circuit controlling pedestal light state

CIRCUIT_LIGHT_RECOGNITION

Circuit controlling recognition light state

CIRCUIT_LIGHT_STROBE

Circuit controlling strobe light state

CIRCUIT_LIGHT_TAXI

Circuit controlling taxi light state

CIRCUIT_LIGHT_WING

Circuit controlling wing light state

CIRCUIT_MARKER_BEACON

Circuit checked for beacon marker system availability

CIRCUIT_MFD

Circuit checked for MFD system availability, no effect on sim

CIRCUIT_NAV

Circuit checked for NAV system availability

CIRCUIT_PFD

Circuit checked for PFD system availability, no effect on sim

CIRCUIT_PITOT_HEAT

Circuit controlling pitot heat state

CIRCUIT_PROP_DEICE

Circuit controlling prop deicing

CIRCUIT_PROP_SYNC

Circuit controlling prop sync

CIRCUIT_STALL_WARNING

Circuit checked for stall warning availability (if electrical)

CIRCUIT_STANDBY_VACUUM

Circuit controlling standby vacuum

CIRCUIT_STARTER

Circuit controlling electrical starter state

CIRCUIT_TURN_COORDINATOR

Circuit checked for turn coordinator system availability

CIRCUIT_WING_FOLDCircuit controlling the wing folding system (if available).
CIRCUIT_XML

Generic circuit which has no direct impact on sim state

CIRCUIT_XPNDR

Circuit checked for transponder system availability

    #### [circuit.N](#circuit) - Power This parameter takes a table of three values to define the power consumption, where: - 1st value: A minimum Watt consumption - 2nd value: A maximum/ideal Watt consumption - 3rd value: A minimum voltage These wattage values and minimum voltage let us define a range for the resistance (Ohm) used for interpolation when selecting a power setting for a circuit. By default a circuit aims for the maximum power setting (maximum/ideal Watt consumption).   In the simulation, an aircraft circuit functions in a similar way as they do in real life. The load (in amps) drawn by a circuit is defined by the received voltage divided by it's internal resistance. Below is an example of how this key/value pair is structured: #Power:10.0, 15.0, 20.0 ``` Here the values represent: MinW=10W, MaxW=15W, MinV=20.0V.   Generated values for resistance are: - `ResMin(Ohm) = 20.0/(10.0/20.0) # MinV / (MinW/MinV)` -> resistance for min power setting - `ResMax(Ohm) = 20.0/(15.0/20.0) # MinV / (MaxW/MinV)` -> resistance for max power setting   Which means (using [Ohm's law](https://en.wikipedia.org/wiki/Ohm%27s_law)) that the circuit will consume: - `I(Amps) = (Voltage / Resistance)` - `I(Amps) = 20.0 / ResMax(Ohm) = 0.75A` (at 20.0V and max power setting) - `I(Amps) = 28.0 / ResMax(Ohm) = 1.05A` (at 28.0V and max power setting) - `I(Amps) = 20.0 / ResMin(Ohm) = 0.5A` (at 20.0V and min power setting) - `I(Amps) = 28.0 / ResMin(Ohm) = 0.7A` (at 28.0V and min power setting)   The power setting lets us have a variable resistance which can be used for any purposes. For example interior lights use this power setting for dimming. Moreover, in some situations, power might be limited. If the whole system is working using alternators then the power generated might not be enough to sustain every circuit. The power allocated to each circuit is then balanced as a proportion of the circuit MaxW value. A circuit will stay powered as long as the received power is higher than the MinW value and voltage is higher than MinV. This let us define priority in which system gets turned off first by lack of power. Reducing a circuit power setting will give more energy to the other circuits.     ### battery.N A battery is a power supplier with a set capacity that decreases over time depending on the load it must sustain. The battery hash map is comprised of a set of `key:value` pairs, separated by the `#` symbol and takes the following form: ``` cpp battery.N = Connections: #Capacity: #Voltage: #Name: ``` A full example of a single battery definition would be like this: ``` cpp battery.1 = Connections:bus.3 #Capacity:13.6 #Voltage:curve.1 #Name:Main_Battery ``` Key Value Description Required `Connections` List [List](../cfg-files-general-information/#list) of the different buses that this battery is connected to, eg: `Connections: bus.1, bus.3` You can find more information from the following section: Yes `Capacity` Float The battery capacity, in ampere hours. `VoltageCurve.N` The voltage for capacity percentage, defined using a curve (explained in the `curve.N` section). `Name` String The name of the battery. This is an identifier name and is only added for debugging purposes. Cannot contain special characters or spaces. No     ### alternator.N This defines an alternator power source dependent on an engine/{{< glossterm >}}apu{{< /glossterm >}}'s {{< glossterm >}}rpm{{< /glossterm >}}, and the appended number corresponds to its unique ID (*N*, starting at 1). The alternator hash map is comprised of `key:value` pairs, separated by the `#` symbol, and takes the following form: ``` cpp alternator.N = Connections: #iEng: #Voltage: #load: #Name: ``` or: ``` cpp alternator.N = Connections: #iEng: #RatedVoltage: #load: #Name: ``` A full example of a single alternator definition would be like this: ``` cpp alternator.1 = Connections:bus.3 #iEng:0 #RatedVoltage:28 #Load:curve.3 #Name:LH_Alternator ```
KeyValueDescriptionRequired
ConnectionsList

List of the different buses that this alternator is connected to, eg:

Connections: bus.1, bus.3

You can find more information from the following section: Connections

Yes
iEngIntegerAn engine index to get it's power from (starting at 0). This is only required if IsOnAPU is used and set to FALSE (0).No
VoltageCurve.NThe voltage for the given RPM or %RPM, defined using a curve (explained in the curve.N section). This should only be supplied if the RatedVoltage parameter is not used.No
RatedVoltageFloatThe voltage that the alternator is rated for. This should only be supplied if the Voltage parameter is not used.No
LoadCurve.NThe load values based on RPM, defined using a curve (explained in the curve.N section).Yes
IsOnAPUBoolWhen this is set to TRUE (1), the alternator is linked to the APU instead of an engine. For an engine this can be omitted or set to FALSE (0). Note that if set to true, the iEng key should be omitted.No
NameStringThe name of the alternator. This is an identifier name and is only added for debugging purposes. Cannot contain special characters or spaces.No
    ### externalpower.N An external power source is a power supplier with a constant and infinite power output, and the appended number corresponds to its unique ID (*N*, starting at 1). The external power hash map is comprised of `key:value` pairs, separated by the `#` symbol, and takes the following form: ``` cpp externalpower.N = Connections: #RatedVoltage: #Load: #Name: ``` A full example of a single external power source definition would be like this: ``` cpp externalpower.1 = Connections:bus.8 #RatedVoltage:28.5 #Load:400 ``` Key Value Description Required `Connections` List [List](../cfg-files-general-information/#list) of the different buses that this alternator is connected to, eg: `Connections: bus.1, bus.3` You can find more information from the following section: [Connections](#Connections) Yes `RatedVoltage` Float The voltage that the alternator is rated for. {{< button "Load" />}} Integer The load output, which is constant. `Name` String The name of the external power source. This is an identifier name and is only added for debugging purposes. Cannot contain special characters or spaces. No     ### bus.N A bus is a hub for connecting different components (and other buses) to each other, and the appended number corresponds to its unique ID (*N*, starting at 1). The bus hash map is comprised of `key:value` pairs, separated by the `#` symbol, and takes the following form: ``` cpp bus.N = Connections: #Name: ``` A full example of a single bus definition would be like this: ``` cpp bus.3 = Connections:bus.1, bus.2 #Name:Hot_Battery_BUS ```  
KeyValueDescriptionRequired
ConnectionsList

List of the different buses that this bus is connected to, eg:

Connections: bus.1, bus.3

You can find more information from the following section: Connections

No
Name

string

The name of the bus. This is an identifier name and is only added for debugging purposes. Cannot contain special characters or spaces.No
    ### curve.N The curve parameter is defined as a list of paired values, and the parameter is appended with a number that corresponds to its unique ID (*N*, starting at 1). The exact number of paired values that are in the curve will depend on the use the curve is going to get, since curves are used by other parameters to store information. For example, you may have defined a battery like this: ``` cpp battery.1 = Connections:bus.3,bus.5 #Capacity:15.5 #Voltage:curve.1 #Name:Battery_Main ``` In this case, `curve.1` references the battery voltage capacity, and would have been defined like this: ``` cpp curve.1 = 0:21, 0.1:10.5, 0.5:12, 0.9:13, 1:13.4 ```     ### procedure.N Procedures are a set of actions that can either be manually triggered or triggered when entering a given context. Procedures are created one at a time and appended with a number that corresponds to its unique ID (*N*, starting at 1). They consist of a context and then a series of paired values telling the simulation what procedures (actions) to carry out within that context. The general structure for a procedure is as follow: ``` cpp procedure.1 = #, #, #, #... ``` When creating the procedure, the context can only be one of the following three constants:   {{< table-wrapper >}} | Context | Description | |----------------|---------------------------------------------------------------------------| | `None` | No context, can only be manually triggered. | | `Autostart` | Triggered manually, or automatically when auto-starting the engines. | | `Autoshutdown` | triggered manually, or automatically when auto-shutting down the engines. | {{< /table-wrapper >}}   Once you have the given context, you can add in the actions to be performed when the procedure is triggered (either manually or automatically) with each action separated by a `#`. Every action takes a given number of arguments and will manipulate the state of the system, and the actions themselves can only be one of the following constants:   {{< table-wrapper >}} | Action | Parameters | Description | |------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------| | `SetCir` | ID, Bool | Set the circuit with the specified ID switch state to the specified Bool value | | `SetBat` | ID, Bool | Set the battery with the specified ID switch state to the specified Bool value | | `SetAlt` | ID, Bool | Set the alternator with the specified ID switch state to the specified Bool value | | `SetExt` | ID, Bool | Set the external power with the specified ID switch state to the specified Bool value | | `SetCir2Bus_Con` | ID(Bus), ID, Bool | Set the circuit with the specified ID to bus with the specified bus ID connection state to the specified Bool value | | `SetBat2Bus_Con` | ID(Bus), ID, Bool | Set the battery with the specified ID to bus with the specified bus ID connection state to the specified Bool value | | `SetAlt2Bus_Con` | ID(Bus), ID, Bool | Set the alternator with the specified ID to bus with the specified bus ID connection state to the specified Bool value | | `SetExt2Bus_Con` | ID(Bus), ID, Bool | Set the external power with the specified ID to bus with the specified bus ID connection state to the specified Bool value | | `SetBus2Bus_Con` | ID(Bus), ID, Bool | Set the bus with the specified ID to bus with the specified bus ID connection state to the specified Bool value | | `SetCir2Bus_Brk` | ID(Bus), ID, Bool | Set the circuit with the specified ID to bus with the specified bus ID breaker state to the specified Bool value | | `SetBat2Bus_Brk` | ID(Bus), ID, Bool | Set the battery with the specified ID to bus with the specified bus ID breaker state to the specified Bool value | | `SetAlt2Bus_Brk` | ID(Bus), ID, Bool | Set the alternator with the specified ID to bus with the specified bus ID breaker state to the specified Bool value | | `SetExt2Bus_Brk` | ID(Bus), ID, Bool | Set the external power with the specified ID to bus with the specified bus ID breaker state to the specified Bool value | | `SetBus2Bus_Brk` | ID(Bus), ID, Bool | Set the bus with the specified ID to bus with the specified bus ID breaker state to the specified Bool value | | `SetCirPwr` | ID, Percent | Set the circuit with the specified ID power setting to the specified percent value (0 to 100%) | {{< /table-wrapper >}}   To see how this works in practice, let's look at the following example: ``` cpp procedure.1 = None#SetCir:5,0 #SetBat:1,1 #SetBus2Bus_Con:1,4,1 ``` In this example, the procedure will perform the following three actions when it is *manually* triggered (the context `None` will only work with manual triggers): - `SetCir:5,0`: Turn off the circuit with ID 5 - `SetBat:3,1`: Turn on the battery with ID 3 - `SetBus2Bus_Con:1,4,1`: Sets the bus with ID 1 to transfer electricity to the bus with ID 4   #### Triggering Procedures As mentioned above, procedures can be *manually* triggered and/or *auto* triggered. Auto triggering is performed on engine start or shutdown - assuming the correct context is used - but manual triggering requires using the key event `ELECTRICAL_EXECUTE_PROCEDURE` (in [WebAssembly](../../../programming-apis/wasm/webassembly/) or [RPN](../../../programming-apis/reverse-polish-notation/) or any other source). This key event requires 2 arguments to be passed with it, although the second one is *optional*: - [0] = **Procedure ID**: This is the ID of the procedure to be triggered, for example to to trigger `procedure.3` the index would be 3. - [1] = **bInverse**: This is a boolean value that, if omitted, will default to 0 (FALSE). If it is set to 1 (TRUE) then the procedure boolean values will be inverted when executing the procedure. For example, if the procedure has the action `SetCir:5,0`, it will then become `SetCir:5,1`.     ### Connections Connections define links between buses and power suppliers/consumers, and they are used in the `circuit.N`, `battery.N`, `alternator.N`, `externalpower.N` and `bus.N` parameters within the electrical system.   When defining a connection you need to give at least one target bus, specifying the ID value, eg: ``` cpp Connections:bus.1, bus.3 ``` You may also, optionally, give a maximum amp value for the bus, separating it from the bus ID using a ":". For example: ``` cpp Connections:bus.1:3.25, bus.3:2.66 ``` This amp value is the amperage above which the breaker will automatically trigger, cutting the power flow through the bus. If this amp value is not defined, then the default behaviour is for the connection to sustain an infinite current.