PRGM – Setpoint programmer

Block SymbolLicensing group: STANDARD
PIC

Function Description
The PRGM block generates functions of time (programs) composed of n linear parts defined by (n + 1)-dimensional vectors of time (tm = [t0,,tn]) and output values (y = [y0,,yn]). The generated time-course is continuous piecewise linear, see figure below. This block is most commonly used as a setpoint generator for a controller. The program generation starts when RUN = on. In the case of RUN = off the programmer is set back to the initial state. The input DEF = on sets the output sp to the value spv. It follows a ramp to the nearest future node of the time function when DEF = off. The internal time of the generator is not affected by this input. The input HLD = on freezes the output sp and the internal time, thus also the outputs tsc, tt and rt. The program follows from freezing point as planned when HLD = off unless the input CON = on at the moment when the signal HLD on off. In that case the program follows a ramp to reach the node with index ind in time trt. The node index ind must be equal to or higher than the index of current sector isc (at the moment when HLD on off). If RPT = on, the program is generated repeatedly.

PIC

Inputs

RUN

Enable execution

Bool

DEF

Initialize sp to the value of spv

Bool

spv

Initializing constant

Double (F64)

HLD

Output and timer freezing

Bool

CON

Continue from defined node

Bool

ind

Index of the node to continue from

Long (I32)

trt

Time to reach the defined node with index ind

Double (F64)

RPT

Repetition flag

Bool

Outputs

sp

Setpoint variable (function value of the time function at given time)

Double (F64)

isc

Current function sector

Long (I32)

tsc

Time elapsed since the start of current sector

Double (F64)

tt

Time elapsed since the start of program generation

Double (F64)

rt

Remaining time till the end of program

Double (F64)

CNF

Flag indicating that the configured curve is being followed

Bool

E

Error flag – the node times are not ascending

Bool

Parameters

nmax

Reserved (allocated) size of the tm, y vectors   4  10000000 10

Long (I32)

tmunits

Time units  1

Long (I32)

1 ....

seconds

2 ....

minutes

3 ....

hours

tm

(n + 1)-dimensional vector of ascending node times  [0 1 2]

Double (F64)

y

(n + 1)-dimensional vector of node values (values of the time function)  [0 1 0]

Double (F64)

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