Table of Contents

Shift register

Block name

B110_SHIFT_REGISTER

ST call

PROGRAM TEST B110
  VAR 
    REAL1: REAL;
    BOOL1: BOOL;
    ARRAYREAL: ARRAY[1..24] OF REAL;
    FB : LIB.CORE.V1_0.B110_SHIFT_REGISTER;
 END_VAR 
     FB(IN:=REAL1,BR:=BOOL1,OUT=>ARRAYREAL);
END_PROGRAM

Library

LIB\CORE

Version

V1.0

Description

Shift register containing up to 24 analogue values.

Inputs

InputTypeDescription Default value
IN REALInput value 0
BR BOOLShift by one (at rising edge)False

Outputs

Output Type Description
OUT ARRAY[1..24] OF REALArray 1..24 of outputs
SHIFTTIMEDT Time of last shift

Function

The block is a shifting register; at each rising edge on the br input the input value in is saved at the first output out, and the output values are moved by one position higher. The value of the output 24 is lost. The shifttime output returns the time of the last shift.

Application example


The block is used for averaging, calculating of normalized outside temperature, bar graphs, peak shaving algorithms etc.