GETPA – Block for remote array parameter acquirement

Block SymbolLicensing group: STANDARD
PIC

Function Description
The GETPA block is used for acquiring the array parameters of other blocks in the model remotely . The block operates in two modes, which are switched by the GETF parameter. For GETF = off the output arrRef is set to the value of the remote parameter at the start and every time when the remote parameter changes. If the GETF parameter is set to on, then the block works in single-shot read mode. In that case the remote parameter is read only when rising edge (off on) occurs at the GET input.

The name of the remote parameter is determined by the string parameter sc (string connection), which has the form <block_path:parameter_name>. The path to the block whose parameter should be read can contain hierarchic levels separated by dots followed by the block name. The path can be either relative or absolute:

  • Relative – starts at the level where the GETPA block is located. The string has to be prefixed with ’.’ in this case. Examples of relative paths: ".CNDR:yp", ".Lights.ATMT:touts".
  • Relative to task – starts at the root level of the task where the SETPA block is located. The string has to be prefixed with ’%’ in this case. Examples of paths: "%CNDR:yp", "%Lights.ATMT:touts".
  • Absolute – complete sequence of hierarchic levels down to the block. For referring to blocks located in the driver task (see the IOTASK block for details on configuration) the ’&’ followed by the driver’s name is used at the beginning of the absolute path. Examples of absolute paths: "task1.inputs.ATMT:touts", "&EfaDrv.measurements.CNDR:yp".

The order and names of individual hierarchic levels are presented in a tree-like structure within the Diagnostics section of the REXYGEN Studio program.

Warning 1: If the remote parameter is in a task other than the GETPA block, block execution is delayed until the remote task is completed. It is necessary to avoid the so-called race conditions and guarantee the correct value reading. Therefore, it is recommended to include the GETPA block in a slower task (longer period/execution time) and read parameter in a faster task (shorter period/execution time). In the opposite situation (e.g. the GETPA block in a faster task), the SETPA block should be used in a slower task.

Note 1: If parameter GETF = off and source array is in same task as the GETPA block, data are not copy into intermediate array, but output is direct reference to original array. It save resources (cpu time and memory). The nmax, etype parameters are ignored in this case.

Note 2: When using multiple GETPA blocks, it is not guaranteed to read all data from a remote task in the same tick. It is only guaranteed that the previous block will receive a value in the same or previous period as the next block (the order of blocks execution can be checked in REXYGEN Diagnostics).

Note 3: The remote parameter must be a primary array (for example CNA:acn, RTOV:xVec, MX_MAT:ay). The array reference (like CNA:vec, RTOV:yVec, SUBSYSTEM:Outport) is not supported.

Input

GET

Input for initiating one-shot parameter read. Array is read on rising edge of this input.

Bool

Outputs

arrRef

Array reference

Reference

E

Error flag

Bool

Parameters

sc

String connection to the parameter

String

GETF

Get parameter only when forced to.

Bool

off ..

Remote parameter is continuously read

on ...

One-shot mode, the remote parameter is read only when forced to by the GET input (rising edge)

nmax

Maximum size of array   10 256

Long (I32)

etype

Type of members of the acquired array. This is type of the intermediate (state) array where is copy of acquired data. The conversion is performed if original and intermediate array has different type.  8

Long (I32)

2 ....

Byte

3 ....

Short

4 ....

Long

5 ....

Word

6 ....

DWord

7 ....

Float

8 ....

Double

10 ...

Large

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