This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Changing negative value to zero
#3
Thanks for a quick advice.

The variable (modbus register) my heatpump is calculating is degree minutes for my cooling system. So it calculates positive values when the temperature in my buffer tank is above my setpoint and the cooling activation treshold is 10 DM. Highest DM it calculates is 40 and lowest is -10. I basically want to get rid of the negative DM's so I can get my cooling cycle to start earlier.

So I put the same address for the input and the output, but it didn't work. (tried both 5sec timer and event) It's a mystery to me what happens but after I activate the script the seems like the heatpump isn't able to write the new variable which it calculates and the script overwrites the variable with the last value so it doesn't change. Even after I deactivate the script it does something odd very long until it recovers.

   

Here is a log of the variable and at this page the script is already been deactivated. It seems the heatpump tries to overwrite the next calculated value which is 3, but the script somehow stays with the 2. When the heatpump tries to write the value 10, my cooling cycle starts and after it I think the system recovers from the script somehow and now the heatpump can write reasonable values to variable.

Any advice on that? Do I need to make the timer time longer or do I need some kind of middle step where I compare the output of the maximum value and the modbus register and only rewrite it if they differ?

Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
RE: Changing negative value to zero - by RagingBull - 02.06.2021, 08:03

Forum Jump: