Importing resource files
Resource files (extension ECPX) are typically located in the directory 3.1\Target\Resource. The TwinCAT 2 EventLogger has created these files via a configuration program.
The files can be used in the new EventLogger via the following workflow:
- The Excel Add-in has been installed.
- 1. Select a resource file in Excel via the menu entry TcEventLogger > Import.
- One event class is created per
SourceId
. - When importing, some mappings are made.
- 2. Check their content in the application and take them into account. The mappings are described below.
- 3. Generate a TMC file via Generate TMC-File.
- The TMC file is integrated in the TwinCAT Solution as described here.
- 4. Additionally you can create a TcPOU file via Create PLC mapping function, which provides a mapping from SourceId/EventId to the corresponding new event.
- The further development can be done in the following in Excel or after one-time import also in the TMC editor (but then no longer in Excel)
The following mappings are made during the import:
- All events about resources have a state
bSetEvent
and are therefore provided as alarms. SourceId
is used as event class and theEventId
as event ID and corresponding event classes are created.- The information
ReqMustCon
is imported and handled as an acknowledgement usingclear
. - The information
nClass
is mapped to theeSeverity
of the TwinCAT 3 EventLogger:
New EventLogger eSeverity | Old EventLogger nClass | ||
---|---|---|---|
0 | Verbose | 0 | None |
0 | Verbose | 1 | Maintenance |
0 | Verbose | 2 | Message |
0 | Verbose | 3 | Hint |
1 | Info | 4 | Stateinfo |
1 | Info | 5 | Instruction |
2 | Warning | 6 | Warning |
3 | Error | 7 | Alarm |
4 | Critical | 8 | Parameter Error |
The sample Resource Import provides the necessary implementations as an example.