Sample11: Module communication: method call PLC module to C++ module
This article describes the implementation:
- A C++ module that provides methods for controlling a state machine.
Follow this step-by-step introduction to the implementation of a C++ module that provides an interface to the state machine. - Of a PLC module for calling the function of the C++ module.
The fact that no hard-coded link exists between the PLC and the C++ module is a great. Instead, the called C++ instance can be configured in the System Manager.
Follow this step-by-step introduction with regard to the implementation of a PLC project that calls methods from a C++ module.
Download
Here you can access the source code for this sample:
https://github.com/Beckhoff/TC1300_Samples/tree/main/S11-Mod2ModMethod
- 1. Using a Visual Studio with TwinCAT installed, open the project via Open Project ....
- 2. Configure signing for this project by switching on TwinCAT signing with a right-click on Project->Properties->Tc Sign and configure your certificate and password if necessary.
Further information on signing C++ projects can be found in the chapter TwinCAT. - 3. Select your target system.
- 4. Build the sample (e.g. Build->Build Solution).
- 5. Activate the configuration by clicking
.
- The sample is ready for operation.
Further Information
Related documents