### ANLS – Controlled generator of piecewise linear function

Block SymbolLicensing group: STANDARD Function Description
The ANLS block generates a piecewise linear function of time given by nodes t1,y1; t2,y2; t3,y3; t4,y4. The initial value of output y is defined by the y0 parameter. The generation of the function starts when a rising edge occurs at the RUN input (and the internal timer is set to 0). The output y is then given by

$y={y}_{i}+\frac{{y}_{i+1}-{y}_{i}}{{t}_{i+1}-{t}_{i}}\left(t-{t}_{i}\right)$

within the time intervals $⟨{t}_{i},{t}_{i+1}⟩,i=0,\dots ,3,{t}_{0}=0$.

To generate a step change in the output signal, it is necessary to to define two nodes in the same time instant (i.e. ${t}_{i}={t}_{i+1}$). The generation ends when time t4 is reached or when time ${t}_{i}$ is reached and the following node precedes the active one (i.e. ${t}_{i+1}<{t}_{i}$). The output holds its final value afterwards. But for the RPT parameter set to on, instead of holding the final value, the block returns to its initial state y0, the internal block timer is set to 0 and the sequence is generated repeatedly. This can be used to generate square or sawtooth functions. The generation can also be prematurely terminated by the RUN input signal set to off. In that case the block returns to its initial state y0, the internal block timer is set to 0 and $\mathtt{\text{is}}=0$ becomes the active time interval.

Input

 RUN Enable execution, run the analog sequence generation Bool

Outputs

 y Analog output of the block Double (F64) is Index of the active time interval Long (I32)

Parameters

 y0 Initial output value Double (F64) t1 Node 1 time  $\odot$1.0 Double (F64) y1 Node 1 value Double (F64) t2 Node 2 time  $\odot$1.0 Double (F64) y2 Node 2 value  $\odot$1.0 Double (F64) t3 Node 3 time  $\odot$2.0 Double (F64) y3 Node 3 value  $\odot$1.0 Double (F64) t4 Node 4 time  $\odot$2.0 Double (F64) y4 Node 4 value Double (F64) RPT Repeating sequence Bool off .. Disabled on ... Enabled

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