SETPA – Block for remote array parameter setting
Block SymbolLicensing group: STANDARD
Function Description
The SETPA block is used for setting the array parameters of other blocks in the model remotely
. The block operates in two modes, which are switched by the SETF parameter. For
the remote parameter cs is set to the value of the input vector signal
arrRef at the start and every time when the input signal changes. If the
parameter is set
to on, then the block works in one-shot write mode. In that case the remote parameter is set only when
rising edge (offon)
occurs at the SET 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 with a ’.’ character, indicating the level where the SETPA block is placed. Examples of paths: ".CNDR:yp", ".Lights.ATMT:touts".
- Starts with ’..’ characters, indicating a level above the SETPA block. Examples of 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: A 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: If the remote parameter is in a task other than the SETPA 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 setting. Therefore, it is recommended to include the SETPA block in a slower task (longer period/execution time) and set parameter in a faster task (shorter period/execution time). In the opposite situation (e.g. the SETPA block in a faster task), the GETPA block should be used in a slower task.
Note 1: When using multiple SETPA blocks, it is not guaranteed that all data will be written to the remote task in the same tick. It is only guaranteed that the previous block will set a value in the same or previous period as the next block. The execution order can be seen in the REXYGEN Studio program diagnostics.
Note 2: 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.
Note 3: The OUTCONN block can also be used for writing the value remotely.
This block propagates the signal quality. More information can be found in the 1.4 section.
Input
arrRef | Array reference | Reference |
SET | Input for initiating one-shot parameter write | Bool |
Parameter
sc | String connection to the parameter | String |
SETF | Set parameter only when forced to | Bool |
|
|
|
SETS | Set array size flag | Bool |
Output
E | Error indicator | Bool |
|
|
|
[Previous] [Back to top] [Up] [Next]
2024 © REX Controls s.r.o., www.rexygen.com