PWM Set Duty Cycle

Updates the duty cycle of a PWM signal

Description

A 'PWM Duty Cycle' block allows the duty cycle of the generated PWM signal to changed. Note that this only works properly if a 'PWM Init' block is also present for initializing the related PWM module.

Input

The duty cycle is taken as the input. It has a 10-bit resolution so a value of 256 equals 25% duty cycle, 512 equals 50% duty cycle, etc.
The used datatype is of uint16.

Parameters
General - Sample time
Sample time of the block. The Sample time (in seconds) defines the rate at which the block is visited by the real-time scheduler of the target. The value of the Sample time has to be an integer multiple of the base sample time of the model.