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

FS2004 Take-Off Configuration Warning

Messages
1,468
Country
italy
I am a little puzzled as to why this doesn't work. It certainly used to. But now it's silent.
I can't see anything wrong with the gauge. The part that doesn't work is in red.
Code:
<Element>
    <Select>
      <Value>
(L:DM SOUNDS OFF,number) 1 != if{

(* -- Altitude Alert -- *)
(L:AP ALT VAR, number) (A:Indicated altitude, feet) - abs d 200 &gt;= r 1000 &lt;= &amp;&amp; if{ (L:DM SOUND ALERT FIRED,number) 0 == if{ 1 (&gt;L:DM SOUND ALERT,number) 1 (&gt;L:DM SOUND ALERT FIRED,number) } } els{ 0 (&gt;L:DM SOUND ALERT,number) 0 (&gt;L:DM SOUND ALERT FIRED,number) }

[COLOR="Red"](* -- Takeoff config Alert -- *)
0 s0
(A:Radio Height, feet) 11 &lt; if{
   (A:GROUND VELOCITY, knot) 50 &lt; if{
      (A:GENERAL ENG1 THROTTLE LEVER POSITION, percent) 50 &gt; (A:GENERAL ENG2 THROTTLE LEVER POSITION, percent) 50 &gt; || (A:GENERAL ENG3 THROTTLE LEVER POSITION, percent) 50 &gt; || (A:GENERAL ENG4 THROTTLE LEVER POSITION, percent) 50 &gt; || if{
         (A:TRAILING EDGE FLAPS0 LEFT PERCENT, percent) flr 44 != if{ 2 s0 }
         (A:Spoilers handle position, percent) 1 &gt; if{ 2 s0 }
         (A:Elevator Trim Position,degrees) 2 &lt; if{ 2 s0 }
         (A:Elevator Trim Position,degrees) 7 &gt; if{ 2 s0 }
         }
      }
   }
l0 (&gt;L:DM SOUND BEEP,number)[/COLOR]

(* -- V SPEEDS -- *)
(A:Radio Height, feet) 12 &lt; if{
   (A:Turb eng1 N2, percent) 90 &gt; (A:Turb eng2 N2, percent) 90 &gt; || (A:Turb eng3 N2, percent) 90 &gt; || (A:Turb eng4 N2, percent) 90 &gt; || if{
      (A:AIRSPEED INDICATED,knots) (L:DM REF V1,number) &gt; if{
         (L:DM SOUND V1 PLAY,number) 1 == if{ 1 (&gt;L:DM SOUND V1,number) 0 (&gt;L:DM SOUND V1 PLAY,number) }
         }
      (A:AIRSPEED INDICATED,knots) (L:DM REF VR,number) &gt; if{
         (L:DM SOUND VR PLAY,number) 1 == if{ 1 (&gt;L:DM SOUND VR,number) 0 (&gt;L:DM SOUND VR PLAY,number) }
         }
      }
   }

   }
      </Value>
    </Select>
   </Element>
Please have alook and see if anything is not quite right. Thanks.
vololiberista
 
This is supposed to play a sound depending on (L:DM SOUND BEEP,number) value?

Does (L:DM SOUND BEEP,number) return the correct number (eg, 2), or is the sound application malfunctioning?

Bob
 
This is supposed to play a sound depending on (L:DM SOUND BEEP,number) value?

Does (L:DM SOUND BEEP,number) return the correct number (eg, 2), or is the sound application malfunctioning?

Bob

The sound application works fine. The same sound is used also for the cabin height alarm. The sound is not triggered here in the code above for some odd reason.
vololiberista
 
Last edited:
I've always used "knots" as my units for A: variables, so you could try changing "knot" to "knots"?
 
I've always used "knots" as my units for A: variables, so you could try changing "knot" to "knots"?

"knot" is also recognized (but I would use "knots" like you suggest;))

There is no such variable either in the FS9 or FSX SDK...

Code:
(A:TRAILING EDGE FLAPS LEFT PERCENT,percent)
(A:TRAILING EDGE FLAPS RIGHT PERCENT,percent)

You're right, the variable is not mentioned in the SDK (again...and again...:confused:) but it does exist indeed, and is mentioned as a token in gauges.h.

Vololiberista, your code in red works fine. Unless the base radio altitude of your aircraft is greater than 11 feet, I don't find anything wrong in that part.

Tom
 
"knot" is also recognized (but I would use "knots" like you suggest;))



You're right, the variable is not mentioned in the SDK (again...and again...:confused:) but it does exist indeed, and is mentioned as a token in gauges.h.

Vololiberista, your code in red works fine. Unless the base radio altitude of your aircraft is greater than 11 feet, I don't find anything wrong in that part.

Tom

The radio height is shown as 9.79 feet so that's below 11!!!
I'm glad you say the code in red works. I wish it did. It doesn't and I cant understand why. The value 2 is not passed to the sound variable. Why not I cannot say. Perhaps if I code it in another way. Though it's quite complex.

The a/c is on the ground and going at less than 50kts. If any one or more of the engine throttles are at or above 50% and/or the flaps are too low and/or the tail plane is not set and/or the spoilers are out then the warning should sound.
vololiberista
 
Maybe you could do the same test I did: use Blackbox or anything similar and check that (L:DM SOUND BEEP,number) has a value of 2 when the takeoff warning conditions are met.

Tom
 
You're right, the variable is not mentioned in the SDK (again...and again...:confused:) but it does exist indeed, and is mentioned as a token in gauges.h.

Yes, that token is a depecrated carry-forward from FS98. Also, tokens listed in gauges.h are specifically for C gauges. They don't always have an XML equivalent.

Moreover, the actual token in gauges.h has underscores in the name, and the last element of the token's name is ANGLE, not PERCENT:
TRAILING_EDGE_FLAPS0_LEFT_ANGLE

