09-28-2009 09:58 AM - edited 09-28-2009 10:06 AM
here is the Hardware setup of mine.
[IMG]http://i34.tinypic.com/daa8.jpg[/IMG]
Now, I already have such a VI which gives me the temperature of heater. But i want to control the temperature of the Heater from VI, in which when i give certian temperature, then power supply provide the current in such amount that the required temperature is gained and stops when the temperature crosses the limit.
09-29-2009 09:41 AM
Hello,
Do you have the PID Toolkit? If so, you should be able to use the sime PID VI in order to control your output. This assumes that the input and output units are the same. If they are not, you would need to convert them appropriately.
-Zach
09-29-2009 11:04 AM
Zach H wrote:Hello,
Do you have the PID Toolkit? If so, you should be able to use the sime PID VI in order to control your output. This assumes that the input and output units are the same. If they are not, you would need to convert them appropriately.
-Zach
THe first time I measured temperature and had to drive a current output, i was flumoxed by the unit analysis until I looked closely at the eqaution used by the PID toolkit. The "P" term can be of any unit we desire so the "conversion factor" ends up the units of the "P" term.
If any of you have thought more about this idea and can enlighten me, feel free to do so!
Ben
09-30-2009 12:50 AM
I m uploading my VI here. In this VI, when I increases the value in the slide bar, it increases the temperature of the
Heater. as in the pic
and here is the image of the block diagram of this VI. in this picture, the "slide bar for increasing the temperature" is
circled.
NOW. My question is that, How can I attach the PID setup in block diagram to "slide bar" and so that when i chooses certian temperature, the it gives automatically that amount of current and when the temperature rises from that particular value, it again stops the current to the HEATER?
I u know that, then please do modifications in block diagram and upload it. thanks.
09-30-2009 12:52 AM
09-30-2009 11:05 PM
The problem is that you have basically created two completely different VI's and slapped them together. One is your real world analog input and analog output. The Inputs and Outputs are not connected to each other in any way. The second VI is the PID simulation example. It is an example to show you how a PID control algorithm is used. As an example, they created the "Plant" simulator there. That is simulating the real world for the purpose of the example and has nothing to do with your real world inputs and outputs. And why do you have the Proportional Gain VI in the upper loop and its output goes to the while loop tunnel and is never used again?
What you need to do is only use the actual PID portion of the example and have it placed in your upper loop. You have your DAQmx read. The analog input from that is fed to the PID subVI. The output of the subVI is fed to the Analog output DAQmx Write VI.
One thing you will have to do is modify the DAQmx Read. You are reading an N channel N sample and getting a waveform. Why the N channel version when you are actually only using 1 channel? Also, youi need to get it to a single sample. You can use multiple samples, but it should only be for the sake of averaging the data together into a single value to feed to the PV of the PID subVI. As such, you should use either 1 channel 1 sample, or 1 channel N samples Array where the array is averaged to a single value. The Waveform type doesn't do you any good because you can't do anything with its timing information.
10-01-2009 02:18 AM
Dear,
the VI modded by you was not working with me and and gave this error.
Now, I dont know that what to do with it.
and also, I want Such a Front panel in which I can set the temperature for the heater as in this VI, there is no such option.
10-01-2009 09:02 AM
That error doesn't make sense as you show only one channel "cDAQ1Mod2/ai0" in your input control on the front panel. Actually what is happening is that you have a Create Task VI at the very beginning of that call string which isn't doing anything bug creating an Unnamed Task. Try eliminating that since the create channel is what is doing the work to create the channel. Though I don't know why it thinks that there are 3 channels in that task since there are no channels being defined with the Create Task VI.
Setpoint is the control on the front panel that you tell the VI what temperature "point" you want to "set" the controller to.
10-01-2009 09:53 AM
The other two tasks are for the inputs. < The detectors are to be attached with that. >
i only wants that there should be some setup for the heater, through which i can control the temperature of the HEATER.