LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID Ramp Setpoint 0

Hello,
 
I'm hitting a wall in trying to get a setpoint value from the PID Setpoint Profile VI. Basically what i'm trying to do is heating up a cell (analog output 0-10V), with the user providing the target temperature and the ramp rate and the values processed in real time. I'm using an Agilent Datalogger to read the temperature.
 
Using the "Probe" I'm able to determine that the VI reads the setpoint correctly, however the setpoint output from the VI is always 0. Need help urgently to get this working. Attached is an image with the probe values and also the VI. Help is much appreciated.
 
Download All
0 Kudos
Message 1 of 9
(5,280 Views)
For additional information... what i was trying to do in the calculations was allowing the user to input the ramp rate at xx deg c/min and calculating out the time required to reach the temp.
 
When I use the standard "input" of the setpoint profile. THe VI would work. (Pls see attached picture).
0 Kudos
Message 2 of 9
(5,262 Views)
Hi scuzzy,
I see that in the first screenshot you posted, you have a True constant always wired into the reinitialize (F) terminal of the PID Setpoint Profile VI. This would cause the VI's internal track of time to reset to t=0 every time it is called (see the detailed help for the VI), and then I'm assuming it would only try to achieve the first setpoint given and never actually begin to ramp up. What happens if you switch this to False? The second screenshot you posted (PID_ramp2.jpg) shows a False constant.
0 Kudos
Message 3 of 9
(5,238 Views)
Hi Vijay,
 
When I switch to false the same thing occurs...
 
Regards...
0 Kudos
Message 4 of 9
(5,221 Views)
Hi,
 
Anyone else would be able to help with this issue? Or should this be a reported bug of the VI?
0 Kudos
Message 5 of 9
(5,199 Views)
Hi scuzzy,
 
I think the problem lies in how you've converted the two numeric controls on the front panel to a one element array of one cluster.
 
Instead, try placing an array container on your front panel. Then drop a cluster container inside it. Now place both of your numeric controls into that cluster. Connect this directly to the "setpoint profile" input on your block diagram.
 
Does this work?
--Michelle

National Instruments
0 Kudos
Message 6 of 9
(5,181 Views)
Hi Michelle,
 
I'm not too sure what you mean. the input is Target Temp and ramp rate while the PID Setpoint Profile.vi accepts a time and target temp. I believe it's just a quick modification of the VI to show what u mean... Thanks...
0 Kudos
Message 7 of 9
(5,168 Views)
Hi scuzzy,
It looks like Michelle has the right idea. It deals with the fact that arrays can have indefinite size, while clusters have a fixed and well-defined number of items within them. If you examine the output from the Array to Cluster VI, you will see that it generates a cluster of of 9 sub-clusters (where each subcluster has a time and setpoint value). You can also see this by the menu that comes up when you click an entry in the Bundle By Name VI and see your options listed as setpoint profile[0], setpoint profile[1], etc. all the way to [8]. I am not certain why 9 items is picked as the length to make that cluster.

Then when you take that cluster and only replace the setpoitn and time values for entry 0, but don't change any of the others, their values are set to time=0 and setponit = 0 for all 8 of the other items in the cluster. If you put an indicator up to the array output when you convert back from a cluster to an array, you will see it is 9 elements long, and all but the first output you explicitly set with your ramp up logic have zeros for time and setpoint.

If you instead take a 2-element cluster and bundle in your values into it and then built it into an array, you will get a proper array out which only has the number of times and setpoints in it which you specify. (You can use a Build Array VI to do this, or you can use a for loop with an auto-indexed output if you like)

I have made a screenshot from an example VI (also attached) which might help you understand what's going on better.


Download All
0 Kudos
Message 8 of 9
(5,145 Views)
Hi Vijay & Michelle,
 
Appreciate you guys took the time to explain. Would certainly try it out! Thanks...
 
0 Kudos
Message 9 of 9
(5,135 Views)