View Single Post
  #7   Spotlight this post!  
Unread 17-02-2016, 12:13
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,753
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: TeleopPeriodic doesn't seem to iterate fast enough to smoothly run motors

Quote:
Originally Posted by Tominator368 View Post
Could you explain this further? I'm quite sure motors will not keep their most recent value, at least, for instance, if I were to simply call a set() function in robotInit() so that it was only set once; the motor wouldn't run infinitely in this scenario.
Actually, the motor does keep the same value until your code changes it to something else.

The motor will however stop if there is a motor safety engaged. The motor safety times out if the motor isn't continuously set, because it assumes the code is locked up after ~.1 second or whatever time you set the motor exception to, and cuts off the PWM to prevent a runaway motor.
If your code disabled the motor safety then the motor would suddenly burst back to life at whatever speed was set however long ago.
The motor safety is optional, but is probably engaged by default.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 17-02-2016 at 12:22.
Reply With Quote