LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A Fieldpoint Temperature PID without the PID toolkit

Hi,

I'm trying to make a temperature PID using a FP-1000(RS-232) with a FP-TC-120 and FP-DO-400. The copy of LabVIEW that I have does not have the PID add-on and purchasing it is a last resort because of project budgeting. I'm a beginner but I've managed to make a temperature monitor which uses a thermocouple and which saves the input into a file. Now I've been trying to make the monitor into a controller but I've had some trouble finding tutorials/examples which use Fieldpoint and also does not use the PID add-on. Buying a stand alone temperature controller isn't really an option because I will later be trying to make a larger program which includes a mass flow and pressure controller and hopefully this temperature controller will be a good base to work from. Does anyone have suggestions for tutorials/examples relating to Fieldpoint PIDs and how to relay the result from the PID to the FP-DO-400? The temperature controller is mainly meant to keep the temperature constant over longer periods of time (~3 months). The FP-DO-400 will hopefully be connected to heating tape (around the monitored pipe) or another heating source.

Thanks,
Ryan
0 Kudos
Message 1 of 14
(3,193 Views)

Hi Ryan,

         It looks like you have a great start on your application.  As a place to start, I would recommend that you take a look at this resource that gives a general overview of PID with LabVIEW.  There are many resources on the internet that can explain the correct PID algorithms to use with your system.  Essentially, you should already have all the pieces except for the precise algorithms to use to create the PID control system.  A few resources to look at are here and here.  If you are still unable to build your application, you may consider taking advantage of National Instruments' investment into this area and purchase the PID toolkit which will save you considerable development time.  Have a great day and good luck!

Regards,
Jim M
Applications Engineer
National Instruments
0 Kudos
Message 2 of 14
(3,165 Views)
Hi Jim,

Thanks for the reply. I've tried working through the LabVIEW without the toolkit for now and this is what I've come up with although I'm having trouble communicating with the FP-DO-400. I don't have the actual heating device now but I figured that if I hooked up a voltmeter/ammeter to the FP-DO-400 I would be able to tell when a signal was being sent out. However no signal seems to be sent. I looked through the LabVIEW Block Diagram and tried to see what was happening with the PID part that I used. I got the PID section from someone's example for a pressure controller and tried to re-format it for temp. control use but I guess I missed something. Can you/anyone take a look at the program I tried to make and see any suggestions that I could follow to try and correct this?

Thanks again,
Ryan
0 Kudos
Message 3 of 14
(3,134 Views)

Hi Ryan,

            If you are worried that your DIO-400 is not functioning correctly, I would output a signal using Measurement & Automation explorer.  If you go under My Systems > Data Neighbordhood > FPName > cFP-DIO-400 @X, you should be able to double click on the value column for one of the channels and output a signal.  Once you have verified the functionality of your FieldPoint module, I would use highlight execution within your application to help you determine where the main issue with your application is.  Please let me know once you've done this and let me know if you're still having problems.

Regards,
Jim M
Applications Engineer
National Instruments
0 Kudos
Message 4 of 14
(3,115 Views)
You are writing to a digital output channel which means you are either writing a true or false, or a 0 or 1.  But your code right before that is doing additions and coercing a value to be in the range of your upper and lower limits.  That will be some value that is not likely to be a 0 or 1.  You will need to do some comparison operation on your values to translate that to a true or false, on or off, 1 or 0 condition to feed into your digital output.
 
On your FP read of the thermocouple data, I don't understand why you are summing the array of elements coming out of the T/C read.


Message Edited by Ravens Fan on 06-12-2008 10:13 PM
0 Kudos
Message 5 of 14
(3,105 Views)

Thanks for the replies Jim and Ravens Fan. I'm going re-think how I go about doing this program and re-work what I've done.

 

-Ryan

0 Kudos
Message 6 of 14
(3,081 Views)
Hi again,

I have another quick question. With the FP-DO-400, is it only possible to do a On/Off signal (100% on, 0% for off)? Or is it possible to send 20% of the signal so that its not constantly over or under the setpoint. I'm trying to now make the PID temperature control read the difference from the setpoint and from that determine the correct signal to send out. Should I be using the FP-PWN-520 module instead or another output module?

-Ryan
0 Kudos
Message 7 of 14
(3,060 Views)

A DO module can only be on or off, 100% or 0%.  A PWM would be better in that you could set it for percentages in between.  I just don't know how you would connect it to your heat tape.  I would assume that the heat tape would require a higher current than you could pass through a module.  You would have to compare the requirements for your heating system to the specifications for whichever module you would use.

One possibility to still allow you to use a DO module (which I would assume you are using a relay to switch on and off the higher current of the heat tape), would be to set up a loop.  Let's say you want 50%.  Then have a loop run so the relay is on for 1 second and off for 1 second.  For 33%, 1 sec on 2 sec off.  As long as the total cycle time is not so long that the tape heats up too much during the On time and you see wide fluctuation in your temp reading, but not too short where the extra cycles causes problems with wearing out a relay.  With a total cycle time that works well, you could have a ratio of on to off times of the relay that would effectively give you reduced power through the heat tape.

0 Kudos
Message 8 of 14
(3,055 Views)
Okay,

So I figured out that I will still be using the FP-DO-400 and a relay to the heating tape. Looking back at the past comments I changed the .vi I had previously made. I'm not sure what I've now made is correct in that I have a case structure determining whether the FP output is either Off (False) or On (True) through the write source. So if the temperature is less than the setpoint a signal goes out to the FP module and then to the relay. Is this write? It says that there are no errors present but I'm not 100% confident that the program will do what I'm wanting it to.

Thanks again,
Ryan
0 Kudos
Message 9 of 14
(3,023 Views)
Hi Ryan,
 
          It looks like your code will accomplish what you are trying to do.  The only issue I envision is that essentially you are working with an on/off system, which is not a PID system.  The purpose of a PID system is to control the rate of change of your system depending on your environment.  You will not have control over the rate of change with your system currently and so you may encounter erratic results trying to lock in on a particular temperature.  This will depend on how precise a temperature you need for your system.  The more precise, the more rate of change matters. 
          Regardless, let us know if this works for you and good luck.
 
Regards,
Jim M
Applications Engineer
National Instruments
0 Kudos
Message 10 of 14
(3,010 Views)