Using LINDA to Interface with the MJC8400

Hi all,

I wanted to take a moment to give back a little to this community. I'm currently building my own Q400 cockpit and while I'm certainly not an expert in building, I'm definitely not an expert in programming - but I'd like to share a couple things that I've learned about interfacing with the MJC84. I wish this information had been handy when I was building so I'd like to put it out there for others who may be contemplating building a Q400 sim.

I won't go into too much discussion on how to use the program, but I'm using LINDA to program my inputs in conjunction with Leo Bodnar BU0836X boards and BBI-64 Boards. Just a quick note - you can use LINDA to interface your joystick/yoke/throttle quadrant buttons to the MJC84.

First - download LINDA:

Next - download and install the MJC84 LINDA profile:

This profile was last updated in 2018 and includes most but definitely not all inputs into the Q400. I'd assume this project is mostly dead, which is a shame, but it still works great in LINDA.

For me, I recently completed building a UNS-1 to go along with my Q400 home cockpit:

Interfacing posed a problem because in the LINDA profile, there were no inputs for the FMS keys written so I had to figure out how to program them. I read and re-read the documentation provided by Majestic and I just couldn't come up with a good way to interface the FMS buttons - just not a programmer and don't have a programmers brain. After exchanging a few emails with Support, I was reminded that I could interface the FMS buttons through Lvars, which is what LINDA uses. So I went through the MJC84 code for LINDA and was able to reverse-engineer inputs. This should work for every input listed in VariablesMap.xlsx in the mjc8q400/doc/ExtInterfaces folder.

So, to program the "ON/OFF/DIM" button in LINDA, here's what we need to do:

First, open LINDA, select the Majestic Dash 8 Q-400 profile at the top. Hit edit, then in the new window that pops up hit "Edit User" at the bottom. This file allows you to add your own inputs without disturbing the main profile.

We're going to be working mainly with this phrase:

function name_your_input_here ()
MJCD8_Write(signalsent, resultingCRC)

So, first name whatever button you're going to trying to program. Can be anything, but it's helpful to name it after the button your programming. In our case, lets name it FMS_KEY_ONOFF.

Now, go to VariablesMap.xlsx found in mjc8q400/doc/ExtInterfaces folder. Go to the FMC tab at the bottom. The second input down is listed as:


In the description for that variable, you'll see the list of each key and it's corresponding signal for that key:


For the ON/OFF/DIM switch, it's 242.

Last step is getting the resulting CRC.

Go to mjc8q400\doc\ExtInterfaces\XML and find IntVarCRCGen.exe

In the text field, we're going to paste the variable name, in this case it's FMC_->FMC[0].eventState.key_press_input and get our CRC, which is 79415

So our code to write into LINDA would be

function FMS_KEY_ONOFF ()
MJCD8_Write(242, 79415)

Similarly, if you wanted to program the TCS Button this way it would look like this:

function TCS_Button ()
MJCD8_Write(1, 29521)

The test position on the Anti-Skid switch:

function GL_AntiSkid_TEST ()
MJCD8_Write(2, 96582)

And so on...

Once your input is programmed, you can go into the joysticks section of LINDA and start assigning these inputs to buttons on your joystick. I have my entire overhead panel, pedestal panel and now my FMS interfaced through LINDA and it's working great. It's a fantastic method until MJC's COCKPIT edition comes out and lets us program these buttons through their native software.

This post may be obvious and a waste of time to some people, but I certainly didn't understand how to do it so if I help just one person, it'll be worth it.

Pics of my setup just for fun:

Next up I'm working on the ARCDU, the WX Radar panel, the AHRS slew panel and starting to introduce backlighting into my build.


  • Thank you so much for this very helpful post :)

  • Thanks to your post and another one by aua668 (Reinhard) I have succeeded in assigning the ARCDU sidekeys to buttons via a Lua plug-in. At least I understand that part of the process. Now I would also like to assign the ARCDU tuning rotary knobs to buttons (one increase and one decrease each for the inner and outer knobs). Unfortunately I've been unable to figure out how to do that. Could you point me in the right direction if it's not too much trouble ? Thanks in advance for any help.
    Love your panels BTW, fantastic job you've done !

  • Disregard - I've figured it out o:)

  • Could you share your process on getting the ARCDU rotary knobs to function via LINDA/LUA? The ARCDU is next on my list to complete..

  • edited October 2021

    @q400sim said:
    Could you share your process on getting the ARCDU rotary knobs to function via LINDA/LUA? The ARCDU is next on my list to complete..

    Sure thing! Here is the section in my DASH8 Lua plug-in that deals with the ARCDU tune knobs (and sorry for the delayed reply). Hopefully the function names are self-explanatory:

    -- ### ARCDU tune knobs section ###

    function ARCDU_TuneKnob_Outer_Decrease()
    ipc.writeLvar("MJC_VAR_WRITE_VALUE", -1)
    ipc.writeLvar("MJC_VAR_WRITE_CODE", 68036)

    event.flag(78, "ARCDU_TuneKnob_Outer_Decrease")

    function ARCDU_TuneKnob_Outer_Increase()
    ipc.writeLvar("MJC_VAR_WRITE_VALUE", 1)
    ipc.writeLvar("MJC_VAR_WRITE_CODE", 68036)

    event.flag(79, "ARCDU_TuneKnob_Outer_Increase")

    function ARCDU_TuneKnob_Inner_Decrease()
    ipc.writeLvar("MJC_VAR_WRITE_VALUE", -1)
    ipc.writeLvar("MJC_VAR_WRITE_CODE", 68519)

    event.flag(80, "ARCDU_TuneKnob_Inner_Decrease")

    function ARCDU_TuneKnob_Inner_Increase()
    ipc.writeLvar("MJC_VAR_WRITE_VALUE", 1)
    ipc.writeLvar("MJC_VAR_WRITE_CODE", 68519)

    event.flag(81, "ARCDU_TuneKnob_Inner_Increase")

    -- ### End Section ###

    I could have used the function MJCD8_Write (val, code) in LINDA's DASH8 actions.lua plug-in but it would not have saved much.

    These ARCDU tune knob functions are called by event flags 78 to 81 respectively (using FSUIPC's LuaToggle function), which are assigned to a Leo Bodnar ELMA E37 dual concentric rotary encoder on my home-made "functional MCP". The box is built around a Hagstrom KE72 encoder that generates key commands, which LINDA cannot process, hence I had to use FSUIPC.

    I think you are right that the actions.lua file for the DASH8 looks to be incomplete, but nevertheless it provided a lot of useful info. The corresponding files for the PMDG 737 NGXu and PMDG 777 were similarly helpful for creating my own Lua plug-ins.

    Hope this helps.


  • Cool! Thank you so much for taking the time to type that out and share, Emile!

Sign In or Register to comment.