Archived

This topic is now archived and is closed to further replies.

old_doggie

Spring Loaded switch xml

Recommended Posts

Hello All,Can one of you guys please shed some light on electrically held / spring loaded type 3 position switches.I am trying to get a a switch to return to the mid position on an electrical panel in the event of and engine / electrical failure. On and off are no problem but a conditional event to do this is giving me a brain freeze.Thanks, Douglas

Share this post


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

Hi,Try for a 3 pos. switch something like:(A:your engine or electric or other system,bool) if{ (L:Switch,enum) } els{ 0 }Case 0=midCase 1=leftCase 2=rightEtc.3 clickspots0 (>L:Switch,enum)1 (>L:Switch,enum)etc.Hope it helps,Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Jan,Thanks for the quick reply and example but it is not the effect that I am after. I have used similar code for my aircon system and all packs, fans, bleeds etc work as they should. In plain english, the switch should work as follows:The switch only has 2 click spots as the Center is the ( Spring Loaded Position ). B737 NG - GENERATOR SWITCH : (Three position switch, spring-loaded to center position)- OFF : disconnects IDG from the transfer bus.- ON : connects the IDG output to the generator bus when power quality is correct.I have tried various combinations and have come close. Using the first part of your code and some othere bits,It is now working fine in the ON position but Off remains static.I think I have to now include clickspots. I'll continue tomorrow as my brain has started to throb an eyes are bulging. (A:General eng1 generator switch,bool) if{ (L:GB1,enum) } els{ (L:GB2, enum) } } els{ 2 }> Gen Breaker GB1(M:Event) 'LeftSingle' scmp 0 == if{ 1 (>L:GB1, enum) } (M:Event) 'LeftRelease' scmp 0 == if{ 0 (>L:GB1, enum) }(M:Event) 'Leave' scmp 0 == if{ 0 (>L:GB1, enum) }(>K:TOGGLE_ALTERNATOR1)http://forums.avsim.net/user_files/193801.jpghttp://forums.avsim.net/user_files/193802.jpg

Share this post


Link to post
Share on other sites

Hi,Another possibility in one clickspot is something like:(L:Alternator switch,enum)(M:Event) 'LeftSingle' scmp 0 == if{ (A:GENERAL ENG1 MASTER ALTERNATOR,bool) if{ (>K:TOGGLE_ALTERNATOR1) -1 (>L:Alternator switch,enum) } } (M:Event) 'RightSingle' scmp 0 == if{ (A:GENERAL ENG1 MASTER ALTERNATOR,bool) ! if{ (>K:TOGGLE_ALTERNATOR1) 1 (>L:Alternator switch,enum) } } (M:Event) 'Leave' scmp 0 == if{ 1 (>L:Alternator switch,enum) } Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Jan, you solved a problem for me and I didn't even have to ask.I needed a simple (ON-OFF) spring loaded toggle (5 of them) and this code works perfectly. I was on the right track, just didn't have the syntax quite right.Thank you for sharing your knowledge.Cal - CYXXVE7LZZ

Share this post


Link to post
Share on other sites

Jan,Thanks a bunch for your help and pointers. The switches now work as they should.I used your suggested value statement from the first post, without the if{ and changed the name etc. I then modified the click statement with a delay and presto, works just like the old GB switch should, without the sound of the relay closing.Here is the code.GEN1 GB ON2 (>L:GB1,enum) (P:Absolute time, seconds) .90 +(>L:GCR1 timer,seconds) (>K:TOGGLE_ALTERNATOR1)Smooth as silk,Regards,Douglas

Share this post


Link to post
Share on other sites