Logic Machine Forum
Saturate CPU - 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: Saturate CPU (/showthread.php?tid=5438)



Saturate CPU - mai - 28.05.2024

I have created scripts to monitor the states of different ignitions. A lighting can belong to more than one grouping, for example, I have two independent lights in a hallway. When any of them turn on, I have to indicate the following states:
1. Grouping of hallway lights on floor 1
2. Building Corridor Light Grouping
3. Grouping of lights on floor 1

I have done it with tags, for the activation of the script. I have written the script with OR logic gates.



The CPU saturates when I turn on/off, for example, to all the lights on the floor. I think it is because when the lights change state, it has to enter the script several times and it becomes saturated.

How can i fix it? Or what is the reason for it to saturate so quickly?


RE: Saturate CPU - Daniel - 28.05.2024

Share your script and check what is the reason for the CPU load. You might created a loop or it is high KNX traffic. Use System load app and also check KNX statistics.


RE: Saturate CPU - mai - 28.05.2024

I have a scrtip like this for each tag. Some addresses have up to 3 labels.

x = grp.getvalue('2/3/2')
y = grp.getvalue('2/3/4')
z = grp.getvalue('2/3/6')


if x == true or y == true or z == true  then
    grp.write('2/3/100', true)
else
    grp.write('2/3/100', false)
end


I have verified the knx traffic with the ets and when I give a general off/on it executes all the actions only once, it does not stay in a loop with any address


RE: Saturate CPU - admin - 28.05.2024

You can use this solution: https://kb.logicmachine.net/scripting/logic-functions-central-statuses/