01-05-2009 05:50 AM
I have a very simple vi. It checks temperature values and if the value is above a set point value, it totals it and then writes it off to a file at the end of 24 hours. As I said, that part is easy. I know the next part is easy too, but I am coming up blank. I want to check an incoming value against the previous value (this occurs every 5 seconds). If the value is 50 degrees higher than the previous value, then add to the total the value * 100%. If the value is greater than 200, but not greater than the previous value + 50, then add to the total the value * 70%. If my temperature dips below 200, there are no additions to the total.
I think this can be accomplished with a For Loop, but I can't seem to hook up the logic to read a value and then check the next against it.
Ron
01-05-2009
06:02 AM
- last edited on
06-18-2025
08:38 PM
by
Content Cleaner
If you use a while loop and add a shift register to it, you can compare the old and new value.
Ton
01-05-2009 06:20 AM
Thanks! I'll try it!
Ron