Configuring and registering a TcCOM object
Registering in TwinCAT
The following data is used to register a TcCOM object belonging to online tool radius compensation (TcCncServices.h):
- Type 3 (CCNC_REGISTEROBJECT_TYPE_TOOL_RADIUS_COMP) is default.
- If the TcCOM object does not use instance-specific objects, set the Group entry to 0.
- If the TcCOM object uses instance-specific variables, set the Group entry to the respective channel number [1;12] assigned to the object.
Maximum one object per channel. - Index is not used.
An online tool radius compensation object is registered via the following TcCOM interface which is defined in the file TcCncInterfaces.h
- virtual HRESULT TCOMAPI RegisterObject(TcCncRegisterObject& id, ITcUnknown* ipUnk)=0;
- virtual HRESULT TCOMAPI UnregisterObject(TcCncRegisterObject& id)=0;
Supplying the TcCOM object
After online tool radius compensation is generated, there should be 2 files available:
- TMC file
- Driver file
The description of online tool radius compensation is contained in the TMC file, e.g. TcCncMyOnlineToolRadiusComp.tmc.
The file is located in the work directory of the solution.
The drive file directory is dependent on Release or Debug;
- <TwinCAT> \3.1\sdk\_products\TwinCAT RT (x64)\Release or
- <TwinCAT> \3.1\sdk\_products\TwinCAT RT (x64)\Debug
When the configuration is activated, the respective driver file is automatically copied to the directory <TwinCAT>\3.1\Driver\AutoInstall.
Based on the above example name: TcCncMyOnlineToolRadiusComp.sys
![]() | You only need to trigger the generation (Debug/Release) and activate the associated configuration. |
The procedure for debugging the created online tool radius compensation is analogous to debugging an McCOM transformation. This procedure is described in [McCOM transformation, section: Debugging the transformation].
Loading the object
Loading the object for online tool radius compensation is described in “Integrating online tool radius compensation object”.
