Circuit Avionics - Flight Simulator Hardware
Shopping Cart (0)

You Have Control

CircuitXL Avionics were created to give pilots full control over their hardware.

Every button, knob, switch and LED should do exactly what you want it to do, for any given aircraft.

The information below introduces some of the key concepts and technical information you'll need to get you off the ground.

Variables

CircuitXL Avionics need to send and receive many types of information to your Flight Simulator. Keyboard and joystick commands are insufficient.

Therefore, our hardware interacts with variables. These are part of Flight Simulator's internal code but not visible to most users.

The naming of these variables depends on which simulator you use. These are the terms you'll hear most commonly:

  • MSFS
    • Simvars, L:Vars, Events
  • X-Plane
    • DataRefs
  • FSX / Prepar3D (P3D)
    • FSUIPC Offsets

For now, we'll stick with the generic term variables.

Here are some of the default variables for MSFS, X-Plane and FSX/P3D. Bear in mind that many add-ons use customised variables created by aircraft addon developers.

MSFS Engine Variables. If the value of ENG ON FIRE is ever 1, you might want to land

X-Plane Lighting Variables, as shown in DataRefTool. The value of each variable is shown on the right.

FSX/P3D Autopilot Variables
(the four-letter code is the FSUIPC Offset i.e. the variable)

Variables can be simple 0/1 boolean numbers, or longer data such as a frequency or the name of a waypoint. They can be inputs or outputs (some of them are both).

More information on how to find and use variables for each simulator is shown further down this page.

MobiFlight

CircuitXL Avionics use MobiFlight to handle our variables, sending them where then need to go, whether that's the aircraft on your screen or the control panel sitting on your desk.

Some useful tips on using MobiFlight with your CircuitXL Avionics are given at the end of the Getting Started page.

It is highly recommended to browse the MobiFlight Wiki where you can find lots of useful information. There is also the MobiFlight Discord where you can interact with the community, and read over prior discussions found via the Search function. A wide range of topics are covered, from programming and configuration, to 3D printing and making your own hardware.

Outputs tab of Mobiflight.

Profiles and Functions

When we start MobiFlight we open a Profile.

A profile contains a list of all the functions of our control panel, divided into Inputs and Outputs.

  • Inputs
    • Buttons
    • Knobs
    • Toggle Switches
  • Outputs
    • LED
    • Numeric Display

The Output and Input tabs of MobiFlight

Open any of the pre-made profiles in MobiFlight to see the Input and Output tabs, with every function listed on its own line.

For each function, click the "..." button under "Edit" to see how each function is constructed, and make changes.

It is worth taking some time to click through all the tabs. You will be able to see which variables are being used (hint: Check "Show Preset Code" to see the actual variable). You can also see what preconditions are attached to their being used, and whether a transform has been applied to alter the variable.

Example Function: BARO Display

One simple example: on the CircuitXL Universal Autopilot, we want to show our pressure reading in Millibars. We achieve this by taking the pressure variable. In MSFS, this is (A:KOHLSMAN SETTING MB,Millibars):

The value of the variable is presently 1013.099853, so we need to remove the decimal places. We therefore transform it with Round($,0).

The $ represents the raw variable, and the 0 specifies that we want 0 decimal places:

Our Autopilot has a 2-position BARO MODE switch. The positions are INHG (Inches) or HPA (Millibars). We only want to show Millibars if the switch is in HPA. This is accomplished with a simple precondition:

This is how the Output tab looks when we're done:

Flight Sim Value shows the raw variable, and Output Value shows the rounded figure.

The line above, DISP_BARO_INHG has a red exclamation mark. Hover over it in MobiFlight and it says Precondition Not Satisfied. This is because our BARO MODE switch is set to HPA so the INHG reading will not display - its precondition is not satisfied. This is the correct behaviour.

Quirks

Nothing in life is simple, and you will have to do things slightly differently depending on the simulator, the simulated aircraft, and in particular the aircraft developer. So long as the developer has made the right variable available, there is nearly always a solution!

Setting up BARO in X-Plane's Zibo 737 was going fine, except that the only available pressure variable (baro_sel_in_hg_pilot) was for Inches, not Millibars.

The solution was to transform Inches into Millibars (HPA) by multiplying it by 33.863889532610884. Many thanks to Google for the conversion. And yes that's wayyyyy overkill on the accuracy!

That's Round(($*33.863889532610884),0)

MobiFlight Variables

MobiFlight can also make use of MobiFlight Variables, which are custom variables we create ourselves, outside of the Flight Simulator environment.

 One example of this is the system selector used on the CircuitXL Radio Panel. When we make the selection, we aren't actually interacting with Flight Simulator. Instead, we are setting the value of a MobiFlight Variable called SYSTEM to either 1 or 2.

The SYSTEM variable is used as a precondition for virtually every function on the panel. When our SYSTEM variable is 1, we will see VHF1, NAV1 and ADF1, and each knob and button will affect the VHF1, NAV1 and ADF system only.

The inputs and outputs for our VHF2/NAV2/ADF2 will show the "precondition not satisfied" warning. This is normal behaviour.

If we didn't specify those preconditions, the displays would try to show both frequencies at the same time, flickering rapidly, and the knobs would affect both radios (1 and 2) at the same time! MobiFlight makes it easy to control what is displayed and what function each input has, depending on the situation.

Technical Challenges

Configuring for a new aircraft isn't always as straightforward as we'd like! There's always one switch or LED that you'd like to set up a certain way, but have to do a bit of head scratching to figure it out.

