View Single Post
  #4   Spotlight this post!  
Unread 02-02-2013, 12:09
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: How to toggle a relay with one button?

The green arrow is found on the Programming -> Structures palette.
It's called a Feedback node, and what it does for you is remember the previous value, so the current value can be compared to the previous value.

So for the button press the value can be thought of as 0 (false) or 1 (true).
That first peculiar little combination is checking to see of the button is going from off (the previous value) to on (the current value), so it's only true the very first time you press the button and won't be true again until the button is release and pressed again.

To change the arrow direction once you put it on your block diagram, right-click and choose Change direction.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 02-02-2013 at 12:14.
Reply With Quote