RX72M Group
Single-Chip Motor Control via EtherCAT Communications
R01AN5434EJ0110 Rev.1.10
Page 53 of 85
Aug.31.2020
5.27 R_MTR_GetSpeedUnits
This function gets the current velocity value (number counted per second).
Format
int32_t R_MTR_GetSpeedUnits(uint8_t u1_id)
Parameters
u1_id
Specifies the ID of the motor to be controlled.
MTR_ID_A /* Motor A*/
Return Values
Get the Current velocity [count/s]
Properties
The prototypes are declared in r_mtr_driver_ecat_acces.h.
Description
The current velocity value is a signed value (number counted per second).
The value is converted to the 16.16-bit fixed point format.
Example
int32_t s4_speed_units;
/* Get speed units */
s4_speed_units = R_MTR_GetSpeedUnits(MTR_ID_A);