Configuring and registering the transformation with the CNC
Registering the transformation
The following data is used to register a TcCOM (TcCncServices.h)
- Type 1 (see TCCNC_REGISTEROBJECT_TYPE_TRAFO) is defaulted
- Group Channel number of transformation [1;12] selectable at configuration
- Index Number of the kinematic [500;99] selectable at configuration; also permitted for compatibility reasons [65;69]
The transformation is registered via the following TcCOM interface, which is defined in the TcCncInterfaces.h file.
- virtual HRESULT TCOMAPI RegisterObject
(TcCncRegisterObject& id, ITcUnknown* ipUnk)=0; - virtual HRESULT TCOMAPI UnregisterObject
(TcCncRegisterObject& id)=0;
Manual transformation provision
After the transformation is generated, two files must be provided for its uses.
The transformation is described in the TMC file TcCncTrafo1.tmc and is stored out of the source code directory in the following target directory.
<TwinCAT>\3.1\CustomConfig\Modules
The generated device driver (e.g. TcCncTrafo1.sys) is stored by
<TwinCAT>\3.1\SDK\_products\TwinCAT RT (x86)\Release
in
<TwinCAT>\3.1\\Driver\AutoInstall
.
For debugging, the generated device driver (e.g. TcCncTrafo1.sys) and the symbol file (e.g. TcCncTrafo1.pdb) are stored by
<TwinCAT>\3.1\SDK\_products\TwinCAT RT (x86)\Debug
in
<TwinCAT>\3.1\\Driver\AutoInstall
.
Configuration of the transformation
When the transformation is configured, the TcCOM object is selected in the System Manager and the channel (group) and the transformation ID (index) are initialised.
The procedure is illustrated in Integrate transformation.