RX72M Group
Single-Chip Motor Control via EtherCAT Communications
R01AN5434EJ0110 Rev.1.10
Page 40 of 85
Aug.31.2020
5.14 R_MTR_GetDir
This function gets the currently set direction of motor rotation.
Format
uint8_t R_MTR_GetDir(uint8_t u1_id)
Parameters
u1_id
Specifies the ID of the motor to be controlled.
MTR_ID_A /* Motor A*/
Return Values
Rotation direction
MTR_CW(0):
Clockwise
MTR_CCW(1):
Counterclockwise
Properties
The prototypes are declared in r_mtr_driver_acces.h.
Description
When called, this function gets the direction of rotation.
Example
uint8_t u1_dir;
/* Get direction */
u1_dir = R_MTR_GetDir(MTR_ID_A);