### TRNDV – Real-time trend recording with vector input

Block SymbolLicensing group: STANDARD

Function Description
The TRND 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\cdot \mathtt{\text{n}}\cdot \mathtt{\text{l}}$, 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. $\mathtt{\text{n}}=4$ trends of this type and length $\mathtt{\text{l}}=1000$, $8\cdot 4\cdot 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 Diagnostics diagnostic program.

Inputs

 uVec Vector signal to record Reference HLD Input for freezing the cyclic buffers, no data is appended when $\mathtt{\text{HLD}}=\mathtt{\text{on}}$ Bool

Output

 iE Error code Error i .... REXYGEN general error

Parameters

 n Number of signals (trend buffers)  $↓$1 $↑$64 $\odot$8 Long (I32) l Number of samples per trend buffer  $↓$2 $↑$268435000 $\odot$1000 Long (I32) btype Type of all trend buffers  $\odot$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 $\mathtt{\text{pfac}}\cdot {T}_{S}$ unless $\mathtt{\text{RUN}}=\mathtt{\text{off}}$, where ${T}_{S}$ is the block execution period in seconds.  $↓$1 $↑$1000000 $\odot$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 $\mathtt{\text{afac}}=0$. Data are stored with the period of $\mathtt{\text{afac}}\cdot \mathtt{\text{pfac}}\cdot {T}_{S}$, where ${T}_{S}$ 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 $\mathtt{\text{id}}=0$.  $\odot$1 Word (U16) Title Title of the trend to be displayed in the diagnostic tools of the REXYGEN system, e.g. in the REXYGEN Diagnostics program  $\odot$Trend Title String

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