Engee documentation

Interval Test Dynamic

Determines if the signal is within the specified interval.

interval test dynamic

Description

The Interval Test Dynamic block returns true (1) if the input is between the values of the external signals up and lo. The block returns false (0) if the input is outside these values. The output of the block when the input signal is equal to lo or the up signal is determined by whether the Interval closed on right and Interval closed on left check boxes are selected.

Ports

Input

up - upper limit of interval
scalar | vector | matrix

The upper limit of an interval given as a scalar, vector or matrix.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool.

u - input signal
scalar | vector | matrix

Input signal defined as a scalar, vector or matrix.

Data types: Bool, UInt8.

lo - lower limit of the interval
scalar | vector | matrix

The lower limit of an interval given as a scalar, vector or matrix.

Output

y - output signal
scalar | vector | matrix

Output signal indicating whether the input values fall within the specified interval. You can specify the Output data type parameter as Bool or UInt8.

Output data types: Bool, UInt8.

Parameters

Interval closed on right - switching on the upper limit value
on (by default) | off

When you select this checkbox, the value of the signal associated with the up input port is included in the interval for which the block outputs true (1).

Usage in program code

Block parameter

IntervalClosedRight

Values

off | on

By default

On

Interval closed on left - Enable lower limit value
On (By default) | Off

When you select this checkbox, the value of the signal associated with the lo input port is included in the interval for which the block outputs true (1).

Usage in program code

Block parameter

IntervalClosedLeft

Values

off | on

By default

On

Output data type - output data type
Bool (by default) | UInt8

Specify the output data type as Bool or UInt8.

Usage in program code

Block parameter

OutDataType

Values

Bool | UInt8

By default

Bool

Additional options

C code generation: Yes