![Renesas RX72M Series Скачать руководство пользователя страница 37](http://html.mh-extra.com/html/renesas/rx72m-series/rx72m-series_application-note_1440520037.webp)
RX72M Group
Single-Chip Motor Control via EtherCAT Communications
R01AN5434EJ0110 Rev.1.10
Page 37 of 85
Aug.31.2020
5.11 R_MTR_SetSpeed
This function sets the velocity command value in rpm.
Format
void R_MTR_SetSpeed(int16_t ref_speed)
Parameters
ref_speed
Velocity command value [rpm]
Return Values
None
Properties
The prototypes are declared in r_mtr_driver_acces.h.
Description
The unit of velocity command values is rpm. A negative value will cause rotation in the opposite direction to
forward rotation.
The available range of settings in the sample program is -2000 rpm to 2000 rpm.
Example
/* Set reference position 2000[rpm] */
R_MTR_SetSpeed(2000);