PCSGU250 DLL duty cycle

Hello,

Is it possible to change the duty cycle of a generated square signal with the PCSGU250 dll ?

Best regards,
Sylvain

[quote]Is it possible to change the duty cycle of a generated square signal with the PCSGU250 dll ?[/quote]I’m sorry but the duty cycle can’t be set with the DLL.
As a workaround you can use the library waveform to get other PWM ratios.
In this case use the DLL function SetLibWave.

You can create the waveform library file using the Wave Editor of the software.
Here is an example of the waveform file how to get 25% duty cycle: 1.0 (2500) (0) -1.0 (7500)
You can use copy and paste in the Wave editor’s edit window to copy the data there.

In the PCSGU250 the maximum number of samples per one period is 512.
The software resamples the values of the wave file to fit to 512 samples per period.
Due to this resampling process there may be some minor error in the final duty cycle.

The “(0)” in the data file is needed to get sharp pulse edge.
Please see in the Help menu the “Wave Editor” for more details how to create the custom waveform files.

Hello,

Thanks for your rapid answer.

Sylvain