Simconnect Event IDs for Aircraft-Specific functions

Does anyone know if it’s possible to set events specific to the A320neo (like ‘Engage Selected Heading Mode’) with simconnect?

None of the standard events seem to do it, and I can’t seem to find another reference anywhere

2 Likes

https://forums.flightsimulator.com/t/airbus-neo-is-there-a-binding-to-switch-between-managed-and-selected-modes/244977/4

2 Likes

I managed to set heading, speed and altitude modes (managed / engaged) with spadnext. However, VS_SLOT_INDEX_SET seems to be broken.

Did you success to control vertical speed modes using physical buttons?

Thanks

Excellent - thank you. I’m writing my own 3rd party interface so that part’s covered.

How did you become aware of those event IDs? I can’t find them in the documentation

Yea, VS knob state do not control it properly. I think it’s selected state and secondary functions did not linked properly.

As a workaround; you can ignore the VS knob state and set the vertical speed by using AP_VS_VAR_INC and AP_VS_VAR_DEC sim events. You will only be able to set it during climb or descent, not in levelled ALT hold state. And FCU display wont show it unless you manually pull the knob. But it will work limiting the vertical speed, as AP will try to match it whether you are using managed or selected ALT mode.

Additionally, you can bind another event to VS button (long press for example) that sets the vertical speed variable to 0 or activates ALT hold to mimic Level Off function.

Hope this helps

1 Like

I am using Spad.Next to interface my panels and controllers. Afaik, developer of Spad.Next data mined those MSFS specific sim events and variables himself. You can install trial version and check the MSFS specific event IDs if you like.

1 Like

Will check it out. Thanks again

‘Engaging Selected Heading Mode’ is what i also would like to do with my DIY Panel run by an Arduino (Teensy++ 2.0). It works as an HID device but could somebody please give me a hint where do i even start? It works quite simple for X-Plane where only one single plugin is required to edit “datarefs” but in the MSFS World i am overwhelmed at the moment about the different applications available.

So far i got FSUIPC and Simconnect installed (i guess), i looked into LINDA, Mobiflight and Link2FS already but as far i understand they all do the same. They let me bind the keys of my DIY HID device to functions in the Sim, however those are the same function i can bind within MSFS2020 anyways. :man_shrugging:t2:

Spadnext website shows only Saitek Devices, when i go to “Joysticks/Gamepads” the site says “work in progress”, Simconnect should be installed but i got no clue where it is or how to use it. :see_no_evil:

Sorry for being so clueless and bothering you with such newbie questions since last time i was flying MSFS was 2004, can somebody explain a little about the basics, point me to the right direction or recomend some tutorial as a starting point etc.?

Not quite sure how you’d make that work with a HID device - although you might be able to.

One way to do it (which is what i’ve done) is to have the arduino communicate via serial to an app running locally on the machine with the sim, which then gets/sets values via simconnect. The reason i’ve done it this way and not as a generic-input HID is because I have displays attached to the arduino and I want to be able to read from the sim

From what I can gather, spad.next can function as the app on the PC which interfaces between the arduino/sim to save writing that part yourself. I haven’t tried it personally so others might be able to comment. Their website is also unclear to me on how this works, but i’ll be grabbing the trial version later today and will report back if I find anything useful

1 Like

Thanks, i did not even know that it doesn’t work by using a HID device :smile:
I would actually prefer using it via serial communication too so that i won’t be limited by the amount of buttons and functions of a HID device.

I don’t mind writing my own code for the arduino so i wont’t necessarily need spad.next however i got no clue which app to use in order to access Events and Lvars and also don’t know about about the coding unless i know which App to use and have some code examples or library.

Which App are you using?

Currently using an app i’ve written myself in python using this wrapper https://pypi.org/project/SimConnect/ (mostly because I don’t have much experience in c++) and then used the references in the SDK (SDK/Documentation/03-Content_Configuration/Variable_Lists/Simulation_Variables.html)

This only includes standard variables and functions, however, and there are custom ones which go undocumented in there as discussed above

2 Likes

Looks interesting, will try out the example “MSFS2020-cockpit-companion” from the link you gave me.
To make it work i will have to install “Python 3”, “Flask” and “Python-SimConnect”, however it won’t let me interact with the Simulator via my arduino but only by web browser.

When i am successfull with that i need to figure out how to write a python app which understands the serial outputs from the arduino instead of web browser / http.

