Engee documentation

Detect Change

Detecting a change in the signal value.

detect change

Description

The Detect Change block determines that the current value of the input signal is not equal to the previous value.

  • The output signal takes the value true (1) when the current value of the input signal is not equal to the previous value.

  • The output signal takes the value false (0) when the current value of the input signal is equal to the previous one.

This block can be used only with discrete solvers.

Ports

Input

Port_1 - input signal
scalar | vector | matrix

Input signal as a scalar, vector or matrix.

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

*Support for complex numbers: Yes

Output

Port_1 - output signal
0 | 1
  • The output signal takes the value true (1) if the current value of the input signal is not equal to the previous one.

  • The output signal takes the value false (0) when the current value of the input signal is equal to the previous one.

Data types: Bool, UInt8.

Parameters

Initial condition - initial value of input signal
0.0 (by default) | scalar | vector

Initial value of the input signal.

Usage in program code

Block parameter

vinit

Values

scalar | vector

* By default*

0

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

Set the output data type to Bool or UInt8.

Usage in program code

Block parameter

OutDataTypeStr

Values

Bool | UInt8

By default

Bool

Additional options

C code generation: Yes