Engee documentation

Compare To Constant

Compares the input signal with a constant.

blockType: Compare To Constant

Path in the library:

/Basic/Logic and Bit Operations/Compare To Constant

Description

Block Compare To Constant compares the input signal with the constant specified in the parameter Constant value. The comparison method is set by the parameter Operator.

Ports

Input

# IN_1 — Input signal
scalar

Details

The input signal is in the form of a scalar for comparison with a constant.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

Complex numbers support

Yes

Output

# OUT_1 — Output signal
scalar

Details

Output — 0 if the comparison is false, and 1 if it is true.

Data types

Bool, UInt8

Complex numbers support

Yes

Parameters

Main

# Operator — The logical operator
| == | ~= | < | >= | >

Details
This parameter can have the following values
  • == — the input value is equal to a constant.

  • ~= — the input value is not equal to a constant.

  • < — the input value is less than a constant.

  • — the input value is less than or equal to a constant.

  • > — the input value is greater than a constant.

  • >= — the input value is greater than or equal to a constant.

Values

| == | ~= | < | >= | >

Default value

<=

Program usage name

relop

Tunable

No

Evaluatable

No

# Constant value — a constant for comparison
Scalar / array of real and/or complex numbers

Details

The value of the constant that the input value is compared to.

Default value

3.0

Program usage name

const

Tunable

Yes

Evaluatable

Yes

# Output data type — type of output data
Bool | UInt8

Details

Specify the type of output data Bool or UInt8.

Values

Bool | UInt8

Default value

Bool

Program usage name

OutDataTypeStr

Tunable

No

Evaluatable

No

Additional options

C code generation: Yes