TRNDV – Real-time trend recording with vector input

Block SymbolLicensing group: STANDARD
PIC

Function Description
The TRNDV block is designed for storing input signals which arrive at the uVec input in vector form. On the contrary to the TRND block it allows storing more than 4 signals. The signals are stored in cyclic buffers in the memory of the target device. The main advantage of the TRNDV block is the synchronization with the real-time executive, which allows trending of even very fast signals (i.e. with very high sampling frequency). In contrary to asynchronous data storing in the higher level operator machine (host), there are no samples lost or multiply stored.

The number of stored signals is determined by the parameter n. In case the trend buffer of length l samples gets full, the oldest samples are overwritten. Data can be stored once in pfac executions of the block (decimation). The other decimation factor afac can be used for storing data in archives.

The type of trend buffers can be specified in order to conserve memory of the target device. The memory requirements of the trend buffers are defined by the formula s nl, where s is the size of the corresponding variable in bytes. The default type Double consumes 8 bytes per sample, thus for storing e.g. n = 4 trends of this type and length l = 1000, 8 4 1000 = 32000 bytes are required. In case the input signals come from 16-bit A/D converter the Word type can be used and memory requirements drop to one quarter. Memory requirements and allowed ranges of individual types are summarized in table 1.1 in this reference guide.

It is possible to read, display and export the stored data by the REXYGEN Studio in the Watch mode. After double-clicking on the corresponding TRNDLF block, a new card with the prefix Trend will open.

WARNING: set any of the parameters arc, afac, id to 0/empty disable writing data into archive. The data are available in diagnostic tools only in this case.

Inputs

uVec

Vector signal to record

Reference

HLD

Input for freezing the cyclic buffers, no data is appended when HLD = on

Bool

R1

Input for clearing the trend contents. The buffers are cleared when R1 = on. This flag overpowers the HLD input.

Bool

Output

iE

Error code

Error

i ....

REXYGEN general error

Parameters

n

Number of signals (trend buffers)   1  64 8

Long (I32)

l

Number of samples per trend buffer   2  268435000 1000

Long (I32)

btype

Type of all trend buffers  8

Long (I32)

1 ....

Bool

2 ....

Byte

3 ....

Short

4 ....

Long

5 ....

Word

6 ....

DWord

7 ....

Float

8 ....

Double

10 ...

Large

pfac

Multiple of the block execution period defining the period for storing the data in the trend buffers. Data are stored with the period of pfac TS unless RUN = off, where TS is the block execution period in seconds.   1  1000000 1

Long (I32)

afac

Every afac-th sample stored in the trend buffer is also stored in the archives specified by the arc parameter. There are no data stored in the archives for afac = 0. Data are stored with the period of afacpfacTS, where TS is the block execution period in seconds.   0  1000000

Long (I32)

arc

List of archives to store the trend data. The format of the list is e.g. 1,3..5,8. The data will be stored in all listed archives (see the ARC block for details on archives numbering). Third-party programs (Simulink, OPC clients etc.) work with an integer number, which is a binary mask, i.e. 157 (binary 10011101) in the mentioned case.

Word (U16)

id

Identification code of the trend block. This identifier must be unique in the whole target device with the REXYGEN system (i.e. in all archiving blocks). Disabled for id = 0.  1

Word (U16)

Title

Title of the trend to be displayed in the diagnostic tools of the REXYGEN system, e.g. in the Watch mode in the REXYGEN Studio program.  Trend Title

String

timesrc

Source of timestamps. Each data sample in the trend buffer is stored with a timestamp. For fast or short-term trends where you are interested in sample-by-sample timing more than in absolute time, choose CORETIMER – REXYGEN internal technological time, which is incremented by the nominal period each base tick. For long-running trends where you are mostly interested in absolute time shared with the operating system (and possibly synchronized by NTP), choose SYSCLOCK. Other values are intended for debugging or special purposes.  1

Long (I32)

1 ....

CORETIMER – Time maintained by the Core Timer (at the current tick)

2 ....

CORETIMER-PRECISE – Time maintained by the Core Timer (at block execution)

3 ....

SYSCLOCK – Time maintained by the System (at the current tick)

4 ....

SYSCLOCK-PRECISE – Time maintained by the System (at block execution)

5 ....

PFC – Performance Counter Time

SigNames

Names of the signals to be displayed in the diagnostic tools of the REXYGEN system, e.g. in the Watch mode in the REXYGEN Studio program. Each line is name of one signal respectively.

String

2024 © REX Controls s.r.o., www.rexygen.com