Sample Resource Import

This sample shows how a resource file in ECPX format can be used with the TwinCAT 3 EventLogger.

Download the sample: https://github.com/Beckhoff/Tc3Eventlogger_Samples/tree/main/PLC/Tc3EventLogger_ResouceImportSample/TwinCAT%20ResourceImport

For this purpose, a new implementation of the FB_SimpleAdsLogEvent function block is created in the sample. This uses the mapping function F_MapSource generated from Excel, which can be imported via the TcPOU file. The implementation also shows the mapping of the functionality:

The following steps are proposed

A Resource.ecpx file is available and corresponding alarms are to be sent via the TwinCAT 3 EventLogger. The Excel add-in is installed.
1. Import the file into Excel using "Import".
An event class is created from each "source" in which the events can be found. The translations have also been adopted in the translation
2. The event classes can now be further developed in Excel.
3. "Generate TMC file" generates a TMC file.
4. This can be integrated into a TwinCAT Solution by right-clicking on System->TypeSystem "Add existing item".
5. A PLC function can be created using "Create PLC mapping function".
6. This can be imported into a PLC project on DUT by right-clicking "Add"->"Existing Item".
7. The sample provides a sample implementation for a function block that has the same inputs/outputs as the FB_SimpleAdsLogEvent. This means that only the declaration needs to be changed, but not the behavior of the process.
The events are sent by the provided function block via the TwinCAT 3 EventLogger.
For this purpose, the behavior of the exemplary implementation may have to be adapted and, for example, the mapping of the severity adapted. Cf. Importing resource files

The sample shows the result and also provides an example of the output file in ECPX format, generated TMC / Function file.