April 14, 20188 yr I've made a cabin temp gauge useing xml. Im trying to make the gauge peak when i switch on the test mode for checking lamps ect. i have this : -<Image Name="tempneedleWindow.bmp" PointsTo="North"> <Axis Y="69" X="2"/> </Image> -<Rotate><Value Maximum="60" Minimum="-40">(L:CabinTemp,Celsius) </Value> -<Failures> <SYSTEM_ELECTRICAL_PANELS Action="-40"/> </Failures> -<Nonlinearity> <Item Y="79" X="31" Value="-40"/> <Item Y="60" X="56" Value="0"/> <Item Y="60" X="75" Value="14"/> <Item Y="79" X="138" Value="60"/> </Nonlinearity> <Delay DegreesPerSecond="10"/> </Rotate> </Element> The Lvar for the test switch is <Value> (L:TestMasterSwitch) </Value> Whitch returns values of 0,1 and 2. Im useing the value 0 to illuminate the lamps on my gauge, witch i've done. Looking at other examples, i think i need to add the (L:TestMasterSwitch) Lvar somewhere in the above <Value>...''string''(?) Something like ; if {(L:TestMasterSwitch) 0 then (L:CabinTemp,Celsius) 60 else (L:CabinTemp,Celsius)...... (if test switch is turned on,then set temp gauge to 60 (peak), otherwise return (L:CabinTemp,Celsius) value. Just not sure how to write the above in XML language. Can anyone please help? Thanks Luke Pype
April 19, 20188 yr Just guessing, how about: <Value ... >(L:TestMasterSwitch) 0 == if{ (L:CabinTemp,Celcius) } els{ 60 }</Value> Barry Friedman
April 20, 20188 yr Author Hi Barry Glad to report that did the trick! I had to change to 0 to a 1 though as it was reversed. the complete string: <Value Minimum="-40" Maximum="60">(L:CabinTemp,Celsius) + (L:TestMasterSwitch) 1 == if{ (L:CabinTemp,Celcius) } els{ 60 }</Value> Thank you, appreciate the help! Luke Pype
Archived
This topic is now archived and is closed to further replies.