• 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.

Left and Right magnetos?

Messages
10,163
Country
us-arizona
Hey all,

If I have a plane with left and right Magnetos, are there default mag switches available?

I see these in the list;

switch_ignition_magnetos
switch_ignition_magnetos0
switch_ignition_magnetos1
switch_ignition_magnetos2
switch_ignition_magnetos3

....and....


switch_ignition_magnetos_dc3
switch_ignition_magnetos0_dc3
switch_ignition_magnetos1_dc3
switch_ignition_magnetos_spirit

These two didnt work;
switch_ignition_magnetos
switch_ignition_magnetos0

They are from the top.

I hope maybe I am missing them.


Bill
 
Bill,

I know for FSX there isn't code available by default however it's easy enough to roll your own. Also some of the default FSX code for magnetos appears to be wrong in terms of what it does and what it says it's for.

If the stuff below copies correctly it's for separate left and right magnetos on the one engine, i.e. you can individually select which magnetos are working.

If what you want is code to switch on the magnetos on the left engine and then the right engine, I don't have any to hand but it is possible.

Code:
<PartInfo>
        <Name>switch_ignition_magneto_left</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>(A:RECIP ENG LEFT MAGNETO:1, bool) 50 *</Code>
            </Parameter>
        </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipID>TOOLTIPTEXT_MAGNETO_SWITCH_LEFT</TooltipID>
      <MouseFlags>LeftSingle</MouseFlags>
      <CallbackCode>
        (&gt;K:MAGNETO1_LEFT)
      </CallbackCode>
    </MouseRect>
    </PartInfo>

    <PartInfo>
        <Name>switch_ignition_magneto_right</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>(A:RECIP ENG RIGHT MAGNETO:1, bool) 50 *</Code>
            </Parameter>
        </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipID>TOOLTIPTEXT_MAGNETO_SWITCH_RIGHT</TooltipID>
      <MouseFlags>LeftSingle</MouseFlags>
      <CallbackCode>
        (&gt;K:MAGNETO1_RIGHT)
      </CallbackCode>
    </MouseRect>
    </PartInfo>
 
Many thanks Skippy!

Thats what I meant was lefthand and righthand magnetos on a single engine plane. I cant believe they dont have that if they have it on the ignition switch. Oh well. Thankful for what we have.


Bill
 
Oh Bill, every recip engine has two magnetos: left and right!

The default for a single engined a/c or the left engine on a twin a/c is:

switch_ignition_magnetos0

For the right engine on a twin a/c the default is:

switch_ignition_magnetos1

In both cases, the sequence is:

0 = off
1 = left mag
2 = right mag
3 = both
4 = start

If you have separate switches for left and right magnetos, then "Skippy's" script is called for.
 
In that case, you'll need something like I used in the C310. You will also need to add some "logic" to your script update polygon to account for the four possible conditions: OFF - LEFT - RIGHT - BOTH

Code:
  <PartInfo>
    <Name>Logic_Check</Name>
    <Visibility>
      <Parameter>
        <Code>
            (L:LeftMag, number) 0 ==
            (L:RightMag, number) 0 ==
            and if{ (>K:MAGNETO1_OFF) }

            (L:LeftMag, number) 1 ==
            (L:RightMag, number) 0 ==
            and if{ (>K:MAGNETO1_LEFT) }

            (L:LeftMag, number) 0 ==
            (L:RightMag, number) 1 ==
            and if{ (>K:MAGNETO1_RIGHT) }

            (L:LeftMag, number) 1 ==
            (L:RightMag, number) 1 ==
            and if{ (>K:MAGNETO1_BOTH) }
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>

  <PartInfo>
    <Name>C310_switch_LeftMag</Name>
    <AnimLength>50</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:LeftMag, number) 50 *
        </Code>
        <Lag>400</Lag>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipText>Engine 1 LeftMag</TooltipText>
      <CallbackCode>
        (L:LeftMag, number) ! (>L:LeftMag, number)
        1 (>L:XMLSND1,bool)
      </CallbackCode>
    </MouseRect>
  </PartInfo>

  <PartInfo>
    <Name>C310_switch_RightMag</Name>
    <AnimLength>50</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:RightMag, number) 50 *
        </Code>
        <Lag>400</Lag>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipText>Engine 1 RightMag</TooltipText>
      <CallbackCode>
        (L:RightMag, number) ! (>L:RightMag, number)
        1 (>L:XMLSND1,bool)
      </CallbackCode>
    </MouseRect>
  </PartInfo>
 
The K:MAGNETO1_RIGHT and K:MAGNETO1_LEFT commands always seem to toggle both magnetos so they are useless.


The below code works with a 4 position magneto switch.
0: magnetos off
1: left magneto
2: right magneto
3: both magnetos

Uses left-clicks to toggle up, right-click to toggle down.
Also retrievs it's state from the sim if needed, means it will be set to off if the flight has such a state saved in it.

This is for engine 1.
To make it work with engine 2 etc just change the index af the A:Vars and the K:MAGNETO1_SET command.


Code:
    <PartInfo>
     <Name>bf108_magnetschalter</Name>
     <AnimLength>75</AnimLength>
     <Animation>
        <Parameter>
        <Code>(A:Recip eng left magneto:1,bool) 2 * (A:Recip eng right magneto:1,bool) + 25 *</Code>
                <Lag>200</Lag> 
        </Parameter>
     </Animation>
         <MouseRect> 
            <Cursor>Hand</Cursor> 
            <HelpID>HELPID_GAUGE_MAGNETO_SWITCH</HelpID>
            <TooltipID>TOOLTIPTEXT_MAGNETO_SWITCH</TooltipID> 
           <MouseFlags>LeftSingle+RightSingle</MouseFlags> 
           <CallbackCode>                  
              (M:Event) 'RightSingle' scmp 0 ==   
                if{ (L:bf108magnetschalter,enum) -- 0 max (&gt;L:bf108magnetschalter,enum) } 
              (M:Event) 'LeftSingle' scmp 0 ==   
                if{ (L:bf108magnetschalter,enum) ++ 3 min (&gt;L:bf108magnetschalter,enum) }                           
              (L:bf108magnetschalter,enum) 3 == if{ 3 (&gt;K:MAGNETO1_SET) }                           
              (L:bf108magnetschalter,enum) 2 == if{ 2 (&gt;K:MAGNETO1_SET) }               
              (L:bf108magnetschalter,enum) 1 == if{ 1 (&gt;K:MAGNETO1_SET) }                       
              (L:bf108magnetschalter,enum) 0 == if{ 0 (&gt;K:MAGNETO1_SET)  }            
           </CallbackCode>
     </MouseRect> 
   </PartInfo>
 
Last edited:
The K:MAGNETO1_RIGHT and K:MAGNETO1_LEFT commands always seem to toggle both magnetos so they are useless.[/CODE]

That's a curious observation, Mathias...

...given that the script I posted has been working as designed for the past many months in the MilViz C310R release. :confused:

It is of course a trivial matter to replace the commands in the logic section of the working script I posted with discrete n (&gt;K:MAGNETO1_SET) events.

The scripts I posted assume separate toggle switches for left and right magnetos, and a separate starter button or 3-position key switch.
 
Hi Bill,

that's why I said "seem". At least I didn't have luck with it.
The good thing about my code really is that its a lot shorter and also works with CTRL+E, but then again it's for an oldschool 4 position magneto switch. ;)
 
Last edited:
Back
Top