Component: Magnetic Encoder (AS5600) (Magnetic): Difference between revisions
Appearance
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;"" to "width="10%" align="center" class="mtx-class-macrohead"" |
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead"" |
||
| Line 29: | Line 29: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetStatus''' | ||
|- | |- | ||
| colspan="2" | Reads the status register testing for if the magnet is detected and in range. Bit2 = Magnet Detected, Bit1 = Magnet too weak, Bit0 = Magnet too strong Ideally the best response is 4, magnet detected and in range. | | colspan="2" | Reads the status register testing for if the magnet is detected and in range. Bit2 = Magnet Detected, Bit1 = Magnet too weak, Bit0 = Magnet too strong Ideally the best response is 4, magnet detected and in range. | ||
| Line 43: | Line 43: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Initialise''' | ||
|- | |- | ||
| colspan="2" | Configures the I2C bus ready for communications and applies the settings defined in the properties. Also sets the default power level to always on. Returns 1 if the module is detected 0 if the module is not found | | colspan="2" | Configures the I2C bus ready for communications and applies the settings defined in the properties. Also sets the default power level to always on. Returns 1 if the module is detected 0 if the module is not found | ||
| Line 57: | Line 57: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadAngle''' | ||
|- | |- | ||
| colspan="2" | Returns the angle as a floating point value between 0 and 360 degrees. | | colspan="2" | Returns the angle as a floating point value between 0 and 360 degrees. | ||
| Line 71: | Line 71: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadRawAngle''' | ||
|- | |- | ||
| colspan="2" | Returns the angle as a raw value between 0 and 4095 representing 0 to 360 degrees. | | colspan="2" | Returns the angle as a raw value between 0 and 4095 representing 0 to 360 degrees. | ||
| Line 85: | Line 85: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetPowerMode''' | ||
|- | |- | ||
| colspan="2" | Configures the power mode of the device. | | colspan="2" | Configures the power mode of the device. | ||
| Line 105: | Line 105: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
Revision as of 14:23, 13 July 2026
| Author | Matrix TSL |
| Version | 1.0 |
| Category | Magnetic |
Magnetic Encoder (AS5600) component
A precise magnetic encoder featuring 12-bit resolution and interfaced via an I2C bus.
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
GetStatus
Initialise
ReadAngle
| ReadAngle | |
| Returns the angle as a floating point value between 0 and 360 degrees. | |
| Return | |
ReadRawAngle
| ReadRawAngle | |
| Returns the angle as a raw value between 0 and 4095 representing 0 to 360 degrees. | |
| Return | |
SetPowerMode
| SetPowerMode | |
| Configures the power mode of the device. | |
| Mode | |
| 0=Always On, 1=5ms Polling, 2=20ms Polling, 3=100ms Polling | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Magnetic_Encoder_AS5600.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Magnetic_Encoder_AS5600.fcfx