主要内容

检查静态上限

Check that signal is less than (or optionally equal to) static upper bound

  • Library:
  • Simulink / Model Verification

    HDL Coder / Model Verification

  • 检查静态上限块

描述

检查静态上限block checks if an input signal is less than (or optionally equal to) a specified lower bound at each time step and executes an assertion after comparison. TheUpper boundparameter defines the upper bound. If the input signal is less than the upper bound, the assertion istrue(1)块什么都不做。如果没有,则块会停止模拟并默认返回错误消息。

这input signal and bound can be scalars, vectors, or matrices. The input and the bound must be the same data type. The block compares the value of the input to the bound differently depending on the signal.

  • When comparing scalars to vectors or matrices, the block compares the scalar to each element of the non-scalar input signal or bound.

  • When comparing a vector or matrix signal to a vector or matrix upper bound, the block compares the input signal to the bound element-by-element.

  • For models with an input signal and bound that are both vectors or matrices, the input signal and bound must have the same dimensions.

端口

输入

expand all

检查的输入信号针对由Upper boundparameter.

Data Types:一半|single|double|int8|INT16|INT32|int64|uint8|UINT16|uint32|uint64|Boolean|固定点|枚举

Output

expand all

Output signal that istrue(1)if the assertion succeeds andfalse(0)如果断言失败。如果Configuration Parameters window, in theMath and Data Typessection, under高级参数, you selectImplement logic signals as Boolean data,然后输出数据类型为Boolean。否则,信号的数据类型为double

Dependencies

To enable this output port, select the输出断言信号参数复选框。

Data Types:double|Boolean

Parameters

expand all

在输入信号所具有的振幅范围内指定上限。

Programmatic Use

范围:最大限度
Type:string scalar or character vector
Default:“ 0”

选择此复选框以使有效输入幅度的范围包括上限。

Programmatic Use

范围:max_included
Type:string scalar or character vector
Values:"on"|“离开”
Default:"on"

Clearing this parameter disables the block and causes the model to behave as if the block does not exist. To enable or disable all verification blocks, regardless of the setting of this option, go to the Configuration Parameters window, clickDiagnostics>Data Validity,扩展高级参数section, and set模型验证块启用toEnable all或者禁用所有

Programmatic Use

范围:已启用
Type:string scalar or character vector
Values:"on"|“离开”
Default:"on"

Specify a MATLAB®expression to evaluate when the assertion fails. Because the expression is evaluated in the MATLAB workspace, define all variables used in the expression in that workspace.

Dependencies

要启用此参数,请选择Enable assertionparameter.

Programmatic Use

范围:打回来
Type:string scalar or character vector
Default:""

Select this parameter to stop the simulation when the check fails. Clear this parameter to display a warning and continue the simulation.

Programmatic Use

范围:stopWhenAssertionFail
Type:string scalar or character vector
Values:"on"|“离开”
Default:"on"

Select this parameter to enable the output port.

Programmatic Use

范围:export
Type:string scalar or character vector
Values:"on"|“离开”
Default:“离开”

Specify the style of the block icon. Thegraphic选项显示图标上断言条件的图形表示。这textoption displays a mathematical expression that represents the assertion condition.

Programmatic Use

范围:icon
Type:string scalar or character vector
Values:“形象的”|"text"
Default:“形象的”

块特征

Data Types

Boolean|double|枚举|固定点|一半|整数|single

直接进料

Multidimensional Signals

yes

Variable-Size Signals

Zero-Crossing Detection

Extended Capabilities

PLC Code Generation
使用Simulink®PLCCoder™生成结构化文本代码。金宝app

Fixed-Point Conversion
使用定点Designer™设计和模拟定点系统。

Version History

在R2006a之前引入