C++-samples
Numerous samples are available – further samples follow.
This picture provides an overview in graphical form and places the emphasis on the interaction possibilities of a C++ module.
Beyond that, this is a table with brief descriptions of the samples.
Number | Title | Description |
01 | This article describes the implementation of a TC3 C++ module that uses an IO module mapped with physical IO. This sample describes the quick start for the purpose of creating a C++ module that increments a counter on each cycle and assigns the counter to the logical output "Value" in the data area. | |
02 | Describes the flexibility of C++ code when working with IOs that are configured at the task. Thanks to this approach, a finally compiled C++ module can affect various IOs connected with the IO task much more flexibly. One application could be to check cyclic analog input channels, where the number of input channels can differ from one project to another. | |
03 | Describes the design and implementation of one's own ADS interface in a C++ module.
| |
05 | Shows how CoE registers of EtherCAT devices can be accessed over ADS. | |
06 | Shows how symbols in an ADS server can be accessed via the ADS interface. C# ADS client connects to a module implemented in PLC/C++/Matlab. Upload the available symbol information and read/write subscription for process values. | |
07 | Describes the implementation of a TC3 C++ module that receives ADS notifications regarding data changes on other modules. | |
08 | Describes the implementation of methods that can be called by ADS via the task. | |
10 | Describes the interaction between two C++ modules with a direct data pointer. The two modules must be implemented on the same CPU core in the same real-time context. | |
11 | Sample11: Module communication: PLC module calls a method of a C-module | This sample contains two parts
|
11a | Sample11a: Module communication: C-module cites a method in the C-module | This sample contains two classes in one driver (can also be done between two drivers)
|
12 |
| |
13 |
| |
19 | Describes how the File IO function can be used in a synchronized manner with C++ modules. | |
20 | Describes how the File IO function can be used with C++ modules. | |
20a | A more extensive sample than S20 and S19. It describes the cyclic read and/or write access to files from a TC3 C++ module. | |
22 | Describes how the TwinCAT Automation Device Driver (ADD) is to be written for access to the DPRAM. | |
23 | Describes the use of Structured Exception Handling (SEH) based on five variants. | |
24 | Describes the use of semaphores. | |
25 | Describes how to use the TC3 C++ static library contained in another TC3 C++ module. | |
26 | Describes the determination of the task execution order, if a task is assigned to more than one module. | |
30 | Describes the measurement of the TC3 C++ cycle or execution time. | |
31 | Describes the implementation of a behavior in C++, which is comparable to a TON function block of PLC / 61131. | |
37 | Describes the loading and saving of the state of an object during the initialization and de-initialization. | |
TcCOM | Several samples are provided to illustrate the module communication between PLC and C++. |
- Sample01: Cyclic module with IO
- Sample02: Cyclic C++ logic, which uses IO from the IO Task
- Sample03: C++ as ADS server
- Sample05: C++ CoE access via ADS
- Sample06: UI-C#-ADS client uploading the symbolic from module
- Sample07: Receiving ADS Notifications
- Sample08: provision of ADS-RPC
- Sample10: module communication: Using data pointer
- Sample11: module communication: PLC module invokes method of C-module
- Sample11a: Module communication: C module calls a method of another C module
- Sample12: module communication: Using IO mapping
- Sample13: Module communication: C-module calls PLC methods
- Sample19: Synchronous File Access
- Sample20: FileIO-Write
- Sample20a: FileIO-Cyclic Read / Write
- Sample22: Automation Device Driver (ADD): Access DPRAM
- Sample23: Structured Exception Handling (SEH)
- Sample24: Semaphores
- Sample25: Static Library
- Sample26: Order of execution in a task
- Sample30: Timing Measurement
- Sample31: Functionblock TON in TwinCAT3 C++
- Sample35: Access Ethernet
- Sample37: Archive data
- TcCOM samples