LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pwm counter

Hi Experts,
                 I'm using PCI-6052E DAQ card and developing in Labview 8.0, i have attached a vi that I've been developing after studying the 'PWM output counter vi' example.  Basically Im trying to output a PWM wave out of the counter 1 port of my card and ultimately I want to control the duty cycle of this wave.  However there are 2 problems that im encountering:

1) the wave output from my counter port is changing frequency all the time even though i set the frequency to be 50Hz, I have verfiy this by using DAQ assistant in order to output a PWM of 50 Hz and the oscilloscope can pick that wave up with no problems, so im wondering whether its my develop vi has problems as there wasn't an option for me to control duty cycle on the DAQ assistant.

2) Im also looking to control the amplitude of the PWM wave from my software, I have a peak value of 3.36 volts but I was hoping to control this and im not sure how to achieve it.

Can yous please advise, thank you for your time.

Best regards,
Coato
0 Kudos
Message 1 of 3
(3,380 Views)
Hi Experts,
               There is one more problem that I want to mention and that is outputting the PWM at certain duty cycles, I seem to output duty cycles from 0.1 to 0.5 okay as I can see the transitions happening, but when it gets over 0.7 duty cycle, the pwm wave doesn't change at all, as I expect that at duty cycle of 0.9, there will be almost a straight line at high state but im gettting like a 0.7 duty cycle wave.  Please advise.  Thank you

Thanks,
Coato
0 Kudos
Message 2 of 3
(3,356 Views)

Hi Coato,

I think this document will give you the info. you need to modify the example for your needs. At the moment you have no direct way to modify the duty cycle on the fly, but the example detailed in this link gives you an effective, simple method.

http://zone.ni.com/devzone/cda/tut/p/id/2991

Best wishes
Rob L

NI Applications Engineer

UK & Ireland


It only takes a click to rate this message 😉
0 Kudos
Message 3 of 3
(3,288 Views)