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

MSFS20 A model behavior to shortcut "CTRL+E" event

Lagaffe

Resource contributor
Messages
900
Country
france
Hi,

My aim to usesome codes, on a twin engine (Canso PBY-5A), to start:
1 - the right propeller with a very small speed (only the right engine has a hydraulic pump),
2 - then start the right engine,
- wait some instants and
- make 1 /2 operations for the left engine.

A) Reading the XML files of the TBM930, I have seen this particular code:
<Component ID="MISC">
<UseInputEvent ID="PROCEDURE">
<PROCEDURE_ID>AUTOSTART</PROCEDURE_ID>
<ON_AUTOSTART>
(&gt;B:ELECTRICAL_Crash_Lever_Up)
(&gt;B:ELECTRICAL_Battery_1_Battery)
(&gt;B:ELECTRICAL_Alternator_1_Main)
(&gt;B:ENGINE_Ignition_1_Auto)
(&gt;B:ENGINE_Starter_1_On)
(&gt;B:ENGINE_Throttle_Idle)
(&gt;B:FUEL_Pump_1_Auto)
(&gt;B:FUEL_Selector_1_Left)
</ON_AUTOSTART>
<ON_AUTOSTOP>
(&gt;B:ELECTRICAL_Battery_1_Off)
(&gt;B:ELECTRICAL_Alternator_1_Off)
(&gt;B:ENGINE_Throttle_Cutoff)
(&gt;B:ENGINE_Starter_1_Off)
(&gt;B:ENGINE_Ignition_1_Off)
(&gt;B:FUEL_Pump_1_Off)
(&gt;B:FUEL_Selector_1_Off)
</ON_AUTOSTOP>
</UseInputEvent>
</Component>

Does it possible using this PROCEDURE example to write some codes using L:vars or A:vars and events to by-pass the CTRL+E command ?
I can guess what the use is but:
- I haven't found any documentation on B:var or how to create them, initialize them
- Maybe it is possible to do what I would like to do by using simple A:vars or L:vars.
Today, I spend my afternoon, making some tests but without success .

B) I have create a simple gauge to capture the event and launch my commands but no success:
<Gauge Name="Logics" Version="1.0">

<Update Frequency="18"/>

<!-- KEYTRAPS -->
<!-- =========== -->
<Keys>

<On Event="ENGINE_AUTO_START">
(L:pBV_AutoStart, bool) ! (&gt;L:pBV_AutoStart, bool)
</On>

</Keys>

<!-- AUTOSTART -->
<!-- ============ -->

