PID Control Reference Example for LabVIEW FPGA
Overview
This example shows how to do simple PID control of a PWM output using an analog input as feedback.
Downloads
Filename: simplepidpwm.zip
Requirements: View
This example has two parts. A host VI and a FPGA VI. The FPGA VI does all of the PID control. It reads an analog feedback sensor in volts, does PID control, and generates a PWM output signal at a base frequency. It also has a digital line output that tells direction. The host VI simply initializes the FPGA VI, reads data back, and displays everything in nominal form.
Note: Currently, the speed of the PID loop and the PWM generation loop are programmed to always be the same. If you need to run your PWM generation loop faster than the PID loop, you can change this by modifying the PID Loop Rate (Ticks) in the host.
Note: This was designed for 783x R Series boards and uses LabVIEW 8.5, LabVIEW FPGA 8.5, and the PID Toolkit.
**The accompanying code represents a very specific use case for NI products. For more general examples, please refer to ni.com/examples, the LabVIEW Example Finder, or the NI driver help files that come with every NI driver.
Feedback
This reference application was created by the NI Systems Engineering group.
We do not regularly monitor Reader Comments posted on this page.
Please submit your feedback in the Reference Design discussion forum so that we can improve this component for future applications.
Please direct support questions to NI Technical Support.
Requirements
Filename: simplepidpwm.zip
Software Requirements
Application Software: LabVIEW Professional Development System 8.5
Toolkits and Add-Ons: LabVIEW PID and Fuzzy Logic Toolkit 8.5, LabVIEW FPGA Module 8.5
Hardware Requirements
Hardware Group: Reconfigurable I/O (RIO)
Driver: NI-RIO 2.3.1
Reader Comments | Submit a comment »
Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
