Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Displaying message in RTMCPro when data not available


ScottB Oct 12, 2012 02:08 AM

Hi,

we have systems that have intermitant data links so it is possible for data on the RTMCPro displays to be out of date. Is there a way in a digital display to easily check if the last reading is more than say 30 minutes ago and display a warning message and if more recent display the collected value.

So if there was no up to date value (say last value was more than 30 minutes ago) the display would show 'No Data', but if there was a current value it would display that.

Thanks for any help!


Cheers,

Scott.


jtrauntvein Oct 12, 2012 08:08 PM

You can do what you want by comparing the last time stamp of the value with the current system time within an iif() function. The following example may serve to illustrate:

alias(temp, "ln:cr1000.one_min.temp_degf");
iif(SystemTime() - timestamp(temp) < 30 * nsecPerMin,
temp,
$"Data is too old")


ScottB Oct 15, 2012 12:48 AM

Thanks - works a treat!

I am always impressed by how quickly my problems get solved via the forum - thanks!


Scott.

Log in or register to post/reply in the forum.