<Element>
<Select>
<Value>
(L:pBV_AutoStart, bool)
if{

<!-- Check the mixture status -->
(A:GENERAL ENG FUEL VALVE:1,bool) ! if{ (>K:TOGGLE_FUEL_VALVE_ENG1) }

<!-- Check the magneto status -->
(A:MASTER IGNITION SWITCH, bool) ! if{ (>K:MAGNETO1_START)

<!-- Check the mixture status -->
(A:GENERAL ENG MIXTURE LEVER POSITION:1, percent) 100 != if{ (>K:MIXTURE1_RICH) }

<!-- Check the status again and engage starter -->
(A:GENERAL ENG FUEL VALVE:1,bool) (A:GENERAL ENG MIXTURE LEVER POSITION:1, percent) 80 &gt; and (A:GENERAL ENG STARTER:1, bool) ! and
if{ (>K:TOGGLE_STARTER1) }

<!-- Disengage starter when engine is running -->
(A:GENERAL ENG COMBUSTION:1, bool) (A:GENERAL ENG STARTER:1, bool) and
if{ (>K:TOGGLE_STARTER1) 0 (&gt;L:pBV_AutoStart, bool) }
}
</Value>
</Select>
</Element>

</Gauge>
My aim to use this "UseInpuEvent", on a twin engine (Canso PBY-5A), I wanted to start
1 - the right propeller with a very small speed (only the right engine has a hydraulic pump),
2 - then start the right engine,
- wait some instants and
- make 1 /2 operations for the left engine.

If someone has yet use this model behavior or has some knowledges, I was very interested.
This example can be also interesting for a lot of people.
Thanks.
 
Last edited:
You may like to use Presets.

First of all you need to define the Preset (change the InputEvent ID to you own, everything else can stay the same). This code is a simple, generic preset code. It does mean that the code to call the preset is quite long, but it also means that this code will work for 99% of your needs without needing to decipher the insanely complex presets that Asobo has made.

Code:
    <InputEvent ID = "ANTSDRIFTEREVENTS">
        <Presets>
            <Preset ID="#PRESET_NAME#">
                <Tooltip>
                    <Icon>#TT_ICON#</Icon>
                    <Interaction>#TT_INTERACTION#</Interaction>
                    <InteractionLockable>#TT_INTERACTIONLOCKABLE#</InteractionLockable>
                    <TTDescription RPN="True">#TT_DESCRIPTION#</TTDescription>
                    <TTValue RPN="True">#TT_VALUE#</TTValue>
                </Tooltip>
                <Value>
                    <Units>#VAL_UNITS#</Units>
                    <Code>#VAL_CODE#</Code>
                    <Init>#VAL_INIT#</Init>
                    <WatchVars>
                        <Condition Check="VAL_LOCALVAR">
                            <True>
                                <LocalVar ID="#VAL_LOCALVAR#"/>                          
                            </True>
                        </Condition>
                        <Condition Check="VAL_LOCALVAR_2">
                            <True>
                                <LocalVar ID="#VAL_LOCALVAR_2#"/>                          
                            </True>
                        </Condition>
                        <Condition Check="VAL_SIMVAR">
                            <True>
                                <SimVar ID="#VAL_SIMVAR#"/>                          
                            </True>
                        </Condition>
                        <Condition Check="VAL_SIMVAR_2">
                            <True>
                                <SimVar ID="#VAL_SIMVAR_2#"/>                          
                            </True>
                        </Condition>
                    </WatchVars>
                </Value>
                <Inc>
                    <Code>#INC_CODE#</Code>
                    <Parameters>
                        <Param Type="Float" RPN="True">#INC_PARAM#</Param>
                    </Parameters>
                    <Bindings>
                        <Loop>
                            <Setup>
                                <Param>ID</Param>
                                <From>1</From>
                                <Inc>1</Inc>
                                <While>
                                    <Arg NotEmpty="INC_BINDING_#ID#"/>
                                </While>
                            </Setup>
                            <Do>
                                <Parameters Type="Override" Lifetime="Iteration">
                                    <INC_BINDING Process="Param">INC_BINDING_#ID#</INC_BINDING>
                                    <INC_BINDINGVALUE Process="Param">INC_BINDINGVALUE_#ID#</INC_BINDINGVALUE>
                                </Parameters>
                                <Binding EventID="#INC_BINDING#">
                                    <Param>#INC_BINDINGVALUE#</Param>
                                </Binding>                          
                            </Do>
                        </Loop>              
                    </Bindings>
                </Inc>
                <Dec>
                    <Code>#DEC_CODE#</Code>
                    <Parameters>
                        <Param Type="Float" RPN="True">#DEC_PARAM#</Param>
                    </Parameters>
                    <Bindings>
                        <Loop>
                            <Setup>
                                <Param>ID</Param>
                                <From>1</From>
                                <Inc>1</Inc>
                                <While>
                                    <Arg NotEmpty="DEC_BINDING_#ID#"/>
                                </While>
                            </Setup>
                            <Do>
                                <Parameters Type="Override" Lifetime="Iteration">
                                    <DEC_BINDING Process="Param">DEC_BINDING_#ID#</DEC_BINDING>
                                    <DEC_BINDINGVALUE Process="Param">DEC_BINDINGVALUE_#ID#</DEC_BINDINGVALUE>
                                </Parameters>
                                <Binding EventID="#DEC_BINDING#">
                                    <Param>#DEC_BINDINGVALUE#</Param>
                                </Binding>                          
                            </Do>
                        </Loop>              
                    </Bindings>
                </Dec>
                <Set>
                    <Code>#SET_CODE#</Code>
                    <Parameters>
                        <Param Type="Float" RPN="True">#SET_PARAM#</Param>
                    </Parameters>
                    <Bindings>
                        <Loop>
                            <Setup>
                                <Param>ID</Param>
                                <From>1</From>
                                <Inc>1</Inc>
                                <While>
                                    <Arg NotEmpty="INC_BINDING_#ID#"/>
                                </While>
                            </Setup>
                            <Do>
                                <Parameters Type="Override" Lifetime="Iteration">
                                    <INC_BINDING Process="Param">SET_BINDING_#ID#</INC_BINDING>
                                    <INC_BINDINGVALUE Process="Param">SET_BINDINGVALUE_#ID#</INC_BINDINGVALUE>
                                </Parameters>
                                <Binding EventID="#SET_BINDING#">
                                    <Param>#SET_BINDINGVALUE#</Param>
                                </Binding>                          
                            </Do>
                        </Loop>              
                    </Bindings>
                </Set>
            </Preset>
        </Presets>
    </InputEvent>

Then you call your preset:

Code:
            <UseInputEvent ID="ANTSDRIFTEREVENTS">
                <PRESET_NAME>tm_Mags_rear_left</PRESET_NAME>
                <TT_ICON>PUSH</TT_ICON>
                <TT_INTERACTION>PRIMARY_DOWN</TT_INTERACTION>
                <TT_INTERACTIONLOCKABLE>LOCK</TT_INTERACTIONLOCKABLE>
                <TT_DESCRIPTION>(R:1:@TT_Package.ENGINE_MAGNETO_STATE_ACTION_SET_SOLO)</TT_DESCRIPTION>
                <TT_VALUE>(L:tm_Mags_rear_left,number) if{ @TT_On } els{ @TT_Off }</TT_VALUE>
                <INC_CODE>(L:tm_Mags_rear_left,number) 0 == if{ (&gt;B:tm_Mags_rear_left_Set) }</INC_CODE>
                <INC_PARAM>p0</INC_PARAM>
                <DEC_CODE>(L:tm_Mags_rear_left,number) 1 == if{ (&gt;B:tm_Mags_rear_left_Set) }</DEC_CODE>
                <DEC_PARAM>p0</DEC_PARAM>
                <SET_CODE>
                    (L:tm_Mags_rear_left,number) 0 == if{ 1 (&gt;L:tm_Mags_rear_left,number) } els{ 0 (&gt;L:tm_Mags_rear_left,number) }
               
                    (L:tm_Prefs_independent_mags,number) !
                    if{
                        (L:tm_Mags_rear_right,number) (&gt;L:tm_Mags_front_right,number)
                        (L:tm_Mags_rear_left,number) (&gt;L:tm_Mags_front_left,number)
                    }
                    (L:tm_Mags_rear_left,number) (L:tm_Mags_front_left,number) + 2  ==  (L:tm_Mags_rear_right,number) (L:tm_Mags_front_right,number) + 2  ==  &amp; if{ 3 (&gt;K:MAGNETO1_SET) }
                    (L:tm_Mags_rear_left,number) (L:tm_Mags_front_left,number) + 2  ==  (L:tm_Mags_rear_right,number) (L:tm_Mags_front_right,number) + 2 &lt; &amp; if{ 2 (&gt;K:MAGNETO1_SET) }
                    (L:tm_Mags_rear_left,number) (L:tm_Mags_front_left,number) + 2 &lt; (L:tm_Mags_rear_right,number) (L:tm_Mags_front_right,number) + 2  ==  &amp; if{ 1 (&gt;K:MAGNETO1_SET) }
                    (L:tm_Mags_rear_left,number) (L:tm_Mags_front_left,number) + 2 &lt; (L:tm_Mags_rear_right,number) (L:tm_Mags_front_right,number) + 2 &lt; &amp; if{ 0 (&gt;K:MAGNETO1_SET) }
                </SET_CODE>
                <SET_PARAM>p0</SET_PARAM>
                <SET_BINDING_1>MAGNETO_LEFT</SET_BINDING_1>
                 <SET_BINDINGVALUE_1>1</SET_BINDINGVALUE_1>
                <SET_BINDING_2>MAGNETO1_LEFT</SET_BINDING_2>
                 <SET_BINDINGVALUE_2>1</SET_BINDINGVALUE_2>
                <VAL_UNITS>bool</VAL_UNITS>
                <VAL_CODE>(O:Magneto_Left_Position)</VAL_CODE>
                <VAL_INIT>(A:RECIP ENG LEFT MAGNETO:1,bool) (&gt;L:tm_Mags_rear_left)</VAL_INIT>
                <VAL_SIMVAR>RECIP ENG LEFT MAGNETO:1</VAL_SIMVAR>
            </UseInputEvent>

UseInputEvent ID should match your InputEvent ID. PRESET_NAME should be unique.

The SET_BINDING parameters will capture MSFS events (in this case the magneto left commands) and if they are received it will perform the SET_CODE.

The code can also be run by:

Code:
1 (&gt;B:tm_Mags_rear_left_Set)

The B: event is the PRESET_NAME + either _Set, _Inc or _Dec

Notice how, in my example, the INC_CODE and DEC_CODE can both call the SET_CODE by setting the B: var

SDK link about presets:
 
Woouaaou ! It's a complete answer, thanks for your reply and all theses informations.

This morning I have try also to find some informations in the Q&A forum and the conclusion is also that the old FSX fashion "<On Keys>" is obsolete and Asobo doesn't want to work on it to bring us an easy solution to use.

I think I have two or three days of hard reading and headaches to read and understand all this.
So let's go.
I will try to supplement this thread with what I find and if possible outline the final solution I would implement ;)
 
