Sign in to follow this  
phjvh

There has GOT to be a simple switch out there???

Recommended Posts

GuysI am trying ( maybe im too old for this ) to make a switch that will not function unles specific variables are true, yet the switch image must work regardless.Not having any luck Im afraid.For instance, an avionics switch that will still appear to funtion ( visually move on and off) yet NOT actually function uless the master battery is on. Here is the stock switch.(A:Avionics master switch,bool)So, how do I modify it so that the avionics will not activate unless the master battery is on, yet the switch will still visually move?Any suggestions appreciated.Steve

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi,You can try:(A:Dummy,bool)(A:ELECTRICAL MASTER BATTERY,bool) if{ (>TOGGLE_AVIONICS_MASTER) (L:Dummy,bool) ! (>L:Dummy,bool) } els{ (L:Dummy,bool) ! (>L:Dummy,bool) }May be you have to change the if and els statements.I will test it myself later on (now "at work")Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites

JanThanks a million,.....a couple of tweaks and she works great.(L:Dummy,bool)(A:ELECTRICAL MASTER BATTERY,bool) if{ (>K:TOGGLE_AVIONICS_MASTER) (L:Dummy,bool) ! (>L:Dummy,bool) } els{ (L:Dummy,bool) ! (>L:Dummy,bool) } Thanks againSteve

Share this post


Link to post
Share on other sites

This keeps getting weirder.I have got the gauge to work, UNTIL I step outside the parameters, then it goes wonky.Here is my Avionics switch, tied to the main bus voltage. When greater than 20 volts, the Avionics switch will work, turning the avionics on and off..(L:AVDummy,bool)(A:Electrical main bus voltage,volts) 20 > if{ (>K:TOGGLE_AVIONICS_MASTER) (L:AVDummy,bool) ! (>L:AVDummy,bool) } els{ (L:AVDummy,bool) ! (>L:AVDummy,bool) } Which is cool, until I play Beta Tester. When the switch is on and I turn off the generator and battery (ie Zero bus volts) the Avionics stay on. Cannot turn them off till I turn the battery or generator on again ( to power up the main bus). When I do that, the switch functions in reverse, where what was on is now off and off is now on.Its not just this switch that performs like that, any switch with the arguments in the click line: (A:Aircraft variable, bool)if{ (>K:TOGGLE_SOMETHING) (L:AVDummy,bool) ! (>L:AVDummy,bool) } els{ (L:AVDummy,bool) ! (>L:AVDummy,bool) } Seem to react the same way.Any Hints??Steve

Share this post


Link to post
Share on other sites

Steve,I just tested your code and too noticed the phenomenon.In my case turning the alternators off and leaving the battery on and voltage dropping below 20, the avionics remained functional but i could not use the switch anymore. (Battery and alternators off give a total electrical failure in my panel)That seems logical because you can't click anymore below 20V and the avionics draw their current from the battery bus.Now i made this one and it seems to work a little bit.(Volt<20 you can switch off, but only on when alternator is on; so more volts)(A:AVIONICS MASTER SWITCH,bool) 1 == if{ 1 (>L:Standby Master,enum) }(L:Dummy,enum) Standby Power Switch (A:AVIONICS MASTER SWITCH,bool) 1 == if{ (>K:TOGGLE_AVIONICS_MASTER) (L:Dummy, enum) 1 == if{ 0 (>L:Dummy, enum) } (>K:TOGGLE_AFTERBURNER1) }Standby Power Switch (A:AVIONICS MASTER SWITCH,bool) 0 == (A:Electrical main bus voltage,volts) 20 > && if{ (>K:TOGGLE_AVIONICS_MASTER) (L:Dummy, enum) 0 == if{ 1 (>L:Dummy, enum) } (>K:TOGGLE_AFTERBURNER1) }So 2 clickspots; may be some help.Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this