![]() |
PID-thermostat: help - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: PID-thermostat: help (/showthread.php?tid=5421) |
PID-thermostat: help - Amelie - 18.05.2024 I have a heat pump, which can cool and heat. The switches from Jung measures only the temperature, thus the installer used the PID-function of the logic machine. But now, the heat pump (last week) has changed from heating to cooling. The temperature in the bedrooms was higher than the desired temperature, so one would expect that the valves opened so there was cooling in the bedrooms. But, the valves stayed closed. They went open, when I putted the desired temperature higher than the actual temperature in the room. So, it worked the other way around. The script (resident - 10s) of the installer is: Code: Verwarmen = grp.getvalue('1/6/4') -- status of the heat pump The weird thing is that I save the script (without changing anything), the behavior is normal. Thus, the cooling start as the actual temperature is higher than the desired temperature. But, the heating side works then vice versa. Can anyone help me wat is wrong? RE: PID-thermostat: help - CristianAgata - 18.05.2024 (18.05.2024, 16:07)Amelie Wrote: I have a heat pump, which can cool and heat. The switches from Jung measures only the temperature, thus the installer used the PID-function of the logic machine. But now, the heat pump (last week) has changed from heating to cooling. The temperature in the bedrooms was higher than the desired temperature, so one would expect that the valves opened so there was cooling in the bedrooms. But, the valves stayed closed. They went open, when I putted the desired temperature higher than the actual temperature in the room. So, it worked the other way around. Hi, Have you tried this ? https://kb.logicmachine.net/scripting/pid-thermostat/ Best regards Cristian RE: PID-thermostat: help - Amelie - 19.05.2024 The installer/programmer has copied the code into the section of the 'general functions' instead of in de user functions. The resident scrip seems to be the same as in the example (expect that there is no require('user.pid'), but I think that it is not necessary since he uses general functions) So, I don't see why it is not working as it should. RE: PID-thermostat: help - admin - 20.05.2024 You need to restart the script when heating/cooling mode changes because PID instance (p variable) is only created once the script starts. Attach an event script to 1/6/4: Code: name = 'pid' -- resident script name Resident script can be simplified: Code: -- init pid algorithm RE: PID-thermostat: help - Amelie - 20.05.2024 (20.05.2024, 07:20)admin Wrote: You need to restart the script when heating/cooling mode changes because PID instance (p variable) is only created once the script starts. Thank you very much! I was looking for a solution in that direction, but your proposal is much nicer than mine (and compacter). Another question: the programmer/installer has made a resident script for each badroom. So, I have 4 scripts like that. Can I combine them into 1 resident script and working with a p1 for room 1, p2 for room2, p3 for room 3 and p4 for room4. Would it be less taxing for the LM? |