User Documentation
Table Of Contents
- Table of contents
- 1 Introduction
- 2 Safety instructions
- 3 System overview
- 4 Operating behavior
- 5 Software installation
- 6 Configuration
- 7 Program development
- 8 Licensing
- 9 Device Administration (DevAdmin)
- 10 Software units
- 11 OPC UA Server
- 12 Node-RED
- 13 LongtermDiagnosticMonitor
- 14 Data recorder
- 15 Diagnostics
- 16 Maintenance
- 17 Technical data
- 18 Directives and standards
- 19 Appendix: Tutorial - creating an IEC project
- 20 Appendix: Addressing in the Ethernet (basics)
- 21 Appendix: Tutorial FoE
- 22 Appendix: Tutorial - call C function from IEC
- Index

Data recorder
System manual
2696790000/02/04.2020
86
*****************************************************************************
* interface functions
*/
ModuleInitFunc moduleInit = &ModuleInit;
ModuleStartFunc moduleStart = &ModuleStart;
ModuleStopFunc moduleStop = &ModuleStop;
ModuleExitFunc moduleExit = &ModuleExit;
HookClientFunc moduleCallback = &ModuleCallback;
/
*****************************************************************************
* macros
*/
#define ReturnIfNot(cond) \
if (!(cond)) { LogApiTrace(traceid, "### ReturnIfNot@line %d ###",
__LINE__);return;}
/
*****************************************************************************
* constants
*/
static const char scProfileName[] = "TestDataRecAppP1";
static const char scVarNameTemp[] = "temperature";
static const char scVarNamePres[] = "pressure";
/
*****************************************************************************
* static variables
*/
static int32_t sTemp;
static float sPres;
static DataRecApiProfileId sP1Id;
static DataRecApiVarId sTempId;
static DataRecApiVarId sPresId;
General instructions
Automatic recordings are to be configured in C-applications with the
DataRecApiSetRecContext function. The function defines a task context for
the recording based on the following information:
● Temporal distance of the individual recordings in μs
● Task priority of the individual recordings (from 1 = high to 31 = low)
● CPU task binding (starting from 0, or -1, for system-side selected stan-
dard binding)
With these settings a task is generated on the system-side, which is queued
under the usual application tasks in regards to intermittency and priority. To
fulfill certain requirements on the determinism of the recording, the interac-
tion of this task with the remaining application tasks is to be taken into ac-
count. For example, if the time stamps of the data detect unwanted “jitter,”
the selection of the above parameters is to be reconsidered. Furthermore,
the priority should not be too high, the distance should not be too short and
the quantity of data should not be too large in order to prevent a blocking of
real-time-critical tasks.