plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

Save the date ! On February the 9th, at 10:30am, we will be happy to meet you again for a live SDK Q&A ! You can already ask all your questions here on the forum.

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.

Please take a moment to read the platform’s guidelines before you get started!


DA40CGDFQ avatar image
DA40CGDFQ asked Vitus answered

Please update and provide examples of use for Electrical breakers

ELECTRICAL_BUS_BREAKER_TOGGLE bus index Toggle bus breaker state
ELECTRICAL_BUS_TO_ALTERNATOR_CONNECTION_TOGGLE alternator index Toggle alternator connection state
ELECTRICAL_BUS_TO_BATTERY_CONNECTION_TOGGLE battery index Toggle battery connection state
ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE bus index Toggle bus connection state
ELECTRICAL_BUS_TO_CIRCUIT_CONNECTION_TOGGLE circuit index Toggle circuit connection state
ELECTRICAL_BUS_TO_EXTERNAL_POWER_CONNECTION_TOGGLE external power index Toggle external power connection state
ELECTRICAL_CIRCUIT_BREAKER_TOGGLE circuit index Toggle circuit breaker state

Some of the K events require bus index values. There is no clear explanation of how to use. If the BUS BREAKERS need redundant indexes, ie. BUS INDEX and and index to look like.

I an aircraft has two bus ties then how do you set it up. I tried and either can't get the animation and breaker to work or BOTH breakers animate at he same time.

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

OzWookiee avatar image
OzWookiee answered OzWookiee commented

Here's the code from our P-40

  (L:FLAPSLIVE,boolean) 1 == if{ 5 3 (&gt;K:2:ELECTRICAL_CIRCUIT_BREAKER_TOGGLE) } 
  (L:GEARSLIVE,boolean) 1 == if{ 25 4 (&gt;K:2:ELECTRICAL_CIRCUIT_BREAKER_TOGGLE) }


So we are pulling the breaker on Circuit 5 on Bus 3

bus.3= Connections:bus.1#Name:FLAP_MOTOR_BUS
circuit.5 = Type:CIRCUIT_FLAP_MOTOR#Connections:bus.3#Power:10, 15, 10.0#Name:Flaps_Motor ; Flaps motor

and Circuit 25 on Bus 4

bus.4= Connections:bus.1#Name:GEAR_MOTOR_BUS
circuit.25 = Type:CIRCUIT_GEAR_MOTOR#Connections:bus.4#Power:10, 15, 10.0#Name:Gear_Motor ; Gear Motor
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Thanks, but how do you do BUS BREAKERS. would you need a BUS INDEX and an INDEX, seems to be the same number and redundant.

0 Likes 0 ·
Sorry, saw that you highlighted the electrical bus and remembered that we used that prev.
0 Likes 0 ·
Vitus avatar image
Vitus answered

bump! More information is really, really required on this one! It took me a few hours to come up with some code that works, which is totally unnecessary.

It also seems that there's something weird going on with the BUS LOOKUP INDEX. Whenever you set it, you seem to "prime" your next request. Weird.

This works for me for toggling bus breakers:

  4 (>A:BUS LOOKUP INDEX, number) (A:BUS BREAKER PULLED,bool) == if{

I use it to toggle a master switch for cabin reading lights. All lights have individual circuits, but are connected to bus.4.

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.