Square signal

| Vectorized | C | ST |
in the palette on the schematic

The block forms a signal at the output from uniform rectangular pulses with the specified time and amplitude parameters:

where y1, y2, T1, T2 are the properties of the block, y(t) is the output signal, t is the current model time in seconds, frac(t/(T1+T2)) is the fractional part.

Inputs

none

Outputs

  • output - output signal port.

Properties:

  • The duration of the 1st half-period is the time T1, during which the output block generates the value of the first half-period.
  • The value of the 1st half-period is the signal y1 sent by the block to the output during the first half-period.
  • The duration of the 2nd half-period is the time T2, during which the output block generates the value of the second half-period.
  • The value of the 2nd half-period is the signal y2 sent by the block to the output during the second half-period.
Properties can be vectors: T1 = [T1 1, T1 2,…,T1 n], y1 = [y1 1, y1 2,…,y1 n] и y2 = [y2 1, y2 2,…,y2 n], the dimensions of which must be the same. In this case a vector signal will also be generated at the output:

Parameters

none

Прим.:
  1. By default, the block generates a scalar output signal.
  2. Named properties can be set as local model variables (submodels) in a programming language script, as global project signals using the Tools → Signals main menu item, or as external project signals using a attachable signal database.