Units

Default Units

Quantity
Default Units
Affected by

Setpoint

Rotations

Position Conversion Factor

Encoder Position

Rotations

Position Conversion Factor

Encoder Velocity

RPM

Velocity Conversion Factor

Applied Output

Duty Cycle

kP

Duty cycle per rotation

Position Conversion Factor

kI

Duty cycle per (rotation*ms)

Position Conversion Factor

kD

(Duty cycle*ms) per rotation

Position Conversion Factor

kS

Volts

kV

Volts per RPM

Velocity Conversion Factor

kA

Volts per RPM/s

Velocity Conversion Factor

kG

Volts

kCos

Volts per Rotation

MAXMotion Cruise Velocity

RPM

Velocity Conversion Factor

MAXMotion Maximum Acceleration

RPM/s

Velocity Conversion Factor

MAXMotion Allowed Profile Error

Rotations

Position Conversion Factor

Conversion Factors

There are two configurable Conversion Factors on each Encoder type that can be used to account for gear ratios and unit conversions in the motor control logic. These are applied independently and the velocity factor does not rely on the position factor, so different units can be used for each.

Position Conversion Factor

Positions read from the feedback encoder are multiplied by the Position Conversion Factor before being processed by the closed-loop controller.

Common Position Conversion Factors

Description
Factor

Default (Revolutions)

1

Degrees

360

Radians

2π (6.28318530718)

10:1 Gearbox, Rotations at output

1/10 (0.1)

Distance in inches traveled with a 6in diameter wheel

6π (18.8495559215)

Velocity Conversion Factor

Velocities read from the feedback encoder are multiplied by the Velocity Conversion Factor before being processed by the closed-loop controller.

The velocity conversion factor is completely independent of the position conversion factor, so both need to be set to change both units.

All accelerations on the SPARK controllers are in terms of velocity per second, where the velocity is in units specified by the Velocity Conversion Factor.

Common Velocity Conversion Factors

Description
Factor

Default (RPM)

1

Revolutions per Second

1/60 (0.01666666666)

Degrees per Minute

360

Degrees per Second

360/60 (6)

Radians per Minute

2π (6.28318530718)

Radians per Second

2π/60 (0.10471975512)

Last updated

Was this helpful?