Migrating from NC2 to MC3
This guide provides step-by-step instructions on how to migrate a TwinCAT NC2 axis (classic NC PTP) to an MC3 axis.
Requirements
- TwinCAT 3 Motion configuration with one or multiple NC2 axes
- Installation of the MC3 packages is complete (see the Installation chapter)
- It is recommended that you create a backup copy of the original project.
Procedure
Creating MC3 projects and axes
- 1. Create a new MC3 configuration in the existing project folder (see the chapter Creating an MC Project).
- 2. Add new axis objects to the MC project according to the number of axes to be migrated (see the chapter Creating an Axis Object).
- 3. If necessary, assign an application-specific name.
- 4. Distinguish between the virtual axis and the physical axis with its link to the hardware:
- Virtual axis not linked to the I/O configuration:
- 5. Continue with the migration of the axis parameters.
- Axis linked to the I/O configuration:
- 6. Remove the link between the NC2 axis to be migrated and the I/O configuration.
- 7. Link the MC3 axis to the I/O device (see the chapter Link an axis object to hardware Linking an axis object to hardware).
Advanced axis configuration (optional)
The modularity of the MC3 configuration allows for a clearer overview and better organization of the parameters. If a homing procedure or a position controller is required in the MC3 software for the axis to be migrated, additional objects must be inserted below the MC3 axis. The same applies when using the touch probe function.
References:
- Expand the axis object with an additional module
- Referencing cams (homing modules)
- Probe modules (touch probe modules)
- Controller objects (controller modules)
Transfer axis parameters
The parameters for the MC3 axis can be found in the Init Parameter tab.
NC2 Parameter | MC3 Parameter | To be observed | |||
|---|---|---|---|---|---|
Simulation mode in the Solution Explorer context menu | Simulation mode in the Solution Explorer context menu and as the | The parameter can also be written to an MC3 axis during runtime. The prerequisite is that the axis is not enabled. | |||
Unit (Settings tab) | Position Unit (Init Parameter tab) | In MC3, selecting a value from an enumeration type. | |||
|
|
| |||
Maximum Dynamics | |||||
Reference Velocity Maximum Velocity | Maximum Velocity | If the Reference Velocity is used in NC2, the minimum value between the Reference Velocity (NC2) and the Maximum Velocity (NC2) can be calculated for MC3, and this value can be entered as the Maximum Velocity (MC3). | |||
Maximum Acceleration | Maximum Acceleration | Changing the default value. The value can be copied from an existing NC2 axis. | |||
Maximum Deceleration | Maximum Deceleration | Changing the default value. The value can be copied from an existing NC2 axis. | |||
|
|
| |||
Default Dynamics | |||||
Default Acceleration | Default Acceleration | Changing the default value. The value can be copied from an existing NC2 axis. | |||
Default Deceleration | Default Deceleration | Changing the default value. The value can be copied from an existing NC2 axis. | |||
Default Jerk | Default Jerk | Changing the default value. The value can be copied from an existing NC2 axis. | |||
|
|
| |||
Fast Axis Stop | - |
| |||
Fast Axis Stop Signal Type (optional) | - |
| |||
Fast Acceleration (optional) | - |
| |||
Fast Deceleration (optional) | - |
| |||
Fast Jerk (optional) | - |
| |||
|
|
| |||
Manual Motion and Homing | |||||
Homing Velocity (towards plc cam) | Central parameterization in an optional Homing object as a child object of the axis. | ||||
Homing Velocity (off plc cam) | Central parameterization in an optional Homing object as a child object of the axis. | ||||
Manual Velocity (Slow) | Jog Velocity Slow | Changing the parameter name. The value can be copied from an existing NC2 axis. | |||
Manual Velocity (Fast) | Jog Velocity Fast | Changing the default value and the parameter name. The value can be copied from an existing NC2 axis. | |||
Jog Increment (Forward) | MC_Jog.Distance | Available via a function block in “Inching” mode | |||
Jog Increment (Backward) | MC_Jog.Distance | Available via a function block in “Inching” mode | |||
|
|
| |||
Limit Switches | |||||
Soft Position Limit Minimum Monitoring | Position Limit Enforcement Enabled | A general parameter for enabling monitoring | |||
| Minimum Position | Minimum Position | The parameter appears when | ||
Soft Position Limit Maximum Monitoring | Position Limit Enforcement Enabled | A general parameter for enabling monitoring | |||
| Maximum Position | Maximum Position | The parameter appears when | ||
|
|
| |||
Monitoring | |||||
Position Lag Monitoring | Position Lag Monitoring Enabled | Changing the parameter name | |||
| Maximum Position Lag Value | Maximum Position Lag Value | The parameter appears when | ||
| Maximum Position Lag Filter Time | Maximum Position Lag Filter Time | The parameter appears when | ||
Position Range Monitoring | - |
| |||
| Position Range Window | - |
| ||
Target Position Monitoring | MC_WaitForStableActualPosition | NC2: MC3: The function block can be buffered after motion commands of the DiscreteMotion type (PLCopen state). | |||
| Target Position Window | ||||
| Target Position Monitoring Time | ||||
In-Target Alarm | |||||
| In-Target Timeout | ||||
Motion Monitoring | - |
| |||
| Motion Monitoring Window | - |
| ||
| Motion Monitoring Time | - |
| ||
|
|
| |||
Setpoint Generator | - |
| |||
Setpoint Generator Type | - |
| |||
Velocity Override Type | - |
| |||
|
|
| |||
NCI Parameter | - |
| |||
Rapid Traverse Velocity (G0) | - |
| |||
Velo Jump Factor | - |
| |||
Tolerance ball auxiliary axis | - |
| |||
Max. position deviation, aux. axis | - |
| |||
|
|
| |||
Other Settings |
|
| |||
Position Correction | - |
| |||
| Filter Time Position Correction (P-T1) | - |
| ||
Backlash | - |
| |||
Error Propagation Mode | Example:
| Coupling function blocks such as MC_GearIn or MC_CamIn have additional inputs. Couplings are command-based. A separate error propagation setting can be configured for each coupling/command. | |||
| Error Propagation Delay | - | Previous error responses and propagation can be implemented using the settings of coupling function blocks and axis parameters. Example: An error has occurred on the slave axis. The error must not be propagated to the master axis ( | ||
Couple slave to actual values if not enabled | Example:
| Coupling function blocks such as MC_GearIn or MC_CamIn have additional inputs. Couplings are command-based. A separate error propagation setting can be configured for each coupling/command. | |||
| Velocity Window | - |
| ||
| Filter Time for Velocity Window | - |
| ||
Allow motion commands to slave axis (Default | No separate parameter - MC3 axes allow motion commands to be sent to the slave axis (default | Slave axes can be decoupled from their master axis using a motion command ( | |||
Allow motion commands to external setpoint axis | No separate parameter - MC3 axes allow motion commands on axes with external setpoint generation enabled (default |
| |||
Dead Time Compensation (Delay Velo and Position) | Dead Time Compensation from Hardware
| As a rule, dead times are automatically determined during EtherCAT fieldbus initialization and compensated for internally in MC3. If a manual correction is nevertheless necessary, it can be entered in the | |||
| Additional Time Shift from Hardware | ||||
Dead Time Compensation to Hardware
| |||||
| Additional Time Shift to Hardware | ||||
Data Persistence | - |
| |||
Transfer drive parameters
The parameters for the MC3 axis can be found in the Init Parameter tab. It is important to note whether the Show Hidden Children option is enabled in the axis's context menu (disabled by default; Axis > right-click > Show Hidden Children). If the function is enabled, the following parameters are displayed in the child object of the axis, which then becomes visible. Otherwise, all parameters can be accessed centrally via the axis object.
NC2 Parameter | MC3 Parameter | To be observed |
|---|---|---|
Output Settings | ||
Invert Motor Polarity | Drive Type / Scaling > Direction Inverted | In the MC3, the inversion of the motor and encoder orientation is a parameter of the drive object. From the MC's perspective, there is often only one hardware object (e.g., AX8000). In this case, using two parameters with different settings is not advisable, as it will result in a position lag and the control loop will not function as expected. An additional encoder TcCOM object as a child object of the axis also has its own parameter. |
Reference Velocity | - | See the description of the axis parameters |
|
|
|
Position and Velocity Scaling | ||
Output Scaling Factor (Position) | Drive Type / Scaling > Position Scaling Numerator/Denominator from Hardware | Not directly applicable. See the MC3 parameters for scaling the target and actual positions. If the MC considers it to be a hardware object, the parameters can be found under the Drive object. Otherwise, the drive and encoder have their own scaling parameters. |
Output Scaling Factor (Velocity) | Drive Type / Scaling > Velocity Scaling Numerator to Hardware | In this procedure, the Velocity Scaling Denominator must be set to 1. Used to scale the target and actual velocities for the drive and from the encoder, respectively. |
Minimum Drive Output Limitation [-1.0 ... 1.0] | - |
|
Maximum Drive Output Limitation [-1.0 ... 1.0] | - |
|
Output Delay | - |
|
|
|
|
Torque and Acceleration Scaling | ||
Input Scaling Factor (Actual Torque) | Drive Type / Scaling > Torque Scaling from Hardware | The value can be copied directly. |
Input P-T1 Filter Time (Actual Torque) | Drive Type / Actual Torque Filter / Settings > Filter Time Torque | A standalone TcCOM object as a child object under the Drive object. Enable Show Hidden Children to add a filter object. |
Input P-T1 Filter (Actual Torque Derivative) | Drive Type / Actual Torque Filter / Settings > Filter Time Torque Derivative | A standalone TcCOM object as a child object under the Drive object. Enable Show Hidden Children to add a filter object. |
Output Scaling Factor (Torque Setpoint) | - |
|
Output Scaling Factor (Torque Offset) | - |
|
Output Delay (Torque Offset) | - |
|
Output Scaling Factor (Acceleration) | - |
|
Output Delay (Acceleration) | - |
|
|
|
|
Optional Position Command Output Smoothing Filter | ||
Smoothing Filter Type | - |
|
Smoothing Filter Time | - |
|
Smoothing Filter Order (P-Tn only) | - |
|
|
|
|
Other Settings |
|
|
Drive Mode | - |
|
Drift Compensation (DAC-Offset) | - |
|
Following Error Calculation | Axis > Monitoring > Position Lag Calculation | Internal – InternallyCalculated External - HardwareProvided |
Error Tolerance | - |
|
Transfer encoder parameters
The parameters for the MC3 axis can be found in the Init Parameter tab. It is important to note whether the Show Hidden Children option is enabled in the axis's context menu (disabled by default; Axis > right-click > Show Hidden Children). If the function is enabled, the following parameters are displayed in the child object of the axis, which then becomes visible. Otherwise, all parameters can be accessed centrally via the axis object.
From the MC's perspective, there is often only one hardware object (e.g., AX8000). In this case, for example, the MC3 provides only one parameter for reversing the direction of rotation. An additional encoder TcCOM object as a child object of the axis also has its own parameter.
If two options are listed in the “MC3 Parameter” column in the table below, the parameter in question is available for a drive object and, optionally, for an additional encoder.
NC2 Parameter | MC3 Parameter | To be observed | ||
|---|---|---|---|---|
Encoder Evaluation | ||||
Invert Encoder Counting Direction | Axis > Drive Type / Scaling > Direction Inverted or Axis > Encoder Type / Scaling > Direction Inverted | In the MC3, the inversion of the motor and encoder orientation is a parameter of the drive object. In the case of a hardware object, having two parameters with different settings does not make sense, as this results in a position lag and the control loop does not function as expected. | ||
Scaling Factor Numerator | Axis > Drive Type / Scaling > Position Scaling Numerator from Hardware or Axis > Encoder Type / Scaling > Position Scaling Numerator from Hardware |
| ||
Scaling Factor Denominator | Axis > Drive Type / Scaling > Position Scaling Denominator from Hardware or Axis > Encoder Type / Scaling > Position Scaling Denominator from Hardware |
| ||
Position Bias | Axis > Drive Type / Scaling > Encoder Mounting Offset or Axis > Encoder Type / Scaling > Encoder Mounting Offset |
| ||
Modulo Factor | Axis > General > Position Modulus | The axis parameter is visible as soon as the parameter is set to | ||
| Tolerance Window for Modulo Start | Axis > General > Position Modulo Tolerance Window |
| |
Encoder Mask (maximum encoder value) | Axis > Drive Type / General > Maximum Counter Value + Minimum Counter Value or Axis > Encoder Type / General > Maximum Counter Value + Minimum Counter Value | The two MC3 parameters are visible when the
| ||
Encoder Sub Mask | Axis > Drive Type / General > Maximum Absolute Counter Value or Axis > Encoder Type / General > Maximum Absolute Counter Value | The two MC3 parameters are visible when the | ||
Reference System | Axis > Drive Type / General > Position Interpretation or Axis > Encoder Type / General > Position Interpretation |
| ||
|
|
| ||
Limit Switches | ||||
Soft Position Limit Minimum Monitoring | Position Limit Enforcement Enabled | A general parameter for enabling monitoring | ||
| Minimum Position | Minimum Position | The parameter appears when | |
Soft Position Limit Maximum Monitoring | Position Limit Enforcement Enabled | A general parameter for enabling monitoring | ||
| Maximum Position | Maximum Position | The parameter appears when | |
|
|
| ||
Filter | ||||
Filter Time for Actual Position (P-T1) | Axis > Drive Type / Actual Position Filter / Settings > Filter Type = PT1 > Filter Time Position or Axis > Encoder Type / Actual Position Filter / Settings > Filter Type = PT1 > Filter Time Position | An additional TcCOM filter object is a child object of each drive and/or encoder object by default. The | ||
Filter Time for Actual Velocity (P-T1) | Axis > Drive Type / Actual Position Filter / Settings > Filter Type = PT1 > Filter Time Velocity or Axis > Encoder Type / Actual Position Filter / Settings > Filter Type = PT1 > Filter Time Velocity | |||
Filter Time for Actual Acceleration (P-T1) | Axis > Drive Type / Actual Position Filter / Settings > Filter Type = PT1 > Filter Time Acceleration or Axis > Encoder Type / Actual Position Filter / Settings > Filter Type = PT1 > Filter Time Acceleration | |||
|
|
| ||
Homing | ||||
Invert Direction for Homing Sensor Search | Central parameterization in an optional Homing object as a child object of the axis. | |||
Invert Direction for Sync Impulse Search | ||||
Home Position (Calibration Value) | ||||
Reference Mode (Sync condition) | ||||
Homing Sensor Source | ||||