SHLD – Sample and hold

Block SymbolLicensing group: STANDARD
PIC

Function Description
The SHLD block is intended for holding the value of the input signal. It processes the input signal according to the mode parameter.

In Triggered sampling mode the block sets the output signal y to the value of the input signal u when rising edge (off on) occurs at the SETH input. The output is held constant unless a new rising edge occurs at the SETH input.

If Hold last value mode is selected, the output signal y is set to the last value of the input signal u before the rising edge at the SETH input occured. It is kept constant as long as SETH = on. For SETH = off the input signal u is simply copied to the output y.

In Hold current value mode the u input is sampled right when the rising edge (off on) occurs at the SETH input. It is kept constant as long as SETH = on. For SETH = off the input signal u is simply copied to the output y.

The binary input R1 sets the output y to the value y0, it overpowers the SETH input signal.

See also the PARR block, which can be used for storing a numeric value as well.

This block propagates the signal quality. More information can be found in the 1.4 section.

Input

u

Analog input of the block

Double (F64)

SETH

Set and hold the output signal

Bool

R1

Block reset

Bool

Parameter

y0

Initial output value

Double (F64)

mode

Sampling mode  3

Long (I32)

1 ....

Triggered sampling

2 ....

Hold last value

3 ....

Hold current value

Output

y

Analog output of the block

Double (F64)

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