RX72M Group
Single-Chip Motor Control via EtherCAT Communications
R01AN5434EJ0110 Rev.1.10
Page 41 of 85
Aug.31.2020
5.15 R_MTR_GetStatus
This function gets the state of system operation of the motor control program.
Format
uint8_t R_MTR_GetStatus(uint8_t u1_id)
Parameters
u1_id
Specifies the ID of the motor to be controlled.
MTR_ID_A /* Motor A*/
Return Values
State of system operation
MTR_MODE_INACTIVE (0x00)
MTR_MODE_ACTIVE (0x01)
MTR_MODE_ERROR (0x02)
Properties
The prototypes are declared in r_mtr_driver_acces.h.
Description
The indicator of the state of system operation reflects motor driving being stopped (INACTIVE), the motor
being driven (ACTIVE), or an abnormal state (ERROR).
Example
uint8_t u1_motor_status
/* Get status of motor control system */
u1_motor_status = R_MTR_GetStatus(MTR_ID_A);