

ALGORITHM REQ IN ST :
IF IN <= PW THEN OUT := 100;
ELSE OUT := 0;
END_IF
END_ALGORITHM
An instance of this Function Block type converts a sawtooth waveform
in the range
{0..100}
to a rectangular waveform of the same frequency and the same signal
range, with a pulse width in percent expressed by the
PW
input. Its operation is modeled by the Execution Control Chart (ECC)
and algorithm shown above.
See the WAVEFORMS
system
configuration for an example of the use of instances of this and
other waveform generation FB types.