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

Possible to count throttle movements?

Messages
150
I was wondering if it's possible to count throttle movements ie every time the throttle reaches a set position moving upwards.

What I am looking to do is reduce RPM if the throttle has been moved forwards past a set position, but I'm not sure whether either is possible.
 
Do you want to have throttle position or rather a RPM target as input?

And if I understood correctly, you want to prevent RPM from increasing past a certain limit?
 
Hi Heretic,

Not quite, what I'm trying to do is have a gauge that counts the number of times the throttle advances past a set limit during a flight, so for example the throttle may be advanced past 80% during a flight, each time this happens the gauge will count upwards until a specified number is reached say 20, and then I want to limit RPM to 80% of maximum rpm
 
In general terms:

1. If throttle is above 80% and flag variable = 0 then increment counter variable by 1. Set flag variable to 1 to avoid further counting.

2. If throttle is below 80% and flag variable = 1 then set flag variable to 0 to allow count next time pilot increases throttle.

3. If counter variable reaches 20 then limit RPM value (and reset counter if needed).
 
In case we're talking FSX here, Tom's take in code form:
Code:
(A:GENERAL ENG THROTTLE LEVER POSITION:1, percent) 80 >
(G:Var1) 0 == and
(G:Var2) 20 != and
if{ (G:Var2) ++ (>G:Var2) 1 (>G:Var1) }

(A:GENERAL ENG THROTTLE LEVER POSITION:1, percent) 80 <
(G:Var1) 1 == and
if{ 0 (>G:Var1) }

(G:Var2) 20 ==
if{ (A:TURB ENG N2:1, percent) 80 min (>C:SIMVARS:TURB ENG N2:1, percent)  }

Note that you'll need to have XMLTools installed to directly interact with N2 via Simvars.

Block 1 is only executed if throttle is above 80%, the control variable is zero and the couter variable is not 20. When true, the counter variable is increased by one and the control variable is set to 1, effectively locking the block. Block 2: Throttle below 80% releases the upper block execution by resetting the control variable to zero.
Block 3 effectively sets an upper limit for N2 via XMLTools once the counter variable is at 20. The "min" is MSFS' way of expressing an upper limit for a value.
 
Back
Top