Object containing:
motorRevolutions Number of motor-side revolutions defined in device parameters.shaftRevolutions Number of shaft-side revolutions defined in device parameters.torqueControllerEncoderSource Encoder source used by the torque controller. A value of 0 means no assigned encoder.positionControllerEncoderSource Encoder source used by the position controller. A value of 0 means no assigned encoder.Generated using TypeDoc
Computes the effective mechanical gear ratio between motor revolutions and shaft revolutions. The returned value represents:
gearRatio = motorRevolutions / shaftRevolutions
Special handling is applied when both the torque controller and the position controller use the same encoder source. In that case, there is no physical external gearing, meaning both controllers observe identical positions, so the gear ratio is considered to be 1.
If shaft revolutions equals 0 (invalid or unavailable data), a default gear ratio of 1 is returned as a safe fallback.
Returns
The computed gear ratio. Produces:
1if both controllers use the same encoder source, or if shaftRevolutions is0.(motorRevolutions / shaftRevolutions)otherwise.