ANLS – Controlled generator of piecewise linear function

Block SymbolLicensing group: STANDARD
PIC

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 = yi + yi+1 yi ti+1 ti (t ti)

within the time intervals ti,ti+1,i = 0,,3,t0 = 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. ti = ti+1). The generation ends when time t4 is reached or when time ti is reached and the following node precedes the active one (i.e. ti+1 < ti). 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 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  1.0

Double (F64)

y1

Node 1 value

Double (F64)

t2

Node 2 time  1.0

Double (F64)

y2

Node 2 value  1.0

Double (F64)

t3

Node 3 time  2.0

Double (F64)

y3

Node 3 value  1.0

Double (F64)

t4

Node 4 time  2.0

Double (F64)

y4

Node 4 value

Double (F64)

RPT

Repeating sequence

Bool

off ..

Disabled

on ...

Enabled

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