I thought of another example, remember a few versions ago that Asobo broke a lot of throttles because, I think it was, the Throttle_Set command stopped working.

I built this preset to handle the throttle commands myself (this is based on the Asobo throttle preset but I've stripped out most of the junk)

Code:
    <InputEvent ID = "ANTSTHROTTLEEVENTS">
        <Presets>
            <Preset ID="#PRESET_NAME#">
                <Tooltip>
                    <Icon>#TT_ICON#</Icon>
                    <Interaction>#TT_INTERACTION#</Interaction>
                    <InteractionLockable>#TT_INTERACTIONLOCKABLE#</InteractionLockable>
                    <TTDescription RPN="True">#TT_DESCRIPTION#</TTDescription>
                    <TTValue RPN="True">#TT_VALUE#</TTValue>
                </Tooltip>
                <Value>
                    <Units>percent</Units>
                    <Code>(O:ENGINE_Throttle_1_Position)</Code>
                    <WatchVars>
                        <Simvar ID="GENERAL ENG THROTTLE LEVER POSITION:1"/>
                    </WatchVars>
                </Value>
                <Inc>
                    <Code>(A:GENERAL ENG THROTTLE LEVER POSITION:1, position 16k) p0 + 16384 / (&gt;B:ENGINE_Throttle_1_Set)</Code>
                    <Parameters>
                        <Param Type="Float" RPN="True">p0 256 *</Param>
                    </Parameters>
                    <Bindings>
                        <Binding EventID="THROTTLE_INCR"><!-- event manipulating all throttles (declared for each throttle preset) -->
                            <Param>1</Param>
                        </Binding>
                        <Binding EventID="THROTTLE_INCR_SMALL"><!-- event manipulating all throttles (declared for each throttle preset) -->
                            <Param>0.5</Param>
                        </Binding>
                        <Binding EventID="THROTTLE#THROTTLE_ID#_INCR">
                            <Param>1</Param>
                        </Binding>
                        <Binding EventID="THROTTLE#THROTTLE_ID#_INCR_SMALL">
                            <Param>0.5</Param>
                        </Binding>
                    </Bindings>
                </Inc>
                <Dec>
                    <Code>(A:GENERAL ENG THROTTLE LEVER POSITION:1, position 16k) p0 - 16384 / (&gt;B:ENGINE_Throttle_1_Set)</Code>
                    <Parameters>
                        <Param Type="Float" RPN="True">p0 256 *</Param>
                    </Parameters>
                    <Bindings>
                        <Binding EventID="THROTTLE_DECR"><!-- event manipulating all throttles (declared for each throttle preset) -->
                            <Param>1</Param>
                        </Binding>
                        <Binding EventID="THROTTLE_DECR_SMALL"><!-- event manipulating all throttles (declared for each throttle preset) -->
                            <Param>0.5</Param>
                        </Binding>
                        <Binding EventID="THROTTLE#THROTTLE_ID#_DECR">
                            <Param>1</Param>
                        </Binding>
                        <Binding EventID="THROTTLE#THROTTLE_ID#_DECR_SMALL">
                            <Param>0.5</Param>
                        </Binding>
                        <Binding EventID="FLAPS_INCR">
                            <Param>1</Param>
                        </Binding>
                    </Bindings>
                </Dec>
                <Set>
                    <Code>
                        p0 (&gt;O:thr_temp)
                        p0 (&gt;K:THROTTLE1_SET) l0 (&gt;O:ENGINE_Throttle_1_Position)
                    </Code>
                    <Parameters>
                        <Param Type="Float" RPN="True">p0 16384 *</Param>
                    </Parameters>
                    <Bindings>
                        <!-- Aliases -->
                        <Binding Alias="ENGINE_All_Throttle_Full_Forward"><!-- event manipulating all throttles (declared for each throttle preset) -->
                            <Param>1</Param>
                        </Binding>
                        <Binding Alias="ENGINE_All_Throttle_Full_Backward"><!-- event manipulating all throttles (declared for each throttle preset) -->
                            <Param>0</Param>
                        </Binding>
                        <Binding Alias="ENGINE_All_Throttle_Idle"><!-- event manipulating all throttles (declared for each throttle preset) -->
                            <Param>0</Param>
                        </Binding>
                        <Binding Alias="ENGINE_Throttle_1_Full_Forward">
                            <Param>1</Param>
                        </Binding>
                        <Binding Alias="ENGINE_Throttle_1_Full_Backward">
                            <Param>#LOWER_POSITION_PCT_OVER_100#</Param>
                        </Binding>
                        <Binding Alias="ENGINE_Throttle_1_Idle">
                            <Param>0</Param>
                        </Binding>
                        <!-- EventIDs -->
                        <Binding EventID="THROTTLE_FULL">
                            <Param>1</Param>
                        </Binding>
                        <Binding EventID="THROTTLE_CUT">
                            <Param>0</Param>
                        </Binding>
                        <Binding EventID="THROTTLE1_FULL">
                            <Param>1</Param>
                        </Binding>
                        <Binding EventID="THROTTLE1_CUT">
                            <Param>0</Param>
                        </Binding>
                        <Binding EventID="THROTTLE1_SET">
                            <Param Type="Float" RPN="True">p1 @S16KToS1</Param>
                        </Binding>
                        <Binding EventID="THROTTLE1_AXIS_SET_EX1">
                            <Param Type="Float" RPN="True">p1 @S16KTo01</Param>
                        </Binding>
                        <Binding EventID="AXIS_THROTTLE1_SET">
                            <Param Type="Float" RPN="True">p1 @S16KTo01</Param>
                        </Binding>
                        <Binding EventID="THROTTLE_SET">
                            <Param Type="Float" RPN="True">p1 @S16KToS1</Param>
                        </Binding>
                        <Binding EventID="THROTTLE_AXIS_SET_EX1">
                            <Param Type="Float" RPN="True">p1 @S16KTo01</Param>
                        </Binding>
                        <Binding EventID="AXIS_THROTTLE_SET">
                            <Param Type="Float" RPN="True">p1 @S16KTo01</Param>
                        </Binding>
                    </Bindings>
                </Set>
            </Preset>
        </Presets>
    </InputEvent>

You can see all the Binding events that this preset uses which captures all the possible ways to input throttle events and they all get processed and redirected into the p0 (&gt;K:THROTTLE1_SET). This is how Asobo handles the throttle, mixture and propeller inputs now. A bunch of Binding events collect the input events and process them into a final set code.


And this is how I call the Input Event:

Code:
        <Component ID="mousezone_throttle_rear" Node="mousezone_throttle_rear">
            <UseInputEvent ID="ANTSTHROTTLEEVENTS">
                <PRESET_NAME>ENGINE_Throttle_1</PRESET_NAME>
                <TT_ICON>MOVE_AXIS_Y</TT_ICON>
                <TT_INTERACTION>PRIMARY_DOWN+Y_AXIS</TT_INTERACTION>
                <TT_INTERACTIONLOCKABLE>Y_AXIS</TT_INTERACTIONLOCKABLE>
                <TT_DESCRIPTION>(R:1:@TT_Package.ENGINE_THROTTLE_ACTION_1ENG)</TT_DESCRIPTION>
                <TT_VALUE>(A:GENERAL ENG THROTTLE LEVER POSITION:1,percent) '%d%%' @sprintf</TT_VALUE>
            </UseInputEvent>
            <UseTemplate Name="ASOBO_GT_Lever_DraggingYAxis_Code">
                <HIGHLIGHT_NODE_ID>throttle_rear</HIGHLIGHT_NODE_ID>
                <TOOLTIP_TITLE>@TT_Package.ENGINE_THROTTLE_TITLE</TOOLTIP_TITLE>
                <TOOLTIP_ENTRY_0>ENGINE_Throttle_1</TOOLTIP_ENTRY_0>
                <UP_CODE>1 (&gt;B:ENGINE_Throttle_1_Inc)</UP_CODE>
                <DOWN_CODE>1 (&gt;B:ENGINE_Throttle_1_Dec)</DOWN_CODE>
            </UseTemplate>
        </Component>
 
Good example !
As I have buy the Twin Otter, I am reading theirs presets to have an other view. They also use Preser/InputEvent to manage "CTRL+E" workaround but it is very, very complex ... too many for my usage.
 
Hi,
After a lot of reading I think I have an idea to solve the problem of the "slow propeller start". As suggested by Anthony, I will rely on InputEvents but I will not modify the CTRL+E sequence.

In fact, it is the STARTER command that starts the engine so by defining a special choke: with three positions :
- 0: OFF
- 1: Normal
- 2: Special
I will be able to start the engine with the standard CTRL+E command but
- switching immediatly this modified choke to position 2,
- let a time configurable by a timer elapse and then at the expiry of this timer,
- I will switch back to the standard value of the choke (=1) and
- the engine should finally start.

By adding temperature conditions (as I made on the Menestrel HN-433) to lengthen or shorten the timer, I think I have isolated a solution to my problem.
 
Code:
        <Component ID="mousezone_throttle_rear" Node="mousezone_throttle_rear">
            <UseInputEvent ID="ANTSTHROTTLEEVENTS">
                <PRESET_NAME>ENGINE_Throttle_1</PRESET_NAME>
                <TT_ICON>MOVE_AXIS_Y</TT_ICON>
                <TT_INTERACTION>PRIMARY_DOWN+Y_AXIS</TT_INTERACTION>
                <TT_INTERACTIONLOCKABLE>Y_AXIS</TT_INTERACTIONLOCKABLE>
                <TT_DESCRIPTION>(R:1:@TT_Package.ENGINE_THROTTLE_ACTION_1ENG)</TT_DESCRIPTION>
                <TT_VALUE>(A:GENERAL ENG THROTTLE LEVER POSITION:1,percent) '%d%%' @sprintf</TT_VALUE>
            </UseInputEvent>
            <UseTemplate Name="ASOBO_GT_Lever_DraggingYAxis_Code">
                <HIGHLIGHT_NODE_ID>throttle_rear</HIGHLIGHT_NODE_ID>
                <TOOLTIP_TITLE>@TT_Package.ENGINE_THROTTLE_TITLE</TOOLTIP_TITLE>
                <TOOLTIP_ENTRY_0>ENGINE_Throttle_1</TOOLTIP_ENTRY_0>
                <UP_CODE>1 (&gt;B:ENGINE_Throttle_1_Inc)</UP_CODE>
                <DOWN_CODE>1 (&gt;B:ENGINE_Throttle_1_Dec)</DOWN_CODE>
            </UseTemplate>
        </Component>

Hi Anthony,

Many thanks for showing this code. If I had several engines on a drone and wanted to sync these all to whatever ENGINE_Throttle_1 is at from your above templates, how would I go about that?

I was thinking of:

XML:
                <UseTemplate Name="ASOBO_ENGINE_Throttle_Template">
                    <UseTemplate Name="ASOBO_GT_Update">
                    <FREQUENCY>5</FREQUENCY>
                    <UPDATE_CODE>
                        (I:XMLVAR_Interacting_With_Lever_Throttle) if{
                            (A:GENERAL ENG THROTTLE LEVER POSITION:2, position 16k) (&gt;K:THROTTLE2_SET)
                            (A:GENERAL ENG THROTTLE LEVER POSITION:3, position 16k) (&gt;K:THROTTLE3_SET)
                            (A:GENERAL ENG THROTTLE LEVER POSITION:4, position 16k) (&gt;K:THROTTLE4_SET)
                            (A:GENERAL ENG THROTTLE LEVER POSITION:5, position 16k) (&gt;K:THROTTLE5_SET)
                            (A:GENERAL ENG THROTTLE LEVER POSITION:6, position 16k) (&gt;K:THROTTLE6_SET)
                            (A:GENERAL ENG THROTTLE LEVER POSITION:7, position 16k) (&gt;K:THROTTLE7_SET)
                            (A:GENERAL ENG THROTTLE LEVER POSITION:8, position 16k) (&gt;K:THROTTLE8_SET)
                        }
                    </UPDATE_CODE>
                    </UseTemplate>
                </UseTemplate>

That doesn't seem to work though, not sure where my mistake is.

Grateful for any guidance on how to implement this correctly.

Anna
 
Last edited:
Hi Anthony,

Many thanks for showing this code. If I had several engines on a drone and wanted to sync these all to whatever ENGINE_Throttle_1 is at from your above templates, how would I go about that?

I was thinking of:

XML:
                <UseTemplate Name="ASOBO_ENGINE_Throttle_Template">
                    <UseTemplate Name="ASOBO_GT_Update">
                    <FREQUENCY>5</FREQUENCY>
                    <UPDATE_CODE>
                        (I:XMLVAR_Interacting_With_Lever_Throttle) if{
                            (A:GENERAL ENG THROTTLE LEVER POSITION:2, position 16k) (&gt;K:THROTTLE2_SET)
                            (A:GENERAL ENG THROTTLE LEVER POSITION:3, position 16k) (&gt;K:THROTTLE3_SET)
                            (A:GENERAL ENG THROTTLE LEVER POSITION:4, position 16k) (&gt;K:THROTTLE4_SET)
                            (A:GENERAL ENG THROTTLE LEVER POSITION:5, position 16k) (&gt;K:THROTTLE5_SET)
                            (A:GENERAL ENG THROTTLE LEVER POSITION:6, position 16k) (&gt;K:THROTTLE6_SET)
                            (A:GENERAL ENG THROTTLE LEVER POSITION:7, position 16k) (&gt;K:THROTTLE7_SET)
                            (A:GENERAL ENG THROTTLE LEVER POSITION:8, position 16k) (&gt;K:THROTTLE8_SET)
                        }
                    </UPDATE_CODE>
                    </UseTemplate>
                </UseTemplate>

That doesn't seem to work though, not sure where my mistake is.

Grateful for any guidance on how to implement this correctly.

Anna
You appear to be setting the throttles 2 through 8 to the position of throttles 2 through 8. In other words, you are doing nothing. Read Throttle Level Position:1 and use that to set Throttle2 through 8.

The easiest thing to do would be:

Code:
 (A:GENERAL ENG THROTTLE LEVER POSITION:1, position 16k) (&gt;K:THROTTLE_SET)

As this sets all throttles to throttle 1.

Also, I'm not sure, does MSFS support more than 4 engines? You might only be able to set throttle2 to throttle4.
 
Hi
I model a Pou Du Ciel (http://oldpat.e-monsite.com/pages/microsoft-flightsimulator-2020/hm-293-pou-du-ciel.html) To start it, I have a key style key car, two switches magneto 1 and magneto 2 as well as a fuel pump switch. It normally starts manually, but the CTRL+E command does not start the fuel pump, the engine cranks but does not start. Why does CTRL+E not turn on the fuel pump?
I tried the TBM method 930 but I only have the pump on and the rest no longer works.
Here is my problem, if any of you can help me?
The code of my XML_intérior file:
<Component ID="MISC">
<UseInputEvent ID="PROCEDURE">
<PROCEDURE_ID>AUTOSTART</PROCEDURE_ID>
<ON_AUTOSTART>

(&gt;B:ELECTRICAL_Knob_Starter_Auto) ------------->this the key 3 position: off , battery on , ignition and automatic return in position 2
(&gt;B:FUEL_Pump_1_On)
(&gt;B:ENGINE_Starter_1_On) ------------------------>In case!!!
(&gt;B:ELECTRICAL_Switch_Magneto_1_On)
(&gt;B:ELECTRICAL_Switch_Magneto_2_On)
</ON_AUTOSTART>
<ON_AUTOSTOP>
(&gt;B:ELECTRICAL_Knob_Starter_Off)
(&gt;B:FUEL_Pump_1_Off)
(&gt;B:ENGINE_Starter_1_Off)
(&gt;B:ELECTRICAL_Switch_Magneto_1_Off)
(&gt;B:ELECTRICAL_Switch_Magneto_2_Off)
</ON_AUTOSTOP>
</UseInputEvent>
</Component>
 
HI
I found a solution but it doesn't satisfy me completely:
In the "apron.flt" file, I set the fuel pump to 1 and the plane starts with CTRL+E.
But now the plane in the parking , the pump is already on.
On the forum, a search with CTRL+E gives nothing and auto_start not much
If anyone has another solution, I'm a taker.
 
When you talk about "to open the FUEL pump", do you have before open the VALVE in order to have fuel in the engine ?
When you make your test whith the APRON.flt, open also the SDK tools Simvars.exe in order to visualize the VALVE 's status.

For Simvars.Exe, I had created some simvars files in order to visualize all VARS that I need in a lot of situation so It is more easy to debug and investigate.
Example for a Twin engine : PBY-5A.simvars
ELECTRICAL MASTER BATTERY,Bool,False
ELECTRICAL BATTERY BUS VOLTAGE,volts,False
AVIONICS MASTER SWITCH,Bool,False
MASTER IGNITION SWITCH,Bool,False

RECIP ENG RIGHT MAGNETO:1,Bool,False
RECIP ENG LEFT MAGNETO:1,Bool,False
RECIP ENG RIGHT MAGNETO:2,Bool,False
RECIP ENG LEFT MAGNETO:2,Bool,False

GENERAL ENG FUEL PUMP SWITCH:1,Bool,False
GENERAL ENG FUEL PUMP SWITCH:2,Bool,False
GENERAL ENG FUEL VALVE:1,Bool,False
GENERAL ENG FUEL VALVE:2,Bool,False
GENERAL ENG MIXTURE LEVER POSITION:1,percent,False
GENERAL ENG MIXTURE LEVER POSITION:2,percent,False

GENERAL ENG STARTER:1,Bool,False
GENERAL ENG STARTER:2,Bool,False
GENERAL ENG COMBUSTION:1,Bool,False
GENERAL ENG COMBUSTION:2,Bool,False
GENERAL ENG GENERATOR ACTIVE:1,Bool,False
GENERAL ENG MASTER ALTERNATOR:1,Bool,False
GENERAL ENG GENERATOR ACTIVE:2,Bool,False
GENERAL ENG MASTER ALTERNATOR:2,Bool,False

SUCTION PRESSURE,inHg,False
AMBIENT TEMPERATURE,celsius,False
RECIP CARBURETOR TEMPERATURE:1,celsius,False
RECIP CARBURETOR TEMPERATURE:2,celsius,False
RECIP ENG CYLINDER HEAD TEMPERATURE:1,celsius,False
RECIP ENG CYLINDER HEAD TEMPERATURE:2,celsius,False
ENG FUEL PRESSURE:1,psi,False
ENG FUEL PRESSURE:2,psi,False
ENG OIL PRESSURE:1,psi,False
ENG OIL PRESSURE:2,psi,False
ENG OIL TEMPERATURE:1,celsius,False
ENG OIL TEMPERATURE:2,celsius,False
ENG HYDRAULIC PRESSURE:1,psi,False
ENG HYDRAULIC PRESSURE:2,psi,False
 
Thank you for your answer Didier
According to the pilot and builder of this plane there is only the pump, no valve. But if I have to add one I can do it.
I'm doing the test with simvar and I'll tell you what it is
 
According to the pilot and builder of this plane there is only the pump, no valve
Warning, the reality is ONE thing and the simulation is another. The modelization of an aircraft under FSX or MSFS need always a VALVE even if this one doesn't exist in reality :cool:
 
All right
I have a problem with the pump and the valve, in blender, the animation and the xml file is:FUEL_SWITCH_Pump_1.
In MSFS the anim works but the variables in simvar do not move and the GENERAL ENGINE FUEL PUMP AND VALVE switch.
I'm peeling the ASOBO fuel subtemplate xml file but it's incomprehensible
To be continued....... Capture d’écran 2023-02-08 222239.png
 
Back
Top