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

FSXA Mixture contol 10% to 100% only

Messages
160
Country
germany
In my Turboprob Soloy Mark 1 and 2 projects I am thinking about a Ground/Idle control gauge. It seems, the solution can be solved with mixture control. Stock mixture GENERAL ENG MIXTURE LEVER POSITION:1 is working fine. However - if it goes to 0 engine is shut off.

But I have no idea to create a control gauge that begins with 10 percent and ends with 100 %. Both, modeldev xml and switchable gauge xml codes are needed.

Is there a solution?

Thomas
 
An easy solution would be this gauge running in the background, which will reset the mixture lever to 12% whenever it tries to go below that value.

Code:
<Gauge>
<Element>
<Select>
<Value>
(A:GENERAL ENG MIXTURE LEVER POSITION:1, percent) 12 &lt;
if{ 0.12 16383 * (>K:AXIS_MIXTURE1_SET) }
</Value>
</Select>
</Element>
</Gauge>
 
Note that a joystick mixture control lever will be able to override gauges, at least for short periods of time.
 
Thank you for your anwers, however I am looking for a simple switch - but I have no idea to combine the L: in the <click> area with the mixture control... The switch itself works with no problems...

Code:
<Gauge Name="Throttle_SET" Version="1.0">

  <Element>
    <Select>
       <Value>(L:Dummy_throttleset, enum)</Value>
       <Case Value="0">
         <Image Name="throttle_set_off.bmp"/>
       </Case>
       <Case Value="1">
         <Image Name="throttle_set_on.bmp"/>
       </Case>
    </Select>
  </Element>

  <Mouse>
     <Tooltip>Ground Flight Idle</Tooltip>
  <Cursor Type="Hand"/>
  <Click> (L:Dummy_throttleset, enum) ! (&gt;L:Dummy_throttleset, enum)</Click>
  </Mouse>
</Gauge>

Case Value = 0 should be mixture 10 percent, case Value =1 running mixture to 100 %.

Thomas
 
In that case, the controller gauge will look like this:

Code:
<Gauge>
<Element>
<Select>
<Value>
(L:Dummy_throttleset, enum) 0 ==
(A:GENERAL ENG MIXTURE LEVER POSITION:1, percent) 11 != and
if{ 0.11 16383 * (>K:AXIS_MIXTURE1_SET) }
(L:Dummy_throttleset, enum) 1 ==
(A:GENERAL ENG MIXTURE LEVER POSITION:1, percent) 100 &lt; and
if{ 1.00 16383 * (>K:AXIS_MIXTURE1_SET) }
</Value>
</Select>
</Element>
</Gauge>
 
Yes, it works! But in my Soloy the automatic engine start via strg+E is not working anymore...
 
I thought that engine had power (throttle) and Condition (mixture) controls. That is what the stock King Air has and since it is a turboprop, setting the mixture to above the cut-off setting (about 5%) reduces RPM and Torque which puts it in the Ground Idle position. So You do not need a gauge, just use the Condition lever like in the real plane
Roy
 
Yes, it works! But in my Soloy the automatic engine start via strg+E is not working anymore...

That's because mixture is depending on the status of your L: var now. Mixture control keys also won't work anymore. You need to catch any mixture-related (key) events and then set your L: var accordingly.

Something like this:
Code:
<Gauge Name="Mixture" Version="1.0">
<Element>
<Select>
<Value>
(L:Dummy_throttleset, enum) 0 ==
(A:GENERAL ENG MIXTURE LEVER POSITION:1, percent) 11 != and
if{ 0.11 16383 * (>K:AXIS_MIXTURE1_SET) }
(L:Dummy_throttleset, enum) 1 ==
(A:GENERAL ENG MIXTURE LEVER POSITION:1, percent) 100 &lt; and
if{ 1.00 16383 * (>K:AXIS_MIXTURE1_SET) }
</Value>
</Select>
</Element>
<!-- Mixture Control -->
<Keys>
<On Event="MIXTURE_RICH">
(L:Dummy_throttleset, enum) 1 != if{ 1 (>L:Dummy_throttleset, enum) }
</On>
<On Event="MIXTURE_INCR">
(L:Dummy_throttleset, enum) 1 != if{ 1 (>L:Dummy_throttleset, enum) }
</On>
<On Event="MIXTURE_INCR_SMALL">
(L:Dummy_throttleset, enum) 1 != if{ 1 (>L:Dummy_throttleset, enum) }
</On>
<On Event="MIXTURE_DECR">
(L:Dummy_throttleset, enum) 0 != if{ 0 (>L:Dummy_throttleset, enum) }
</On>
<On Event="MIXTURE_DECR_SMALL">
(L:Dummy_throttleset, enum) 0 != if{ 0 (>L:Dummy_throttleset, enum) }
</On>
<On Event="MIXTURE_LEAN">
(L:Dummy_throttleset, enum) 0 != if{ 0 (>L:Dummy_throttleset, enum) }
</On>
<On Event="MIXTURE1_RICH">
(L:Dummy_throttleset, enum) 1 != if{ 1 (>L:Dummy_throttleset, enum) }
</On>
<On Event="MIXTURE1_INCR">
(L:Dummy_throttleset, enum) 1 != if{ 1 (>L:Dummy_throttleset, enum) }
</On>
<On Event="MIXTURE1_INCR_SMALL">
(L:Dummy_throttleset, enum) 1 != if{ 1 (>L:Dummy_throttleset, enum) }
</On>
<On Event="MIXTURE1_DECR">
(L:Dummy_throttleset, enum) 0 != if{ 0 (>L:Dummy_throttleset, enum) }
</On>
<On Event="MIXTURE1_DECR_SMALL">
(L:Dummy_throttleset, enum) 0 != if{ 0 (>L:Dummy_throttleset, enum) }
</On>
<On Event="MIXTURE1_LEAN">
(L:Dummy_throttleset, enum) 0 != if{ 0 (>L:Dummy_throttleset, enum) }
</On>
<On Event="ENGINE_AUTO_START">
(L:Dummy_throttleset, enum) 1 != if{ 1 (>L:Dummy_throttleset, enum) }
</On>
<On Event="ENGINE_AUTO_SHUTDOWN">
(L:Dummy_throttleset, enum) 0 != if{ 0 (>L:Dummy_throttleset, enum) }
</On>
</Keys>
</Gauge>

