Overview
The Tc2_Drive library should no longer be used in newer projects. Please use the Tc2_MC2_Drive library instead (see documentation TwinCAT 3 PLC Lib Tc2_MC2_Drive). |
The Tc2_Drive library includes functions and function blocks for SoE drives that access the drive via a drive reference.
Drive libraries
The three drive libraries Tc2_Drive, Tc2_NcDrive and Tc2_MC2_Drive were developed for different functional purposes, but are almost identical in their functionality. The function blocks of the libraries Tc2_NcDrive and Tc_MC2_Drive form wrapper function blocks around the function blocks of the Tc2_Drive library.
Drive library | Use | Access to the drive | Note |
---|---|---|---|
Tc2_Drive See documentation TwinCAT 3 PLC Lib: Tc2_Drive | Use the Tc2_Drive library if you use the drive entirely from the PLC (i.e. without NC). | The drive is accessed via a drive reference. Within the library, the ST_DriveRef structure is used for this with the NetID as a string. For linking purposes, a structure called ST_PlcDriveRef is also provided with the NetID as a byte array. | If you want to access parameters in the drive for which no special function block has been implemented, use the function blocks FB_SoERead_ByDriveRef and FB_SoEWrite_ByDriveRef. These function blocks are implemented in the PLC Lib Tc2_EtherCAT in the SoE Interface folder. |
Tc2_NcDrive See documentation TwinCAT 3 PLC Lib: Tc2_NcDrive | Use the Tc2_NcDrive library if you are using the drive via the NC with the Tc2_Nc libraries. | The drive is accessed via the NC axis structure (NC_TO_PLC). The function blocks of the Tc2_NcDrive library independently determine the access data to the drive (NetID, address and channel number) via the NC axis ID from the NC axis structure. | If you want to access parameters in the drive for which no special function block has been implemented, use the function blocks FB_SoERead and FB_SoEWrite. |
Tc2_MC2_Drive See: TwinCAT 3 PLC Lib Tc2_MC2_Drive documentation | Use the Tc2_MC2_Drive library if you are using the drive via the NC with the Tc2_MC2 library. | The drive is accessed via the MC2 axis reference (AXIS_REF). The function blocks of the Tc2_MC2_Drive library independently determine the access data to the drive (NetID, address and channel number) via the NC axis ID from the MC2 axis reference. | If you want to access parameters in the drive for which no special function block has been implemented, use the function blocks FB_SoERead and FB_SoEWrite. |
Note the differences when using the drive libraries with AX5000 and Bosch Rexroth IndraDrive CS (see Samples) |
Functions
Name | Description |
---|---|
Reads version information from the PLC library. The function will be replaced by the global structure stLibVersion_Tc2_Drive. | |
Converts the C1D word (S-0-0011) of the AX5000 to a structure ST_AX5000_C1D for Class 1 diagnosis | |
Converts the Drive status word (S-0-0135) of the AX5000 into the structure ST_AX5000DriveStatus | |
Converts the C1D word (S-0-0011) of the IndraDrive Cs into the structure ST_IndraDriveCs_C1D for Class 1 diagnosis | |
Converts the drive status word (S-0-0135) of the IndraDrive Cs into a structure ST_IndraDriveCsDriveStatus |
Function blocks
Name | Description |
---|---|
Resets the drive (S-0-0099). | |
Sets the drive password (S-0-0267). | |
Executes a command. | |
|
|
Reads the diagnostic message (S-0-0095). | |
Reads the diagnostic number (S-0-0390). | |
Reads the diagnostic number list (up to 30 entries) (S-0-0375). | |
Reads Class 1 diagnosis (S-0-0011) ... Class 3 diagnosis (S-0-0013). | |
|
|
Sets the Command Control. | |
Checks the command status. | |
|
|
FB_SoERead_ByDriveRef | Reads a parameter (see PLC Lib Tc2_EtherCAT). |
FB_SoEWrite_ByDriveRef | Writes a parameter (see PLC Lib Tc2_EtherCAT). |
|
|
Reads the drive temperature (S-0-0384). | |
Reads the motor temperature (S-0-0383). | |
Reads the DC bus current (S-0-0381). | |
Reads the DC bus voltage (S-0-0380). | |
|
|
Reads the mains voltage (P-0-0200). | |
Sets the Motor Control Word (P-0-0096). | |
Executes an automatic firmware update for the AX5000. | |
|
|
Enables a CoE drive. | |
Generates a simple three-phase velocity profile that can be used to supply a CoE drive directly. | |
Enables a SoE drive. | |
Generates a simple three-phase velocity profile that can be used to supply a SoE drive directly. |
Requirements
Component | Version |
---|---|
TwinCAT on the development computer | 3.1 Build 4016 or higher |
TwinCAT on the Windows CE-Image | 3.1 Build 4016 or higher |
TwinCAT on the Windows XP-Image | 3.1 Build 4016 or higher |