MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

Posts: 47
Good morning to all, solved the first problems, my work for the construction of the overhead of the B. 737 proceed.The problem that presents itself now is more complex: being all the panels obtained from theplexiglass and not purchased are not prepared for the announcers, I had therefore to create boxes in which I will put the leds in correspondence of the various announceers (problem already this because I imagine that I will have to buy the PCBs) but the question is: how do you make sure that the right annunciators light up when you operate the master battery? etc.
Can someone explain me? thank you
2018-09-22 08:17
From: EDDG, Germany
Posts: 1785
Hello Giulio,

it would be nice if you would tell us a few details:

- which simulation do you use (FSX, P3DVx)
- which aircraft do you use (standard simulation, PMDG 737, 747, Airbus)

If you want to get maximum output from us, you also have to give us a maximum of input.
Stephan (Time: UTC+1)
2018-09-22 22:45
From: ETSI, Germany
Posts: 4988

As Stephan said... For detailed Information we need a better input.

The AddOn is the important part....
Some AddOns can already include the logics you need... But mostly this is not include and must be done by youreself.

Basic information:
A ) You have 2 Different kinds of LED in your B737 .

1. Backlight LED
For example the Buttons on your MCP.... Here the Lable Text like "VNAV" or "HDG" is normaly a static backlight. This led´s not be controlled by the simulator.... Here you make a indipendent circuit ( also external from Mobiflight).... So if you activate the Potentiometer for Backlight all this LED in each single Button (Corry switch) are illuminated.

2. Functional LED
This LED are controlled by the Simulator.... For example the Green Status Lights of MCP buttons.... Or the Overhead Annunciators like "FAIL" or "ON"
Here you normaly got a Mobiflight Output Config for each LED.... It check the Sim Status and finaly controll the LED.

B ) You have 3 Different Status of a "Function LED"

1. The "Live" Status.
If LED is ON/OFF in "regular" situation in Simulator it must be also on or off in your Homecockpit ( for Exampel status Light of MCP VNAV Switch) .... If VNAV is enabled and the Green LED is light in Sim it must also light in HC..... Here you simply read the Status of this function (VNAV) and use this information for the LED.

2. OFF situation in case of Battery OFF.... Here most Addons have a Problem. the Offset you read in Point 1 is show always the internal situation of the System. So If for example the Fuel Pump Switch is ON then the value of the corespondendning LED is 1.... BUT It is still "1" if battery is OFF..... But here the LED should be OFF.
So we need a trick.

3.ON Situation in case of Light test
Here its the same like in Point 2... While Lighttest is in Progress ALL Led should light.... But most addons not change the value of the Offsets (from the functions).... So if you VNAV is OFF at the moment the Offset of the Status Light is "0" Whatever lighttest is ON and it should be "1" at the moment.

To solve this we have different solutions.

1. Hardware.
You can read the Batteryswitch and use a relais for this one Output.... This relais then will cut the power (or grd) lines from ALL Led in your Cockpit.
This is techincal a bit difficult.... You also must plan this before you start to build your cockpit cause here some different wire systems are needed.
Same work with a lot of resistors and a secundary Power Line to LED also for Lighttest.... In that case the Lighttest Button is a Output and you controll a Relais that will power all LED simulatan to the regulary system.... So all will light (Whatever the Arduino not light it regulary at the moment)

2. Software by Mobiflight.
You can Create for EVERY Led Output 3 instead of 1 Output config....
1st Is for regualry Situation .... 2nd is always OFF.... and 3rd is Always ON .... Then you need preconditions so the correct config work in the right situation.
This workes... But it is also a lot of time to create all this configs.

3. Software by Mobiflight "in the future"
Maby Sebastian impliment a tool i plan for since long time. This will help to make those things with mobiflight more comfortable in one config.
But i not know if this tool ever comes live.... Or when it comes

