EdgeTrigger
This block generates an event on rising, falling or both edges of the input signal (depending on the block parameter). A rising edge is a change in value from strictly negative or zero to strictly positive. A falling edge is the opposite.
Library
ActivationOperations
Description
The EdgeTrigger block serves to generate events when the input signal crosses, reaches or leaves the value zero. Unlike the ZeroCross block, this block detects both the zero-crossing of continuous-time and discrete-time signals. For continuous-time crossings, the behavior of the block is identical to that of the ZeroCross block. For discrete-time signals or more generally when the input signal jumps due to an event, the generation of the output event depends on the current and previous values of the signal. In that case the generated output event is synchronous with the event causing the jump.
For edge options ">=0 to <0" "- to +" "+ to -" and "Zcross", in addition to crossings, an event is generated both when the signal reaches zero and when it leaves zero.
The direction of the crossing is optionally available as a block output. The value 1 indicates a rising edge and the value -1, a falling edge.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
edge | Type of edge | This parameter defines the type of edge. 7 types are supported. | String | '<0 |
showport | Display output port | The direction of the crossing is optionally available as a block output. The value 1 indicates a rising edge and the value -1, a falling edge. This outpout is available only for edge options ">=0 to <0" "- to +" "+ to -" and "Zcross". | Number | 0 |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
Port 1 | explicit | input | 1 | |
Port 2 | activation | output | 1 | |
Port 3 | explicit | output | showport |
Advanced Properties
Name | Value | Description |
---|---|---|
always active | no | |
direct-feedthrough | no | |
zero-crossing | no | |
mode | no | |
continuous-time state | no | |
discrete-time state | no |