Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Pwm using counter

Hi, I'm trying to use pwm on a dc signal to control a buck converter for pv panel. I'm using pxi 6221 chassis. http://zone.ni.com/devzone/cda/tut/p/id/2991 this is an example on ni zone. However I don't understand the circuit. In particular the daqmx vi's. The any help would be great.
0 Kudos
Message 1 of 2
(5,604 Views)

Hey mtronics

 

The DAQmx vi's are what are configuring and controlling your hardware.

 

The first vi, CO pulse freq, is saying that you want to output a signal prom the counter output on your device at a set frequency and duty cycle.

The timing vi is then configuring the clock that your task is using. As you have already configured a frequency, this is set to implicit.

Now that the taskis configured the task is started.

Within the while loop the write to channel is checking if the duty cycle has changed. If it has it will update the duty cycle to the desired value.

The task then waits for an error or the user clicks the stop button to exit to while loop and then clear the task. This is to release the resources for any other code to use.

 

Hopefully that clears up things for you.

Matthew Trott
Applications Engineer
National Instruments UK
www.ni.com/ask
0 Kudos
Message 2 of 2
(5,583 Views)