Logic Machine Forum
Problem with trend data - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: Problem with trend data (/showthread.php?tid=5018)



Problem with trend data - FrancescoBellino - 11.10.2023

Good morning,

I have a Logic Machine on a plant where we monitor heat and electric meters. 
I have found a problem in the trend log data.

For a heat pump there are a heat meter and an electric meter that monitor the heat and electric power. The meters are integrated with Modbus RTU protcol.
Then we have a resident script that calculates a coefficient which is the heat power / electric power.

We have 3 trend log that have the following configuration:
 - Absolute value
 - Average
 - Every 5 minutes

The problem is that we have some data that are not right (there is an image of data in the upload).

For example, in the image, the first column is the result but at 3:15 there is a value that is completely wrong.
For the others rows the result seems to be correct.

Have you ever had some problems on the trendlog that compute the average?

Thank you in advance


RE: Problem with trend data - Daniel - 11.10.2023

Why do you say it is wrong?


RE: Problem with trend data - FrancescoBellino - 11.10.2023

(11.10.2023, 12:13)Daniel Wrote: Why do you say it is wrong?

Thank you for the reply.

Because the first column is calculated as: Column 2 / Column 3.

For the other values it is correct but for that one is wrong.


RE: Problem with trend data - admin - 11.10.2023

Trends values are sampled once a minute, all values changes in between are not taken into account. Show your script for coefficient calculation. What is the script sleep time?


RE: Problem with trend data - FrancescoBellino - 11.10.2023

(11.10.2023, 13:01)admin Wrote: Trends values are sampled once a minute, all values changes in between are not taken into account. Show your script for coefficient calculation. What is the script sleep time?

So the trendlog sample every minute and then perform the average of the 5 values?

I upload the script there. It has a sleep time of 1 second as the pool time od the Modbus devices.

Thank you


RE: Problem with trend data - Daniel - 11.10.2023

This scripts creates a lot of unnecessary traffic, use grp.checkwrite or even better grp.checkupdate if no need to write to bus.
Yes sample value is taken every minute and then average is calculated for resolution period.


RE: Problem with trend data - FrancescoBellino - 11.10.2023

(11.10.2023, 14:12)Daniel Wrote: This scripts creates a lot of unnecessary traffic, use grp.checkwrite or even better grp.checkupdate if no need to write to bus.
Yes sample value is taken every minute and then average is calculated for resolution period.

Thank you so much for the advise.

At the moment we don't have a KNX bus connected to the Logic Machine and the Object are virtual so I don't think that they will be written on the bus.
I will try anyway to change the functions in order to avoid traffic, as you suggested!

I didn't know these two function that are really useful for some applications.