FRC.WPILib.CTRE by RobotDotNet

<PackageReference Include="FRC.WPILib.CTRE" Version="2017.0.1" />

.NET API 131,584 bytes

 CANTalon

This Class represents a CAN Talon SRX Motor Controller.
public enum FeedbackDevice

Feedback type for CAN Talon

The Feedback device status.

public struct MotionProfileStatus

Enumerated types for Motion Control Set Values

public enum StatusFrameRate

Status Rate for CAN Talon

public struct TrajectoryPoint

public const int MaxTalonId = 62

The max Id allowed for a CAN Talon

protected static readonly Resource TalonIds

Resource list of all the talons that the program knows of and has control of.

public bool Alive { get; }

public double CloseLoopRampRate { get; set; }

Gets or sets the closed loop ramp rate for the current profile. In Volts/Sec

public bool ControlEnabled { get; set; }

Gets or Sets whether closed loop control is enabled on the talon.

public double D { get; set; }

public string Description { get; }

public int DeviceId { get; }

Gets the current DeviceId of the CANTalon

public bool Enabled { get; }

public double Expiration { get; set; }

public double F { get; set; }

public int FaultForwardLimit { get; }

Gets if there is currently a fault on the Forward Limit. (Non-Sticky)

public int FaultForwardSoftLimit { get; }

Gets if there is currently a fault on the Forward Soft Limit. (Non-Sticky)

public int FaultHardwareFailure { get; }

Gets if there is currently a general hardware failure fault. (Non-Sticky)

public int FaultOverTemp { get; }

Gets if there is currently an Over Temperature fault. (Non-Sticky)

public int FaultReverseLimit { get; }

Gets if there is currently a fault on the Reverse Limit. (Non-Sticky)

public int FaultReverseSoftLimit { get; }

Gets if there is currently a fault on the Reverse Soft Limit. (Non-Sticky)

public int FaultUnderVoltage { get; }

Gets if there is currently an UnderVoltage fault. (Non-Sticky)

public FeedbackDevice FeedBackDevice { get; set; }

Gets or sets the feedback device to be used by the talon.

public uint FirmwareVersion { get; }

public bool ForwardLimitSwitchNormallyOpen { get; set; }

Gets or Sets whether the forward limit switch is normally open.

public double ForwardSoftLimit { get; set; }

Gets or Sets the Forward Soft limit of the CAN Talon

public bool ForwardSoftLimitEnabled { get; set; }

Gets or sets whether the forward soft limit is enabled or not.

public double I { get; set; }

public bool Inverted { get; set; }

public int IZone { get; set; }

Gets or sets the IZone of the CANTalon.

public ControlMode MotorControlMode { get; set; }

public double P { get; set; }

public PIDSourceType PIDSourceType { get; set; }

public int Profile { get; set; }

Gets or sets which closed loop profile to use.

public bool ReverseLimitSwitchNormallyOpen { get; set; }

Gets or sets whether the reverse limit switch is normally open.

public double ReverseSoftLimit { get; set; }

Gets or Sets the Reverse Soft limit of the CAN Talon

public bool ReverseSoftLimitEnabled { get; set; }

Gets or sets whether the reverse soft limit is enabled or not.

public bool SafetyEnabled { get; set; }

public double Setpoint { get; set; }

public string SmartDashboardType { get; }

public int StickyFaultForwardLimit { get; }

Gets the number of forward limit sticky faults.

public int StickyFaultForwardSoftLimit { get; }

Gets the number of forward soft limit sticky faults.

public int StickyFaultOverTemp { get; }

Gets the number of over temperature sticky faults.

public int StickyFaultReverseLimit { get; }

Gets the number of reverse limit sticky faults.

public int StickyFaultReverseSoftLimit { get; }

Gets the number of reverse soft limit sticky faults.

public int StickyFaultUnderVoltage { get; }

Gets the number of under voltage sticky faults.

public ITable Table { get; }

public double VoltageCompensationRampRate { get; set; }

Gets or Sets the voltage compensation ramp rate.

public CANTalon(int deviceNumber)

Constructs an new CANTalon object with default timing.

public CANTalon(int deviceNumber, int controlPeriodMs, int enablePeriodMs)

Constructs a CANTalon object.

