RX72M Group
Single-Chip Motor Control via EtherCAT Communications
R01AN5434EJ0110 Rev.1.10
Page 52 of 85
Aug.31.2020
5.26 R_MTR_GetPositionUnits
This function gets the value (number counted) corresponding to the current position.
Format
int32_t R_MTR_GetPositionUnits(uint8_t u1_id)
Parameters
u1_id
Specifies the ID of the motor to be controlled.
MTR_ID_A /* Motor A*/
Return Values
Current position [count]
Properties
The prototypes are declared in r_mtr_driver_ecat_acces.h.
Description
The current position value is a signed value (number counted).
Example
int32_t s4_current_pos_units;
/* Get position units */
s4_current_pos_units = R_MTR_GetPositionUnits(MTR_ID_A);