LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time-Dependent Function

I need to create a triangle wave that will be time-dependent. In other words, if the time is between 00:00 (midnight) and 12:00 (noon) I want my function (temperature) to increase linearly from the minimum at 00:00 to the max at 12:00. Then, from 12:01 to 23:59 I want my function (again temp) to decrease linearly from max at 12:00 to min at 00:00.
Ideally, whenever I initiate the program LV would know what time it is and determine the target value for temperature.
IS THIS POSSIBLE IN LABVIEW???
Is there any way to convert those ridiculous seconds into meaningful time???
0 Kudos
Message 1 of 7
(3,761 Views)
Most of the things you can think of is possible in G, just as in other languages.

Check out the attached example on how to solve your problem, run it and it will give you an output based on the time you ran it and the output specified in the lookup table.

(It's difficult to see sometimes but the use of seconds is there to *make* things meaningful;-)
Message 2 of 7
(3,761 Views)
Thanks for the quick response!
...I should have mentioned earlier that I'm using LV 5.1.1... I think the attached VI is in 6? Do you have a 5.1.1. version of that vi?
0 Kudos
Message 3 of 7
(3,761 Views)
...I should also mention that my 6.0 evaluation version has expired...on both of my computers...
D'OH!
0 Kudos
Message 4 of 7
(3,761 Views)
Ok, since your evaluation version had expired as well I attached a picture of the code instead.

(I recommend LV7 by the way, things have gotten much better since the days of 4 and 5.X!:-))
0 Kudos
Message 5 of 7
(3,761 Views)
I'll replicate the code and mull it over. As you said, "just about anything is possible in G," if you know what you are doing. If we have the cash-ola I'd love to upgrade to 7! Especially since I think I saved us lots of money in man-hours with my temperature and oxygen control vi! ...ancient equipment and software seem to add another level of complexity to our work!

I'm a newcomer to LabView (and a fish biologist, not an engineer) but I think I'm catching on pretty fast.
Thanks again for the help!
Lance
0 Kudos
Message 6 of 7
(3,761 Views)
Nice to be of help.

In LV5 you'll need to wire a boolean out of the case, as you can see in my LV7 code there is a tunnel there that doe snot have an input; it's because in LV7 you can specify the tunnel to return the default if it's not wired; in this case a false...
0 Kudos
Message 7 of 7
(3,761 Views)