Recommended Posts

Hi,

I am using a variable value component to measure a Hz value of a stirrer that I have. When I turn it off suddenly, the last value is kept. It shows a value of a constant 3Hz for example, even when it is not spinning. NOw obviously this isn't a big deal, but I was wondering is there a way to reset that value to 0 so it doesn't confuse anyone who might see the screen?

I created a frequency channel that is a timer. For the expression on the variable value component I used a conversion that included frequency[0] in it.

Thanks

Link to comment
Share on other sites

There are a couple ways to do this. One thing you could do before I explain your answer is make it so the background of the value shows in green when it is current and red when it is old. But anyhow, to make it reset to 0 if the data is, say, older than 5 seconds, you'd put this in the expression:

iif(SysTime() - frequency.Time[0] > 5, 0, frequency[0])

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.