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

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:

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 Simulation Mode axis parameter

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
Default: 2200.0

Maximum Velocity
Default: 2000.0

Maximum Velocity
Default: 2000.0

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
Default: 15000.0

Maximum Acceleration
Default: 10000.0

Changing the default value. The value can be copied from an existing NC2 axis.

Maximum Deceleration
Default: 15000.0

Maximum Deceleration
Default: 10000.0

Changing the default value. The value can be copied from an existing NC2 axis.

 

 

 

Default Dynamics

Default Acceleration
Default: 1500.0

Default Acceleration
Default: 2000.0

Changing the default value. The value can be copied from an existing NC2 axis.

Default Deceleration
Default: 1500.0

Default Deceleration
Default: 2000.0

Changing the default value. The value can be copied from an existing NC2 axis.

Default Jerk
Default: 2250.0

Default Jerk
Default: 4000.0

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)

Homing object

Central parameterization in an optional Homing object as a child object of the axis.

Homing Velocity (off plc cam)

Homing object

Central parameterization in an optional Homing object as a child object of the axis.

Manual Velocity (Slow)
Default: 100.0

Jog Velocity Slow
Default: 100.0

Changing the parameter name. The value can be copied from an existing NC2 axis.

Manual Velocity (Fast)
Default: 600.0

Jog Velocity Fast
Default: 250.0

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 Position Limit Enforcement Enabled = TRUE is set. #Ignore can be used to disable monitoring of the software limit switches in one direction.

Soft Position Limit Maximum Monitoring

Position Limit Enforcement Enabled

A general parameter for enabling monitoring

 

Maximum Position

Maximum Position

The parameter appears when Position Limit Enforcement Enabled = TRUE is set. #Ignore can be used to disable monitoring of the software limit switches in one direction.

 

 

 

Monitoring

Position Lag Monitoring

Position Lag Monitoring Enabled

Changing the parameter name

 

Maximum Position Lag Value

Maximum Position Lag Value

The parameter appears when Position Lag Monitoring Enabled = TRUE is set.

 

Maximum Position Lag Filter Time

Maximum Position Lag Filter Time

The parameter appears when Position Lag Monitoring Enabled = TRUE is set.

Position Range Monitoring

-

 

 

Position Range Window

-

 

Target Position Monitoring

MC_WaitForStableActualPosition

NC2: MC_MoveAbsolute.Done = TRUE when ActPos is within the window specified by the TargetPositionMonitoring and TargetPositionWindow parameters.

MC3: The function block can be buffered after motion commands of the DiscreteMotion type (PLCopen state). MC_MoveAbsolute.Done = TRUE when the setpoint profile reaches the target and is therefore independent of target position monitoring. A clear separation of functionality is established.

 

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:

MC_CamIn.ReactionToMasterError

MC_CamIn.ReactionToSlaveError

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 (MC_CamIn.ReactionToSlaveError := NoReaction), and the slave axis must be decoupled from the master axis. In the MC3, automatic decoupling occurs in this case, and the slave axis initiates its error response. If it is still possible to control the axis, a deceleration ramp following an MC_Reset can be replaced by a user-defined command with the same dynamic limits (this can be done within a PLC cycle).

Couple slave to actual values if not enabled

Example:

MC_CamIn.ReactionToMasterError

MC_CamIn.ReactionToSlaveError

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 TRUE)

No separate parameter - MC3 axes allow motion commands to be sent to the slave axis (default TRUE)

Slave axes can be decoupled from their master axis using a motion command (BufferMode := Aborting)

Allow motion commands to external setpoint axis

No separate parameter - MC3 axes allow motion commands on axes with external setpoint generation enabled (default TRUE)

 

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 and Additional Time Shift To Hardware parameters.

 

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 Is Modulo Axis = TRUE .

 

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 Position Data Range parameter is set to UserDefined. A manual check of the value is necessary. In MC3, the value range is signed.

FullRange: Refers to the maximum range of values that can be represented by the data type, e.g., 0 and 2^32 for UDINT, and -2147483648 to 2147483647 for DINT.

UserDefined: Manually enter the value range for the value from the PDO link.

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 Position Interpretation parameter is set to AbsoluteUserDataRange. Number of unique increments per revolution (2^20-1 for a single-turn absolute encoder).

Reference System

Axis > Drive Type / General > Position Interpretation

or

Axis > Encoder Type / General > Position Interpretation

  • INCREMENTAL corresponds to Incremental
  • INCREMENTAL (single-turn absolute) corresponds to Incremental
  • ABSOLUTE corresponds to AbsoluteFullRange
  • ABSOLUTE MULTITURN RANGE (with single overflow) corresponds to AbsoluteFullRange
  • ABSOLUTE SINGLETURN RANGE (with single overflow) corresponds to AbsoluteFullRange
  • ABSOLUTE (modulo) corresponds to AbsoluteModulo

 

 

 

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 Position Limit Enforcement Enabled = TRUE is set. #Ignore can be used to disable monitoring of the software limit switches in one direction.

Soft Position Limit Maximum Monitoring

Position Limit Enforcement Enabled

A general parameter for enabling monitoring

 

Maximum Position

Maximum Position

The parameter appears when Position Limit Enforcement Enabled = TRUE is set. #Ignore can be used to disable monitoring of the software limit switches in one direction.

 

 

 

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 Typ should be set to PT1. The additional parameters for setting the filter times will then become visible.

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

Homing object

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