Go to Post ...instead of question marks swirling my mind I got triangles, circles and squares... - Dorienne [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
  #3   Spotlight this post!  
Unread 15-02-2015, 15:02
RoboBucs RoboBucs is offline
Registered User
FRC #5005
 
Join Date: Jan 2015
Location: Chattanooga, TN
Posts: 72
RoboBucs is an unknown quantity at this point
Re: Use a button to make a motor move a certain number of rotations

Quote:
Originally Posted by Levansic View Post
It depends on how you set your motors in Begin.vi, and what type of motor controllers you are using. Most likely, this will cause your motors to run at full speed forward or backward, while the button is pressed.

If you are using encoders and configured Talon SRX's to use CAN and position control with proper PID values, you may get a twitch. You will need proper software setup, encoders, and good PID values to do what you want to do accurately.

The drive reference contains data that will configure the various drive and motor vi's to interpret their inputs properly. By default, the maximum input/output is 1, which corresponds to a 100% forward or backward. Your ±3.76... input will be seen as a saturated maximum of 1. The default mode if you just open a can Talon SRX will be Percent Vbus, which works the same as PWM, and doesn't use feedback from an encoder.

All of this being said, you can approximate the closed-loop control to do what you want with a sensibly low speed and a timer, but this will take a LOT of experimentation, and the results will be highly variable.
Alright, the number I put there was supposed to be the number of rotations that the motors would make each time they're pressed, the motors have built in encoders, where would I put that number so that the motors will run 3.76 rotations each time the button is pressed? Thanks
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 21:25.

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