SquareWaveGenerator
This block generates a square wave.
Library
SignalGenerators
Description
This block is a square wave generator. The output switches periodically between a first value and second value.
The third parameter of this block defines the period of the signal. The Duty Cycle (fourth parameter) is defined as a percentage of the period.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
FV | First value | First value of the signal. Real value. | Matrix | |
SV | Second value | Second value of the signal. Real value. | Matrix | |
period | Period | Period of the signal. Real strictly positive value. | Scalar | |
dutyCycle | Duty cycle | Duty cycle: defines the percentage of the period during which the signal stays at first value. Duty cycle is a real value in the range [0 ; 100] | Scalar | |
offset | Offset | Time shift before the signal starts the square wave. Before offset is reached, signal value is set to Second Value parameter. | Scalar | |
datatype | Output datatype | Defines the datatype of the output. | String | 'double' |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
Port 1 | explicit | output | 1 |
Advanced Properties
Name | Value | Description |
---|---|---|
always active | no | |
direct-feedthrough | no | |
zero-crossing | no | |
mode | no | |
continuous-time state | no | |
discrete-time state | no |