View Single Post
  #4   Spotlight this post!  
Unread 08-12-2016, 17:47
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,695
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: Request for Screenshots of Code for Time Delay

Periodic Tasks is designed to handle any background tasks that can operate independently regardless of embedded time delays.
This code gets dropped in there as-is. Put it in white space completely separate from anything else already in there.
If you haven't seen these before, this image is more than just an image, it's what's called a vi snippet that can be dragged and dropped onto a block diagram whitespace to generate all the code seen. Just right-click and use Save Image As... to get the image to drag and drop on your desktop.

Everything in Teleop.vi must complete in less than 20ms, so timed delays cannot be used in there.
If Teleop code takes longer than 20ms it will stop responding to drive controls for as long as it is tied up.
To do the processing of a sequence of events in Teleop, you would need to use a state machine that simply checked what it should be doing during each 20ms pass through Teleop.vi.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 08-12-2016 at 18:15.
Reply With Quote