SquareWaveGenerator

This block generates a square wave.

    SquareWaveGenerator

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

SquareWaveGenerator_0

NameLabelDescriptionData TypeValid 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.
Supported types are : double, complex, int32, int16, int8, uint32, uint16, uint8, boolean, inherit.

String

'double'
'complex'
'int32'
'int16'
'int8'
'uint32'
'uint16'
'uint8'
'boolean'
'inherit'

Ports

NameTypeDescriptionIO TypeNumber

Port 1

explicit

output

1

Advanced Properties

NameValueDescription

always active

no

direct-feedthrough

no

zero-crossing

no

mode

no

continuous-time state

no

discrete-time state

no