In the FS9 SDK, C tokens are listed in the cleverly named TokenVar.doc file. The XML parameters are listed separately in the Parameters.doc file. They are often quite different. They are not always the same as the C token with the underscore characters removed... :o

TRAILING EDGE FLAPS LEFT PERCENT
 
Maybe you could do the same test I did: use Blackbox or anything similar and check that (L:DM SOUND BEEP,number) has a value of 2 when the takeoff warning conditions are met.

Tom

I tried that Tom. It seems that the s values are somehow not passing on the 2 to the sound value.

I reconfigured my 80kts warning with the s values and the sound wasn't triggered either. So the problem seems to lie there. But the formatting seems ok. So I don't know what's up.
vololiberista
 
Yes, that token is a depecrated carry-forward from FS98. Also, tokens listed in gauges.h are specifically for C gauges. They don't always have an XML equivalent....

Actually I found the C token after making a test with FLAPS0 xml var and seeing it show proper values, which confused me enough as to search for any doc where I could find any reference, even "alike" as the one you refer.
Pretty odd uh?

I tried that Tom. It seems that the s values are somehow not passing on the 2 to the sound value.

I reconfigured my 80kts warning with the s values and the sound wasn't triggered either. So the problem seems to lie there. But the formatting seems ok. So I don't know what's up.
vololiberista

So the problem is not in the red code but elsewhere in the <Element>...

Tom
 
Actually I found the C token after making a test with FLAPS0 xml var and seeing it show proper values, which confused me enough as to search for any doc where I could find any reference, even "alike" as the one you refer.
Pretty odd uh?



So the problem is not in the red code but elsewhere in the <Element>...

Tom

Except that all the other parts of the <Element> work correctly!
vololiberista
 
Perhaps you could also explain this anomaly:-
In the first code box 2 (>L:DM SOUND BEEP,number) triggers the sound. but in the second which is the Takeoff config re written it doesn't, but the 1 (>L:Takeoff_alert,bool) does work. So what is happening in the second code is that (L:DM SOUND BEEP,number) stays at zero. Why is that?
vololiberista

Code:
<!-- Cabin Pressure Aural Warning -->
   <Element>
      <Select>
         <Value>(L:Cabin_Alt_ind,number) 10000 &gt; (L:ALT_PRESSED,bool) 0 == and
if{ 2 (>L:DM SOUND BEEP,number) } els{ 0 (>L:DM SOUND BEEP,number) }</Value>
      </Select>
   </Element>

Code:
(* -- Takeoff config Alert -- *)
(L:Takeoff_alert,bool) 0 == (A:Radio Height, feet) 11 &lt; if{
   (A:GROUND VELOCITY, knots) 50 &lt; if{
      (A:GENERAL ENG1 THROTTLE LEVER POSITION, percent) 50 &gt; (A:GENERAL ENG2 THROTTLE LEVER POSITION, percent) 50 &gt; || (A:GENERAL ENG3 THROTTLE LEVER POSITION, percent) 50 &gt; || 

(A:GENERAL ENG4 THROTTLE LEVER POSITION, percent) 50 &gt; || if{
         (A:TRAILING EDGE FLAPS0 LEFT PERCENT, percent) flr 44 !=
         (A:Spoilers handle position, percent) 1 &gt; if{ 2 (>L:DM SOUND BEEP,number) 1 (>L:Takeoff_alert,bool) }
         (A:Elevator Trim Position,degrees) 2 &lt; if{ 2 (>L:DM SOUND BEEP,number) 1 (>L:Takeoff_alert,bool) }
         (A:Elevator Trim Position,degrees) 7 &gt; if{ 2 (>L:DM SOUND BEEP,number) 1 (>L:Takeoff_alert,bool) }
         }
      }
   }
 
The problem seems to be that the sim doesn't like more than one gauge that references the same sound. In this case (L:DM SOUND BEEP,number).
If I create "another" sound in the ini file which in practice references the same wav file then the original coding works. don't askme why I can't use the same sound reference twice!!!
vololiberista
 
The problem seems to be that the sim doesn't like more than one gauge that references the same sound. In this case (L:DM SOUND BEEP,number).

No, that's not the problem. The problem is that you're assigning values to the same sound var in other gauges, therefore when the sound .dll gauge reads it, most probably it is in 0.
For example, in the Cabin Pressure test, you're assigning

0 (>L:DM SOUND BEEP,number)

on every cycle where the condition isn't met. If this code is posted after the one for the TakeOff config, it will overwrite the 2 value with 0 and the sound won't be played ever.

Tom
 
No, that's not the problem. The problem is that you're assigning values to the same sound var in other gauges, therefore when the sound .dll gauge reads it, most probably it is in 0.
For example, in the Cabin Pressure test, you're assigning

0 (>L:DM SOUND BEEP,number)

on every cycle where the condition isn't met. If this code is posted after the one for the TakeOff config, it will overwrite the 2 value with 0 and the sound won't be played ever.

Tom

Yes, that is similar to my thinking in that if more than one gauge uses the same sound its value will be determined by the first assigned value.
Re assigning the wav file to a second sound variable overcomes this conflict.
vololiberista
 
Yes, that is similar to my thinking in that if more than one gauge uses the same sound its value will be determined by the first assigned value.
Re assigning the wav file to a second sound variable overcomes this conflict.
vololiberista

It has nothing to do with sound but rather with the order in which the variable receives assignments. Hypothetically, if you assign a different value to Var1 in gauge00 through gaugeNN, this last value is the one that the sim will use/display.
It is important that you understand this concept to avoid similar troubles in the future.
OTOH, using another variable is a simple (and good) solution in this particular case.

Tom
 
Back
Top