LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID control to maintain constant temperature

Dear all LabVIEW gurus,
 
 
  Here we have a control application in which we're trying to use LabVIEW to
act as a PID controller to control (turn ON/OFF) a heating pad to maintain a constant
temperature on a metal surface which the heat pad is heating.
 
  What we're thinking is that instead of buying an off-the-shelf temp controller that takes in thermocouple readings, does the PID controlling, and outputting control signals to solid state relays to turn on the heating pad, we think that LabVIEW shall be able to do the controlling while saving us some $$$.
 
  The way we're imagining is to connect the thermocouple to a USB TC DAQ unit with all the right signal conditioning, then connect via USB to computer for LabVIEW to record the data(temp) points. We'll then apply a PID algorithm with a setpoint in LabVIEW and supposedly Labview will make decision as to turn on the heat or off. The output (ON/OFF) signal from Labview will then be connected to another USB DAQ system, a NI USB-6008 unit. It has an output port that we're thinking we'll just connect to some sort of transistor device to power the actual heater.
 
  A simple search for "PID" retrieves many PID examples in "Example Finder", however, since NI USB-6008 is relatively new, these examples don't seem to be able to run on USB6008.
 
  I'm wondering if there's some sort of example that we can start building on top of rather than start from scratch for this USB-6008. Also please don't hesitate to advise if there is any easier methods as the above method may be too complicated.
 
Jeff

0 Kudos
Message 1 of 5
(4,336 Views)

Hi,

I think your PID solution lies exactly in the Example Finder. The PID VI that you have found is basically a soft PID and depending upon certain algorithms it takes the inputs calculates/adjusts the output values and tries to minimize the error.

Basically, if you have become theoritically strong on PID concepts, it will help you modify the existing soft PID. For example, my previous application was on mentaining constant pressure in a pressure controller (in pressure control only P and I will come into the picture, D will be zero). Similarly, in case of temperature, since the chage is a slow, all the three will come into the picture i.e.P, I and D.

But most importantly, you should be able to set proper values to P, I and D, which could only be done by hit and trial.

 

0 Kudos
Message 2 of 5
(4,319 Views)

Not to derail your LabView efforts, but in terms of price I fail to see how you can beat ~$200 for an off-the-shelf standalone PID temperature controller (Omega comes to mind). Investment is labor is comparatively nil too- specify/purchase/connect probe and power, connect heating blanket and supply, and set setpoint and PID parameters with about an hour or two of total time investment.

Just a controls suggestion

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 3 of 5
(4,309 Views)
Jeff,
I have some questions for you?
1. Are you using DAQmx or DAQmx Base to program NI USB-6008? If you are using DAQmx 7.5 you can use the daqmx examples for programming NI USB-6008.
2. Are you using LabVIEW PID toolkit or just programing your PID algorithm using regular VIs? If you are using DAQmx Base driver you can find example VIs under this folder
C:\Program Files\National Instruments\LabVIEW 7.x\examples\daqmxbase

Ame G.
National Instruments
0 Kudos
Message 4 of 5
(4,301 Views)
Thanks for your replies,

TSreedhar: yeah I think later on tuning for the PID controller is definitely required in Labview, although right now we just have sort of a rough plan but haven't really tried coding in Labview...
AnalogKid2DigitalMan: What you said was exactly right, and we actually have something from Omega right now on another machine. Since this course (im' a student by the way) is on Labview so we thought we might as well do it in Labview as an exercise, although we'll still buy a unit from Omega as a backup in case labview doesn't work out 😃
 
Ame: THanks very much for your response, i'm a sort of 2 month newbie to Labview, just to make sure I understand your questions correctly,
 
1. You asked whether we have DAQmx 7.5 or DAQmx Base, I'm slightly confused between DAQmx7.5 DAQmx Base and the traditional DAQ (legacy).  Is the latter two the same? (DAQmx Base = "traditional DAQ" for previous versions before Labview 7.x?) If that's the case, I'm using Labview 7.1 Student edition so I guess mine is DAQmx. Also, how do I verify the version of DAQmx to be 7.5 or not? I didn't upgrade the DAQmx so that's whatever came with the install CD.
 
2. you mentioned "If you are using DAQmx 7.5 you can use the daqmx examples for programming NI USB-6008. "
The examples i found in example finder are in NI example finder -> Hardware Input/Output ->DAQmx ->Control-> General and most of the examples listed have compatible hardware listed also. If USB 6008 is not on the specified hardware list, we can also connect to it and expect the example to run? I'll be able to hook it up early next week to test it out.
3. We're using PID algorithm using regular VIs, not the additonal "PID toolkit" that needs to be bought. We'll follow the path to examples you provided to find examples...
 
 Again, thanks very much for all of you helping us with the question. Once we start coding I'll be able to report more details regarding the difficulties/lessons we'll be learning...
 
Jeff
0 Kudos
Message 5 of 5
(4,277 Views)