PWM generator#

block

Block appearance in REPEAT VISION#

 The PWM generator block implements PWM modulation principle - the signal at the output of the unit is 1, when the value of the input signal is greater than the value of the carrier signal of PWM generator (see Fig. 1 below), otherwise - at the output of unit 0.

PWMGenerator

Fig. 1 PWM generator#

 The block allows to specify three different types of carrier signal:

  1. Direct saw - the signal is characterized by slow growth and sharp decline (see Fig. 2 below).

Signal straight saw

Fig. 2 Signal Direct saw#

  1. Reverse saw - the signal is characterized by vertical growth and slow decline (see Fig. 3 below).

Signal reverse saw

Fig. 3 Signal Reverse saw#

  1. Triangular - the signal is characterized by slow growth and slow decline (see Fig. 4 below).

Triangle signal

Fig. 4 Signal Triangular#

 Value \(f\) – specified frequency of carrier signal, [Hz].

 The pulse delay allows to change the initial value of PWM generator carrier signal - “shift” the signal to the left for specified time.

1.  Properties#

Property

Default Value

Description

Units of measurement

Carrier signal frequency

1000.0

-

Hz

PWM delay

0.0

-

s

Tooth height

1.0

Maximum value

-

Minimum value

0.0

-

-

Carrier signal type:
Up counter;
Down counter;
Up-down counter

Up counter

-

-

2.  Inputs and outputs#

Parameters

Input/Output

Description

Units of measurement

Port type

Input signal

Input

-

-

Automation

Output signal

Output

-

-

Automation

In order to see the connection capabilities of the block, you need to go to page Description of block ports

3.  Code generation#

Important

Block supports C source code generation