page 94
Funktion
PWM100
Library CRxxxx.LIB
Function symbol
Purpose
The function is used to initialised and parameterise the PWM
outputs.
Parameter
Function inputs
Function outputs, none
Description
Function PWM100 allows a simple use of the PWM functions in
the R 360. The PWM frequency can be stated directly in Hz and
the pulse /break ratio in 1% steps. This function is not suited for
setting up high-accuracy proportional controls.
Function PWM100 is called up once for each channel during the
initialisation of the user program. The input INIT has to be set to
TRUE. During initialisation the parameter FREQUENCY is
transferred.
The FREQUENCY value has to be the same for channels
4...7. The functions PWM and PWM100 must not be mixed.
The PWM frequency is internally limited to 10 kHz.
Name Data type Description
INIT BOOL TRUE: PWM100 is initialised
FALSE: PWM100 is allocated new values
FREQUENCY WORD PWM frequency in Hz
CHANNEL BYTE current PWM channel/output
VALUE BYTE current PWM value
CHANGE BOOL TRUE: new PWM value is accepted
FALSE: changed PWM value has no
influence on the output
DITHER_
VALUE
BYTE amplitude of the dither value in percent
DITHER_
FREQUENCY
WORD dither frequency in Hz