Note that any event pertaining to enrich or lean mixture will influence your mixture switch. The discrimination between global mixture events and events for engine 1 mixture is only present to cover users with multi-engine throttle quadrants.
Also note that you may incorporate any L: var into the auto start sequence.
 
Roy, the real Soloy Mark 1 is different to the most turboprobs - there is no condition lever. The second lever controls only propeller.

27714532ue.jpg


Bjöern, the gauge itself is working fine without autostart - with autostart, switch goes into flight idle and than sim freezes animations with no sound. You have to start sim again...

Thomas
 
Probably because the sim-internal start up logic clashes with the switch-mixture logic in the gauge and causes command flooding. I have no idea how to work around this. It's probably best to remove the autostart event trap.
 
Bjoern, I am with you - to ban autostart, is there a "fast" move, or should I have correct all other stuff like fuel_cutoff or starter switch etc.?
 
Autostart can't be blocked, but it won't work anyway if the mixture control gauge controls mixture anyway.
 
Hi,

Autostart can be blocked if you send another autostart command immediately after it is invoked by the user.

The trick is to be able to detect when the autostart is triggered (AFAIK not possible using XML). I use a C gauge custom coded for me.
 
This might work.

Code:
...
<On Event="ENGINE_AUTO_START">
(>K:ENGINE_AUTO_START)
</On>
...
 
Hi Thomas,

If I understand you correctly, you want to control the engine Mixture with a VC lever to control a GroundIdle engine state.
So if the lever is fully pushed, Mixture is forced 100% and if the lever is fully pulled, Mixture is forced to 10%; and lineairly in between......Right ??
The following gauge does this:

Code:
<Gauge>

<Element>
  <Select>
    <Value>
      (A:GENERAL ENG COMBUSTION:1,bool)
      (A:GENERAL ENG MIXTURE LEVER POSITION:1,percent) 0.1 &gt; &amp;&amp;
      if{
        100 (L:GroundIdle,number) 90 * - s10 (A:GENERAL ENG MIXTURE LEVER POSITION:1,percent) - abs 0.1 &gt;
        if{ l10 163.84 * (>K:MIXTURE1_SET) }
      }
    </Value>
  </Select>
</Element>

</Gauge>
This code assumes you animate/control your VC lever in the modeldef.xml code with:
- (L:GroundIdle,number) = 0 (fully pushed down).
- (L:GroundIdle,number) = 1 (fully pulled back).
- And any value of the lever lineairly between 0 and 1, depending on it´s position.

This will allow for EngineAutoStart event/command when engine is Off.

As said above, the problem with EngineAutoStart events is, that FSX then controls the Mixture function too.
So this code only forces the Mixture function (based on your VC lever position) when the engine is actually running.
And allows the engine to be shutdown via a MixtureLean event/command too.

This code also prevents "event flooding", and eliminates the need to monitor/trap EngineAutoStart events.

Hope this solves your problem ...

Rob
 
PS: just noted that this GroundIdle feature is just a simple On/Off switch, not a lever.
But my above code works for a On/Off switch too (same formula).
So when switch is Off (0, default at aircraft load, pushed) Mixture is set to 100%.

Rob
 
Thank you Rob and Bjoern,
I will take a closer look on it tomorrow - just arrived back from Spain this evening.

Thomas
 
Hi Rob,

it seems, that the control gauge works, but I need a click event for the switch. I am sure, something like

Code:
<Click>(L:Dummy_throttleset, enum) ! (&gt;L:Dummy_throttleset, enum) 1 (L:GroundIdle,number)</Click>

is not working...

Thomas
 
Last edited:
Why not this instead?
Code:
<click>(L:GroundIdle,bool) ! (>L:GroundIdle,bool)[</click>
By the way, please place all XML script in a "Code Box" so that the forum doesn't convert certain characters into emojies! :teacher:

sYVpU.png
 
As Bill said...

Just use the same Lvar in the clickspot code and the gauge code that controls the mixture.

Rob
 
Back
Top