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

FSX [Solved] (Macro) Timer-based gauge won't work

Heretic

Resource contributor
Messages
6,830
Country
germany
FSX, but FS9 syntax, using Tom A.'s macro timers.

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

<Macro Name="GetElapsed">
(P:Absolute time,@2) (L:@1,@2) - abs
</Macro>

<Macro Name="SetElapsed">
(P:Absolute time,@2) (>L:@1,@2)
</Macro>

<Element>
<Select>
<Value>
  (A:GENERAL ENG EXHAUST GAS TEMPERATURE:1,celsius) 700 &gt;
  (G:Var1) 1 !=
  and
  if{ @SetElapsed(EGTTimer,seconds) 1 (>G:Var1) 5 (>L:Test,enum) }

  @GetElapsed(EGTTimer,seconds) (>L:Therm_Health,enum)

  (A:GENERAL ENG EXHAUST GAS TEMPERATURE:1,celsius) 700 &lt;
  (G:Var1) 0 !=
  and
  if{ 0 (>G:Var1) }
</Value>
</Select>
</Element>
</Gauge>

The macro stuff was straight from the Wiki.

I just can't get a readout. Neither on (L:EGTTimer, seconds), nor on (L:Therm_Health,enum), nor does (L:Test,enum) change.

Syntax bug? Time for bed? General stupidity?


- Edit:

Wait, is P:/E: ABSOLUTE TIME restricted to minutes?

- Edit²:

Tested an alternative, non-macro timer, which works. So it isn't gauge syntax.
 
Last edited:
I think I had a few too many nested comments in the original gauge file above the timer code which the XML parser could not handle or so. Sorted them out and the timer works now.


As usual, I hope you were amused by yet another episode of "Björn has a problem and solves it himself within the hour". Stay tuned for more!
 
This is what I've got for engine one
Code:
<!-- Engine Limitations Exceeded -->
   <Element>
      <Select>
         <Value>(L:RandomNumber,number) 0.215 &lt; if{ (L:eng1_stop,number) @GetElapsed(time1,seconds) +
             (A:Turb eng1 N2, percent) 102 > *
             d (>L:eng1_stop,number) 620 >
             if{ (>K:TOGGLE_ENGINE1_FAILURE) 0 (>L:eng1_stop,number) 1 (>L:restart1,bool) }
            @SetElapsed(time1,seconds) }
         </Value>
      </Select>

   </Element>
   <Element>
      <Select>
         <Value>(L:RandomNumber,number) 0.115 &lt; if{ (L:eng1_stop,number) @GetElapsed(time1,seconds) +
             (A:Turb eng1 N2, percent) 105 > *
             d (>L:eng1_stop,number) 20 >
             if{ (>K:TOGGLE_ENGINE1_FAILURE) 0 (>L:eng1_stop,number) 1 (>L:restart1,bool) }
            @SetElapsed(time1,seconds) }
         </Value>
      </Select>
   </Element>
 
Vololiberista and Bjoern, you guys never cease to amaze with with your various forms of failures for engines.
 
Vololiberista and Bjoern, you guys never cease to amaze with with your various forms of failures for engines.

There isn't actually that much black magic involved. You just need to settle on a timer philosophy (I'm using mgh's now as its simple and flexible) and the rest is just standard operation.

Example: The timer block ensures that the L: var is increased to a maximum of 300 once a second if EGT is within a certain range. Block one makes the engine burn out after precisely 300 seconds = 5 minutes, block two after 300/10 = 30 seconds.

Code:
(P:ABSOLUTE TIME, seconds) (L:START TIME, seconds) - 1 &gt;
  if{ (P:ABSOLUTE TIME, seconds) (&gt;L:START TIME, seconds)
700 730 (A:GENERAL ENG EXHAUST GAS TEMPERATURE:1,celsius) rng
  if{ (L:Therm_Stress,number) 1 + 300 min (>L:Therm_Stress,number) }

(A:GENERAL ENG EXHAUST GAS TEMPERATURE:1,celsius) 730 &gt;
  if{ (L:Therm_Stress,number) 10 + 300 min (>L:Therm_Stress,number) }
}

All you need to do then with the L: var is to start a (custom) fire and that's it.
Code:
(L:Therm_Stress,number) 300 &gt;=
  if{ 1 (>L:ENG ON FIRE,bool) }

If you use the timer in combination with Doug Dawson's XML_Config gauge, you got yourself the basis for something akin to a poor man's AccuSim.
 
This engine "failure" is how I work out engine vibration for the LP and HP compressor in each engine. There are other bits and bobs
used by the engine vibration gauges and warning lights. Then fed into the throttle position so that vibrations increase.
Beyond which the engines will fail. As the RR Conways are not exactly new they have a wear and tear factor built in. It also works when reverse is selected! Once the engine shuts down it can never be restarted without changing the state.cfg file

Code:
<Value>(A:GENERAL ENG ELAPSED TIME:1, hours) 1000 &gt;
if{ (A:GENERAL ENG ELAPSED TIME:1, hours) 1000 / (>L:vib1,number) (L:vib1,number) 0.075 + (>L:vib1a,number) }
els{ 1.079 (>L:vib1,number) (L:vib1,number) 0.075 + (>L:vib1a,number) }</Value>
 
Last edited:
Volo,
Can you come up with a gauge that makes a single jet engine vibrate more the further you are out to sea?
Rolls Royce was pretty good at that effect
Roy
 
Volo,
Can you come up with a gauge that makes a single jet engine vibrate more the further you are out to sea?
Rolls Royce was pretty good at that effect
Roy

I don't quite know how I would detect sea!
The Conway 550 was prone to surging at altitude. For which the only remedy was to open the wing stop valves. That's simulated.
Why would going over the sea increase the vibration rate? That seems to be a bit of a red herring!
 
It may seem to be a bit of a red herring, but I can assure you it was very real at the time. Probably something to do with being further from land than the beast would glide.

Roy
(Scusa scherzavo!)
 
Back
Top