Flightdeck Solutions Forum Index Flightdeck Solutions
Technical Support Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Toggle bit question

 
Post new topic   Reply to topic    Flightdeck Solutions Forum Index -> FDS - Interface Products
View previous topic :: View next topic  
Author Message
neuman5022



Joined: 25 Nov 2005
Posts: 261
Location: Nelson NEW ZEALAND

PostPosted: Mon Jul 02, 2012 1:31 am    Post subject: Toggle bit question Reply with quote

Hi Folks

Need your help again:


When updating an input task with PMsystems, after choosing the name I have 3 options: Set Bit, Clear bit (Which I understand) and "toggle bit". What does the Toggle bit do and when it is needed ?

Thanks

Isaac
Back to top
View user's profile Send private message Send e-mail
mauriceb



Joined: 22 Aug 2005
Posts: 1051
Location: Gravenhurst, Ontario - Canada

PostPosted: Mon Jul 02, 2012 6:57 pm    Post subject: Reply with quote

Toggle means just what it says...if bit=0 change it to 1 and if bit=1 change it to 0. In other words, change the initial state to the opposite state.

Maurice
Back to top
View user's profile Send private message
neuman5022



Joined: 25 Nov 2005
Posts: 261
Location: Nelson NEW ZEALAND

PostPosted: Tue Jul 03, 2012 6:34 am    Post subject: Reply with quote

Thanks Mo

It always looks so simple when you explain it Laughing

Cheers

Isaac
Back to top
View user's profile Send private message Send e-mail
vidarf



Joined: 12 May 2006
Posts: 504
Location: Narvik, Norway

PostPosted: Tue Jul 03, 2012 10:05 am    Post subject: Reply with quote

With Mau, it HAS to be simple... Razz

BTW, any examples for where this is actually used? Can't think of anything.
_________________
My cockpit project
Back to top
View user's profile Send private message Visit poster's website
mauriceb



Joined: 22 Aug 2005
Posts: 1051
Location: Gravenhurst, Ontario - Canada

PostPosted: Tue Jul 03, 2012 12:29 pm    Post subject: Reply with quote

vidarf wrote:
With Mau, it HAS to be simple... Razz

BTW, any examples for where this is actually used? Can't think of anything.


Simple minds....simple explanations Smile

My guess would be that they are used for push button switches (momentary or not) since you cannot tell what state they are in. So when you push the switch, you change the state of what the switch controls whatever it was. You could not use set bit or clear bit with a momentary switch for obvious reasons.

But of course this is what my simple mind believes. More enlightened minds may have a better or more complete explanation Smile

Maurice
Back to top
View user's profile Send private message
neuman5022



Joined: 25 Nov 2005
Posts: 261
Location: Nelson NEW ZEALAND

PostPosted: Wed Jul 04, 2012 4:09 am    Post subject: Reply with quote

Thanks for the info Mo.


Why can't a push button have set bit and clear bit ?


Some push buttons require to hold the button for a specific task - for example the test button on the LE devices of the 737 AFT OVHD. Pushing and holding will have the lights on, when releasing it will go off. In this case can I asign the set bit/clear bit ?


For other types of tasks - say horn cut-out or similar, maybe then then the clear bit has no meaning, but in some cases we can use the virtual toggle for push button option.

Hope someone will jump in for an example of where we need the toggle bit ???

Cheers


Isaac
Back to top
View user's profile Send private message Send e-mail
mauriceb



Joined: 22 Aug 2005
Posts: 1051
Location: Gravenhurst, Ontario - Canada

PostPosted: Wed Jul 04, 2012 7:58 am    Post subject: Reply with quote

neuman5022 wrote:
Thanks for the info Mo.


Why can't a push button have set bit and clear bit ?


Some push buttons require to hold the button for a specific task - for example the test button on the LE devices of the 737 AFT OVHD. Pushing and holding will have the lights on, when releasing it will go off. In this case can I asign the set bit/clear bit ?


Isaac


Pushing a button is one action, releasing it is a different action and in your example, I guess you could use set bit/clear bit. But if you want the same action (pushing a button) to cause the opposite result every time you push the button, then you would need the toggle function.

Let's say you wanted to set an alarm by pushing a momentary push button and clear the alarm when you press that same button again then the toggle function would be required.

But anyway, why do you need to know where it is used in a cockpit? You can use the set bit/clear bit as long as it does what you need and I think it may become obvious if/when the toggle function is needed. Unless you are just curious and in that case, I can't help you since I have no idea either Very Happy

Someone else will have to chime in here with a good use of the toggle function


Maurice
Back to top
View user's profile Send private message
vidarf



Joined: 12 May 2006
Posts: 504
Location: Narvik, Norway

PostPosted: Thu Jul 05, 2012 10:31 am    Post subject: Reply with quote

Oh, oh, OH!! I KNOW, I KNOW, I KNOW!!! The clock button on the glare wings! Very Happy
If the button on the clock itself is present, of course...

Dang, Mau - you HAVE to be impressed by that one! Very Happy
_________________
My cockpit project
Back to top
View user's profile Send private message Visit poster's website
mauriceb



Joined: 22 Aug 2005
Posts: 1051
Location: Gravenhurst, Ontario - Canada

PostPosted: Thu Jul 05, 2012 9:18 pm    Post subject: Reply with quote

vidarf wrote:
Oh, oh, OH!! I KNOW, I KNOW, I KNOW!!! The clock button on the glare wings! Very Happy
If the button on the clock itself is present, of course...

Dang, Mau - you HAVE to be impressed by that one! Very Happy


Congratulations!. You may have found the one & only example Very Happy. Steve might disagree though.

Maurice
Back to top
View user's profile Send private message
vidarf



Joined: 12 May 2006
Posts: 504
Location: Narvik, Norway

PostPosted: Sat Jul 07, 2012 2:11 pm    Post subject: Reply with quote

*proud* Cool
_________________
My cockpit project
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Flightdeck Solutions Forum Index -> FDS - Interface Products All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group