Feedback

Get status

Description

Gets the status of the motor

Inputs

None

Outputs

  1. u16 statusFlags: A series of flags which are 1 bit each

    • Bit 0: In the bootloader (if this flag is set then the other flags below will all be 0)

    • Bit 1: MOSFETs are enabled

    • Bit 2: Motor is in closed loop mode

    • Bit 3: Motor is currently executing the calibration command

    • Bit 4: Motor is currently executing a homing command

    • Bit 5: Motor is currently executing the procedure to go to closed loop mode

    • Bit 6: Motor is currently busy doing a time consuming task and is not ready to take another command

    • Bit 7: Not used, set to 0

    • Bit 8: Not used, set to 0

    • Bit 9: Not used, set to 0

    • Bit 10: Not used, set to 0

    • Bit 11: Not used, set to 0

    • Bit 12: Not used, set to 0

    • Bit 13: Not used, set to 0

    • Bit 14: Not used, set to 0

    • Bit 15: Not used, set to 0

  2. u8 fatalErrorCode: The fatal error code. If 0 then there is no fatal error. Once a fatal error happens, the motor becomes disabled and cannot do much anymore until reset. You can press the reset button on the motor or you can execute the System reset command to get out of the fatal error state.

Code examples

Log window

Choose a theme
Choose a theme