LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID with controlled ramp Options

TPD.jpgHi

I spot welded a K-Type Thermocouple on the surface of platinum foil (0.007mm thickness) I want to heat up from 20K-300K by Kepco power supply by using DC current from 0-6A.

I don't have any heater behind my target just by DC current ( by using Kepco Power supply) , platinum foil has very low resistance so I need initial current 5.12A for start heating from 20K I need to use Ramp heating for example 10 degree/minute et...

I used PID tool kit from Labview to drive kepco power supply and also I have linearized amplifier for thermocouple with 0-10v output. I attached a copy of my labview programme.

Anybody can help me to add an ramp voltage to PID toolkit ?

thanks

0 Kudos
Message 1 of 15
(6,159 Views)
Hi Ela,

at first you should get rid of all (or most) DDT wires...
Then add a Ramp function to change your setpoint automatically...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 15
(6,142 Views)

thank you GerdW

What do you mean "get rid of all (or most) DDT wires"

and you mean ramp to setpoint vi ?

0 Kudos
Message 3 of 15
(6,128 Views)

Hi Ela,

 

What do you mean "get rid of all (or most) DDT wires"

Get rid of DAQ assistent and use simple DAQmx functions as you do with the AO.

Btw. create the AO task just once before the loop and delete it also just once after the loop!

 

and you mean ramp to setpoint vi ?

Yes.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 15
(6,108 Views)

TPD with ramp.jpgDear GerdW

many thanks for your guidance ,

please look at my code I add PID to setpoint but when I turn on the system the thempereture is jump very fast and the set point profile does not work.

sorry this is my first time with Labview

sincerly

 

0 Kudos
Message 5 of 15
(6,037 Views)

Hi Ela,

 

as long as you only attach images here we will not provide much help. Why don't you attach your VI (LV2014 preferred)?

 

when I turn on the system the thempereture is jump very fast and the set point profile does not work.

- When the temperature is "jumping" either the reading is wrong or your heater has too much power…

- "does not work" is no LabVIEW error message: please explain in which way something "does not work"…

 

You still use ExpressVIs and DDT wires…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 15
(6,005 Views)

Hi again

this is my VI

please let me know if there is some mistake.

 

Note: I attach the VI as 7 zipped because "The attachment's TPD ramp.vi content type (application/x-labview-vi) does not match its file extension and has been removed."


@GerdW wrote:

Hi Ela,

 

as long as you only attach images here we will not provide much help. Why don't you attach your VI (LV2014 preferred)?

 

when I turn on the system the thempereture is jump very fast and the set point profile does not work.

- When the temperature is "jumping" either the reading is wrong or your heater has too much power…

- "does not work" is no LabVIEW error message: please explain in which way something "does not work"…

 

You still use ExpressVIs and DDT wires…



@GerdW wrote:

Hi Ela,

 

as long as you only attach images here we will not provide much help. Why don't you attach your VI (LV2014 preferred)?

 

when I turn on the system the thempereture is jump very fast and the set point profile does not work.

- When the temperature is "jumping" either the reading is wrong or your heater has too much power…

- "does not work" is no LabVIEW error message: please explain in which way something "does not work"…

 

You still use ExpressVIs and DDT wires…




0 Kudos
Message 7 of 15
(5,973 Views)

Hi Ela,

 

see attached VI, simplified to show just the behaviour of PID functions.

 

Right now the PID reacts as soon as the (simulated) temperature values is greater then the current setpoint. You still need to work out the correct PID gains - in your VI you used the default values…

 

 I attach the VI as 7 zipped because "The attachment's TPD ramp.vi content type (application/x-labview-vi) does not match its file extension and has been removed."

See this lengthy thread and the solution provided there at the end…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 15
(5,960 Views)

Dear Gerdw:
Hi
Many thanks for your kindly and valuable guidance.
LabVIEW code now working very well please look at Fig 1 in Word file attachment its linearity and temperature slope (12 degree/minute) is enough for my project.
Unfortunately it is not reproducible please look at Fig 2. Do you have any idea about this problem?
Before answering to my question I should say:
I added two VI toolkits in my code
1. PID Gain Schedule because I have to heat up a very thin layer of platinum foil that has low resistance so in some temperature region I have to change P and I value for example in Fig 1 and fig 2 I used following setting

Temperature range P I D
-238 Celsius to -200 Celsius 10 0.3 0
-200 Celsius to -50 Celsius 80 0.5 0
-50 Celsius to 0 Celsius 100 0.4 0
0 Celsius to 50 Celsius 100 0.4 0
50 Celsius to 100 Celsius 80 0.5 0

Time(s) Setpoint
0.00 -238 Celsius
800.00 +100 Celsius

2. PID output Rate Limiter because for start heating from -238 Celsius I need 5A dc current with this vi I selected initial output in 4 volt.
3. Another problem is when I push Stop bottom in programmer the analogue output is still in 5 volt I would like to be 0
4. The maximum current of programmable power supply is 7 A .

In any case thank you very much and please look at my code another time if you think something is rung please make correction.

 

Download All
0 Kudos
Message 9 of 15
(5,899 Views)

Hi Ela,

 

using a proprietary Office file format to show two images is usually "bad behaviour". Those office file formats could contain viruses, macros, and other bad stuff. Next time please use simple image file formats, PNG preferred!

 

Unfortunately it is not reproducible please look at Fig 2. Do you have any idea about this problem?

Disturbances?

Unoptimized PID gains?

 

1. PID Gain Schedule

You should make your gain values as Default of that cluster array…

 

2. PID output Rate Limiter because for start heating from -238 Celsius I need 5A dc current with this vi I selected initial output in 4 volt.

The "initial output" is zero, as you don't have set any other value as default…

This functions limits the change of rate of the PID output, not the range limits! The output limits of the PID is set with the PID function itself…


3. Another problem is when I push Stop bottom in programmer the analogue output is still in 5 volt I would like to be 0

When you want to output a zero you need to program this behaviour!

THINK DATAFLOW: output zero after the loop…


4. The maximum current of programmable power supply is 7 A .

Ok. You have limited the PID to a range of [0, 4.5]…

 

please make correction.

- You still create and clear the AI task with each iteration. Don't do THIS!

- Init before the loop, set the timing to "continuous", clear the task after the loop. Read 1000 samples in the loop and DELETE the wait function!

- When you want to have an array of samples you should read the samples as "1D array", not as waveform!

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 15
(5,880 Views)