Class QuadratureConfigs
Configs related to the CANdi™ branded device's quadrature interface using both the S1IN and S2IN inputs
All the configs related to the quadrature interface for the CANdi™ branded device , including encoder edges per revolution and sensor direction.public class QuadratureConfigs : IParentConfiguration, ISerializable, ICloneable
- Inheritance
-
QuadratureConfigs
- Implements
- Inherited Members
Fields
QuadratureEdgesPerRotation
The number of quadrature edges in one rotation for the quadrature sensor connected to the Talon data port.
This is the total number of transitions from high-to-low or low-to-high across both channels per rotation of the sensor. This is also equivalent to the Counts Per Revolution when using 4x decoding. For example, the SRX Mag Encoder has 4096 edges per rotation, and a US Digital 1024 CPR (Cycles Per Revolution) quadrature encoder has 4096 edges per rotation. On the Talon FXS, this can be at most 2,000,000,000 / Peak RPM.- Minimum Value1
- Maximum Value1000000
- Default Value4096
- Units
public int QuadratureEdgesPerRotation
Field Value
SensorDirection
Direction of the quadrature sensor to determine positive rotation. Invert this so that forward motion on the mechanism results in an increase in quadrature position.
- Default ValueFalse
public bool SensorDirection
Field Value
Methods
Clone()
Creates a copy of this config group.
public QuadratureConfigs Clone()
Returns
Deserialize(string)
Deserialize string and put values into this object
public StatusCode Deserialize(string to_deserialize)
Parameters
to_deserializestringString to deserialize
Returns
- StatusCode
OK if deserialization is OK
Serialize()
Serialize this object into a string
public string Serialize()
Returns
- string
This object's data serialized into a string
ToString()
Provides the string representation of this object
public override string ToString()
Returns
WithQuadratureEdgesPerRotation(int)
Modifies this configuration's QuadratureEdgesPerRotation parameter and returns itself for method-chaining and easier to use config API.
The number of quadrature edges in one rotation for the quadrature sensor connected to the Talon data port. This is the total number of transitions from high-to-low or low-to-high across both channels per rotation of the sensor. This is also equivalent to the Counts Per Revolution when using 4x decoding. For example, the SRX Mag Encoder has 4096 edges per rotation, and a US Digital 1024 CPR (Cycles Per Revolution) quadrature encoder has 4096 edges per rotation. On the Talon FXS, this can be at most 2,000,000,000 / Peak RPM.- Minimum Value1
- Maximum Value1000000
- Default Value4096
- Units
public QuadratureConfigs WithQuadratureEdgesPerRotation(int newQuadratureEdgesPerRotation)
Parameters
newQuadratureEdgesPerRotationintParameter to modify
Returns
- QuadratureConfigs
Itself
WithSensorDirection(bool)
Modifies this configuration's SensorDirection parameter and returns itself for method-chaining and easier to use config API.
Direction of the quadrature sensor to determine positive rotation. Invert this so that forward motion on the mechanism results in an increase in quadrature position.- Default ValueFalse
public QuadratureConfigs WithSensorDirection(bool newSensorDirection)
Parameters
newSensorDirectionboolParameter to modify
Returns
- QuadratureConfigs
Itself