Main Content

Logic Decision

Threshold crossing detector at input to binary process

  • Logic Decision block

Libraries:
Mixed-Signal Blockset / Utilities

Description

Logic Decision block produces an output event at a fixed delay from almost exactly the time the input signal crosses a decision threshold. This block helps transitioning from a uniformly sampled input waveform to an event driven digital logic subsystem.

Ports

Input

expand all

Input signal, specified as a floating point scalar. The input signal can either be inherited, or defined by the Logic Decision block as a fixed step discrete sample time.

Data Types: double | Boolean

Decision threshold value, specified as a scalar. The value at vth port determines when the input signal is delayed by a fixed amount.

Data Types: floating point

Output

expand all

Output signal, returned as either 0 or 1.

Data Types: double | Boolean

Parameters

expand all

Source of sample time.

  • Select Inherited to inherit sample time from previous block.

  • Select Fixed to set discrete sample time to a fixed value.

Programmatic Use

  • Use get_param(gcb,'SampleTimeSource') to view the current source of Sample time.

  • Use set_param(gcb,'SampleTimeSource',value) to set Sample time to a specific value.

Actual value of sample time, specified as a real scalar excluding zero.

Dependencies

To enable this parameter, select Fixed in Sample time parameter.

Programmatic Use

  • Use get_param(gcb,'SampleTimeIn') to view the current Sample time value.

  • Use set_param(gcb,'SampleTimeIn',value) to set Sample time value to a specific value.

The minimum propagation delay for the block, specified as a positive scalar. For a fixed discrete input sample time, the actual delay is the maximum of this parameter value and the fixed step size.

Programmatic Use

  • Use get_param(gcb,'Delay') to view the current Minimum delay value.

  • Use set_param(gcb,'Delay',value) to set Minimum delay value to a specific value.

The number of pending output events that can be stored in the block, specified as a positive integer scalar.

Programmatic Use

  • Use get_param(gcb,'BufferSizeIn') to view the current Buffer size.

  • Use set_param(gcb,'BufferSizeIn',value) to set Buffer size to a specific value.

Version History

Introduced in R2019a