Commissioning in TwinCAT 3

With the following steps you configure an EL7411 in TwinCAT 3 for the operation with Drive Motion Control.

1. In the CoE parameter 0x7010:03 "Modes of operation" set the operation mode "Drive Motion Control (DMC)".
Commissioning in TwinCAT 3 1:
2. Activate the Predefined PDO Assignment "Drive motion control (For TC3 DriveMotionControl Lib)".
Commissioning in TwinCAT 3 2:
The process data for using Drive Motion Control is activated.
3. Create a PLC project if none has been created yet.
4. Add the library "Tc3_DriveMotionControl" to the PLC project.
(If you want to use Drive Motion Control without the library "Tc3_DriveMotionControl", see chapter State machine.)
Commissioning in TwinCAT 3 3:
5. If the libraries "Tc3_DriveMotionControl" and "Tc2_Mc2" are used simultaneously in the current project:
In the window "Properties" of one of the two libraries, set the property "Qualified access only" to "True".
Commissioning in TwinCAT 3 4:
The library with "Qualified access only" can now 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.
6. Declare a variable of type "AXIS_REF" in the PLC. Sample:
VAR
   DmcAxis:   AXIS_REF;
END_VAR
7. 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:
8. In the Solution Explorer link the PLC variables with the process data of EL7411.
Commissioning in TwinCAT 3 6:
9. In the PLC code, call the function block ReadStatus() cyclically, ideally at the beginning of each PLC cycle.