Commissioning in TwinCAT 3

Use the following steps to configure channel 1 of a EP7414-9071 for operation with Drive Motion Control.

Configure channel 2 in the same way. The parameter indices for channel 2 are each increased by 0x0800 compared to channel 1.

1. Set the operation mode “Drive Motion Control (DMC)” in CoE parameter 0x6060 “Modes of operation”.
Commissioning in TwinCAT 3 1:
2. Activate the Predefined PDO AssignmentDrive motion control (For TC3 DriveMotionControl Lib)”.
Commissioning in TwinCAT 3 2:
The process data for using Drive Motion Control is activated.

PLC configuration

1. Create a PLC project if none has been created yet.
2. Add the “Tc3_DriveMotionControl” library to the PLC project.
(If you want to use Drive Motion Control without the “Tc3_DriveMotionControl” library, see chapter State machine.)
Commissioning in TwinCAT 3 3:
3. If the “Tc3_DriveMotionControl” and “Tc2_Mc2” libraries are used simultaneously in the current project:
Set the “Qualified access only” property to “True” in the “Properties” window for one of the two libraries.
Commissioning in TwinCAT 3 4:
The library with “Qualified access only” can only be addressed in the PLC code via the corresponding namespace, e.g.: Tc3_DriveMotionControl.MC_Stop()
This avoids name conflicts, e.g. when calling the function block MC_Stop, which has the same name in both libraries.
4. Declare a variable of type “AXIS_REF” in the PLC. Sample:
VAR
   DmcAxis:   AXIS_REF;
END_VAR
5. Click on “Build’ > “Build Solution” in the menu bar.
The project is compiled.
The process image of the PLC task is generated.
Commissioning in TwinCAT 3 5:
6. In the Solution Explorer link the PLC variables with the process data of EP7414-9071.
Commissioning in TwinCAT 3 6:
7. In the PLC code, call the function block ReadStatus() cyclically, ideally at the beginning of each PLC cycle.