Trend Logs (Max, Min Average) - 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: Trend Logs (Max, Min Average) (/showthread.php?tid=4037) |
Trend Logs (Max, Min Average) - sjfp - 06.05.2022 Hi, is it possible to get the Max, Min and Average values ( all stored data) from each trend name so that they can be added to vis. Trend Logs 1) Power DB1 : max 2/3/10 min 2/4/10 average 2/5/10 2) Power DB2 : max 3/3/10 min 3/4/10 average 3/5/10 3) Power DB3 : max 4/3/10 min 4/4/10 average 4/5/10 4) Lighting DB1 : max 5/3/10 min 5/4/10 average 5/5/10 RE: Trend Logs (Max, Min Average) - admin - 09.05.2022 This example will calculate min/max/average for the past year data. Keep in mind that this is rather CPU and memory intensive calculation so it's not recommended to run it too often. Code: require('trends') RE: Trend Logs (Max, Min Average) - sjfp - 09.05.2022 (09.05.2022, 08:11)admin Wrote: This example will calculate min/max/average for the past year data. Keep in mind that this is rather CPU and memory intensive calculation so it's not recommended to run it too often.Thank you once again. |