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

[FS9 -> FSX] Starters!?

Messages
206
Country
unitedkingdom
Hi again!

My next pain in FSX conversion of my panel / gauges: The starters are doing very strange things...

My starting code does the following:
  • Set starter on with mouse click, as long as certain conditions are met, and a timer of 5 seconds in which time it will fire continuously until a rise in N2 is seen.
  • Set mixture rich after 23 seconds (just happens to work best) as long as fuel valve is open. In practice, the pilot should only open the valve once the N2 is stable and this is usually longer.

This works very nicely in FS9 along with my modified .air tables, but in FSX there are several problems.
  • One is that during start, the N2 spoolup is different (much slower) than FS9 and unless I toggle the mixture (fire handle is good for that but really isn't ideal :p) it won't always go above 14% N2.
  • Then, if I do actually get the engine to start, the starter does not cut out, even if I toggle it. Something 'keeps it alive'.
  • Finally, I cannot then get the engine to shut down easily. Even switching the fuel valves off and turning the fire handle (mixture lean) will not properly turn the engine off as the starter is still alive!

I'm obviously doing something silly because I have read in many threads how FS9 XML will work fine in FSX, but that is clearly not the case.

Geoff

PS. Actual code, it's a bit of a mess as all the 'interaction with the rest of the system is there as well...
Starter switch:
Code:
<Gauge Name="Engine Start light 1" Version="1.0">
	<Element>
		<Select>
			<Value>(G:Var1) if{ (L:Air1startAVAIL, enum) 0 == (A:AIRSPEED TRUE, knot) 180 &lt; &amp;&amp; (L:ElecAVAIL, enum) 0 == (L:FENG1AVAIL, enum) 0 == (L:StartTIMER1,enum) 1500 &gt; (L:MOD Eng1 oil quantity, percent) 0 max 99 min 55 &lt; (L:ModEGT1,enum) (L:TRP_TGTorange, enum) &gt; (A:Airspeed select indicated or true, knots) 120 &lt; &amp;&amp; (L:ModEGT1,enum) (L:TRP_TGTRED1, enum) &gt;= (L:ModOILT1,enum) 150 &gt; (L:ENG1burntimer, enum) 300 &gt; (A:Turb eng1 N2, percent) 95 &gt;= (A:Sim on ground,bool) &amp;&amp; (L:FirepanelE1,enum) 1 &gt; || || || || || || || || || || if{ 0 (&gt;G:Var1) (A:General eng1 starter, bool) if{ 0 (&gt;K:TOGGLE_STARTER1) 0 (&gt;G:Var1) 0 (&gt;G:Var2) (E:Absolute Time, seconds) (>L:startabort1, enum) } } (L:ElecAVAIL, enum) 1 == (A:Eng1 N2 RPM, percent) 50 &lt; &amp;&amp; (G:Var2) 0 == &amp; if{ (A:General eng1 starter, bool) ! if{ (&gt;K:TOGGLE_STARTER1) } } els{ (G:Var1) -- (&gt;G:Var1) } } 
(G:Var2) 1 &gt;= (A:General eng1 starter, bool) (G:Var1) 0 != || || (A:Turb eng1 N2, percent) 40 &lt;= (L:MOD TURB ENG1 FUEL FLOW PPH, enum) 0.45359237 * 200 &lt; (L:startvar1,enum) 10 &gt; || || &amp;&amp; if{ (G:Var1) 0 != (A:General eng1 starter, bool) (G:Var2) 0 != (G:Var2) 150 &lt; &amp;&amp; || || (L:ElecAVAIL, enum) 1 == &amp;&amp; if{ 1 } els{ 2 } } els{ 0 } sp0 l0 0 == if{ 0 } els{ 1 } sp1 l1 (L:startlast1,bool) != if{ (G:Var3) 0 == l1 0 == &amp;&amp; if{ 1 (&gt;L:SWITCH_LARGE,number) } l1 (>L:startlast1,bool) } (G:Var3) 0 &gt; if{ (G:Var3) 1 - 0 max (&gt;G:Var3) } l0</Value>
			<Failures>
				<SYSTEM_ELECTRICAL_PANELS Action="0"/>
			</Failures>
			<Case Value="0">
				<Image Name="lightstartoff_in.bmp" ImageSizes="23,35,23,35"/>
			</Case>
			<Case Value="2">
				<Image Name="lightstartoff.bmp" ImageSizes="23,35,23,35"/>
			</Case>
			<Case Value="1">
				<Image Name="lightstarton.bmp" Bright="Yes" ImageSizes="23,35,23,35"/>
			</Case>
		</Select>
	</Element>

<Element>
<Select>
<Value>
(G:Var2) 1 &gt; (A:General eng1 starter, bool) ! &amp;&amp; if{ (G:Var2) 1 - (&gt;G:Var2) (G:Var2) 30 &lt; if{ (A:General eng2 starter, bool) (L:PackOveridesw,enum) 0 == &amp;&amp; (L:AIRAPU, enum) 1 == (L:AirENG2, enum) 1 == || &amp;&amp; (A:General eng2 starter, bool) ! || (L:Air1startAVAIL, enum) 1 == &amp;&amp; (A:Airspeed select indicated or true, knots) 220 &gt; (A:Sim on Ground, bool) ! &amp;&amp; || (L:ElecAVAIL, enum) 1 == &amp;&amp; (L:FENG1AVAIL, enum) 1 == &amp; if{ (L:StartTIMER1,enum) 20 &lt; if{ 5 (&gt;G:Var1) (E:Absolute Time, seconds) (>L:TimeStart1,enum) (E:Absolute Time, seconds) (>L:TimeStart1x,enum) (L:HYDRAULIC1 RESERVOIR PERCENT, percent) (>L:HydStart1,enum) (L:MOD Eng1 oil quantity, percent) (>L:OilStart1,enum) 0 (&gt;G:Var2) } } } } els{ (G:Var2) 1 == if{ 0 (&gt;G:Var2) } } 
(A:General eng1 starter, bool) if{ (L:MOD Eng1 oil quantity, percent) (L:OilStart1,enum) &lt; if{ (L:MOD Eng1 oil quantity, percent) (>L:OilStart1,enum) } } 
(A:General eng1 starter, bool) ! (A:TURB ENG1 N2,percent) 40 &gt; &amp;&amp; (L:Timefuelvalve1,enum) 1 == &amp; if{ 0 (>L:Timefuelvalve1,enum) } 
</Value>
</Select>
</Element>

<Element>
<Select>
<Value>
(G:Var2) (L:startvar1,enum) != if{ (G:Var2) (>L:startvar1,enum) } 
(A:General eng2 starter, bool) (L:PackOveridesw,enum) 0 == &amp;&amp; (L:AIRAPU, enum) 1 == (L:AirENG2, enum) 1 == || &amp;&amp; (A:General eng2 starter, bool) ! || (L:Air1startAVAIL, enum) 1 == &amp;&amp; (A:Airspeed select indicated or true, knots) 220 &gt; (A:Sim on Ground, bool) ! &amp;&amp; || (L:ElecAVAIL, enum) 1 == &amp;&amp; (L:FENG1AVAIL, enum) 1 == &amp; (A:TURB ENG1 N2,percent) 20 &gt; &amp; (A:TURB ENG1 N2,percent) 50 &lt; &amp; (A:TURB ENG1 N1,percent) 5 &gt; &amp; (A:TURB ENG1 N1,percent) 15 &lt; &amp; (L:ENG1burntimer, enum) 250 &lt; &amp; (A:GENERAL ENG1 FUEL VALVE, bool) &amp; (A:GROUND VELOCITY, knots) 60 &gt; (A:sim on Ground,bool) ! || &amp;&amp; (L:FirepanelE2,enum) 0 == &amp; (A:General eng1 starter, bool) ! &amp; if{ (A:sim on Ground,bool) if{ (E:Absolute Time, seconds) 28 - (>L:TimeStart1,enum) (E:Absolute Time, seconds) 28 - (>L:TimeStart1x,enum) } els{ (E:Absolute Time, seconds) 14 - (>L:TimeStart1,enum) (E:Absolute Time, seconds) 14 - (>L:TimeStart1x,enum) } (A:General eng1 starter, bool) ! if{ (&gt;K:TOGGLE_STARTER1) }  5 (&gt;G:Var1) } 
(L:startabort1, enum) (E:Absolute Time, seconds) - abs 120 &lt; (L:startabort1, enum) (E:Absolute Time, seconds) - abs 10 &gt; &amp;&amp; (A:Turb eng1 N2, percent) 40 &gt; (A:General eng1 starter, bool) || &amp;&amp; if{ 0 (>L:startabort1, enum) } 
</Value>
</Select>
</Element>

   <Mouse>
      <Help ID="HELPID_GAUGE_STARTER_SWITCH"/>
      <Cursor Type="Hand"/>
      <Click>(G:Var2) 1 &gt; (A:General eng1 starter, bool) ! &amp;&amp; if{ (L:startlast1,bool) if{ 1 (&gt;L:BUTTON_NORM,number) 500 (&gt;G:Var3) } 0 (&gt;G:Var1) 0 (&gt;G:Var2) } els{ (A:General eng1 starter, bool) ! if{ (L:EICAS2 Display Mode, enum) 0 != if{ 0 (>L:EICAS2 Display Mode, enum) } (L:startlast1,bool) ! if{ 1 (&gt;L:BUTTON_NORM,number) 0 (&gt;G:Var3) } (A:sim on Ground,bool) if{ 160 } els{ 40 } (&gt;G:Var2) } (G:Var1) 0 &gt; if{ 0 (&gt;G:Var1) (A:General eng1 starter, bool) if{ 0 (&gt;K:TOGGLE_STARTER1) } (L:startlast1,bool) if{ 1 (&gt;L:BUTTON_NORM,number) 500 (&gt;G:Var3) } } }</Click>
</Mouse>
</Gauge>
Elsewhere in systems code:
Code:
<!-- Fuel to Eng 1 cutoff when no fuel config -->
<Element>
<Select>
<Value>
(L:runonce, enum) 1 == (E:Absolute Time, seconds) (L:begin_timestamp, enum) - abs 5 &gt; &amp;&amp; (L:begin_timestamp, enum) 0 != &amp; if{ (L:FENG1AVAIL, enum) 0 == (A:GENERAL ENG1 FUEL VALVE, bool) ! (A:General eng1 starter, bool) (E:Absolute Time, seconds) (L:TimeStart1x,enum) - abs 22 &lt; &amp;&amp; (A:TURB ENG1 N2,percent) 40 &lt; &amp; (A:Sim on ground, bool) &amp; (L:IGN, bool) ! &amp; (A:General eng1 starter, bool) (E:Absolute Time, seconds) (L:TimeStart1x,enum) - abs 15 &lt; &amp;&amp; (A:TURB ENG1 N2,percent) 40 &lt; &amp; (A:TURB ENG1 N2,percent) 20.5 &lt; &amp; (A:Sim on ground, bool) ! &amp; (L:IGN, bool) ! &amp; (L:FirepanelE1,enum) 1 &gt; || || || || (A:General eng1 mixture lever position, percent) 0 &gt; &amp;&amp; if{ (&gt;K:MIXTURE1_LEAN) } els{ (A:GENERAL ENG1 FUEL VALVE, bool) (A:General eng1 mixture lever position, percent) 100 &lt; &amp;&amp; (L:FENG1AVAIL, enum) 1 == &amp; (A:General eng1 starter, bool) ! (E:Absolute Time, seconds) (L:TimeStart1x,enum) - abs 22 &gt;= (A:TURB ENG1 N2,percent) 22 &gt; &amp;&amp; (A:Sim on ground, bool) ! (L:IGN, bool) || || || &amp;&amp; if{ 1 (>K:MIXTURE1_RICH) } } } els{ (A:Sim on ground, bool) ! (A:TURB ENG1 N2,percent) 5 &gt; &amp;&amp; if{ 1 (>K:MIXTURE1_RICH) } } 
</Value>
</Select>
</Element>
 
This is the starter code for engine 1 in fs9.
The starter switch remains locked in the start position until after 22%n2 and the same switch is used to kill the engines, though mixture, fire handles and LPcocks can do the same.
vololiberista
Code:
<Gauge Name="Starter 1" Version="1.0">
   <Element>
      <Select>
         <Value>(G:Var1) if{ (A:Circuit general panel on, bool) (A:Eng1 N2 RPM, percent) 22 &lt; &amp;&amp; if{ 0 (&gt;K:TOGGLE_STARTER1) 0 (&gt;K:THROTTLE1_CUT) } els{ (G:Var1) -- (&gt;G:Var1) 0 (&gt;K:MIXTURE1_INCR) } } (G:Var1) 0 != (A:General eng1 starter, bool) ||</Value>
         <Case Value="0">
            <Image Name="FUEL_SWITCH_2_OFF.bmp" ImageSizes="24,36"/>
         </Case>
         <Case Value="1">
            <Image Name="FUEL_SWITCH_2_ON.bmp" ImageSizes="24,36"/>
         </Case>
      </Select>
   </Element>
   <Mouse>
      <Help ID="HELPID_GAUGE_STARTER_SWITCH"/>
      <Tooltip ID="TOOLTIPTEXT_LIGHT_STARTER_ON"/>
      <Cursor Type="Hand"/>
      <Click>5 (&gt;G:Var1) 0 (&gt;K:MIXTURE1_LEAN) </Click>
   </Mouse>
</Gauge>
 
In FS9, the stater command is a 'momentary' command, as in it will turn the starter on, which will run momentarily... and then shut off.

In FSX, they "fixed" it so that it is truly a toggle. The command will turn the starter on... and then the next sending of the same command will turn the starter off.
 
@Vololiberista:
Thanks, but my code is fine in FS9, but broken in FSX. Like you, I am a die-hard FS9 user, but people with FSX keep asking if I can convert my panel so I finally agreed to have a look!

@WarpD:
Ahaa, I see. So perhaps all I am missing is an explicit command to turn off the starter once a certain N2 is reached in the starting sequence... Ok, that's something to work with - thanks.

Geoff
 
@Vololiberista:
Thanks, but my code is fine in FS9, but broken in FSX. Like you, I am a die-hard FS9 user, but people with FSX keep asking if I can convert my panel so I finally agreed to have a look!

@WarpD:
Ahaa, I see. So perhaps all I am missing is an explicit command to turn off the starter once a certain N2 is reached in the starting sequence... Ok, that's something to work with - thanks.

Geoff

Fixed! Added an explicit cutoff to the starter after N2 greater than 55...

Geoff
 
Fixed! Added an explicit cutoff to the starter after N2 greater than 55...

Geoff

In a C gauge it's easy to detect whether the sim is FS9 or FSX, which is nice because it allows conditional branching to separate "start up routines."
 
In a C gauge it's easy to detect whether the sim is FS9 or FSX, which is nice because it allows conditional branching to separate "start up routines."

That would be useful. Shame I have no experience writing gauges in C.

On the other hand, in this case the explicit 'stop the starter' command can quite happily co-exist in FSX and FS9 as long as I make sure that it is conditional with the state of the starter - in FS9, by the time that N2 is reached, FS has already switched off the starter for me...

Geoff
 
Hi,

Here is an XML FS9/FSX test. Since FS9 and FSX use different units for the Fuel weight per gallon variable, you can test if this variable (using pounds per gallon units) is returning 6.0 or 6.7, or 0. If the former it's FS9, the latter FSX.

Code:
(A:Fuel weight per gallon, pounds per gallon) 6 == (A:Fuel weight per gallon, pounds per gallon)  10 * near 10 / 6.7 == || if{  FS9 code here  } els{  FSX code here }

I use it to be able to use this variable in FS9 and in FSX:

Code:
	<!--  Determine fuel density for FS2004 (pounds per gallon) or FSX (pounds) ( 10 * near 10 / gives exactly 6.7 lbs/gallon) -->
	<Macro Name="Fuel_Weight"> (A:Fuel weight per gallon, pounds per gallon) 6 == (A:Fuel weight per gallon, pounds per gallon)  10 * near 10 / 6.7 == || if{ (A:Fuel weight per gallon, pounds per gallon) } els{ (A:Fuel weight per gallon, pounds)  } </Macro>

Now that I think about it, it might be easier to test for:

Code:
(A:Fuel weight per gallon, pounds per gallon)  0 == if{ FSX code here } els{ FS9 code here  }

but I haven't tested that.

Hope this helps,
 
Back
Top