Go to Post Now, most of the replies are very tactful when they are questioning a teams' design... but some are simply stupid. Keep your heads. - Andy Baker [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 13-02-2015, 15:52
btcshields6 btcshields6 is offline
Registered User
FRC #4206
 
Join Date: Aug 2014
Location: Texas
Posts: 107
btcshields6 is an unknown quantity at this point
That video did help. Thanks! Anyone have advice about labview implementation?
Reply With Quote
  #2   Spotlight this post!  
Unread 14-02-2015, 09:38
mshafer1 mshafer1 is offline
Programming Mentor
AKA: Matthew Shafer
FRC #3937 (Breakaway)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2008
Location: Arkansas
Posts: 55
mshafer1 is an unknown quantity at this point
Re: Controlling Motor Turns Autonomous

Quote:
Originally Posted by btcshields6 View Post
That video did help. Thanks! Anyone have advice about labview implementation?
Here is some example code of how one might implement a PID gain on the encoder to drive the robot in auto. Please refer to the a fore posted video for how to set the gains. Also, please ignore the comments before the sequence, they were just not deleted from the default auto.

Also, the stopped constants will likely need adjusted - it is .3 on our robot.

There are other options, like running the pid loop in parallel, and setting the instructions in the sequence (i.e. not in the loop with the pid), using a stacked sequence, or the array of actions that comes with the default auto (although you will likely want to change the contained cluster to contain a distance rather than a joystick y), although be careful to put a wait inside the parallel loop so it doesn't bog down the processor.

It could be argued that constantly resetting the encoders allows for more drift (inconsistent drive due to not hitting the set point exactly, and I would agree, it would be better to use absolute set points (in this example, 500, 1100, and 1600).

As far as automatically switching to Teleop, it is not appropriate to code it to (since that would require messing with how the robot decides with mode to drive), but you can run the driver station in practice mode, and with the settings correct, it will do this (i.e. 15s auto 0s delay between periods).
Attached Thumbnails
Click image for larger version

Name:	autoEncoder.png
Views:	35
Size:	112.9 KB
ID:	18346  
Reply With Quote
Reply


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 10:24.

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