It is currently March 28th, 2024, 6:18 pm

Calculate Min,Max Value of a measure

Get help with creating, editing & fixing problems with skins
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: Calculate Min,Max Value of a measure

Post by pul53dr1v3r »

it's even more strange now. On manual refresh, sometimes it retrieves 0.0, sometimes the right Min value. Then, after closing AIDA (with a real Min value on the skin), it keeps the value before, after closing AIDA, even when started but resets it to 0.0 at the moment when the reg key starts to get value from AIDA and so, it keep zeroes all the time. Sometimes (on a manual refresh) it gives 0.0, sometimes a real value...

Nvm, i don't need it so much. Will go with the Max only.

A line about the average. I wished to get the average value of this sensor (PowerUsage), but that formula (in my view) is entirely for static values, not for dynamic. The formula for the dynamic values could be to read only the current values every second, then to sum the values of every second and divide with the number of the seconds of reading. For instance, reading for 5 sec would be:
42 + 87 + 300 + 50 + 71 / 5 = 110
Try to calculate this using the previous formula with min and max. O.O
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Calculate Min,Max Value of a measure

Post by balala »

Pul53dr1v3r wrote:it's even more strange now. On manual refresh, sometimes it retrieves 0.0, sometimes the right Min value. Then, after closing AIDA (with a real Min value on the skin), it keeps the value before, after closing AIDA, even when started but resets it to 0.0 at the moment when the reg key starts to get value from AIDA and so, it keep zeroes all the time. Sometimes (on a manual refresh) it gives 0.0, sometimes a real value...

Nvm, i don't need it so much. Will go with the Max only.
Because as I said I don't have installed AIDA, I think I can't do more then this. Sorry...
Pul53dr1v3r wrote:A line about the average. I wished to get the average value of this sensor (PowerUsage), but that formula (in my view) is entirely for static values, not for dynamic. The formula for the dynamic values could be to read only the current values every second, then to sum the values of every second and divide with the number of the seconds of reading. For instance, reading for 5 sec would be:
42 + 87 + 300 + 50 + 71 / 5 = 110
Try to calculate this using the previous formula with min and max. O.O
Just to clarify, because I'm not sure I understood exactly what you want. You would like to get the last five values of the [PSUPowerUsage] measure and calculate the average of these five values, or the average of the current value returned by the [PSUPowerUsage] measure and the Min and Max values?
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: Calculate Min,Max Value of a measure

Post by pul53dr1v3r »

It's OK. You helped very much so far.
balala wrote:Just to clarify, because I'm not sure I understood exactly what you want. You would like to get the last five values of the [PSUPowerUsage] measure and calculate the average of these five values, or the average of the current value returned by the [PSUPowerUsage] measure and the Min and Max values?
Average Power Consumption of a session. Average Power Usage from Turning a PC on to turning it off. I just gave an example of a session that lasts 5 sec.
A session can be 1h, 10h etc... Not sure can it even be done here in rainmeter not using Lua.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Calculate Min,Max Value of a measure

Post by balala »

Pul53dr1v3r wrote:Average Power Consumption of a session. Average Power Usage from Turning a PC on to turning it off. I just gave an example of a session that lasts 5 sec.
A session can be 1h, 10h etc... Not sure can it even be done here in rainmeter not using Lua.
I don't think so. At least I don't see a good solution now. Sorry again...
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: Calculate Min,Max Value of a measure

Post by pul53dr1v3r »

if you find a way to do it, pls write.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Calculate Min,Max Value of a measure

Post by balala »

I suppose this is the same question as this one: https://forum.rainmeter.net/viewtopic.php?p=141678#p141678
Right?
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: Calculate Min,Max Value of a measure

Post by pul53dr1v3r »

balala wrote:I suppose this is the same question as this one: https://forum.rainmeter.net/viewtopic.php?p=141678#p141678
Right?
Not, it isn't. Here we talked about AVERAGE, that topic is about TOTAL consumption. The difference is like from total and average fuel consumption in a car. Even though, think the formula isn't much simpler.
For example, Total Power Consumption during a session (to a moment in the session) can be 2 000 Wh (2 kWh)
Average Power Consumption of the same session could be 80 W, 200 W etc. depending on the lasting time of the session.
Hope you got what I want?
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy
Contact:

Re: Calculate Min,Max Value of a measure

Post by fonpaolo »

If you're using an UPS to protect your computer, download and install the utility software from your UPS manufacturer.

You can then have all the informations you want and even more.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Calculate Min,Max Value of a measure

Post by balala »

Pul53dr1v3r wrote:Hope you got what I want?
Yep, I did, but have no solution (yet?).
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: Calculate Min,Max Value of a measure

Post by pul53dr1v3r »

fonpaolo wrote:If you're using an UPS to protect your computer, download and install the utility software from your UPS manufacturer.

You can then have all the informations you want and even more.
No, I don't . But even if I do, could bet none of theirs utilities can write the sensor values to an external file/registry.
Post Reply