• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Combining 4 Magnetos to 1 Master

Messages
14
Country
denmark
I'm not sure if this is possible, but I think it should be and so I thought I'd ask here for some guidance.

If an aircraft has 4 engines with 4 separate and individual magneto switches, 1 switch per engine, would it be possible to code a so-called master switch, one master switch that has an On Off function and with a simple click either toggles the actual status of all of the magnetos to either Off or On?

This is the code I currently have for the magnetos:

XML:
            <Component ID="Magnetos">
                <UseTemplate Name="ASOBO_ELECTRICAL_Switch_Magneto_Template">
                    <NODE_ID>ENGINE_Switch_Magneto_1</NODE_ID>
                    <ANIM_NAME>ENGINE_Switch_Magneto_1</ANIM_NAME>
                    <PART_ID>ENGINE_Switch_Magneto</PART_ID>
                    <ID>1</ID>
                    <SWITCH_DIRECTION>Horizontal</SWITCH_DIRECTION>
                    <ARROW_TYPE>Curved</ARROW_TYPE>
                    <TYPE>OFF_L_R_BOTH</TYPE>
                    <NUMSTATES>4</NUMSTATES>
                    <INDEX_OFF>0</INDEX_OFF>
                    <INDEX_LEFT>1</INDEX_LEFT>
                    <INDEX_RIGHT>2</INDEX_RIGHT>
                    <INDEX_BOTH>3</INDEX_BOTH>
                </UseTemplate>
                <UseTemplate Name="ASOBO_ELECTRICAL_Switch_Magneto_Template">
                    <NODE_ID>ENGINE_Switch_Magneto_2</NODE_ID>
                    <ANIM_NAME>ENGINE_Switch_Magneto_2</ANIM_NAME>
                    <PART_ID>ENGINE_Switch_Magneto</PART_ID>
                    <ID>2</ID>
                    <SWITCH_DIRECTION>Horizontal</SWITCH_DIRECTION>
                    <ARROW_TYPE>Curved</ARROW_TYPE>
                    <TYPE>OFF_L_R_BOTH</TYPE>
                    <NUMSTATES>4</NUMSTATES>
                    <INDEX_OFF>0</INDEX_OFF>
                    <INDEX_LEFT>1</INDEX_LEFT>
                    <INDEX_RIGHT>2</INDEX_RIGHT>
                    <INDEX_BOTH>3</INDEX_BOTH>
                </UseTemplate>
                <UseTemplate Name="ASOBO_ELECTRICAL_Switch_Magneto_Template">
                    <NODE_ID>ENGINE_Switch_Magneto_3</NODE_ID>
                    <ANIM_NAME>ENGINE_Switch_Magneto_3</ANIM_NAME>
                    <PART_ID>ENGINE_Switch_Magneto</PART_ID>
                    <ID>3</ID>
                    <USE_STARTER>False</USE_STARTER>
                    <SWITCH_DIRECTION>Horizontal</SWITCH_DIRECTION>
                    <ARROW_TYPE>Curved</ARROW_TYPE>
                    <TYPE>OFF_L_R_BOTH</TYPE>
                    <NUMSTATES>4</NUMSTATES>
                    <INDEX_OFF>0</INDEX_OFF>
                    <INDEX_LEFT>1</INDEX_LEFT>
                    <INDEX_RIGHT>2</INDEX_RIGHT>
                    <INDEX_BOTH>3</INDEX_BOTH>
                </UseTemplate>
                <UseTemplate Name="ASOBO_ELECTRICAL_Switch_Magneto_Template">
                    <NODE_ID>ENGINE_Switch_Magneto_4</NODE_ID>
                    <ANIM_NAME>ENGINE_Switch_Magneto_4</ANIM_NAME>
                    <PART_ID>ENGINE_Switch_Magneto</PART_ID>
                    <ID>4</ID>
                    <USE_STARTER>False</USE_STARTER>
                    <SWITCH_DIRECTION>Horizontal</SWITCH_DIRECTION>
                    <ARROW_TYPE>Curved</ARROW_TYPE>
                    <TYPE>OFF_L_R_BOTH</TYPE>
                    <NUMSTATES>4</NUMSTATES>
                    <INDEX_OFF>0</INDEX_OFF>
                    <INDEX_LEFT>1</INDEX_LEFT>
                    <INDEX_RIGHT>2</INDEX_RIGHT>
                    <INDEX_BOTH>3</INDEX_BOTH>
                </UseTemplate>

My thought was that the above could possibly be combined in one master switch, I'm not sure how, maybe something along these lines:

XML:
            <UseTemplate Name="DAISY_ENGINE_MASTER_Switch_Magneto_Template"/>       
            <Component ID="DAISY_ENGINE_MASTER_Switch_Magneto" Node="DAISY_ENGINE_MASTER_Switch_Magneto">
            <UseTemplate Name="ASOBO_GT_Switch_Code">
                <ANIM_NAME>DAISY_ENGINE_MASTER_Switch_Magneto</ANIM_NAME>
                <PART_ID>DAISY_ENGINE_MASTER_Switch_Magneto</PART_ID>
                <ANIM_CODE>(A:ENGINE_Switch_Magneto_1, Bool) 100 *</ANIM_CODE>
                <ANIM_CODE>(A:ENGINE_Switch_Magneto_2, Bool) 100 *</ANIM_CODE>
                <ANIM_CODE>(A:ENGINE_Switch_Magneto_3, Bool) 100 *</ANIM_CODE>
                <ANIM_CODE>(A:ENGINE_Switch_Magneto_4, Bool) 100 *</ANIM_CODE>
                <LEFT_SINGLE_CODE>(&gt;K:ENGINE_MASTER_MAGNETO_TOGGLE)</LEFT_SINGLE_CODE>
                <TOOLTIP_TITLE>@TT_Package.ENGINE_MAGNETO_MASTER_TITLE</TOOLTIP_TITLE>
                <TOOLTIP_ID>@TT_Package.ENGINE_MAGNETO_MASTER_ACTION</TOOLTIP_ID>
            </UseTemplate>
            </Component>
            </UseTemplate>

This would be with DAISY_ENGINE_MASTER_Switch_Magneto having been defined in the model as the master magneto switch, that just has an On or Off setting. So regardless of the current setting of any of the 4 individual magneto switches, the one magneto master switch would always override the status of the 4 individual magneto switches, so that all four engines cut and turn off when the master magneto switch is turned to Off.

Any help and guidance is much appreciated.

Anna
 

DragonflightDesign

Resource contributor
Messages
936
Country
northernireland
I don't do XML but I did face the same problem in my last project. What I did was to separate the display from the actual magneto switching action so that you could twist and turn the switches as much as you liked, but the actual mag left/right/both code was only triggered when the master switch was on.
 
Top