Go to Post Most teachers are not in it for the income, But they are definitely in it for the outcome. - Bob Steele [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 04-03-2010, 20:26
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Teleop Issue - Motor Control Seems to Freeze

It sounds like you have a lengthy sequence of code executing in the TeleOp. Since the TeleOp is busy, it cannot process new packets with joystick info.

There are two common approaches to this problem. One is to move the solenoid code into a parallel periodic loop. Then the TeleOp no longer does the work, but triggers it using a global or other notification and is then free to continue on processing joystick data. In the periodic loop, you can delay and take all the time you like to sequence the mechanism. The last thing it does is to reset the global and wait for the next trigger.

The other way of doing this is to merge this loop with the teleOp and build a state machine which ticks away at the solenoid waits with each call to teleOp, but never delays for more than 20ms. Actually, this is usually done simply by assuming that you will return a bit later and doing time comparisons to the last solenoid action and moving to the next step after enough time has elapsed, but by not using any delays.

Greg McKaskle
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Labview Servo Control Issue EricWilliams Programming 5 22-01-2010 14:24
Jaguars Slow Yellow Blink - Possible Control System Issue MikeDubreuil FRC Control System 3 26-01-2009 23:04
Driver Station Watch Dog / Motor Won't Spin Issue RMiller FRC Control System 5 20-01-2009 09:58
Small Banebots Motor Issue - Lessened torque and smoke sanddrag Motors 10 12-02-2007 21:41
CIM motor issue dmellich Motors 4 11-02-2005 11:10


All times are GMT -5. The time now is 11:10.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi