RX72M Group
Single-Chip Motor Control via EtherCAT Communications
R01AN5434EJ0110 Rev.1.10
Page 36 of 85
Aug.31.2020
5.10 R_MTR_GetPositioningFlag
This function gets the value of the positioning completed flag.
Format
uint8_t R_MTR_GetPositioningFlag (uint8_t u1_id)
Parameters
u1_id
Specifies the ID of the motor to be controlled.
MTR_ID_A /* Motor A*/
Return Values
MTR_FLG_CLR(0): Positioning not completed
MTR_FLG_SET(1): Positioning completed
Properties
The prototypes are declared in r_mtr_driver_acces.h.
Description
Checking of the completion of positioning is based on judging whether the difference between the target
position and the current position is within a certain range.
Example
/* If the positioning flag is set, then turn on the LED */
if (MTR_FLG_SET == R_MTR_GetPositioningFlag(MTR_ID_A))
{
led_on();
}