TcCOM samples

Modules can communicate between PLC and C++. The description therefore covers handling of C++ modules on the PLC side and handling of the PLC on the C++ side.
The TcCOM samples for communication with the PLC are shown here.

The TcCOM_Sample01 sample shows how TcCOM communication can take place between two PLCs. In the process functionalities from one PLC are directly called up from the other PLC.

The TcCOM_Sample02 sample shows how a PLC application can use functionalities of an existing instance of a TwinCAT C++ class. In this way separate algorithms written C++ (or Matlab) can be used easily in the PLC.
Although in the event of the use of an existing TwinCAT C++ module the TwinCAT C++ license is required on the target system, a C++ development environment is not necessary on the target system or on the development computer.

The TcCOM_Sample03 sample shows how a PLC application uses functionalities of a TwinCAT C++ class by generating an instance of C++ class at the same time. In comparison to the previous sample this can offer increased flexibility.