Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Spring Loaded switch xml

Featured Replies

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

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..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Author

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

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..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

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

  • Author

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

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.