LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ramp up - save measurements - ramp down fast without saving !

Dear friends,

 

I made a temperature ramp vi that saves the measurements after it finishes the ramping. The saving happens after it ramps up the temperature. What I want now is to make it ramp down right after it reached the highest temperature without a delay, but the saving has to be done before the ramping down!  The ramping down rate can be anything but it would be better to be a bit fast, not more that 1 minute. The device allows that rate. There is no need of saving the ramping down. 

 

I have attached my vi.

I am beginner and I need your help.

 

Thank you in advance.

 

Best regards,

Evangelos

0 Kudos
Message 1 of 13
(3,781 Views)

I'm not saying this is the best way, it's just A way.

Connect the "new file path" output of the write to spreadsheet VI, into a ramp-down code block (perhaps another loop if you're doing it that way).

If done this way, it won't however, show on your graph.

Did you want the ramp to appear on the graph?

0 Kudos
Message 2 of 13
(3,770 Views)

Hi, 

Thanks for your answer. I am trying to connect the new file path to a while loop and I start building a rampdown code but it's a connection of two terminals of different type. Also my file path has time and temp. I only want to ramp down temp, or even better I need to ramp down the voltage to 0. Any other ideas or some help with this one? Maybe I can buld a rampdown code and have a delay there and start it after I reach my max temp. Is this possible?

 

Thanks.

 

Evangelos

0 Kudos
Message 3 of 13
(3,724 Views)

Hi Evangelos,

 

your current Vi has no timing whatsoever. It only produces a time channel and a linear ramp.


The time channel does not make any sense to me: the loop runs multiple times in one miliseconds, that ´s why you get those steps. have a look at  the attached VI.

 

Greetings

René

0 Kudos
Message 4 of 13
(3,678 Views)

Hi,

 

what do you mean there is no timing? It does what I want. It ramps the temperature in any value that I put, with a desired rate. Then it saves a file with two columns, one with the elapsed time and the other with the steps that I put through the rate control.

 

Now I need to make it go to 0 after it goes up and saves. So it goes for example to 500 Celcius then saves and then I want it to go down to 0..That's what I need to do.

 

How can I make it save and then to make it go to 0?

 

Thank  you for your time.

 

Best regards, 

Evangelos

0 Kudos
Message 5 of 13
(3,661 Views)

I'm assuming that the 'actual current' and 'actual voltage' will be measuring using some sort of hardware (or is this just for testing purposes?)

 

The simplest way, as stated, would be to have a second loop for your "ramp down" and feed the filepath into the loop.  Note that this just means wiring it to an indicator located inside the "ramp down" loop.   Data flow will force the "ramp down" loop to occur after the save.  Why do you need a "ramp down"?  Does your system have a cooling device to actually drive the temp down?  If not, setting 0C or programming a ramp of temperatures makes no difference.  you are essentially just turning the heater off.

 

As a side tip, you can replace the "Build XY Graph" with Bundle found in the cluster palette.

 

If this is going to be used as a Sub-VI, then i think if will be "OK" as is.  If not, you should really consider making the program more robust.  Enclose your code in a while loop with a button connected to the stop terminal.  then have your "ramp" begin at the press of a button (use Case Structure).  As is, i can set the ramp rate to 5000 and when i run the code it suddenly changes to 100.  This type of behavior is, well, bad.  by having the VI run until the user decides to stop it, things such as coercing values appears more fluid to the user. 

Message 6 of 13
(3,638 Views)

I control a generator which ends up in a thermocouple.  So I control voltage basically but I get temperature to the thermocouple. 

I have to ramp it down so that it goes to 0 volts. Yes the temp will not fall as fast as the voltage but that's not a problem. 

 

How can I connect the bundle to the graph? 

 

I added the start button to a case structure with my code inside. 

 

Also about the rate, I have adjusted the maximum that I will need at the lab which is 100. I don't want it to go faster. 

 

Thank you for your time.

 

Evangelos

 

 

0 Kudos
Message 7 of 13
(3,624 Views)

Hi Evangelos,

 

You already have an array with a temperature ramp from 0 to High Temperatur. There is a function that is called "Reverse 1D Array. If you cable your temperature ramp to that function, you get the ramp reversed. Now you could for instance use a For-Loop with a wait-function (you use that one already in your first loop), to iterate every value in the array down to zero. In every loop iteration you can do whatever you need with the single ramp value.

 

There is a function that "bundel" in the cluster palette. Connect the time and the temperature array with it. The context help of the xy-graph shows you how.

 

Regards

René

Message 8 of 13
(3,577 Views)

@vagmakman wrote:

I control a generator which ends up in a thermocouple.  So I control voltage basically but I get temperature to the thermocouple. 

I have to ramp it down so that it goes to 0 volts. Yes the temp will not fall as fast as the voltage but that's not a problem. 

 

 

 


My point here is that by representing the temp decay as this "ramp down" that you want to program is not what is happening in reality.  Do you need the slow ramp down to protect the generator?  If not, just turn off the generator and record the temperature as it falls to represent the TRUE temp vs time.  But you must remember that the thermocouple will not necessarily read zero at room temperature.  remember that a thermocouple works based on the difference in work function (of the two metals used) at a given temperature.  The temperature where this offset is zero depends greatly on the metals used (K-, J-, T- type thermocouples are all different).

 

Yes you could set up a "ramp down" profile to ensure it takes a minimum amount of time but this only occurs if your profile takes "longer" than the natural cool down rate of your system.  Also, you will need to actively monitor the temperature at each setpoint before proceeding to the next.  Stepping through 20 temperature values in 5 minutes is meaningless if the system takes 20 minutes to cool down through that same range.  So do the following.

 

1) set output voltage

2) enter while loop

   2a) read temp

   2b) if temp is near set point, exit while loop

3) get next set point and repeat 1-2

 


@vagmakman wrote:

 

How can I connect the bundle to the graph? 

 

 


 

 

The output of the Build XY graph is a cluster of the XY data.  Using the bundle function produces the same result.  Just wire it to the graph.  The reason I suggest the bundle function is that is has less overhead and doesn't require converting the arrays to waveform data as you have done in the code.

0 Kudos
Message 9 of 13
(3,567 Views)

Hi,

 

Thanks for the answers.

I did the part with the bundle. Thanks.

 

About the ramp down, I just want to protect the generator. I don't care about the cooling of the thermocouple. There will be enough time until the next mesurements so that it will cool down. 

I still cannot solve the ramp down problem.  I cannot connect the file path to a loop with a ramp down code. It says i connected two terminals of different types. Can you be more detailed? I am quite new to labview. 

 

Thank you all for your time anyway. 

 

Best regards, 

Evangelos

0 Kudos
Message 10 of 13
(3,492 Views)