Some of the variables we use are archaic, going back to the early days of Flight Simulator hardware. Some have only recently been implemented, and aren't widely adopted. The default aircraft that come with Flight Simulator will generally use a standard set of variables, and complex add-on aircraft will generally use variables that have been created by the developer who made the aircraft. This explains why we have one profile for the Default aircraft, and separate profiles for each complex addon.

Furthermore, every aircraft cockpit is different, and the buttons on your hardware don't necessarily match the aircraft you're going to fly. A common example is the aircraft having a pushbutton whereas your hardware has a toggle switch. In this situation, we put our variables to work. Making extensive use of preconditions and transform, we can get the desired result. We can also send one button push to several aircraft systems, we can make them dependent on each other, and so on. It takes a bit of brainpower to get a Boeing panel to fly an Airbus aircraft, with its entirely different philosophy, but it is possible.

Finding Variables: General

Variables are the beating heart of your CircuitXL Avionics, but where to find them?

 

HubHop Presets

MobiFlight comes pre-loaded with thousands of variables for MSFS, X-Plane and P3D. These are displayed on the drop-down menus and are called Presets.

These Presets are sourced from HubHop by MobiFlight, a collaborative website created by MobiFlight where users can make their own corrections and contributions.

You can download the latest HubHop variables by clicking Extra - > HubHop -> Download Latest Presets.

Aircraft Developer

Aircraft developers increasingly recognise the needs of hardware users, and provide documentation for the variables they use. It's worth checking their forums for a Hardware section, or checking the install location of the add-on on your computer, for any documentation.

Community

If you're struggling to program a button or a knob to do something, there's a good chance that somebody else has already tried to do the same thing, and posted about it online.

My favourite source of help is the Search function on the MobiFlight Discord, which has user posts going back years.

You can also start a discussion in the Circuit Avionics Discord.

Finally, a simple Google search will often bring you to a forum thread where people have been discussing the exact same issue.

Finding Variables: Simulator Specific

As well as the general sources shown above, there are also sources specific to the sim you use.

MSFS: Microsoft Documentation

The primary source of variables for the default aircraft, and the simulator itself, is the documentation prodived by Microsoft in their SDK.

The default output variables (SimVars) are listed here.

Most inputs are handled by Events, these are listed here.

Note that some of the SimVar outputs can also accept an input, as shown on the column on the right, "Settable". For example TRANSPONDER STATE can be read and also set through the same SimVar.

MSFS: Get List from Sim

MobiFlight has a button for MSFS users called 'Get List From Sim'.

Tick "Show Preset Code" on an Output to access the "Get List From Sim" button (shown at the lower-right of the image).

This presents a simple list of variables from the simulator. If you can't find what you need elsewhere, there's a good chance you'll find it here.

L:VARs shown for the Aerosoft Twin Otter

MSFS: Developer Mode

Enabling Developer Mode gets you into the guts of an aircraft to find the variables you need. Unlike "Get List from Sim" it also shows you the values in real time, so you can flick the switches in your cockpit to help track down exactly what you need. It's the most powerful tool for MSFS but also takes a while to learn.

After enabling Developer Mode, it's best to restart MSFS so that everything is loaded in correctly.

You should exit Developer Mode once you've found what you need, as it is not suitable for everyday use of your Flight Simulator.

MobiFlight have produced tailored documentation relating to Developer Mode here.

There is a practical demonstration of the mode shown in this video. Note that MobiFlight and MSFS have had several updates and some of the limitations you see on the video, such as inaccessible L:VARs, are no longer present.

X-Plane: Laminar Documentation

In X-Plane, our variables are known as DataRefs. The official list is shown here.

Many of the DataRefs are writable, this is indicated on the documentation.

X-Plane: DataRefTool

X-Plane users benefit from a more straightforward experience when it comes to finding variables creaed by 3rd party aircaft developers.

It's recommended that all users install the DataRefTool plugin which is a really useful tool to locate any DataRefs.

You can watch the value of your variables change in real time, and copy the name of each variable directly from the tool.

DataRefTool showing X-Plane lighting variables

FSX / P3D: FSUIPC Documentation

We interface with these simulators using FSUIPC Offsets.

FSUIPC is a tool which references data directly within the memory. The location within the memory is the Offset.

FSUIPC Offsets are less user-friendly than more modern interfacing methods, but they are just as powerful and have been in use for many years.

You should locate the FSUIPC-SDK-Documentation folder on your PC and find the files FSUIPC(4,5,6,7) Offsets Status.pdf and FSUIPC for Programmers.pdf.

Because you are dealing with individual bits and bytes, you need to specify the format of the data for MobiFlight. More information is given here under the heading "FSUIPC Offset".

Additional Information for MSFS Users: RPN

Cockpit instruments in MSFS are driven by a code called Reverse Polish Notation (RPN). The use of RPN by Microsoft Flight Simulator goes back at least 20 years.

RPN has a peculiar format whereby the code works backwards. Instead of 3 + 4, in RPN you would say 3 4 +.

This is important to know because MobiFlight also has to speak to MSFS in RPN.

The best source of information about RPN as it applies to MSFS is given here, in Microsoft's own documentation. This is recommended reading for all users who wish to do some advanced configuration.

The HubHop presets are already formatted in RPN. We don't often need to alter it, but it is used when we need to use functions such as if, min, max, and so on. I'd recommend looking through existing chunks of RPN in some of those presets by clicking "Show Preset Code", and cannibalising the code to suit your needs.

Hint: If you're lazy, or, like me, RPN illiterate, ChatGPT is well aware of RPN and can output useful code, if you tell it the name of each variable and how you want them to interact with each other.