ExternalEncoderConfig
- class rev.ExternalEncoderConfig
Bases:
BaseConfig- class Presets
Bases:
pybind11_object- static REV_SplineEncoder() rev._rev.ExternalEncoderConfig
REV Robotics - MAXSpline Encoder (via 6-pin JST)
- static REV_ThroughBoreEncoder() rev._rev.ExternalEncoderConfig
- static REV_ThroughBoreEncoderV2() rev._rev.ExternalEncoderConfig
- class Type(value: SupportsInt | SupportsIndex)
Bases:
pybind11_objectMembers:
kQuadrature
- kQuadrature = <Type.kQuadrature: 0>
- ExternalEncoderConfig.Type.name -> str
- property value
- apply(config: rev._rev.ExternalEncoderConfig) rev._rev.ExternalEncoderConfig
Applies settings from another ExternalEncoderConfig to this one.
Settings in the provided config will overwrite existing values in this object. Settings not specified in the provided config remain unchanged.
- Parameters:
config – The ExternalEncoderConfig to copy settings from
- Returns:
The updated ExternalEncoderConfig for method chaining
- averageDepth(depth: SupportsInt | SupportsIndex) rev._rev.ExternalEncoderConfig
Set the sampling depth of the velocity calculation process of the External encoder. This value sets the number of samples in the average for velocity readings. For a quadrature encoder, this can be any value from 1 to 64 (default).
- Parameters:
depth – The velocity calculation process’s sampling depth
- Returns:
The modified ExternalEncoderConfig object for method chaining
- countsPerRevolution(cpr: SupportsInt | SupportsIndex) rev._rev.ExternalEncoderConfig
Set the counts per revolutions of the External encoder.
- Parameters:
cpr – The counts per rotation
- Returns:
The modified ExternalEncoderConfig object for method chaining
- static fromId(id: SupportsInt | SupportsIndex) rev._rev.ExternalEncoderConfig.Type
- inverted(inverted: bool) rev._rev.ExternalEncoderConfig
Set the phase of the External encoder so that it is in phase with the motor itself.
- Parameters:
inverted – The phase of the encoder
- Returns:
The modified ExternalEncoderConfig object for method chaining
- measurementPeriod(periodMs: SupportsInt | SupportsIndex) rev._rev.ExternalEncoderConfig
Set the position measurement period used to calculate the velocity of the External encoder. For a quadrature encoder, this number may be between 1 and 100 (default).
The basic formula to calculate velocity is change in position / change in time. This parameter sets the change in time for measurement.
- Parameters:
periodMs – Measurement period in milliseconds
- Returns:
The modified ExternalEncoderConfig object for method chaining
- positionConversionFactor(factor: SupportsFloat | SupportsIndex) rev._rev.ExternalEncoderConfig
Set the conversion factor for the position of the External encoder. Position is returned in native units of rotations and will be multiplied by this conversion factor.
- Parameters:
factor – The conversion factor to multiply the native units by
- Returns:
The modified ExternalEncoderConfig object for method chaining
- velocityConversionFactor(factor: SupportsFloat | SupportsIndex) rev._rev.ExternalEncoderConfig
Set the conversion factor for the velocity of the External encoder. Velocity is returned in native units of rotations per minute and will be multiplied by this conversion factor.
- Parameters:
factor – The conversion factor to multiply the native units by
- Returns:
The modified ExternalEncoderConfig object for method chaining