Main Content

Logic Decision

Threshold crossing detector at input to binary process

  • Library:
  • Mixed-Signal Blockset / Utilities

  • Logic Decision block

Description

Logic Decision块产生输出事件在一个固定的延迟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 theLogic Decisionblock as a fixed step discrete sample time.

Data Types:double|Boolean

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

Data Types:floating point

Output

expand all

Output signal, returned as either0or1.

Data Types:double|Boolean

Parameters

expand all

Source of sample time.

  • SelectInheritedto inherit sample time from previous block.

  • SelectFixedto set discrete sample time to a fixed value.

Programmatic Use

  • Useget_param(gcb,'SampleTimeSource')to view the current source ofSample time.

  • Useset_param(gcb,'SampleTimeSource',value)to setSample timeto a specific value.

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

Dependencies

To enable this parameter, selectFixedinSample timeparameter.

Programmatic Use

  • Useget_param(gcb,'SampleTimeIn')to view the currentSample time value.

  • Useset_param(gcb,'SampleTimeIn',value)to setSample time valueto 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

  • Useget_param(gcb,'Delay')to view the currentMinimum delay value.

  • Useset_param(gcb,'Delay',value)to setMinimum delay valueto a specific value.

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

Programmatic Use

  • Useget_param(gcb,'BufferSizeIn')to view the currentBuffer size.

  • Useset_param(gcb,'BufferSizeIn',value)to setBuffer sizeto a specific value.

Version History

Introduced in R2019a