My programming skills are limited in either language but in other words what you do is:

  1. Arduino sketch to simply detect and output signals of buttons, switches, encoders etc. via serial com.
  2. Python code to take and translate those signals into events and lvars which get sent to the MSFS via simconnect while this *.py file is running.

Also if i understand it correct, you don’t need “Flask” and “FSUIPC”.

Would be happy to hear how spad.next is working out for you.

Sorry to bother you again… I’ve had the heading and speed controls working but can’t get ALTITUDE_SLOT_INDEX_SET to do anything, either setting it to 1 or 2 - did you use this one?

No worries at all. Glad if I can help.

ALTITUDE_SLOT_INDEX_SET is the correct event yes. It is visually tricky because unlike speed and heading, selected altitude value is displayed in both modes. To be sure which mode is on, check for the small circle next to the altitude shown on FCU display. When the circle is visible, altitude is in managed mode. When it is not, selected mode is active. Or you can check the PFD during climb or descent. It should indicate open climb or open descent during selected mode. Climb or descent in managed mode.

The reason you might not feel the behaviour difference between altitude knob modes is because VNAV is not integrated yet. There is no vertical profile that managed mode can follow, so it is simply following the selected altitude, which is same as using selected mode.

Till VNAV is properly integrated, best way is just to use selected mode during climb and descent, and switching to managed mode during cruise.

Thanks. See that’s how I thought it would work but i’m seeing some interesting behaviour. From my understanding of how the alt works, it’s a little different to speed and heading, in that the aircraft is not always in one or the other - it will exit either mode after reaching the target altitude. I have a momentary switch button I want to use to enter selected mode

If I start at level cruise in Alt* mode, and dial in a new altitutde nothing happens (as expected). If I then pull the knob in-sim then it enters selected alt mode and the aircraft will go into OPEN CLIMB/OPEN DESCENT as expected.

If I set the new alt and send the ALTITUDE_SLOT_INDEX_SET command with a ‘1’ then nothing is hapenning, which seems a bit odd

Ah ok now I got it. It is a bug. It should normally update the selected altitude as soon as you select it. There shouldn’t be a need to switch modes for the update.

I didn’t checked the recent updates patch notes. It might be fixed there. But in any case, it should be fixed in the A32NX mod.

EDIT: Apart from that bug, the FCU altitude knobs secondary functions are not linked to sim connect. Same problem with VS knob. For this one, I made a long press binding that switches modes to 2 and then to 1, as a workaround to make it work with managed mode. But like I said you shouldn’t need it in selected mode, which I recommend using during climb and descent.

1 Like

Interesting. I’ll try sending it a series of commands then to see if it toggles and kicks in the right mode - was about to launch and check when the patch hit so… waiting…

I’m not 100% sure that your description that it should change altitude immediately after setting the dial while in level cruise is right, though. I’ve been rewatching a few videos by pilots (like this one) where they set the altitude then pick a mode to asc/desc. Might well be a bug, but the way this guy in particular explains it, it sounds like normal behaviour.

What do you mean by the ‘FCU altitude knobs secondary functions’ - the Selected Mode/Managed (Push/Pull)?

No you are right when in leveled flight, you need to activate the climb or descent after you are set. The bug was that it was not updating while in climb and descent. Apart from ALT* mode, the knob changes should refresh the selected altitude value immediately.

About secondary functions. Some aircraft functions are hard coded to trigger several events at the same time, or in order. And not all of those events are defined/linked with sim connect. Like battery push buttons in A320, which makes several circuit and bus connections. So simple master battery on command does not work for A320. In FCU altitude knobs case, if push clicking is triggering some secondary event apart from changing managed state, we might be missing it.

Yeah I think you’re right on the secondary events - in Spad when I pull the knob I see this

image

Seems to be triggering the base FLC command too - unfortuanely setting this as well doesn’t seem to do anything. Can’t seem to get anything consistent here! :confused:

1 Like

Just checked with the new patch, using default A320 (No A32NX mod). As soon as I change the selected altitude by manipulating AUTOPILOT_ALTITUDE_LOCK_VAR, it starts ascending or descending. Both in managed or selected mode. Weird thing is it initially climbs with only 700 fpm, until I set a target VS. Then it accelerates the climb to that value.

Maybe this is a new issue. Or maybe it was like that, but A32NX was fixing it. I have to try with a proper flight plan to be sure.

1 Like