TcCOM_Sample03_PlcCreatesCpp
Just like Sample02, this sample describes a TcCOM communication between PLC and C++. To this end a PLC application uses functionalities of a TwinCAT C++ class. The required instances of this C++ class will be created by the PLC itself in this sample. In this way own algorithms written in C++ can be used easily in the PLC.
Although in the event of the use of an existing TwinCAT C++ driver the TwinCAT C++ license is required on the destination system, a C++ development environment is not necessary on the destination system or on the development computer.
An already built C++ driver provides one or more classes whose interfaces are deposited in the TMC description file and thus are known in the PLC.
The procedure is explained in the following sub-chapters:
1. Provision of a TwinCAT C++ driver and its classes
2. Creating an FB in the PLC that creates the C++ object and offers its functionality
3. Execution of the sample project
Downloading the sample: TcCOM_Sample03_PlcCreatesCpp.zip
System requirements
TwinCAT version | Hardware | Libraries to be integrated |
---|---|---|
TwinCAT 3.1, Build 4020 | x86, x64 | Tc3_Module |