Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Modifying VI example program for PID control

Hello, I am trying to modify "PID Control-Single Channel.vi" example in Labview 7.1.  I need to output a fixed frequency square wave with a variable duty cycle from output of the PID. 
Any help would be greatly appreciated
Thank you 

0 Kudos
Message 1 of 3
(3,096 Views)

John,


I don’t know what hardware you are using, but it looks like you are trying to do a control PWM type of an application. Rather then trying to have the PID portion remake the square wave in each iteration and then output to the analog write operation I would recommend using a counter instead and do a frequency output. This will save considerable software overhead. To do this just change the DAQmx Write to a Counter Output. Then you can have the PID output control the duty cycle and have everything else constant.


Hope this helps out, feel free to post back if you have any questions about this.


-GDE

0 Kudos
Message 2 of 3
(3,084 Views)

I agree with GDE.  Also, there is an example that shows exactly how to do this...look through more of the control examples and you will find a PWM output example (one with counters).

 

StuartG

0 Kudos
Message 3 of 3
(3,077 Views)