主要内容

点击十字路口

Detect crossing point

  • Library:
  • 金宝app模拟 /不连续性

    金宝appSimulink /消息和事件

    HDL编码器 /不连续性

    simevents

  • 点击越过

描述

The点击十字路口块检测输入何时到达点击交叉偏移parameter value in the direction specified by the点击交叉方向property.

您可以配置块以输出1或者0signal, a SimEvents®message, or a function-call event. SeeOutput了解更多信息。

端口

输入

展开全部

输入信号表明,该块在指定方向上检测到何时达到偏移量。

数据类型:双倍的

Output

展开全部

输出表示输入信号是否越过命中率。仅当您选择Show output port参数复选框。

信号Output

如果您选择Show output portcheck box and set theOutput typeparameter to信号,块输出指示何时发生交叉。

  • 如果是input signal is exactly the value of the offset value after the hit crossing is detected in the specified direction, the block continues to output a value of 1.

  • 如果在两个相邻点处的输入信号括起来偏移值,则该块在第二次步骤中输出1个值。

  • 如果是Show output portcheck box is不t选定的块确保模拟找到交叉点但不会生成输出。

  • 如果初始信号等于偏移值,则仅在点击交叉方向属性设置为either

  • 如果启用了布尔逻辑信号,则输出为布尔

SimeVents消息输出

The点击十字路口块还可以在Output type参数设置为信息

  • 如果输入信号在指定方向上跨越偏移值,则块将输出消息。

  • 如果输入信号在指定的方向上达到偏移值并保留在那里,则块在命中时间输出一条消息,当信号留下偏移值时一条消息。

  • 如果是initial input signal is equal to the offset value, the block outputs a message withCrossing Type价值没有任何只有点击交叉方向被设定为either

The SimEvents message output signal is a结构with four fields.

函数调用Output

The点击十字路口当块还可以输出一个功能通话事件时Output type参数设置为函数调用

  • 每次输入信号在指定方向上跨越偏移值时,该块都会输出一个函数通话事件。

  • 函数通话事件可以发送到功能通话子系统或功能通话模型的功能通话输入端口。

  • The output is equivalent to the output of a函数调用Generatorblock at each time step with the迭代次数该块的参数设置为1

该字段显示信号交叉的方向点击交叉偏移价值。Negative, Zero, and Positive are defined relative to the offset value. The data type isslhitcrossingtype这是一个enumerated data type。看Use Enumerated Data in Simulink Models了解更多信息。例如,如果HitCrossingOffset设置为2,越过此偏移值的上升信号将记录为NegativeToPositive点击十字路口。

Note

A hit crossing is recorded based on the点击交叉方向环境。换句话说,如果您设置点击交叉方向to detect a跌倒点击十字架,一个NegativeToPositivehit is not recorded.

Note

在simevents块中,如果Crossing Type实体的是NegativeToPositivehitcrossing thenEntity.CrossingType == SlhitCrossingType.negativetoposityreturns logical 1(真的)

如果是signal reaches theHitCrossingOffset价值并保持它,一个Negativetozero或者potitivetozero,根据方向,命中率在命中率交叉时注册。

数据类型:slhitcrossingtype

Forn信号传递给点击十字路口block, this field denotes which signal had a hit crossing event. For a matrix input, this field follows MATLAB®linear indexing. SeeArray Indexing

数据类型:uint32

TimeT热门交叉事件。

数据类型:双倍的

按照指定点击交叉偏移范围。

数据类型:双倍的

数据类型:双倍的|布尔|结构

Note

如果SimeVents消息输出信号跨越模型参考边界或用作状态流的输入®chart, you need to create a bus object for the message. See提示

Parameters

展开全部

指定块检测的值何时输入沿指定的方向交叉点击交叉方向

Programmatic Use

Block Parameter:HitCrossingOffset
类型: character vector
:真实值
默认:'0'

Direction from which the input signal approaches the hit crossing offset for a crossing to be detected.

什么时候set toeither,该块用作almost equalblock, useful in working around limitations in finite mathematics and computer precision. Used for these reasons, this block might be more convenient than adding logic to your model to detect this condition.

当。。。的时候点击交叉方向属性设置为eitherand the model uses a fixed-step solver, the block has the following behavior. If the output signal is 1, the block sets the output signal to 0 at the next time step, unless the input signal equals the offset value.

Programmatic Use

Block Parameter:hitCrossingDirection
类型: character vector
:'either'|'rising'|'falling'
默认:'either'

如果选择,请在块图标上创建输出端口。

Programmatic Use

Block Parameter:Showoutputport
类型: character vector
:'离开'|'on'
默认:'on'

什么时候Output type被设定为信号, the output signal is set to one whenever the input signal crosses the点击交叉偏移价值in the点击交叉方向并且在其他时间为零。

当。。。的时候Output type被设定为信息,输出信号成为SimeVents消息。

什么时候Output type被设定为函数调用, the output signal becomes a function-call event.

Programmatic Use

Block Parameter:hitCrossingOutputtype
类型: character vector
:'Signal'|'信息'|'Function-Call'
默认:'Signal'

选择以启用零交叉检测。有关更多信息,请参阅零交叉检测

Programmatic Use

范围:Zerocross
类型:character vector, string
值:'on'|'离开'
默认:'on'

块特征

Data Types

双倍的

直接进料

是的

多维信号

Variable-Size Signals

零交叉检测

是的

提示

如果是点击十字路口块配置为输出simevents消息和输出信号:

  • Crosses into or out of a referenced model

  • Is fed to the input of a Stateflow chart

then you need to create a bus object for the message signal. In the MATLAB Command Window, run金宝appSimulink.CreatehitCrossmessageto check for and, if needed, create a hit crossing message bus object in the base workspace.

将相应端口的数据类型设置为Bus: HitCrossMessage

Extended Capabilities

Version History

在R2006a之前引入