![Renesas RX72M Series Скачать руководство пользователя страница 34](http://html.mh-extra.com/html/renesas/rx72m-series/rx72m-series_application-note_1440520034.webp)
RX72M Group
Single-Chip Motor Control via EtherCAT Communications
R01AN5434EJ0110 Rev.1.10
Page 34 of 85
Aug.31.2020
5.8 R_MTR_SetPosition
This function sets the position command value in degrees.
Format
void R_MTR_SetPosition(int16_t s2_ref_position)
Parameters
s2_ref_position
Position command value [deg]
Return Values
None
Properties
The prototypes are declared in r_mtr_driver_acces.h.
Description
The position command value is a signed value in units of degrees.
The position after initialization of the position of the motor’s magnet is 0 degrees.
Example
/* Set reference position 180[deg] */
R_MTR_SetPosition(180);