RX72M Group
Single-Chip Motor Control via EtherCAT Communications
R01AN5434EJ0110 Rev.1.10
Page 10 of 85
Aug.31.2020
2.3 Software Configuration
2.3.1
Software File Configuration
Folders and files configured for the sample program are listed in Table 2-5 to Table 2-7.
The files in gray-shaded cells are those which required changes from the base project to implement the
functionality of the sample program. The files listed in bold letters are those that have been added.
Table 2-5 Configuration of Files for the Motor Control Program (1)
Directory
motor/
File
Description
application/
main/
main.h, main.c
Main function
user_interface/
ics/
r_mtr_ics.h, r_mtr_ics.c
ICS related function definition
ICS_RX72M.h
ICS_RX72M.lib
Communications-related
definitions for tools
Communications library for
tools
board/
r_mtr_board.h, r_mtr_board.h
Board user function definition
middle/
interface/
r_mtr_driver_access.h
r_mtr_driver_access.c
User access function definition
r_mtr_driver_ecat_access.h
r_mtr_driver_ecat_access.c
Definitions of functions for
access by the EtherCAT
communications program
common/
r_mtr_common.h
Common definition
r_mtr_units.h
Definitions of units
r_mtr_filter.h, r_mtr_filter.c
General-purpose filter function
definition
r_mtr_fluxwkn.h
r_mtr_fluxwkn.obj
Definition of a function related
to magnetic-flux weakening
control
r_mtr_pi_control.h
r_mtr_pi_control.c
PI control function definition
r_mtr_transform.h
r_mtr_transform.c
Coordinate transformation
function definition
r_mtr_mod.h, r_mtr_mod.c
Modulation function definition
r_mtr_volt_err_comp.h
r_mtr_volt_err_comp.obj
Voltage error compensation
function definition
r_mtr_statemachine.h
r_mtr_statemachine.c
State machine function
definition
control/
r_mtr_parameter.h
Definitions of various
parameters
r_mtr_ctrl_gain_calc.obj
Control gain calculation
function definition
r_mtr_foc_action.c
Action function definition
r_mtr_interrupt_carrier.c
Carrier interrupt function
definition
r_mtr_interrupt_timer.c
Cycle interrupt function
definition
r_mtr_interrupt_sensor.c
Sensor input interrupt function
definition
r_mtr_foc_control_encd_position.h
r_mtr_foc_control_encd_position.c FOC function definition