    

 ## On this page

  

 

 # Pwm

 Last update: 16.07.2025 

The flow of Pulse-Width Modulation is 1 during the first part of the period and 0 during the second one for every period. The length of the part is defined by the duty cycle, from 0% to 100% of the period.

The figure shows the output flow for a PWM with the following inputs:

- cycles: 10
- ts (timesample): 0.1
- dutyCycle: 0.7 (70%)
- amplitude: 1
- offset: 0

![](/sites/default/files/git_ansys/scade_one_library_2025_r2_1/t__pwm_00.svg)

## Interface

NameKindTypeCommentperiodIfloatValue of the period  
Range: &amp;gt;0tsIfloatTime sample during the period  
Range: &amp;gt;0dutyCycleIfloatSwitch reference value for on power, expressed in percent, 100% being fully on.  
Range: \[0, 1\]amplitudeIfloatGain to be applied to the output flow (default 1)offsetIfloatOffset to be added to the output flow (default 0)flowOfloatOutput flow**Constraint**: The ratio period / ts must be greater than 2.

**Parent topic:**[Sources::T](../../libraries/sources/sources_t.md)