• 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 Why does this not work?

Messages
1,468
Country
italy
In conjunction with my other thread http://www.fsdeveloper.com/forum/threads/switching-between-generator-voltages.441526/
http://www.fsdeveloper.com/forum/threads/switching-between-generator-voltages.441526/
I really cannot understand why this code is not working. There are four generators, gens 3 and 4 work perfectly with this code but gens 1 & 2 do not. They refuse. The code for them is "exactly" the same and there is no spurious code elsewhere. I'm using black box so I also know that (L:Electrical genalt1 bus voltage,volts) and (L:Electrical genalt2 bus voltage,volts) carry the correct values. It seems that the sim is happy indeed to transfer the values from gens3 and 4 to (L:AC_volts,volts) but for some inexplicable reason refuses to do so for gens 1 and 2. I cannot see anything wrong at all. I thought that a gauge a day would keep the doctor away but this is making me spend more time in bed than I need. The chemo is bad enough but this takes the biscuit.
Here is the offending gauge.
Code:
<Gauge Name="AC Selector Switch" Version="1.0">
   <Element>
      <Select>
         <Value>(G:Var1)</Value>
         <Case Value="0">
            <Image Name="Gen_sel_sw_4.bmp"/>
         </Case>
         <Case Value="1">
            <Image Name="Gen_sel_sw_5.bmp"/>
         </Case>
         <Case Value="2">
            <Image Name="Gen_sel_sw_6.bmp"/>
         </Case>
         <Case Value="3">
            <Image Name="Gen_sel_sw_3.bmp"/>
         </Case>
         <Case Value="4">
            <Image Name="Gen_sel_sw_2.bmp"/>
         </Case>
         <Case Value="5">
            <Image Name="Gen_sel_sw_1.bmp"/>
         </Case>
      </Select>
   </Element>

 
     <Element>
      <Select>
         <Value>(G:Var1) 0 == (L:Electrical genalt2 bus voltage,volts) (L:AC_volts,volts) != and
         if{ 0 (&gt;G:Var1) (L:Electrical genalt2 bus voltage,volts) (>L:AC_volts,volts) 405 (>L:Herz,number) 1 (&gt;L:check1,bool) }</Value>
      </Select>
   </Element>
 
   <Element>
      <Select>
         <Value>(G:Var1) 1 == (L:Electrical genalt1 bus voltage,volts) (L:AC_volts,volts) != and
         if{ 1 (&gt;G:Var1) (L:Electrical genalt1 bus voltage,volts) (>L:AC_volts,volts) 405 (>L:Herz,number) 1 (&gt;L:check2,bool) }</Value>
      </Select>
   </Element>
 
   <Element>
      <Select>
         <Value>(G:Var1) 2 == (L:Gnd_Power_avail,bool) (L:AC_volts,volts) != and
         if{ 2 (&gt;G:Var1) 120 (>L:AC_volts,volts) 405 (>L:Herz,number) 1 (&gt;L:check3,bool) } (L:Gnd_Power_avail,bool) 0 ==
         if{ 0 (>L:AC_volts,volts) }</Value>
      </Select>
   </Element>
  
   <Element>
      <Select>
         <Value>(G:Var1) 3 == (L:Electrical genalt3 bus voltage,volts) (L:AC_volts,volts) != and
         if{ 3 (&gt;G:Var1) (L:Electrical genalt3 bus voltage,volts) (>L:AC_volts,volts) 405 (>L:Herz,number) 1 (&gt;L:check4,bool) }</Value>
      </Select>
   </Element>
  
    <Element>
      <Select>
         <Value>(G:Var1) 4 == (L:Electrical genalt4 bus voltage,volts) (L:AC_volts,volts) != and
         if{ 4 (&gt;G:Var1) (L:Electrical genalt4 bus voltage,volts) (>L:AC_volts,volts) 1 (&gt;L:check5,bool) }</Value>
      </Select>
   </Element>
  
      <Element>
      <Select>
         <Value>(G:Var1) 5 == (L:ELRAT_Power_avail,bool) (L:AC_volts,volts) != and
         if{ 5 (&gt;G:Var1) 120 (>L:AC_volts,volts) 405 (>L:Herz,number) 1 (&gt;L:check6,bool) }</Value>
      </Select>
   </Element>
  
  
   <Mouse>
      <Tooltip>AC Selector Switch</Tooltip>
     <Area Left="0" Top="0" Width="281" Height="190">
         <Cursor Type="Hand"/>
         <Click>0 (&gt;G:Var1) 1 (>L:Sound_click,enum) 0 (>L:AC_volts,volts) (L:E2GEN_running,bool) 1 ==
         if{ (L:Electrical genalt2 bus voltage,volts) (>L:AC_volts,volts) 4 (>L:needle flicker2, volts) (L:check1,bool) 1 ==
         if{ 0 (&gt;L:check1,bool) } }</Click>
      </Area>
      <Area Left="0" Top="191" Width="281" Height="190">
         <Cursor Type="Hand"/>
         <Click>1 (&gt;G:Var1) 1 (>L:Sound_click,enum) 0 (>L:AC_volts,volts) (L:E1GEN_running,bool) 1 ==
         if{ (L:Electrical genalt1 bus voltage,volts) (>L:AC_volts,volts) 4 (>L:needle flicker2, volts) (L:check2,bool) 1 ==
         if{ 0 (&gt;L:check2,bool) } }</Click>
      </Area>
      <Area Left="0" Top="382" Width="281" Height="190">
         <Cursor Type="Hand"/>
         <Click>2 (&gt;G:Var1) 1 (>L:Sound_click,enum) 0 (>L:AC_volts,volts) (L:Gnd_Power_avail,bool) 1 ==
         if{ 120 (>L:AC_volts,volts) 7 (>L:needle flicker2, volts) (L:check3,bool) 1 ==
         if{ 0 (&gt;L:check3,bool) } }</Click>
      </Area>
      <Area Left="282" Top="0" Width="280" Height="190">
         <Cursor Type="Hand"/>
         <Click>3 (&gt;G:Var1) 1 (>L:Sound_click,enum) 0 (>L:AC_volts,volts) (L:E3GEN_running,bool) 1 ==
         if{ (L:Electrical genalt3 bus voltage,volts) (>L:AC_volts,volts) 4 (>L:needle flicker2, volts) (L:check4,bool) 1 ==
         if{ 0 (&gt;L:check4,bool) } }</Click>
      </Area>
      
      <Area Left="282" Top="191" Width="280" Height="190">
         <Cursor Type="Hand"/>
         <Click>4 (&gt;G:Var1) 1 (>L:Sound_click,enum) 0 (>L:AC_volts,volts) (L:E4GEN_running,bool) 1 ==
         if{ (L:Electrical genalt4 bus voltage,volts) (>L:AC_volts,volts) 5 (>L:needle flicker2, volts) (L:check5,bool) 1 ==
         if{ 0 (&gt;L:check5,bool) } }</Click>
      </Area>
      <Area Left="282" Top="382" Width="280" Height="190">
         <Cursor Type="Hand"/>
         <Click>5 (&gt;G:Var1) 1 (>L:Sound_click,enum) 0 (>L:AC_volts,volts) (L:ELRAT_Power_avail,bool) 1 ==
         if{ 120 (>L:AC_volts,volts) 7 (>L:needle flicker2, volts) (L:check6,bool) 1 ==
         if{ 0 (&gt;L:check6,bool) } }</Click>
      </Area>
   </Mouse>
</Gauge>
 
Back
Top