Voice kit for ra8m1 microcontroller group (28 pages)
Summary of Contents for Renesas RA6T2
Page 1
’Renesas Motor Workbench’. The targeted software for this application is only to be used as reference purposes only and Renesas Electronics Corporation does not guarantee the operations. Please use this after carrying out a thorough evaluation in a suitable environment.
Encoder signal interrupt processing ....................83 Evaluation environment explanation ..................84 Importing the Demo Project ........................84 Building and Debugging ........................85 Quick Start ............................. 86 Motor Control Development Support Tool ‘Renesas Motor Workbench’ ..........87 R01AN6841EJ0110 Rev.1.10 Page 2 of 100 Jan 23, 2024...
Page 3
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 4.4.1 Overview .............................. 87 4.4.2 Easy function operation example ......................88 4.4.3 List of variables for Analyzer function ....................92 4.4.4...
Table 2-2 Software Development Environment studio version FSP version Toolchain version GCC ARM Embedded : 10.3.1.20210824(RA6T2,RA6T3,RA4T1) studio:2023-10 V5.1.0 13.2.1.arm-13-7 (RA8T1) For purchase and technical support, contact Sales representatives and dealers of Renesas Electronics Corporation. R01AN6841EJ0110 Rev.1.10 Page 4 of 100 Jan 23, 2024...
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 2.2 Hardware specifications 2.2.1 Hardware configuration diagram RA6T2 A/D converter input Bus voltage Power supply circuit IU_AIN Phase IV_AIN current...
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 2.2.2 User interface Table 2-3 is lists of user interfaces of this system. Table 2-3 User Interface Item Interface component...
Page 7
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series List of port interfaces of the sensor. Table 2-5 Port Interfaces Function MCI-LV-1 CN5 2pin Encoder A phase input CN5 6pin...
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 2.2.3 Peripheral functions List of the peripheral functions used in this system is given in Table 2-6. Table 2-6 List of the Peripheral Functions...
Page 9
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-2 Overall FSP Stacks diagram Figure 2-3 FSP Configuration of ADC Driver [1/3] R01AN6841EJ0110 Rev.1.10 Page 9 of 100...
Page 10
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-4 FSP Configuration of ADC Driver [2/3] R01AN6841EJ0110 Rev.1.10 Page 10 of 100 Jan 23, 2024...
Page 11
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-5 FSP Configuration of ADC Driver [3/3] R01AN6841EJ0110 Rev.1.10 Page 11 of 100 Jan 23, 2024...
Page 12
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-6 FSP Configuration of AGT Driver R01AN6841EJ0110 Rev.1.10 Page 12 of 100 Jan 23, 2024...
Page 13
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-7 FSP Configuration of GPT Driver for PWM output R01AN6841EJ0110 Rev.1.10 Page 13 of 100 Jan 23, 2024...
Page 14
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-8 FSP Configuration of GPT Driver for phase counting timer [1/5] Figure 2-9 FSP Configuration of GPT Driver for phase counting timer [2/5] R01AN6841EJ0110 Rev.1.10...
Page 15
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-10 FSP Configuration of GPT Driver for phase counting timer [3/5] Figure 2-11 FSP Configuration of GPT Driver for phase counting timer [4/5] R01AN6841EJ0110 Rev.1.10...
Page 16
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-12 FSP Configuration of GPT Driver for phase counting timer [5/5] R01AN6841EJ0110 Rev.1.10 Page 16 of 100 Jan 23, 2024...
Page 17
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-13 FSP Configuration of GPT Driver for free run timer R01AN6841EJ0110 Rev.1.10 Page 17 of 100 Jan 23, 2024...
Page 18
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-14 FSP Configuration of POEG Driver R01AN6841EJ0110 Rev.1.10 Page 18 of 100 Jan 23, 2024...
Page 19
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 2.2.3.2 RA4T1 (1) 12-bit A/D Converter (ADC12) U-phase current (Iu), V-phase current (Iv), W-phase current (Iw), inverter bus voltage (Vdc), and speed command (VR) are measured in "Single scan mode"...
Page 20
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-16 FSP Configuration of ADC Driver [1/2] R01AN6841EJ0110 Rev.1.10 Page 20 of 100 Jan 23, 2024...
Page 21
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-17 FSP Configuration of ADC Driver [2/2] R01AN6841EJ0110 Rev.1.10 Page 21 of 100 Jan 23, 2024...
Page 22
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-18 FSP Configuration of AGT Driver R01AN6841EJ0110 Rev.1.10 Page 22 of 100 Jan 23, 2024...
Page 23
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-19 FSP Configuration of GPT Driver for PWM output R01AN6841EJ0110 Rev.1.10 Page 23 of 100 Jan 23, 2024...
Page 24
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-20 FSP Configuration of GPT Driver for phase counting timer [1/5] R01AN6841EJ0110 Rev.1.10 Page 24 of 100 Jan 23, 2024...
Page 25
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-21 FSP Configuration of GPT Driver for phase counting timer [2/5] R01AN6841EJ0110 Rev.1.10 Page 25 of 100 Jan 23, 2024...
Page 26
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-22 FSP Configuration of GPT Driver for phase counting timer [3/5] R01AN6841EJ0110 Rev.1.10 Page 26 of 100 Jan 23, 2024...
Page 27
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-23 FSP Configuration of GPT Driver for phase counting timer [4/5] R01AN6841EJ0110 Rev.1.10 Page 27 of 100 Jan 23, 2024...
Page 28
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-24 FSP Configuration of GPT Driver for phase counting timer [5/5] R01AN6841EJ0110 Rev.1.10 Page 28 of 100 Jan 23, 2024...
Page 29
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-25 FSP Configuration of GPT Driver for free run timer Figure 2-26 FSP Configuration of POEG Driver R01AN6841EJ0110 Rev.1.10...
Page 30
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 2.2.3.3 RA6T3 (1) 12-bit A/D Converter (ADC12) U-phase current (Iu), V-phase current (Iv), W-phase current (Iw), inverter bus voltage (Vdc), and speed command (VR) are measured in "Single scan mode"...
Page 31
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-28 FSP Configuration of ADC Driver [1/2] R01AN6841EJ0110 Rev.1.10 Page 31 of 100 Jan 23, 2024...
Page 32
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-29 FSP Configuration of ADC Driver [2/2] R01AN6841EJ0110 Rev.1.10 Page 32 of 100 Jan 23, 2024...
Page 33
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-30 FSP Configuration of AGT Driver R01AN6841EJ0110 Rev.1.10 Page 33 of 100 Jan 23, 2024...
Page 34
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-31 FSP Configuration of GPT Driver for PWM output R01AN6841EJ0110 Rev.1.10 Page 34 of 100 Jan 23, 2024...
Page 35
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-32 FSP Configuration of GPT Driver for phase counting timer [1/5] R01AN6841EJ0110 Rev.1.10 Page 35 of 100 Jan 23, 2024...
Page 36
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-33 FSP Configuration of GPT Driver for phase counting timer [2/5] R01AN6841EJ0110 Rev.1.10 Page 36 of 100 Jan 23, 2024...
Page 37
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-34 FSP Configuration of GPT Driver for phase counting timer [3/5] R01AN6841EJ0110 Rev.1.10 Page 37 of 100 Jan 23, 2024...
Page 38
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-35 FSP Configuration of GPT Driver for phase counting timer [4/5] R01AN6841EJ0110 Rev.1.10 Page 38 of 100 Jan 23, 2024...
Page 39
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-36 FSP Configuration of GPT Driver for phase counting timer [5/5] R01AN6841EJ0110 Rev.1.10 Page 39 of 100 Jan 23, 2024...
Page 40
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-37 FSP Configuration of GPT Driver for free run timer Figure 2-38 FSP Configuration of POEG Driver R01AN6841EJ0110 Rev.1.10...
Page 41
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 2.2.3.4 RA8T1 (1) 12-bit A/D Converter (ADC12) U-phase current (Iu), V-phase current (Iv), W-phase current (Iw), inverter bus voltage (Vdc), and speed command (VR) are measured in "Single scan mode"...
Page 42
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-40 FSP Configuration of ADC Driver [1/2] Figure 2-41 FSP Configuration of ADC Driver [2/2] R01AN6841EJ0110 Rev.1.10 Page 42 of 100...
Page 43
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-42 FSP Configuration of AGT Driver Figure 2-43 FSP Configuration of GPT Driver for PWM output R01AN6841EJ0110 Rev.1.10 Page 43 of 100...
Page 44
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-44 FSP Configuration of GPT Driver for phase counting timer [1/4] Figure 2-45 FSP Configuration of GPT Driver for phase counting timer [2/4] R01AN6841EJ0110 Rev.1.10...
Page 45
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-46 FSP Configuration of GPT Driver for phase counting timer [3/4] Figure 2-47 FSP Configuration of GPT Driver for phase counting timer [4/4] R01AN6841EJ0110 Rev.1.10...
Page 46
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Figure 2-48 FSP Configuration of GPT Driver for free run timer Figure 2-49 FSP Configuration of POEG Driver R01AN6841EJ0110 Rev.1.10...
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 2.3 Software configuration 2.3.1 Software file configuration Folder and file configuration of the software is given below. Table 2-7 File and folder configuration[1/2]...
Page 48
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Table 2-8 File and folder configuration[2/2] Folder Subfolder File Remarks fsp/lib Library files fsp/src BSP driver r_adc_b/r_adc_b.c(RA6T2) AD driver r_adc/r_adc.c(RA4T1,RA6T3) r_agt/r_agt.c...
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 2.3.2 Module configuration Module configuration of the software is described below. Application Layer (User Application) Main User Interface Module mtr_main.c r_mtr_ics.c...
Content Control method Vector control Position detection Incremental encoder (A-B Phase) method Motor rotation start/stop SW1 input or input from ‘Renesas Motor Workbench’ Input voltage DC 24 [V] Main clock frequency RA6T2: 240 [MHz] RA6T3: 200 [MHz] RA4T1: 100 [MHz]...
A/D Converter (1) Motor rotation speed reference The rotation speed and position command value of the motor is determined from the input from ‘Renesas Motor Workbench’ or the output value (analog value) of VR1. Rotation speed and position command value from VR1 is measured as shown in the table below.
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 3.1.3 Modulation (current control module) A modulated voltage can be output to improve the efficiency of voltage usage. The modulation operation is set from the API of the current control module.
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 3.1.4 State transition Figure 3-1 is a state transition diagram of the vector control with encoder software. In the target software of this application note, the software state is managed by “SYSTEM MODE”.
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 3.1.5 Start-up method Figure 3-2 and Figure 3-3 show the software implementation of d-axis and encoder alignment method. The d-axis alignment method used as startup control of position control method, in initialization mode (MTR_MODE_INIT) and Boot mode (MTR_MODE_BOOT).
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 3.1.6 Position Profile Generation (Position Profile of Trapezoidal Curve for Speed Command Value) In vector control software for PMSM with encoder, the position profile generation is used to create command value (input position value).
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 3.1.7 Speed Measurement 3.1.7.1 Speed calculation using encoder at low speed The sample software calculates the speed from the encoder count (A, B phase signal edge) intervals for higher real-time and slow speed resolution.
Page 58
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 3.1.7.2 Speed calculation using encoder at high speed When using the encoder during high-speed rotation, the speed is calculated from the number of input pulses in the control cycle.
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 3.1.8 System protection function This control software has the following error status and executes emergency stop functions in case of occurrence of respective errors.
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 3.1.9 AD triggers Shows the timing of AD triggers and scan groups. Timer start 50us Carrier cycle ADC trigger ADC trigger...
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 3.2 Function specifications of vector control with encoder software The block diagram of the vector control with encoder is shown below.
Page 62
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Table 3-6 List of Functions Executed in Current Control Period Interrupt (1/4) File name Function name Process overview Encoder control callback...
Page 63
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Table 3-7 List of Functions Executed in Current Control Period Interrupt (2/4) File name Function name Process overview rm_motor_driver_mod_run Calculates duty cycle...
Page 64
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Table 3-8 List of Functions Executed in Current Control Period Interrupt (3/4) File name Function name Process overview Angle/Speed Process in...
Page 65
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Table 3-9 List of Functions Executed in Current Control Period Interrupt (4/4) File name Function name Process overview motor_current_transform_dq_uvw_abs Coordinate transform dq...
Page 66
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Table 3-10 List of Functions Executed in Speed Control Interrupt (1/2) File name Function name Process overview mtr_callback_encoder Encoder control callback...
Page 67
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Table 3-11 List of Functions Executed in Speed Control Interrupt (2/2) File name Function name Process overview rm_motor_speed_first_order_lpf First Order LPF...
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 3.3 Contents of control 3.3.1 Configuration Options The configuration options of the vector control with encoder module for motor can be configured using the RA Configurator.
Page 69
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Table 3-14 Configuration Options for Current Control Configuration Options (rm_motor_current.h) Options Description Selects how many shunt resistances to use current General | Shunt type detection.
Page 70
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Table 3-15 Configuration Options Initial Value(rm_motor_current.h) Options RA6T2 RA4T1 RA6T3 RA8T1 General | Shunt type 2shunt 2shunt 2shunt 2shunt General | Current control decimation General | PWM carrier frequency (kHz) 20.0...
Page 71
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Table 3-16 Configuration Options for Speed Control Configuration Options (rm_motor_speed.h) Options Description Common | Position support Support position control General | Speed control period (sec) The period of speed control process [sec].
Page 72
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Table 3-17 Configuration Options Initial Value(rm_motor_speed.h) Options RA6T2 RA4T1 RA6T3 RA8T1 Common | Position support Enabled Enabled Enabled Enabled General | Speed control period (sec) 0.0005...
Page 73
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Table 3-18 Configuration Options for Position control module Configuration Options (rm_motor_position.h) Options Description General | Position dead band Position dead band...
Page 74
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Table 3-19 Configuration Options Initial Value(rm_motor_position.h) Options RA6T2 RA4T1 RA6T3 RA8T1 General | Position dead band General | Position band limit...
Page 75
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Table 3-20 Configuration Options for Encoder sensing module Configuration Options (rm_motor_sense_encoder.h) Options Description Pole pairs of target motor. Motor Parameter | Pole pairs Resistance of motor [ohm].
Page 76
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Table 3-22 Configuration Options for Driver Access Configuration Options (rm_motor_driver.h) Options Description Common | ADC_B Support ADC_B module support Common | Shared ADC support...
Page 77
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Modulation | Maximum duty Maximum duty of PWM Maximum duty except dead time. Table 3-23 Configuration Options Initial Value(rm_motor_driver.h) Options...
Page 78
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Table 3-24 Configuration Options Initial Value(rm_motor_driver.h) Options RA6T2 RA4T1 RA6T3 RA8T1 General | A/D conversion unit for U Phase current...
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 3.4 Control flowcharts 3.4.1 Main process Main process Initialization of FSP module Initialization of main variables User interface initialization Initialization of communication...
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 3.4.2 Current Control Period Interrupt (Carrier synchronized Interrupt) Process Carrier synchronous interrupt Encoder counter processing Get U phase and W phase current values Get inverter bus voltage value.
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 3.4.3 Speed Control Period Interrupt Process 500 [us] interrupt [INACTIVE] SYSTEM MODE [ACTIVE] Decide direction [INIT MODE] [DRIVE MODE] RUN MODE...
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 3.4.4 Over Current Detection Interrupt Process The overcurrent detection interrupt is an interrupt that occurs when an external overcurrent detection signal is input.
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 3.4.5 Encoder signal interrupt processing Encoder count capture interrupt [NO] Encoder alignment finished [YES] Encoder edge interval cumulation Encoder phase counter cumulation...
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 4. Evaluation environment explanation 4.1 Importing the Demo Project The sample application provided with this document may be imported into e studio using the steps in this section.
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 2. Select “Existing Projects into Workspace”. Figure 4-2 Import Wizard Selection 3. Click “Browse…” button and select the demo project. Click Finish button and the demo project is imported.
For Renesas Flexible Motor Control Series 4.3 Quick Start When executing the sample code only in the evaluation environment without using Renesas motor workbench, the Quick Start Sample Project can be executed with the following procedure. (1) After turning on stabilized power supply or executing reset, LED1, and LED2 on the inverter board are both off and the motor stops.
4.4.1 Overview In the target software of this application note, the motor control development support tool “Renesas Motor Workbench” is used as a user interface (rotating/stop motor, set rotation speed reference, etc). Please refer to ‘Renesas Motor Workbench User’s Manual’ for usage and more details.
Change the user interface to use Renesas Motor Workbench (1) Turn on "RMW UI". If it has already been turned on, turn it off and then turn it on again. Figure 4-6 Procedure for changing to use Renesas Motor Workbench Run the motor (1) Press the “Run” button (2) Enter the command position with the "Ref position"...
Page 89
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Stop the motor (1) Press the “Stop” button Figure 4-8 Motor stop procedure Processing when it stops (error) (1) Turn on "Reset" button.
Page 90
Change the user interface to use Renesas Motor Workbench (1) Turn on "RMW UI". If it has already been turned on, turn it off and then turn it on again. Figure 4-11 Procedure for changing to use Renesas Motor Workbench Run the motor (1) Press the “Run” button (2) Enter the command speed with the "Ref speed"...
Page 91
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Stop the motor (1) Press the “Stop” button Figure 4-13 Motor stop procedure Processing when it stops (error) (1) Turn on "Reset" button.
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series 4.4.3 List of variables for Analyzer function Table 4-1 is a list of variables for Analyzer. These variables are reflected to the corresponding variables when the same values as g_u1_enable_write are written to com_u1_enable_write.
Operation Example for Analyzer Following example shows motor driving operation using Analyzer. Operation is using “Control Window” as shown in Figure 4-4. Regarding specification of “Control Window”, refer to ‘Renesas Motor Workbench User’s Manual’. - Change the user interface to Analyzer (1) Confirm the check-boxes of column [W?] for ‘com_u1_sw_userif’...
To use the Tuner function, use the executable file provided by Renesas Motor Workbench or "RA6T2(RA8T1,RA6T3,RA4T1)_MCILV1_SPM_ENCD_FOC_TUNER_E2S_Vxxx" included in the sample software. For details on how to use the Tuner function, refer to the Renesas Motor Workbench User’s Manual. R01AN6841EJ0110 Rev.1.10 Page 94 of 100...
The procedure for changing the communication speed of Renesas Motor Workbench with the sample software is shown below. See the Renesas Motor Workbench User's Manual for the values to change. Change the communication speed setting of the sample software (when the required communication rate is 10 Mbps) (1) Change the value of ICS_BRR in r_mtr_ics.h to 1.
For Renesas Flexible Motor Control Series 4.4.7 How to use the built-in communication library The procedure for connecting to Renesas Motor Workbench using the built-in communication library without using the communication board with the sample software is shown below. Connection between PC and CPU board (1) Connect the CPU board and PC via a USB / serial conversion board, etc.
Page 97
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series (2) Register ICS2_RA6T2_Built_in.o Figure 4-21 Register ICS2_RA6T2.o (3) Change the value of USE_BUILT_IN in r_mtr_ics.h to 1. Figure 4-22 Modification of r_mtr_ics.h R01AN6841EJ0110 Rev.1.10...
Page 98
- AB incremental type encoder For Renesas Flexible Motor Control Series Change the communication baud rate setting of Renesas Motor Workbench to connect (1) Change the value to 921,600 with Baud rate Dialog from the Option menu of the Main Window.
- AB incremental type encoder For Renesas Flexible Motor Control Series 5. Reference Documents RA6T2 Group User’s Manual: Hardware (R01UH0951) RA4T1 Group User’s Manual: Hardware (R01UH0998) RA6T3 Group User’s Manual: Hardware (R01UH0999) RA8T1 Group User’s Manual: Hardware (R01UH1016) RA Flexible Software Package Documentation Application note: ‘Encoder vector control for permanent magnet synchronous motor (Algorithm)’...
Vector control for permanent magnetic synchronous motor with encoder - AB incremental type encoder For Renesas Flexible Motor Control Series Revision History Description Rev. Date Page Summary 1.00 May 23, 2023 First edition issued 1.10 Jan 23, 2024 Added description related to RA8T1 R01AN6841EJ0110 Rev.1.10...
Page 101
Unit Products The following usage notes are applicable to all Microprocessing unit and Microcontroller unit products from Renesas. For detailed usage notes on the products covered by this document, refer to the relevant sections of the document as well as any technical updates that have been issued for the products.
Page 102
Renesas Electronics disclaims any and all liability for any damages or losses incurred by you or any third parties arising from the use of any Renesas Electronics product that is inconsistent with any Renesas Electronics data sheet, user’s manual or other Renesas Electronics document.
Need help?
Do you have a question about the RA6T2 and is the answer not in the manual?
Questions and answers