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! 

05/03/2024 - This forum is read-only

The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!

See you on our MobiFlight Community Discord server.

A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.

The forum is still providing a lot of good content, hence we keep this information accessible.

icon
Avatar
bob755
Posts: 24
Hello,

New to mobiflight, I'm about to build an MCP for a PMDG aircraft that uses two 8 digit 7 segment display modules chained like the mobiflight video tutorial.
Because of the panel layout I need to display the 5 digit altitude value across two modules:
The lefthand module has the 4 most significant digits and the righthand module has the least significant digit.

For example:
To display heading (250), altitude(12345) and vertical speed(1800) on two 8 digit modules as:

module 1 module 2
250#1234 5#1800##

where # means blank digit.

Is this possible and if so how?

Thanks in advance.
[Last edited by bob755, 2018-08-22 16:30]
2018-08-22 16:21
Avatar
StephanHo
From: EDDG, Germany
Posts: 1867
Supporter
Hi Bob!

Welcome to Mobiflight.

Yes, what you anticipate is possible.

You normally define a chain with 2 MAX modules.

Name the config for the HDG, e.g. MCP_HDG. Then click on the 3 points.
For HDG you define in the config wizard under FSUIPC the offset 0x52C (MCP heading) and adjust to 2 bytes. Everything else here is disregarded.
Then you switch to the tab Display, select module and type. Then select the MCP_HDG-device at Adr / Connector (you have defined the name) and select the 1st module on the right.
At the "number of digits" set 3, activate "use left padding" and select "0". You activate the 3 displayed digits, a decimal place is not needed.

If you have already connected the display module, now click on the test button and it should display "123". That would be the section HDG done.

Now to Altitude. Here you want to split. 4 digits on display module 1 and 1 digit on module 2.

First give the config a name (for example MCP_ALT) and click the 3 dots again.
Enter the offset 0c652E (MCP_Altitude) under FSUIPC in the config wizard, 2 bytes in length, everything else is ignored again. But with Transform, you put the hook on the front and enter "Round ($ / 10,0)" in the row next to it. This divides the value by 10 and returns no decimal place.
Now you switch back to the tab "Display". Select the MF module again here, select the display modules and select MCP_ALT (the name you selected) for Addr / Connector and select module "1" again (important!)
With "Number of digits" you choose "5", even if you only use 4!
Check "Use left padding" and this time select "Space" so that leading zeros are not displayed.
with "use display" but now only the hook at 2, 3, 4 and 5 set and "set decimal point" remains free.
If you now press the test button, 1234 should be displayed at the last 4 digits.
Thus, your 1st display module is fully utilized.

Let us turn to the second module.

Now you just copied the last config (my name was MCP_ALT). and rename them (e.g., MCP_ALT_2). Click again on the 3 points.
You now see the same config you entered earlier. Here we change now simply to the representation of the 5th digits.

FSUIPC changes the transform line. Enter here: "$ - $". This place is always 0, so we take the value that is being conveyed and subtract it from itself, always getting a 0 as the result.

Change to display, and with Addr / Connector behind only select the 2.
You set "Number of digits" to 2, but only activate the 1st digit. A click on test should now show you a 1 on the leftmost module.

If you have understood this principle, it should be easy for you to also adjust the V / S, otherwise you will sign up again ;)
Grüße,
Stephan (Time: UTC+2)
2018-08-22 17:13
Avatar
bob755
Posts: 24
Hi Stephan,
Thanks very much for your quick and detailed reply.

I understand the first display for 1234 and I had almost figured it out myself but I don't understand the explanation for the second module.
The altitude is 12345 and the 5 should be displayed in the left most digit of the righthand module.
I don't understand why you subtract $ - $ to get zero and select 2 digits but activate one of them.

Sorry but I'm just beginning to learn mobiflight.
2018-08-22 18:04
Avatar
StephanHo
From: EDDG, Germany
Posts: 1867
Supporter
Well, the 5th digit of the Altitude is always 0.

You can also enter only a 0 instead of $ - $. It does not change anything in the presentation.

The 2nd digit is the blank space you want to have between the digits. You can also take only 1 place there and then leave the first inactive at the V / S.
[Last edited by StephanHo, 2018-08-22 20:38]
Grüße,
Stephan (Time: UTC+2)
2018-08-22 18:12
Avatar
bob755
Posts: 24
iconStephanHo:

Well, the 5th digit of the Altitude ad is always 0.



Yes of course!

Thanks very much for your help
2018-08-22 18:18
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
I hope for Stephan it is ok if i correct the guide a little bit.
Whatever all is working the "technic" is a bit to difficult in that case i think !

Basicly we have a simple Rule !
A Config support the Data only to ONE Max7219 Tube .

If you need to Split up a Value over 2 Tubes you need TWO Configs ....So every Config control its own tube ... And the Value must be also manual manipulated!
So for example 12345 need to be split in 2 Configs C1 bring "1234" on Tube 1 ..... and C2 bring "5" on tube 2
So it`s our "Job" to use math calculation or some magic tricks to make 1234 from 12345 or 5 out of 12345


*****

NOW.... In Most Situations this is not easy.... Mostly we need to think about difficult math logics like %Modulo ... Round and so on.

But in THAT Case the solutuion is simple!

For the Left 4 Diggits you need to do nothing :P You just activate the 4 Diggits you need.... Mobiflight simply "ignore" numbers that not can be shown.....
For example you have Value of 12345 and use just 4 Digits on Display then it will show 1234 ( 5 is lost cause there are not enough diggits to show it )
((Only Problem can be if ALT is below 10.000 Maby the Display is pushed 1 Part to the left.... Check this out with the Left Padding Function ))

For the 5th Diggit Stephan also give the solution.... Use in Transform simply "0" instead of Dollar..... The last Diggit in a MCP Altitude is always 0 !
Alternate you can readout a not used offset for that.... Like 66c0 . If offset is not used then it´s always "0" Zero. Then you need no compare/Transform finaly.


If you need that stuff for more complex Displays (this ALT Situatuation was just lucky to be easy) and you have problems... Ask us. We can Help You !
Good Luck !
2018-08-29 00:19
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
iconbob755:

Thanks very much to both of you for the valuable help.

Just a subsiduary question.. Do you know how to read the APU EGT? I cant find any offset for that in the PMDG documentation.




648C 4Byte FLT32 APU_EGTNeedle


Typ FLOAT Size 4 BYTE Value is Decimal.... Take care and Multiply/Round it if you need it for a gauge with motors !
Good Luck !
2018-09-01 20:22
Avatar
bob755
Posts: 24
OK thanks. I missed it!
2018-09-03 11:58
icon