October 14, 200916 yr <Gauge Name="HYD PRESS LITE 4" Version="1.0"> <Element> <Visible>(A:Circuit general panel on, bool)</Visible> <Select> <Value>(L:Hydraulic4 Switch,bool) if{ (A:Hydraulic4 pressure,Psi) 2500 < }</Value> <Case Value="0"> <Image Name="Hyd_Press_On.bmp" Bright="Yes" ImageSizes="100,50" /> </Case> <Value>(L:Hydraulic4 Switch,bool) if{ (A:Hydraulic4 pressure,Psi) 2500 > }</Value> <Case Value="1"> <Image Name="Hyd_Press_Off.bmp" Bright="Yes" ImageSizes="100,50" /> </Case> </Select> </Element></Gauge>In this pressure light gauge the light is expected to be illuminated when the pressure is lower than 2500psi and to be out when the pressure is greater than 2500psi.But the light is switched on&off instantly without respect the pressure values.What is my error?Thanks Gianfranco
October 14, 200916 yr Gianfranco, Maybe try this, hard to say what exactly with the application. Im assuming the "off" bitmap should always be shown and the "on" bitmap be shown on when the warning display switch is on & it has power & the pressure is less than 2500 psi. <Gauge Name="HYD PRESS LITE 4" Version="1.0"><Element><Image Name="Hyd_Press_Off.bmp" Bright="No" ImageSizes="100,50" /></Element><Element><Visible>(L:Hydraulic4 Switch,bool) (A:Hydraulic4 pressure,Psi) 2500 < (A:Circuit general panel on, bool) & &</Visible> <Image Name="Hyd_Press_On.bmp" Bright="Yes" ImageSizes="100,50" /></Element> Hope it helps,Roman FS RTWR SHRS F-111 JoinFS Little Navmap
October 14, 200916 yr Author hi Roman,thanks but your code doesn't work at all.By my code when the Hydraulic switch is operate the light follows the switching but with no respect of the pressure, with your code the light after the first switching remains always out.Thanks again Gianfranco
October 14, 200916 yr Moderator The "error" is one of syntax. You can NOT have two <Value> expressions in a single <Select> operation. You must combine the conditional logic into a single expression.Also, the structure of the if{ } condition is incorrect.. <Select> <Value> (L:Hydraulic4 Switch,bool) (A:Hydraulic4 pressure,Psi) 2500 < and </Value> <Case Value="0"> <Image Name="Hyd_Press_Off.bmp" Bright="Yes" ImageSizes="100,50" /> </Case> <Case Value="1"> <Image Name="Hyd_Press_On.bmp" Bright="Yes" ImageSizes="100,50" /> </Case></Select> Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment