SimConnect events don't trigger the A320N push buttons

Hi!

I’m looking for an event ID or a SimVar to start a battery on the A320 Neo. I tried BATTERY1_SET and MASTER_BATTERY_SET but they do not have impact on the push buttons.

I found out that the MASTER_BATTERY_ON works on the BehaviourDebug window but the battery index has to be set in the second parameter, which does not meet the SDK documentation where there is only one parameter with index 0.

I tried to do the same within SimConnect but nothing happens. I see that the command is received, there is no exception but nothing on the simulator.

Is there a way to emulate to push of these buttons from SimConnect?

The default A320 is tricky because it doesn’t fully show in the behaviors.

You can either set the B variable. Or you can toggle the emissives with such:
1

So I went deeper in order to know how electrical works. I understand now there are busses, batteries,…

I tried to trigger the ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE but nothing changes in the electrical debug. Same for the ELECTRICAL_BUS_TO_BATTERY_CONNECTION_TOGGLE

Still insvestigating :slight_smile:

What you can try is the A variable “ELECTRICAL MASTER BATTERY:1”.

Did you look at the A320 HubHop presets? You can learn a lot by looking at the RPN code from the presets.

Presets | Hubhop by Mobiflight

I think I know why the events don’t work: the preset is overriding them. And if I understand well the RPN, they just returning a state. The state is not set. So I guess I should change the code to made them do what I want.

The preset’s set code is:

p0 s0 10 == if{ 
	1 1 == if{ 
		(>K:ENGINE_AUTO_START) 
	} 1 sp0 
} l0 1 min 0 max (>O:ELECTRICAL_Battery_1_Position) 
(O:ELECTRICAL_Battery_1_Position) sp0 
l0 0 == if{ 
	1 sp0 (A:ELECTRICAL MASTER BATTERY:1, Bool) l0 != if{ 
		1 (>K:TOGGLE_MASTER_BATTERY) 
	} 0 sp0 10 (A:1:BUS CONNECTION ON:6, Bool) l0 != if{ 
		10 6 (>K:2:ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE) 
	} g1 
} 
l0 1 == if{ 
	1 sp0 (A:ELECTRICAL MASTER BATTERY:1, Bool) l0 != if{ 
		1 (>K:TOGGLE_MASTER_BATTERY) 
	} 1 sp0 10 (A:1:BUS CONNECTION ON:6, Bool) l0 != if{ 
		10 6 (>K:2:ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE) 
	} g1 
} 
:1

I guess the first part is for autostart. Then depending on the battery position (which is toggled by the click) it toggles the master battery (so 1) I don’t want to change that 2) I’m not sure it does something) and make the connection between bus 6 and bus 10, the bus 10 having the battery.

There is a couple og things I still can’t figure:

  1. Why can’t I use the ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE event from my SimConnect application to connect the two buses (I think there the event is overriden somewhere)

  2. How the click can call the value of the preset (through the ELECTRICAL_Battery_1_Toggle event, not one from SimConnect) AND set it in the same time.

So I’ll try to make some changes in the overriden event ids to make them connect the buses, hoping it will not causes any side effects.

EDIT: I was wrong. The documentation says that an event id in a preset inhibits the SimConnect’s one. So it’s here to prevent from uncontrolled behaviour and then updating them will not make it usable from SimConnect. I can’t think of a way to get it done right now.