From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to make PWM generator using sine wave and triangular wave too. using basics functions given in function palette

how to make PWM generator using sine wave and triangular wave too while using basics functions given in function palette only. My instructor has asked me to do so, i think its possible only by using select switch or case stucture.

0 Kudos
Message 1 of 4
(3,446 Views)

What have you tried?

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 4
(3,414 Views)

what I have done here is that I have taken sinewave generator and plotted it on the graph as well as chart. Then I have converted all the negative value of sine wave to positive by taking absolute value which traces the wave same as that of full wave rectifier.  Now I need to set a threshold level of amplitude say 0.5 (which in terms of PWM is duty cycle) and again want to trace the graph. the graph hence obtained would be more like PWM generator. When the value is greater than 0.5 the graph will be traced and as soon as the value is less than 0.5 the value should fall to 0 immediately. For this I'm using select switch but am not able to make connection. Please find a way for me. 

0 Kudos
Message 3 of 4
(3,379 Views)

What you have described is not what is typically called pulse width modulation. The usual output of a PWM system is a series of pulses of constant amplitude and frequency but varying width or duty cycle.

 

Consider the output of a comparison function, such as Greater Than? That output is a boolean data type but can be changed to numeric by using the Boolean to (0,1) function.

 

Lynn

0 Kudos
Message 4 of 4
(3,364 Views)