---
tag: m0860
title: I2C Position Encoders
brief: I2C position encoders for closed loop control
author: shitcreek

since: 1.0.0-beta
requires: I2C_POSITION_ENCODERS
group: encoder

codes: [ M860, M861, M862, M863, M864, M865, M866, M867, M868, M869 ]

notes:
  - Requires `I2C_POSITION_ENCODERS`.
  - See [this wiki article](//wiki.aus3d.com.au/Magnetic_Encoder) for more info.

parameters:
  -
    tag: I
    optional: true
    description: Module index.  [0, I2CPE_ENCODER_CNT - 1]
    values:
      -
        tag: index
        type: int
  -
    tag: O
    optional: true
    description: Include homed zero-offset in returned position
    values:
      -
        type: bool
  -
    tag: X
    optional: true
    description: Report on X axis encoder if present. (If A or I not specified)
    values:
      -
        tag: axis
        type: char
  -
    tag: Y
    optional: true
    description: Report on Y axis encoder if present. (If A or I not specified)
    values:
      -
        tag: axis
        type: char
  -
    tag: Z
    optional: true
    description: Report on Z axis encoder if present. (If A or I not specified)
    values:
      -
        tag: axis
        type: char
  -
    tag: E
    optional: true
    description: Report on E axis encoder if present. (If A or I not specified)
    values:
      -
        tag: axis
        type: char
  -
    tag: U
    optional: true
    description: Units in mm or raw step count. (for M860 only)
    values:
      -
        type: bool
  -
    tag: P
    optional: true
    description: Number of rePeats/iterations. (for M863 only)
    values:
      -
        type: int
  -
    tag: S
    optional: true
    description: Module new I2C address. [30, 200]. (for M864 only)
    values:
      -
        tag: addr
        type: int
  -
    tag: R
    optional: true
    description: Reset error counter. (for M866 only)
    values:
      -
        type: bool
  -
    tag: S
    optional: true
    description: Enable/disable error correction. 1 enables, 0 disables.  If not supplied, toggle. (for M867 only)
    values:
      -
        type: bool
  -
    tag: T
    optional: true
    description: New error correction threshold. (for M868 only)
    values:
      -
        type: float
---
- M860 - Report the position(s) of position encoder module(s).
- M861 - Report the status of position encoder modules.
- M862 - Perform an axis continuity test for position encoder modules.
- M863 - Perform steps-per-mm calibration for position encoder modules.
- M864 - Change position encoder module I2C address.
- M865 - Check position encoder module firmware version.
- M866 - Report or reset position encoder module error count.
- M867 - Enable/disable or toggle error correction for position encoder modules.
- M868 - Report or set position encoder module error correction threshold.
- M869 - Report position encoder module error.

I2C position encoders for closed loop control. Developed by Chris Barr at Aus3D.
[Wiki: https://wiki.aus3d.com.au/Magnetic_Encoder](//wiki.aus3d.com.au/Magnetic_Encoder)
[Github: https://github.com/Aus3D/MagneticEncoder](//github.com/Aus3D/MagneticEncoder)