public void ChangeMotionControlFramePeriod(int periodMs)

Sets the period for motion control frames to be sent at.

public void ClearIAccum()

Clears the integral accumulator value.

Clears the motion profile has underrun flag.

Clears the Motion Profile Trajectories on this Talon SRX.

public void ClearStickyFaults()

Clears all of the sticky faults for this CAN Talon.

public void ConfigNominalOutputVoltage(double forwardVoltage, double reverseVoltage)

Configures the nominal output voltage of the Talon.

public void ConfigPeakOutputVoltage(double forwardVoltage, double reverseVoltage)

Configures the output voltage peaks of the Talon.

public void ConfigSoftPositionLimits(double forwardLimitPosition, double reverseLimitPosition)

public void Disable()

public void Dispose()

public void Enable()

public void EnableLimitSwitches(bool forward, bool reverse)

Sets the enabled state of both the forward and reverse soft limit.

public void EnableZeroSensorPositionOnIndex(bool enable, bool risingEdge)

Enables Talon SRX to automatically zero the Sensor Position whenever an edge is detected on the index signal.

public virtual double Get()

public int GetAnalogInPosition()

Gets the analog input position, regardless of whether it is in the current feedback device.

public int GetAnalogInRaw()

Gets the analog input raw position, regardless of whether it is in the current feedback device.

public int GetAnalogInVelocity()

Gets the analog input velocity, regardless of whether it is in the current feedback device.

public double GetBusVoltage()

public int GetClosedLoopError()

Gets the current difference between the setpoint and the sensor value.

public int GetEncoderPosition()

Gets the current encoder position.

public int GetEncoderVelocity()

Gets the current encoder velocity.

public double GetError()

public Faults GetFaults()

public bool GetForwardLimitOk()

public double GetIaccum()

Gets the integral accumulator value.

Gets the status of the currently running the motion profile.

Gets the Top Level Buffer Count of the Motion Profile.

Gets the number of quadrature index rises

public double GetOutputCurrent()

public double GetOutputVoltage()

public int GetPinStateQuadA()

Gets the state of the quadrature A pin.

public int GetPinStateQuadB()

Gets the state of the quadrature B pin.

public int GetPinStateQuadIdx()

Gets the state of the quadrature index pin.

public double GetPosition()

public int GetPulseWidthPosition()

Gets the pulse width postion.

Gets the pulse width rise to fall time.

Gets the pulse width rise to rise time.

public int GetPulseWidthVelocity()

Gets the pulse width velocity.

public bool GetReverseLimitOk()

public double GetSpeed()

public double GetTemperature()

public void InitTable(ITable subtable)

Returns whether the brake is enabled during neutral.

Gets the value of the forward limit switch.

Gets if the top level buffer for motion profiling is full.

Gets the value of the reverse limit switch.

Gets whether the sensor is present.

public virtual double PidGet()

public void PidWrite(double value)

Processes the Motion Profile Buffer.

Pushes a new TrajectoryPoint to the Talon for Motion Profiling.

public void Reset()

public void ReverseOutput(bool flip)

Sets whether to reverse the output.

public void ReverseSensor(bool flip)

Sets whether to reverse the input sensor.

public void SelectProfileSlot(int slotIdx)

Selects the profile slot on the Talon.

public virtual void Set(double value)

public void Set(double value, byte syncGroup)

public void SetAllowableClosedLoopErr(int allowableCloseLoopError)

Sets the max allowable closed loop error.

public void SetAnalogPosition(int newPosition)

Resets the analog position to a new position.

public void SetEncoderPostition(int newPosition)

Resets the encoder position to a specified point.

public void SetParameter(ParamID paramEnum, double value)

General set frame.

public void SetPID(double p, double i, double d, double f, int izone, double closeLoopRampRate, int profile)

Sets the PID and extra constants of the controler.

public void SetPID(double p, double i, double d)

public void SetPosition(double pos)

Sets the position of the encoder or potentiometer

public void SetPulseWidthPosition(int newPosition)

Resets the pulse width position to a specified point.

public void StartLiveWindowMode()

public void StopLiveWindowMode()

public void StopMotor()

public void UpdateTable()

public void ValueChanged(ITable source, string key, Value value, NotifyFlags flags)