4. Software by Lua Scripting
If you can write own scripts you can create a own Offset List.
In that case you not read the original offsets.... ou read with Mobiflight your "own" Offsets.... And your script finaly manipulate this offsets so the Lighttest and Battery is aleready included.... If you make this then the Offset is 1 or 0 always correct cause YOUR script manage this.
(Thats the "perfect" solution.... But it need porgramming skills by youreself)
Good Luck !
2018-09-23 15:25
Posts: 51
Seems like there is no simple solution to this yet.

How would you go about if you wanted to do the three config option as it seems to be the easiest way as of now?
2018-09-23 15:57
From: ETSI, Germany
Posts: 4988

Seems like there is no simple solution to this yet.

How would you go about if you wanted to do the three config option as it seems to be the easiest way as of now?

Step 1: Find out how your AddOn Work. (You already not tell us what aircraft you use)
Observe some LED Outputs .... Create For example a Output for one Overhead Element.... One MCP Element and One Pedestal Element.
(Configs not need to be set to a real LED.... For testing we just check the value in Mobiflight Window. )
Also create 2 Configs (Output) and read here the Battery Master switch .... And the Light Test Switch.

Now run Mobiflight and do some testings.... Run the functions in you have a ON and a OFF Situation for all 3 LED´s . Confirm all work correct and boolean. Means the value in Mobiflight is "1" if LED should be ON on sim and it is "0" if it should be OFF in Sim.
Then Use the Master Battery Switch .... Check if you Output of this switch work correct ( 1 if ON and 0 if OFF)
And Now check the 3 LED Outputs from before.... Do they change to "0" if battery is OFF ... OR ... Do they stay in current state ?
If the change then your AddOn include the logic... If NOT you have to build it later.
SAME Testing is needed for the Light test .... Test the switch Offset by using the Lighttest to know how the value is working....
Then Check again the 3 LED Offsets how they work if Lighttest is active.... If Change to 1 all is fine... if Stay in current state you also need to make this yourself.

Step 2 : Example Config for Batt OFF and Lighttest via Mobiflight.

1. Create a OUTPUT Config that read Battery Master switch .... You need no device here.... this is just a indicator for our preconditions. Use a Easy name like "READBattery"
2. Create a OUTPUT Config that read Lighttest Switch ..... Alos no device is needed. Call it for eample "READLight"
3. Create a Config for Your LED .... For example we use the Status of Flightdirector. Use the Offset of your B737 AddOn. ( All same like you do all the time )
4. Now Duplicate this Config 2 Times ( Or Create this 2 Configs by hand and again set Offset and so on..... Duplicating is just more easy )
5 Name this 3 Configs logical.. For example FDleftNORM .... FDleftOFF ... FDleftLTEST
6 Make a Compare in the OFF Config that say value is always Zero.... You can use TRANSFORM field and say here "0" or you can use COMPARE and sa "If Value = 1" then 0 ELSE 0 " .... Result the value of this config is ALWAYS Zero
7 Make another Compare in the "LTest" Config .... Here it must be always 1 .... So use Transform "1" OR Compare IF value=0 THEN 1 ELSE 1 .

8 Now you need the Preconditions to manage the correct Config work at correct time.

A ) The NORM Config (Should work if Battery is ON and Lighttest is NOT active)
Precondition 1.... Only work if Config READBattery = 1
use the AND Parameter on line 1
Precondition 2.... Only work if Config "READLight" = 0

B ) The OFF Config (Should work if Battery is OFF)
Precondition.... Only work if Config READBattery = 0

C) The LTEST Config (Should work if Battery is ON and if Lighttest is ACTIVE )
Precondition 1.... Only work if Config READBattery = 1
use the AND Parameter on line 1
Precondition 2.... Only work if Config "READLight" = 1

If you use this with multiple LED then you can use the 2 Indicator Configs ( READBattery and READLight ) in each config.... You not need to create this multiple times.
BUT Every LED will need its own 3 configs (NORM,OFF,LTEST ) .

I hope you understand. If not ask again with detailed problem part... i try to help !
Good Luck !
2018-09-25 12:01
Posts: 47
Good evening people .... thanks for the answers .... I use the737 PMDG on P3D v.3 we update ourselves.
2018-09-25 21:44