ActivatedEdge
Activated Edge is similar to Edge but generates events only when activated
Library
StateMachine
Description
This block is used for detecting zero crossings. Optionally, the previous input value can be set to have full control over the first activation of the block. For example if a state must exit if the input of the block is larger than zero, then simply detecting a zero-crossing to initiate an exit may not be enough: when entering the state, the value of the input may already be larger than zero. This could happen in particular at initial time. By setting the previous input value to 0, a zero-crossing is detected and the state is exited.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
cedge | Type of edge | This parameter defines the type of edge. 7 types are supported. | String | '<0 |
prev | Allow setting previous value | Number | 0 |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
Port 1 | explicit | Zero-crossing surface. | input | 1 |
Port 2 | explicit | Previous value can be set here if the option is selected. | input | prev |
act | activation | Block activation, when zero-crossing is detected. | input | 1 |
Port 4 | activation | Event, setting the previous value, when option is selected. | input | prev |
edge | activation | Event is generated here if zero-crossing is detected. | output | 1 |
else | activation | Activation signal when no zero-crossing is detected. | output | 2 |