From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I control and tune a Omega Platinum temperature controller with labview?

I'm a novice to labview, 1st time using it, please bear with me.

 

Bascially, I run into problems of tuing a temperature controller to provide expected control on the temperature, which should be around plus/minus 1 C, maximum of around plus/minus 2C, and right now is around plus/minus 20 C.

 

Current situation and problems:

1. Omega Platinum temperature controller with a SPDT mechanical relay connected to a heating mantle to provide the output, and omega J type thermal couple to probe the temperature. The temp controller is currently running under PID control.

 

2. There is around plus/minus 20C oscillation around the setting point, even after auto-tuning and manually tuning the PID parameters. Please see attached image. And the ebb of oscillation around the setting point may be related to the Fuzzy Logic adaptive tuing of the temp controller, not sure about it. CN8DPt_305.png

 

3. And this temp controller comes with a mini-usb port, I was able to connect and control the temp controller with laptop through a mini-usb and usb line, through the configurator software provided by Omega.

 

Preliminary ideas and possible solutions that need your professional inputs:

 

1. I doubt that the auto-tuing algorithm in the firmware of Omega platinum temp controller is capable of finding the sweet spot of PID values, since multiple trial-and-error on tuning PID generated more confusions and frustrations. So I'm thinking about using the PID Autotuning (Temperature) of labview to optimize the PID parameters. Please correct me if I'm wrong over here.

 

2. Currently, I'm trying to use "Platinum_MB_Example Serial Master.vi" provided by Omega to connect labview to this temp controller (Attached). Even though the configurator software provided by omega could communicate with the temp controller through USB, I had no luck to connect the labview to the temp controller. Should I install specific driver or put the port number to make the communication open? I knew the port number of USB, but I'm not sure how to connect or if that's possible to connect the labview to this temp conroller through USB.

 

3. In case I was able to control this temp controller with labview, how could I add the PID Autotuning (Temperature) function to the original VI provided by omega? 

 

Link to this temp controller is as following:

http://www.omega.com/pptst/CNPT_SERIES.html

 

Your time and help on this are gratefully appreciated.

 

 

0 Kudos
Message 1 of 18
(12,476 Views)

Do you have the file 'OmegaPlatinumModbusDriver.llb'?  

 

It looks like this contains most of the VIs that actually constitute the device driver to interface with LabVIEW.  Once you have these VIs installed, you should be able to communicate with the device with LabVIEW.  There is also a good possibility that the .llb does not install necessary NI-VISA drivers which enable serial communication.  

 

Look into acquiring the OmegaPlatinumModbusDriver.llb.  If you have that and are still unable to communicate, go to ni.com/downloads and install NI-VISA.  

 

Then try to run the Platinum_MB_Example Serial Master.vi again and see if you can communicate with the instrument.  Also it might be a good idea to post the model number of the controller you're using if you want to troubleshoot further.  There are ~10 linked on Omega's page that you referenced. 

Matt | NI Systems Engineering
0 Kudos
Message 2 of 18
(12,450 Views)

Matt, thanks a lot for your time and kind input over here.

 

1. I do NOT have 'OmegaPlatinumModbusDriver.llb', the one I have is "PlatinumLabviewModbusLibrary.llb", or "Platinum Modbus .NET Driver_x86", those are the ones that come close to your description in the platinum-modbus-driver.zip file. Where can I locate the file you mentioned? Did you just see this file name in the release document? If that's the case, the file name may be a typo, I'm not sure.

 

2. As you recommended, I should install NI-VISA. To my naive understanding, I have Labview 2015 SP1 running on my laptop, shouldn't this include the NI-VISA?

 

3. The model number of my temp controller is CN8DPt-305, sorry I missed this critical info at the beginning.

 

Anyway, I'll try to run the "Platinum_MB_Example Serial Master.vi" again following your suggestions, to see if I have any luck.

 

Your further instructions and comments are more than welcomed.

 

Z

0 Kudos
Message 3 of 18
(12,446 Views)

I have never had issues with an unstable PID output after auto-tuning, but I typically use pulse PWM outputs with SSR's, not mechanical on/off relays.

Did you follow the instructions for auto-tune properly, it usually wants the system at room temeperature in order to characterize the response of the system.

 

Could it be that your sensor has a long lag time due to it takes times for the heat from the heater to reach the the sensor?

Can you describe your setup?

 

Another cause could be you are using a heater with too much thermal ouput compared to the load you are heating. How much wattage is it and what is it heating?

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 4 of 18
(12,441 Views)

