MCEDesigner Application Guide
Step-by-step instructions for setting up motor control system with iMOTION™ ICs
iMOTION2.0 MCEDesigner_V2.3.0.1 overview
- Compatible iMOTION™ 1.0 product.
- Script function variables tuning and monitor are available.
- Parameters compared list for review before "Export".
- Parameters real value tunes function.
- Bit Field registers detail information showing.
- Trace wave showing in real value mode.
iMOTION2.0 MCEWizard_MCEDesigner_V2.3.0.1
The MCEDesigner software suite consists of MCEWizard and MCEDesigner.
MCEWizard:
- Defines control gains, limits, and fault levels based on real number inputs.
- Converts gains and levels to parameter counts based on hardware and control limit settings.
- Exports parameters and variable scale factors to MCEDesigner.
MCEDesigner:
- Allows users to read from 16-bit MCE variable registers and read from/write to MCE parameter registers.
- Displays both real and count value for all variable registers and selected parameter registers.
The MCE core is a 16-bit fixed point processor.
The workflow involves Application Script code, System Parameters (V, A, W, mH), Script editor and compiler, Configuration spreadsheet, File interface, GUI, Question database, PC files, Parameter Script FW, MCE FW, and Comm port.
MCE control variable scaling
This section describes how motor control variables are scaled.
Application Input: Includes VSP, RAMP, Freq, UART, Input Select, TargetSpeed.
Motor D-Q Control: Voltage, current, and velocity are scaled according to rated current, inverter voltage range, and maximum speed. This involves components like Input Select, SpdRef, IqRef, LIMIT, Vq, Vd, MotorSpeed, and PI controllers.
Motor AC Control: Voltage, current, and flux are scaled according to feedback signal measurement range and motor back EMF. This includes V_Alpha, V_Beta, Flx_M, Flux Estimator & Angle PLL, Space Vector PWM, Dead time, Gate Signals, and current sense options.
Examples:
- Rated motor current = 4096 counts
- Full scale AC current range = 2048 counts
Control Flow: Includes Startup Sequence/Catch Spin/Stop and Fault Handling.
MCE Parameter scaling
A limited set of parameters have a one-to-one relationship with MCEWizard inputs and can be directly tuned in MCEDesigner.
- Limit settings are scaled per variable being limited.
- Control gains should be scaled using Wizard.
- Sequence timing is scaled in 1ms/10ms steps.
- Hardware timing is scaled in 10ns/20ns steps.
- Fault levels and transition thresholds are scaled per relevant variable being adjusted.
Variable and Parameter Naming Convention
This section details the naming conventions for MCE units, their scaling, and information text.
- MCE Unit: Examples include #DIRECT, #M_MTR_IAB_A, #M_MTR_IAB_mA, #M_MTR_VDC_V.
- Count to Real Scaling (1/S): Specifies the conversion factor (e.g., 1/S=1, 1/S=1/Current_scaling_Mtr).
- Units: Such as N/A, A, mA, V.
- Information Text: Provides details like "This count is the real value" or maximum counts and their corresponding real values (e.g., Max: 2048 Counts = (value=2048/S) A).
MCE Unit Structure:
- Real value unit: e.g., A, mA, V, mV, rpm s, us...
- Base name: e.g., IAB, VDC, FLX, ANG, IDQ, VEL...
- SYSTEM: e.g., MTR, SYS, PFC.
- Domain: e.g., Param, Measure, Control.
MCE Designer Scaling table example
This section provides an example of a scaling table within MCEDesigner.
Unit Name | Scale | Unit | Comment |
---|---|---|---|
#NOREALUNIT | 1 N/A | N/A | This count value does not have a real value equivalent |
#BITFIELD | 1 N/A | N/A | This count defines bit filed settings |
#DIRECT | 1 N/A | N/A | This count is the real value For PrimaryControlLoop, SW_Version |
#M_MTR_IAB_A | 0.0004073 A | A | Max: 2048 Count <--> 0.83 A For Iu, Iv, Iw, I_Alpha, I_Beta |
#M_MTR_IAB_mA | 0.4073084 mA | mA | Max: 2048 Count <--> 834.17 mA For Iu, Iv, Iw, I_Alpha, I_Beta |
#M_MTR_VDC_V | 0.0134277 V | V | Max: 4095 Count <--> 54.99 V For VdcRaw, VdcFilt, VdcOvLevel, VdcUvLevel, CriticalOvLevel |
#M_MTR_FLXDQ_% | 0.0488281 % | % | Rated: 2048 Count <--> 100.00 % For Flx_M, Flx_Q |
#M_MTR_FLXDQ_Wb | 0.0000003 Wb | Wb | Rated: 2048 Count <--> 0.00 Wb For Flx_M, Flx_Q |
The MCEDesigner interface is shown, displaying register values and their properties.
Agenda
- Run motor with a new iMOTION2.0 system
- Read/Write register definition
- Default function definition
- User function definition
- Re-usable function definition
- Trace function definition
- Fault check and display
- Script function tuning
Run motor with a new iMOTION2.0 system (1)
(1) Prepare firmware and parameters file to be download.
- Get the supported MCE Firmware from Web. The new firmware version will always update to Infineon Web. Visit http://www.infineon.com/iMOTION.
- Using MCEWizard generate parameters file. The MCEWizard needs to align with the firmware version. The parameter needs to align with hardware and motor. Refer to the MCEWizard_V2.3.0.0 user guide.pdf.
Run motor with a new iMOTION2.0 system (2)
(2) Power on system.
- Connect debug USB port to PC and power on the motor system.
- After installing the MCEDesigner package, the On-board debugger (JLink virtual COM) is installed automatically.
- If the On-board debugger (JLink virtual COM) driver is not installed or there is an issue, please install the driver by pointing to the MCEDesigner install JlinkUSBDriver folder.
A file explorer window is shown, indicating the path to the JlinkUSBDriver folder containing WIN2K, x64, x86 subfolders and InstDrivers.exe.
Run motor with a new iMOTION2.0 system (3)
(3) Start software.
- Open the .irc file that fits the selected firmware. Double-click the .irc file or select the irc file after opening MCEDesigner.
- Wait for MCEDesigner to check the device finishing.
- A warning dialog may appear if the device is not detected, not programmed with FW/Pars, or if the COM port setting is unavailable.
- If a warning appears, press "Cancel" and check the COM port setting via "Preferences->Connection" in the System window.
After connection, the system will prompt that the device needs firmware and parameters files to be programmed. A MCEDesigner dialog box indicates "target device firmware and parameters files are not programmed! Please program firmware and parameters files."
Run motor with a new iMOTION2.0 system (4)
(4) Download firmware and parameters file to device.
- In the System windows, press “Tools->Programmer” on the top manual bar.
- Select the appropriate Parameter and Firmware File using the "Browse..." button.
- Press "Start" to program the device.
- A dialog will show the program result.
- After programming the file to the device FLASH, a subsequent programming after power cycle is not needed if the FW/Pars are the same.
The "Program IMC controller" dialog is displayed, allowing selection of Program Parameters, Program Firmware and Parameter, or Program Script, with fields for Parameter File, Firmware File, and Script File, and Browse buttons.
Run motor with a new iMOTION2.0 system (4) - Update Parameters
(4) Update register parameters value in .irc file.
- Update parameters value in .irc file: After successful device programming, a dialog prompts the user to select whether to update parameters in the .irc file. If the user needs to tune the motor, press "Yes".
- Update parameters value in .irc file (another method): Parameters can also be imported directly via "File-> Import Driver Parameters".
Note: This method only updates the .irc register value; the parameters in the device remain the last programmed ones.
Run motor with a new iMOTION2.0 system (5)
(5) Select system tune value format
Choose the value format when tuning the system.
Navigate to "Preferences > Tuning Value Format" to select count or real value for display and editing.
Run motor with a new iMOTION2.0 system (6)
(6) Start Motor with VHz open loop firstly.
- Run VHz open loop to check hardware and current wave.
This step is crucial for new hardware and parameters. It allows verification of Iu/Iv/Iw current waves to identify any mistakes. A higher quality current feedback enables entry into close loop operation.
Note: At this stage, parameters related to current sense may need adjustment in MCEWizard, followed by exporting a text file and programming FLASH to update them.
Run motor with a new iMOTION2.0 system (7)
(7) Run Motor with close loop and tune system.
- Run motor in close loop.
After confirming the current sample and hardware are satisfactory, the system can run in close loop.
Press the "Configure" button to change the current and speed loop type.
Then, press the "Start Motor" button to run at the target speed and check the current wave using the trace function.
Run motor with a new iMOTION2.0 system (8)
(8) Update Parameter value.
Update Parameter temporary value in the .irc file before export.
After system tuning is satisfactory, right-click on the parameter register and select "Update Parameter Value" to use the tuned value for the system.
Run motor with a new iMOTION2.0 system (9)
(9) Export parameter file.
- Export parameter file to be programmed to the device.
After system tuning is complete, the parameter file can be exported for re-use. This file can be programmed to the same system for production.
The "Parameters list" dialog shows parameters for export.
Agenda
- Read/Write register definition
- Default function definition
- User function definition
- Re-usable function definition
- Trace function definition
- Fault check and display
- Script function tuning
Read/Write register definition in MCEDesigner
If a user wants to add a register not present in the .irc file definition for iMOTION2.0, it can be defined in "Register Structure Definition".
- Note 1: Register definition is only permitted in the reference manual provided (IMC Software Reference Manual.pdf).
- Note 2: For STATIC register types, select "system". For DYNAMIC register types, select "MCE".
- Note 3: STATIC registers are only permitted to access within Unlock mode.
The "Register Structure Definitions" window shows options for "Write Registers", "Read Registers", and "Register Allocation".
Examples of "Register Properties" for "LowSpeedLim" and "LowSpeedGain" are shown, detailing register name, offset, type, range, scaling, and description.
Register read and Scaling mode
This section explains how to read registers and configure scaling modes in MCEDesigner.
Clicking on a register group updates all register values in that group.
The "Scaling Mode" can be selected within the "Motor Value Tuning Format" dialog, allowing choice between "Using Count Value Tune" and "Using Real Value Tune".
Register write and scaling selection
This section details the process of writing registers and selecting scaling options in MCEDesigner.
- Select a register group to view values ready to be written to the IC.
- Double-click a register to edit and write its value to the IC.
- Right-click and select "Properties" to assign scaling.
The "Properties" dialog allows setting the "Target Speed" and selecting scaling for transferring count values to real values.
Configuration / Status register bit decoding
This section explains how to decode configuration and status registers.
- Double-click a register to show its properties.
- Single-click a register to show its bit definitions.
The "Bits Configuration Information" for "HwConfig" provides details on various bits, such as "Current Shunt Type", "PWM Mode", and "Active polarity for Low side PWM outputs".
Real time Trace Configuration
This section covers the configuration of real-time trace functionality.
- Right-click and select "Define Trace" to set up tracing.
The "Trace Setup" window allows selection of variables for tracing (CH 1 Source, CH 2 Source) and configuration of scaling (CH 1 Scaling, CH 2 Scaling). It also includes settings for Sample Rate, Trigger, and Output file name.
Agenda
- Default function definition
- User function definition
- Re-usable function definition
- Trace function definition
- Fault check and display
- Script function tuning
Default function definition when tuning motor
MCEDesigner provides four frequently-used functions linked to buttons: Configure, Start, Stop, and Emergency Stop.
The default function process/value can be edited as needed.
- When the system window is activated, each button process calls all related items (Motor / PFC) simultaneously.
- If a sub-window part is activated, the button process calls only that part's defined function. The information button will show . Its function process is defined as "Drive Status".
- For Motor windows, the "Reference Speed" function converts RPM input value to TargetSpeed value and writes it to the device automatically based on the Max Speed in the parameters file.
Agenda
- User function definition
- Re-usable function definition
- Trace function definition
- Fault check and display
- Script function tuning
User function definition when tuning motor
MCEDesigner provides user-defined functions.
- These functions include register read/write, execute delay, process repeat, and Subfunction call capabilities.
- Use "Add register" for sub-level function register groups and "Insert register" for the same-level function register groups.
- Note: Use distinct characters for function names when creating new ones.
Function definition's register advanced option
MCEDesigner offers fixed register values within definition functions, which is useful for fine-tuning parameters.
- For example, if a fine KpSreg value is obtained at motor startup and needs to be retained in the function:
- Select KpSreg and right-click.
- Select "Properties", then "Advanced".
- Choose the option "Do not update on Import Driver Parameters".
Agenda
- Re-usable function definition
- Trace function definition
- Fault check and display
- Script function tuning
Re-usable function definition in Subfunction
If a user needs to use a process involving multi-register operations frequently within a function group, it can be defined as a re-usable function in the "Subfunction Library Definition".
Users can insert Subfunctions into functions when tuning motors.
Agenda
- Trace function definition
- Fault check and display
- Script function tuning
Trace function definition
- Wave trace function is critical for monitoring signals.
- Default wave trace items are listed in the System windows.
- The corresponding registers for these items are defined for user motor tuning.
- Users can create additional trace functions depending on tuning requirements.
Trace function definition setting
- Convenient wave trace function setup is available.
- The sample point aligns with PWM frequency; smaller divided values yield more precise signal variety.
- Different trigger modes can be set (only Channel 1 can be the trigger source).
- Trace edge position is configurable.
- Trace data can be saved in a .txt file for further analysis.
Agenda
- Fault check and display
- Script function tuning
Fault check and display
When an unmasked fault occurs in the motor system, the MCE will stop the motor, and MCEDesigner will retrieve the fault information from the Sw-Faults register.
Detailed fault information is displayed on the bottom strip when the mouse hovers over a red LED indicator.
Agenda
- Script function tuning
Script function tuning
When the motor system uses Script function, users can tune and monitor these variables.
After Script compilation, a ".map" file is generated in the same folder, named similarly to the script (e.g., "IMC101T", "IMC102T", "IMM101T").
After configuring Script GPIO/ADC Pins, users must regenerate and program the configured parameters for power-up.
Steps:
- Step 1: Configuration ADC/GPIO
- Step 2: Calculate parameters
- Step 3: Export for program parameters
Script function tuning (Continued)
After Script compilation, users need to program the script-enabled configured parameters and script code to the device.
- Step 4: Program parameters
- Step 5: Program Script code
After programming Script parameters and code, a version check occurs between the IRC file and the device code. If a warning appears, users need to import the map file.
- Step 6: Script version check will show mismatch.
Script function tuning (Map Import)
When the motor system uses Script function, users can tune and monitor these variables.
After importing the ".map" file into MCEDesigner, the script-defined variables become available for tuning or monitoring.
Step 7: Select action (e.g., "Import Register Map").
Step 8: Select the script ".map" file.
This process allows for imported script write variables and imported script read variables.
Script function tuning (Create Function)
When the motor system uses Script function, users can tune and monitor these variables.
Users can create functions for testing, as demonstrated in the example.
- Step 1: Create function "Script Function test".
- Step 2: Add variables that will be written and read.
- Step 3: Execute this function after system connection is built up.