04-25-2022 01:29 PM
Good afternoon,
I'm trying to make a waveform chart with 2 plots to start the relative time at 0 (the moment you run the program) and end at the elapsed time, auto scaling itself if possible. The vi is a symplification of another bigger one I'm working with, where you have 2 numbers shown in the chart and then a dwell time when those numbers are the same value. Right now, the problem is that the left limit of the x-value (minimum) changes with time, so a lot of changes in the imput numbers before they become the same value are lost. I've tried to uncheck the auto-scale value of the x-axis values and set the minimum to 0, but that doesn't seem to work since it becomes 0:00 as in the time off day.
I add the VI that I'm working with.
Thanks a lot.
Solved! Go to Solution.
04-25-2022 02:00 PM - edited 04-25-2022 02:01 PM
Assuming that the points are spaced equally, all you need to set is dt for the x-axis, e.g. with a property node.
(I would recommend further training, because most of your code is convoluted or even dangerous).
04-25-2022 02:02 PM
Can you take a step back and explain what the code should do and how it is used? I am sure properly done the code would fit on half a postcard.
04-25-2022 06:46 PM
Thank you for your answer. As I said, this is just a symmulation of a bigger program, that's why many things don't make a lot of sense. I've used this VI to try and test things for the other program, that's why it's a little bit messed up, but I thought the idea behind my question would get there, although it's true that I might need to practice more.
To answer your question, the program is for the control of a furnace. The two numbers represent the real temperature and setpoint temperature of said furnace, and when those two are the same, it's supposed to wait an amount of time specified by the programmer. The temperatures need to be put in a chart/waveform showing both and how the real temperature slowly comes close to the setpoint one until they reach the same value, then the dwell time.
Also, could you elaborate more on how to do your solution? As I said, I'm a bit of a labview noob and I haven't really worked with property nodes.
Thanks again
04-25-2022 07:24 PM
How are you measuring temperature? It is very unlikely that they are ever exactly the same. You probably need to define a valid range of what is "close enough".
So your program has two states and you have an outer loop that measures certain things and when a condition is met (e.g. temperature close enough to the setpoint) you switch to the next state until some other condition is met. No need for inner loops!
Your chart has a history of 20000 points and once you feed it additional points, the oldest points are lost, i.e. the first value shown no longer has x=0.
Do you want x0=0 when the program starts of when the temperature is reached?
These are not really LabVIEW problems, but general architectural considerations valid in any programming language.
04-26-2022 02:35 AM
I appreciate that you are trying to fix everything wrong with the program, but as I said, this one is a VI that I've been using to test a lot of things for a bigger VI, so a lot of the issues you pressent have already been solved, and the only thing I need advise on is in the original question.
So going back into that, after the furnace reaches a temperature and does the dwell time, it has to go to other temperature and do that again, and do that 10 times. How could I save all those temperatures into one single chart, without loosing points of temperaturw? Would it be better if I use a waveform graph instead?
To answer your question, I would want x0 to be at the start of the program.
Thanks again.
04-26-2022 09:38 AM
X0=0 is the default, so nothing needs to be done. All you need is to set dt (or dx) to your loop time and you'll get correct relative time information, assuming you use a suitable format for the markers.