blockCircularBufferInteger

Circular buffer e.g. for use in the ADC model

Extends from Modelica.Blocks.Icons.DiscreteBlock (Graphical layout of discrete block component icon).

Information

This block implements a circular buffer with integer values.

A new value is read from u and written to the buffer each time the trigger rises. When the buffer is full, it is written to the output and can be evaluated by the callback function.

Parameters

TypeNameDefaultDescription
IntegerBufDepth50Buffer depth

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.BooleanOutputcbTrue when the buffer is full
Modelica.Blocks.Interfaces.BooleanInputresetReset the buffer
Modelica.Blocks.Interfaces.IntegerInputu
Modelica.Blocks.Interfaces.BooleanInputtriggerSamples new value from u
Modelica.Blocks.Interfaces.IntegerOutput[BufDepth]y

Components

TypeNameDefaultDescription
Integer[BufDepth]bufferADC buffer
Integerbuf_ptrPointer to sampled value