From 6:00 PM CST Friday, Feb 15th - 2:00 AM CST Sunday, Feb 17th, ni.com will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multiple Servo Axis PID Reference Example for LabVIEW FPGA

Publish Date: May 06, 2010 | 1 Ratings | 5.00 out of 5 | Print | Submit your review

Overview

PID is a control algorithm that uses the previous and current iterations data to adjust the output based on gain factors. Because previous iteration data is needed, using a single standard PID for multiple servo axes, or control loops, does not work. Implementing many PID loops on FPGA can take valuable FPGA space. By utilizing the RAM available on a FPGA target, previous PID iteration data can be efficiently stored and quickly referenced when needed.

The attached PID FPGA VI has been modified to save previous iteration data in block RAM for up to 8 axes allowing a single PID VI for multiple control loops. For LabVIEW FPGA targets, this method reduces gate usage allowing more axes, or control loops on a given target. Figure 1 below shows how this single PID VI can be used in a “For Loop” to control all the “control loops” or axes defined by the number of elements in each array.

Figure 1. PID VI which saves previous iteration data in FPGA block RAM

The PID VI takes ~60 ticks to run (670+kHz) for each axis (i.e. for 8 axes, this control loop could run up to 670Hz/8 = ~84kHz . . . adding more code, such as input and outputs IO nodes, in series to the control loop will decrease the maximum rate).

This VI is password protected. The unlocked single axis version is available with NI SoftMotion. Contact National Instruments if you already have purchased a license of NI SoftMotion and need this VI unlocked. NI SoftMotion provides other motion centric LabVIEW IP allowing you to create a flexible motion control system.

Back to Top

Bookmark & Share


Downloads

Attachments:

multi_axis_servo_pid_85.zip

Requirements


Ratings

Rate this document

Answered Your Question?
Yes No

Submit