matlab 触发器,Adding Input Triggers to a MATLAB Function Block

Adding Input Triggers to a MATLAB Function Block

An input trigger is an event on the input port that causes the MATLAB

Function block to execute. See Using Triggered Subsystems.

You can define the following types of triggers in MATLAB Function blocks:

Rising

Falling

Either (rising or falling)

Function call

For a description of each trigger type, see Setting Input Trigger Properties.

Use the Ports and Data Manager to add input triggers to a MATLAB Function

block that is open and has focus. To add an input trigger and modify its properties, follow

these steps:

In the Ports and Data Manager, select Add > Input Trigger.

The Ports and Data Manager adds a default definition of the new input trigger to the

MATLAB Function block and displays the Trigger properties

dialog.

Modify trigger properties.

Return to the MATLAB Function block properties at any time by

selecting Tools > Block Dialog.

The Trigger Properties Dialog

The Trigger properties dialog in the Ports and Data Manager allows you to set and modify

the properties of input triggers in MATLAB Function blocks.

To open the Trigger properties dialog, select an input trigger in the Contents

pane.Setting Input Trigger Properties

You can set the following properties in the Trigger properties dialog:

PropertyDescriptionNameName of the input trigger, following the same naming conventions used in

MATLAB®.

PortIndex of the port associated with the input trigger. The default value is

1.

TriggerType of event that triggers execution of the MATLAB

Function block. You can select one of the following types of

triggers:

Rising (default) — Triggers

execution of the MATLAB Function block when the control

signal rises from a negative or zero value to a positive value (or zero if

the initial value is negative).

Falling— Triggers execution of the

MATLAB Function block when the control signal falls from

a positive or zero value to a negative value (or zero if the initial value

is positive).

Either— Triggers execution of the

MATLAB Function block when the control signal is either

rising or falling.

Function call— Triggers execution of

the MATLAB Function block from a block that outputs

function-call events, or from an S-function

DescriptionDescription of the input trigger.

Document linkLink to documentation for the input trigger. You can enter a Web URL address

or a MATLAB command that displays documentation in a suitable format, such as an

HTML file or text in the MATLAB Command Window. When you click the blue text that reads

Document link displayed at the bottom of the Trigger properties dialog, the MATLAB

Function block evaluates the link and displays the

documentation.

Related Examples

More About

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值