Go to Post The energy source of the future is brain power. - Michael R. Lee [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
  #11   Spotlight this post!  
Unread 01-02-2012, 20:11
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,753
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: Motors jerk; but stop responding after that.

The DS contains a tab called Charts. The red trace is the CPU usage of the cRIO. You may want to see if the CPU is maxed out. Second, the project template contains a Support Code folder, and in it is an Elapsed Times VI.

Drag Elapsed Times from the project and place it in Teleop. Run your program, with your robot on blocks, and open the Elapsed Times panel. It will how you the time between successive calls to Teleop.

Some of the other advice given is good. You need to call RobotDrive at least every 100ms or the safety mechanism will assume your code is forgetful and will set the speed to 0. You do not need to put a loop around Teleop because Teleop is called within a loop each time a new joystick packet arrives. If you were to put a continuous loop in Teleop, you would never return, and since you likely wouldn't have a delay in it, you would read the joystick far faster than necessary and update the robot drive more often than necessary. This would interfere with the directions given by the DS and would cause issues with needing to reset the robot after teleop.

Once you have some info about Elapsed Times and CPU usage, I may have other ideas about what is going on.

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


All times are GMT -5. The time now is 13:37.

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