AK2DM,

 

I did follow the instructions from the manual while carrying out autotuning, you're right, we did do the autotuning starting from RT. And we also tried manual tuning on the PID values, not much luck.

 

The whole setup is as following:

CN8DPt-305 as temp controller, connected to a 80W heating mantle, to heat up some solvent in a around 50 ml small flask. The sensor for the temperature is a type J thermal couple from omega. We had experience on this whole setup before, it was possible to have proper temperature control. Only thing swithced out from previous system is the temperature controller, since we don't have access to the old model temperature controller, which was discontinued by the vendor. So, I think the thermal output and load are actually matchable, should work out as long as the PID from the temp controller are properly optimized.

 

Right now, I'm looking for the right route to find those P, I, and D magic values.

 

 

Z

0 Kudos
Message 5 of 18
(12,427 Views)

Looking at your graph, the process and control signals seem to be out of phase in terms of amplitude and lead/lag- is there any chance you wired the SPDT relay wrong by using the normally closed contact instead of the normally open contact to power the heater?

 

Also another possibility- verify that the polarity of the J T/C wiring is correct, I forget offhand the convention for J types, check the Omega site.

 

EDIT: If either of the above required corrections then be sure to do another auto-tune!

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 6 of 18
(12,417 Views)

AK2DM

 

I connected the heater to the N.O. (Normally open relay/SSR load) and COM (Relay Common/SSR AC power), which should the right choice. 

 

And the polarity of J thermal couple should be right, or else the temperature would be heading to the opposite direction under heating.

 

As for the auto-tuning, I have carried out it both manually and automatically for mutliple times, still no luck to finding the optimized P, I and D values. Or else I won't seek professional inputs from people like you.

 

Please let me know any other possible options, thanks again for your time and help on this.

 

Z

0 Kudos
Message 7 of 18
(12,408 Views)

By coincidence we recently purchased a CN16PT-330-EIP and the poor documentation provided by Omega/NewPort makes it not easy to get things up and running, but I managed to do so.

If you still have the problem and are looking for help, let me know by repying to this post and I will try to help you.

For instance, connecting the heather between Common and N.O is not the correct approach, you have to connect the N of the mains supply to one input of your heather and the L to the Common while the 2nd input of your heather is connected to the N.O ... there is just a SPDT switch at the output, no internal connection of the L to the Common (N and L are also connected to pin 7 and 8 to apply power to the controller).

Also, the convention of a J type thermocouple is that white is (-) and black is (+).

0 Kudos
Message 8 of 18
(12,221 Views)

fransv1963,

 

Thanks a lot for taking time to reply my post and providing so much details.

 

Yes, I'm still struggling with the proper control of the temperature. As you could see from folllowing graph, under optimized circumstances, after numerous trial-and-errors of the PID values, there is still around 15C overheating, which is unacceptable for our purpose.

 

As for the line connection, I splitted the power line. For the two power lines of the heating device, I cut one power line in middle, then connected both end in the middle to two separate pin of the temperature controller, and kept another power line intact. In this case, the power is directly coming from the powe panel, the temperature controller is just functioning as a switch, keep one power line under open or close status intentionally.

 

Please let me know how could you eventually achieve proper temperature control, without or with only minimum overshooting and undershooting, your time and input on this are gratefully appreciated.

 

 

CN8DPt_305.png 

 

0 Kudos
Message 9 of 18
(12,214 Views)

What kind of heather and thermocouple are you using ?

 

In my case (only pushed it to 50 degC for the time being) the "auto tune" simply works (starting from a P set to 100, and I and D set to 0) and results in an overshoot of about 1 degC. Also the control is one way only using normal cooling off when no VAC is applied. What looks bizarre is that you don't have the expected exponential decrease after the initial overshoot.

 

Did the auto tune result in error 007 at your end (meaning that it was unable to successfully set PID values) ?

What are the actual PID values ?

 

Here are some initial results during my initial attempts (showing the overshoot of about 1 degC and the exponential decay).

Process and Control Data Charting.png

 

 

Settings which might be worthwhile to check :

1) PID Control: Action (Reverse / Direct)

2) SPDT Relay Output Setting: Digital Options - Cycle Time (s)

 

So in my case you clearly see when the controller kicks in as soon as the thermocouple T is below the target.

If the response is not optimal, you need to play with the PID values ... for this you should have some basic understanding of Control Theory.

0 Kudos
Message 10 of 18
(12,211 Views)