Data recorder

Symbol:

Description:

The data recorder is a function block to collect values of application based variables over a specified period.

The recording of data will be done in relation to the setting of Trigger and Pre-Trigger input and the setting of additional configurations in the parameter dialog.

The data can be read out and displayed during or after the recording with the GreenEye tool.

Parameter:

The creation and parameterization of the data recorders takes place in the data point administration. Under the section "Logger" all data recorder for the project can be managed. The separate help for the data point administration (called by F1 when the dialog is open) will provide additional information about that. The parameterization can lead to the following configurations.

Signals:

Name

I/O

Type(s)

Function

Trig

I

BIT

Triggered usage

PreTrig

I

BIT

Pre-triggered usage

SubDir

I

TEXT

Sub directory for the logger file (optional)

FilePfx

I

TEXT

Prefix of the name of the logger file (optional)

Save

I

BIT

When this signal is HIGH a new file with the recorded data will be created and saved.

Reset

I

BIT

Reset logged data

State

O

WORD

State flags as bit mask

Full

O

FLOAT

Work load percentage

Visualization:

The name of the assigned data recorder will be displayed in the symbol.

Comments:

The name of the logger file is composed in the following format:

Prefix(index)_date_timestamp.dat

The date is given in the following format: YYYMMDD

The time is given in GMT and has the following format: HHMMSS

The file will be saved to the file system of the target system (in case of the test.con.runtime it is …\Target English\test.con.runtime\) under the directory FileStore\SubDir.


Possible configurations for logging

Recording

1

2

3

4

5

6

Usage

Event based

Logger will stopped only by application

X

Trigger input active

The recording will be executed, if the trigger input signal is HIGH when calling the block (within a cyclic task as much as in an event task)

The maximum number of events have to be pre defined

The logger stops when reaching the remaining events after rising edge at Pre - trigger input

X

(X)

Pre – trigger input is active

The recording will be executed each time the function block was called (regardless of a given trigger input).

If a rising edge at the pre-trigger input is detected only the remaining events (determined by the difference between the number of events (1) and defined pre-trigger events (6)) will be recorded.

After this, the recording will stop.

The maximum number of events have to be defined; the indication of pre – trigger events is optional

Time based

The logger stops when reaching the remaining time after rising edge at Pre - trigger input

X

X

(X)

Pre – trigger input is active

The recording will be executed each time the function block was called (regardless of a given trigger input) if the difference between the last recording and the actual time is >= the defined cycle rate.

If a rising edge at the Pre - trigger input is detected only the remaining time (determined by the difference between the duration (5) and defined Pre – trigger duration value (6)) will be recorded.

After this the recording will stop.

Cycle rate and duration have to be defined; the indication of pre – trigger duration value is optional

The logger stops after the prescribed period

X

X

Trigger and pre – trigger inputs are not connected

The recording will be executed each time the function block was called and the difference between the last record and the current time> = cycle rate.

Cycle rate and duration have to be defined.

The logger stops after the prescribed period

X

X

X

Trigger and pre – trigger inputs are not connected

The recording starts after the start time has been reached each time the function block was called and the difference between the last record and the current time> = cycle rate.

Cycle rate, start time and duration have to be defined.

The logger stops when reaching the stop time

X

X

X

Trigger and pre – trigger inputs are not connected

The recording starts after the start time has been reached each time the function block was called and the difference between the last record and the current time> = cycle rate. The recording stops when the stop time has been reached.

Cycle rate, start time and stop time have to be defined.


State and error flags

Type | Value |  | Meaning
 | hex. | decimal
state | 0x0000 | 0 | no information
state | 0x0001 | 1 | logger was initialized
state | 0x0002 | 2 | logger was stopped after reaching pre - trigger settings
state | 0x0004 | 4 | logger was stopped after reaching the time based settings
state | 0x0008 | 8 | the logger records
error | 0x8000 | 32768 | the initialization of the logger failed
error | 0x4000 | 16384 | permissible number of loggers in the device is exceeded
error | 0x2000 | 8192 | logger – memory was not provided
error | 0x1000 | 4096 | header – memory was not provided
error | 0x0800 | 2048 | logger – reset memory failed
error | 0x0400 | 1024 | error in determining the address on the frame memory
error | 0x0200 | 512 | error in determining the address on the description memory
error | 0x0100 | 256 | error in determining the address on the header memory
error | 0x0080 | 128 | error recording type
error | 0x0040 | 64 | error writing a frame