LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PWM Generation

Hello.
 
I am trying to implement a PID controller in LV7.1, using a PWM instead of an anlaogue output.
I want to vary the duty cycle, on the +5V pulses.
I looked at the example shipped with LV7.1(PWM Counter Output), but I am stuggling to integrate it with my main vi.
 
Does anyone have a basic example of generating a PWM with a variable duty cycle?
 
Many Thanks.
 
Regards Tom
 
0 Kudos
Message 1 of 7
(3,818 Views)

Hi,

The example that I have posted shows how to do Pulse Width Modulation using an analog output rather than using a counter. It uses one of the analog output channels and continually changes the duty cycle of the generated square wave.

I hope this helps!

Kurt

0 Kudos
Message 2 of 7
(3,798 Views)

Hi Kurt.

 

Thanks for the reply.

Unfortunately both of the analog output channels I have are tied up, so I have to use the counter.

 

Regards

Tom

0 Kudos
Message 3 of 7
(3,790 Views)

Hello.

In the attached example, NI talk about snychronising tasks, and using "hardware timed single point" as the sample mode.

I want to continuously graph the same data that I am using as the controller reference, but the example will not work unless the sample mpde is HW timed single point. Anyone any ideas on how to overcome this dependency.

Thanks.

Regards

Tom

0 Kudos
Message 4 of 7
(3,775 Views)

Hello again.

I have been working on a way to overcome this problem. When both the PWM generation and the inputs are continuos, the physical control response from the card is extremely sluggish and unsatisfactory. Although when using HW timed single point the perforamnce is fine.

Can anyone help me on this?

Thanking you.

 

Regards

Tom

0 Kudos
Message 5 of 7
(3,761 Views)
Hi,
 
I've found a great tutorial on PWM that may be of some help!
 
Advanced Data Acquisition Series – Pulse Width Modulation in NI LabVIEW Using NI-DAQmx
http://zone.ni.com/devzone/conceptd.nsf/webmain/90DFE241E571056C86256FA4004ABB63?opendocument&Submit...
 
Tutorial: Developing a PWM Interface using LabVIEW FPGA:
http://zone.ni.com/devzone/conceptd.nsf/webmain/0858249f041def8c86256de300769757
 
I hope this helps!
 
I've noticed that you've posted the same question in another forum!
 
Kind Regards,
 
Kurt
NIUK Applications Eng.
Message 6 of 7
(3,729 Views)

Hello Kurt.

Thanks for the references, going through them now, thanks for your assistance.

Sorry I posted again, but I'm way behind schedule, and I have spend ages working on this myself before the first post.

All the best.

Tom

 

0 Kudos
Message 7 of 7
(3,716 Views)