Go to Post Woo for speculation! - Eugenia Gabrielov [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 19-02-2011, 07:24
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,752
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: Please Review My Autonomous Codes

There are a number of things you may want to change. First off, unless you have disabled the safety for the motors, you cannot set the speed of a motor and simply leave it on for 1 or two seconds. If you don't tell it to stay on, it will turn off after 100ms.

I've attached a VI that I really wish we'd put into the palettes. It works the same as last year's Delay and Feed VI, but instead of feeding the watchdog it updates the given motor. You can use it like the delay block, but wire in seconds, and also wire in the error I/O for sequencing and the motor refnum for updating. Don't worry too much about the nap time input.

The snapshot shows what the equivalent diagram looks like with this. I've also attached a subVI, Autonomous Clipboard.vi, with the code --in case you want to copy/paste instead of rebuilding it.

Be sure to put the WPIMotor...DelayAndFeed VI into Program Files\National Instruments\LabVIEW 8.6\vi.lib\Rock Robotics\WPI\Motor Control folder before you use it.

Other considerations? -1 seems really fast to be reversing the robot for three seconds while moving the arm. I suspect that you'll need to dial that down. I also wouldn't be surprised if you need to lower the arm and then start backing up. But that dead-reckoning adjustment is something you should work out at or during the scrimmage.

Good luck.
Greg McKaskle
Attached Thumbnails
Click image for larger version

Name:	Screen shot 2011-02-19 at 6.12.08 AM.png
Views:	176
Size:	22.0 KB
ID:	10211  
Attached Files
File Type: vi WPI_MotorControlDelayAndUpdate.vi (21.3 KB, 75 views)
File Type: vi Autonomous Clipboard.vi (8.1 KB, 58 views)
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 20: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