Go to Post To give credit where credits due, thanks to the GDC for this update. - Brandon Holley [more]
Home
Go Back   Chief Delphi > Technical > Programming
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
  #1   Spotlight this post!  
Unread 29-03-2016, 21:43
Jeringo Jeringo is offline
Registered User
FRC #4749
 
Join Date: Jan 2016
Location: Atlanta
Posts: 10
Jeringo is an unknown quantity at this point
TalonSRX encoder confusion java

I am getting a little confused on encoders for the TalonSRX.
i am trying to do three things, first thing is the software limit. How exactly does it work. we have a shooter that tilts the upmost position it -1000 and all the way to the floor is 3500 i've tried swapping the values but it only lets me tilt the shooter down. the second thing is how to i reset the encoder or set it to 0? and the third thing is how to i tell the motor to go to a certain position?


Code:
Tilt.setFeedbackDevice(FeedbackDevice.AnalogEncoder);
Tilt.setForwardSoftLimit(-1000.00);
Tilt.enableForwardSoftLimit(true);
Tilt.setReverseSoftLimit(3501.00);
Tilt.enableReverseSoftLimit(true);

int pulseWidthPos = Tilt.getPulseWidthPosition();
int pulseWidthUs = Tilt.getPulseWidthRiseToFallUs();
int PeriodUs = Tilt.getPulseWidthRiseToRiseUs();
int pulseWidthVel = Tilt.getPulseWidthVelocity();
FeedbackDeviceStatus sensorStatus = Tilt.isSensorPresent(FeedbackDevice.CtreMagEncoder_Absolute);
boolean sensorPluggedIn = (FeedbackDeviceStatus.FeedbackStatusPresent == sensorStatus);
 


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:02.

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