A320 FCU: variable AUTOPILOT ALTITUDE LOCK VAR vs. displayed altitude

Hello everyone!

Currently, I am programming a SimConnect based software to control my DIY A320 FCU. I built this peace of hardware some years ago for the FSX based AEROSOFT Airbus A320/A321. The software was designed as an in-process gauge (DLL).

Targeting MSFS 2020 now, I decided to re-design my software and set it up as an out-of-process EXE. The software works, I am able to control most of the FCU (did not implement AP1, AP2 and VS yet).

But there is one thing which I cannot figure out: the interaction of AUTOPILOT ALTITUDE LOCK VAR and AUTOPILOT ALTITUDE SLOT INDEX in SimConnect on the one hand and the behaviour of the A320FCU in MSFS on the other hand.

As far as I figured out, AUTOPILOT ALTITUDE LOCK VAR seems to represent what is used by the FMS, not what is shown in the display, i.e. when the altitude knob of the FCU is tuned in MSFS, the display value changes immediately but AUTOPILOT ALTITUDE LOCK VAR does NOT change until the altitude knob is pushed or pulled.

So far I have not been able to find a variable which represents the displayed value. In the case mentioned above, such a variable should represent the displayed value and NOT the value the FMS is using for flight.
Without such a variable, I can only set AUTOPILOT ALTITUDE LOCK VAR from my FCU hardware which means that the plane will use that value immediately. Therefore, I cannot tune e.g. the go around altitude into the ALT window of the FCU without pressing/pulling the ALT knob, therefore still folowing the current altitude until the moment I will press/pull the knob.

I know that there are many things in MSFS which are not available via SimConnect variables (and events). But I did not know about the “… SLOT INDEX” variables, too, until some knowing member of this community gave me a hint. Sadly, SimConnect documentation is still uncomplete.

Greetings from Germany,
Spiralcharger

PS: Are there any variables which reflect the status of LOC and APPR buttons?

I don’t think there’s any way right now to figure out or indeed set the FCU in game from external controls in many circumstances. Personally, my plan is to ignore the in game display and implement things “properly” only on the external panel, with the in-game only syncing up with that when I either pull selected or push managed.

As best as I’ve been able to determine,

LOC = “AUTOPILOT APPROACH HOLD” != 0 and “AUTOPILOT GLIDESLOPE HOLD” == 0
APPR = “AUTOPILOT APPROACH HOLD” != 0 and “AUTOPILOT GLIDESLOPE HOLD” != 0

1 Like

Hello Dave @DGymer!

Yeah, that was my first thought, too. But in my case things are just the other way round - MSFS ignores my input (or better: treats my input not the way it should, i.e. the way it treats input via its own UI). The display just reveals these different treatments.

But ok, as long as MSFS doesn’t handle input correctly I wil have to cope with it by not having the comfort to pre-select altitudes and to activete them later.

Yep, that helped a lot. I’ve just implemented the logic and the LOC and APPR buttons work now like a charm!

In fact, just the AP1 and AP2 buttons are missing. All other inputs and displays incl. button lighting works well.

A very big THANKS to you for your answer which helped me a lot! Nice to have someone out there who is not only knowing but also sharing his knowledge!

Greetings,
Jens

1 Like

I just found that AP_PANEL_ALTITUDE_HOLD event keeps whatever altitude is set in the panel system, be it the garmin display or what have you and holds that altitude like the old AP_ALT_HOLD used to in FSX…same goes for AP_PANEL_HEADING_HOLD is now what AP_HDG_HOLD used to…

both AP_ALT_HOLD and AP_HDG_HOLD seem to select the present values and select nearest hundred feet or nearest itnteger heading and hold it instead of what is pre-selected into the AP itself.

Not sure if this helps exactly, but putting it out there…also just posted the above in it’s own topic. There is also a AP_VS_HOLD that is yet undocumented I found just by trying it as a FS Event Tag.

Solved ?

I get the same issue and have another solution.

The value you are looking for (i.e. the altitude displayed on the FCU) is
AUTOPILOT ALTITUDE LOCK VAR:3

It is indexed.

1 Like

@Pliskin2330:
You made my day! Yes, that seems to be what I was searching for. I just changed my software to use the index 3 on AUTOPILOT ALTITUDE LOCK VAR and now my display simply shows me the same value I see in the sim.

Without the index, my display showed me the value the FMS used which differs e.g. during an approach when you select 3000 ft. for the IAF and command “manged state” but a restriction keeps the FMS from descending to 3000 ft. Instead, it stays at 4000 ft. until the waypoint with the restriction “4000 or higer” is reached. Without the index, I saw the 4000 in the display although having entered 3000 before. This does not happen any longer with the index.

Thanks a lot, Pliskin2330, for gibing me that information. I would never have tried it on my own. I always thought that indexed variables were there to handle multiple instances of the same setting/instrument/value or so.

Regards,
Jens

Good morning
Sorry to disturb you, I am quite new to this subjects even if play with FS for more than 20 years.
Ilove to fly the A320, I even have the oportunity to be 8 hours in a real A320 simulator but now I am trying to use Mobiflight and FSuipc to make some harware controls and I have been able to change the AP Heading and Altitude, and so on but when in Altitude I change the value, in the real plane the Autolilot will not start controling the new Altitude and we need to Pull (or push for management ) the Knob to that start controling. When I change the Altitude using Mobiflight and AP_ALT_VAR_SET_ENGLISH the AP starts to change the Altitude at once.
I believe you had the same problem but the variable you are spoking about (AUTOPILOT ALTITUDE LOCK VAR) I dont’ know how to use it. I satrt installing the SDK but it seems to complex for me. Can you help me some how.
Best regards
Joao

If using FSUIPC, you can read/set this via offset 0x07D4. The LOCK VAR [3] value is read-only and available via offset 0x0818. You can try logging events to see what events are used when you use the UI controls, then duplicate the events sent from your buttons/rotaries.

It is the LOCK VAR 3 variable that holds the displayed value before being set. However, as this is read-only, I’m not sure how this is changed before being set - maybe using the SLOT INDEX controls?
Anyway, @SpiralCharger seems to have this working - maybe they can let you know what controls to use to set the lock var 3 variable?

John

K:2:AP_ALT_VAR_SET_ENGLISH should work for setting the altitude

Hi,

I used AP_ALT_VAR_SET_ENGLISH to select Altitude via my FCU hardware controls.
The AUTOPILOT ALTITUDE LOCK VAR:3 was used to read the value set in the sim and transfer it to the FCU hardware.
The behaviour when adjusting altitude via simconnect changed (at least here) with updates. Note that I mostly use the nightly builds of the free FBW A32x MOD.

To achieve a more predictable result, I will change controlling altitude from pure simconnect to simconnect and WASM as by using WASM I can access the virtual altitude selector knob, using the FBW MOD’s logic instead of the sim’s built-in simconnect mechanism.

Regards,
Jens

Changed how? I haven’t yet tried fbw a320 with latest world update, but prior that I had no problems using simconnect to pre-select the altotude.

I had. Sometimes it worked, i.e. changing altitude just “in the window” was possible, the plane didn’t follow it until I pressed the altitude selector knob. Sometimes it didn’t work, i.e. the airplane followed the altitude selected in the window at once.

Note that I use the nightly builds which implies a lot of possible changes from day to day. E.g., a few days ago, I saw the speed window of the FCU showing the speed and(!) the managed dot (without me having touched to speed knob, of course)…

AUTOPILOT MASTER is the boolean that holds the value of the FCU AP1 switch or the AP2 switch if either of them is set the variable is True