S1OF2 – One of two analog signals selector
Block SymbolLicensing group: ADVANCED
Function Description
The S1OF2 block assesses the validity of two input signals u1 and u2 separately.
The validation method is equal to the method used in the SAI block. If
the signal u1 (or u2) is marked invalid, the output E1 (or E2) is set to on and the
error code is sent to the iE1 (or iE2) output. The S1OF2 block also evaluates the
difference between the two input signals. The internal flag D is set to on if the differences
in the
last nd samples exceed the given limit, which is given by the following inequation:
where vmin and vmax are the minimal and maximal limits of the inputs u1 and u2 and pdev is the allowed percentage difference with respect to the overall range of the input signals. The value of the output y depends on the validity of the input signals (flags E1 and E2) and the internal difference flag D as follows:
- (i) If and and
-
, then the output y depends on the mode parameter:
and the output E is set to off unless set to on earlier.
- (ii) If and and
- , then and .
- (iii) If and ( and )
- , then () and the output E is set to off unless set to on earlier.
- (iv) If and
- , then and .
The input R resets the inner error flags Fl–F4 (see the SAI block) and the D flag. For the input R set permanently to on, the invalidity indicator E1 (E2) is set to on for only one cycle period whenever some invalidity condition is fulfilled. On the other hand, for , the output E1 (E2) is set to on and remains true until the reset (R: offon). A similar rule holds for the E output. For the input R set permanently to on, the E output is set to on for only one cycle period whenever a rising edge occurs in the internal D flag (). On the other hand, for , the output E is set to on and remains true until the reset (rising edge R: offon). The output W is set to on only in the (iii) or (iv) cases, i.e. at least one input signal is invalid.
The parameter nb specifies the number of samples after restart during which signal validity detection for u1 and u2 is suppressed. The parameter nc indicates the number of samples for testing immutability (see the SAI block, condition F2). The number of samples for testing variability (see the SAI block, condition F3) is given by the parameter nr. The maximum expected percentage change in input u1 (u2) from the total range over nr samples of input u1 (u2) (see the SAI block) is determined by prate. The parameter nv represents the number of samples for testing range exceedance (see the SAI block, condition F4).
This block does not propagates the signal quality. More information can be found in the 1.4 section.
Input
u1 | First analog input of the block | Double (F64) |
u2 | Second analog input of the block | Double (F64) |
sv | Substitute value for an error case | Double (F64) |
HF1 | Hardware error flag for signal u1 | Bool |
|
|
|
HF2 | Hardware error flag for signal u2 | Bool |
|
|
|
R | Reset inner error flags | Bool |
Parameter
nb | Number of samples to skip at startup 10 | Long (I32) |
nc | Number of samples for invariability testing 10 | Long (I32) |
nbits | Number of A/D converter bits 12 | Long (I32) |
nr | Number of samples for variability testing 10 | Long (I32) |
prate | Maximum allowed percentage change 10.0 | Double (F64) |
nv | Number of samples for out-of-range testing 1 | Long (I32) |
vmin | Lower limit for the input signal -1.0 | Double (F64) |
vmax | Upper limit for the input signal 1.0 | Double (F64) |
nd | Number of samples for deviation testing 5 | Long (I32) |
pdev | Maximum allowed percentage deviation of inputs 10.0 | Double (F64) |
mode | Computation of output when both inputs are valid 1 | Long (I32) |
|
|
|
Output
y | Analog output of the block | Double (F64) |
E | Output signal invalidity indicator | Bool |
|
|
|
E1 | Invalidity indicator for input u1 | Bool |
|
|
|
E2 | Invalidity indicator for input u2 | Bool |
|
|
|
iE1 | Reason of input u1 invalidity | Long (I32) |
|
|
|
iE2 | Reason of input u2 invalidity | Long (I32) |
|
|
|
W | Warning flag (invalid input signal) | Bool |
|
|
|
[Previous] [Back to top] [Up] [Next]
2024 © REX Controls s.r.o., www.rexygen.com