Page 1 of 1

working hours counter

Posted: 20/10/2021, 7:27
by Irbis
Hello everyone, in my automation program for an ammonia compressor I made an hour meter but every time the HMI is turned off it clears the working hours.
My question is if there is a way to keep the operating hours variables no matter the HMI is turned off?

Re: working hours counter

Posted: 20/10/2021, 9:37
by Pixsys tecnico 1
Hi,
you need simply use RETAIN variables with the FuntionBlock, in you case CON_SEC, CON_MIN and CON_HOUR.
In this way the times are stored also after a power off and the FunctionBlock continues to increase that values.

Re: working hours counter

Posted: 20/10/2021, 16:48
by Irbis
Pixsys tecnico 1 wrote:Hi,
you need simply use RETAIN variables with the FuntionBlock, in you case CON_SEC, CON_MIN and CON_HOUR.
In this way the times are stored also after a power off and the FunctionBlock continues to increase that values.

Hello Mr. Pixsys I did what you suggested but it still does not store the time value after a shutdown of the HMI pixsys 810.
Can you please send me an example? 8-)

Re: working hours counter

Posted: 21/10/2021, 9:34
by Pixsys tecnico 1
Keep in mind that the retain value is stored every 30 seconds, so the power on time must be at least that time.

To set the attribute "retain" to a variable:
retain_attribute.PNG