Hello everyone,

I've read alot about this and I cannot get working solution to show my computer fan speed into percentage instead of RPM.

With le software SpeedFan, i've push to the limit each fan of my computer to check the maximum RPM of each fan. For example, the fan that help my GPU to get fresh air have a maximum RPM of 1700.

Right now my widget show 672 RPM, but I want to have a percentage instead, so display 39%

How to get this? (and sorry for my english)

## Need help to convert fan speed RPM to percentage

### Re: Need help to convert fan speed RPM to percentage

Something like this

Code: Select all

`[MeasurePercent]`

Measure=Calc

Percent=(#FanSpeed# / (#MaxFanSpeed#/100))

### Re: Need help to convert fan speed RPM to percentage

CyberTheWorm wrote:Something like thisCode: Select all

`[MeasurePercent]`

Measure=Calc

Percent=(#FanSpeed# / (#MaxFanSpeed#/100))

A small mistake: the Percent option of this measure should be Formula:

Code: Select all

`[MeasurePercent]`

Measure=Calc

Formula=(#FanSpeed# / (#MaxFanSpeed#/100))

I also would rewrite this formula as

`Formula=( 100 * #FanSpeed# / #MaxFanSpeed# )`

### Re: Need help to convert fan speed RPM to percentage

.......okay, but how to display this? Variables? I really don't understand.

This is where I check the speed of the fan

And this to display the speed:

This is where I check the speed of the fan

Code: Select all

`[MeasureSpeed]`

Measure=Plugin

Plugin=SpeedFanPlugin

SpeedFanType=FAN

SpeedFanNumber=2

DynamicVariables=1

And this to display the speed:

Code: Select all

`[RPMDisplay]`

Meter=STRING

MeasureName=MeasureSpeed

X=40

Y=30

AntiAlias=1

NumOfDecimals=0

Text=%1

### Re: Need help to convert fan speed RPM to percentage

Rambytes wrote:.......okay, but how to display this? Variables? I really don't understand.

No, you don't need to add further variables. Just replace the in MeasureName option of the [RPMDisplay] meter the name of the measure you'd like to see:

`MeasureName=MeasurePercent`

### Re: Need help to convert fan speed RPM to percentage

Are you sure? The result is 0

Where the #FanSpeed# and #MaxFanSpeed# is for?

I really don't understand... most of the time I understand but not this one... (if my english was better, but i can't explain)

What I mean is where #FanSpeed# get is value from?

Can you build the complete code, with this I will understand more

Where the #FanSpeed# and #MaxFanSpeed# is for?

I really don't understand... most of the time I understand but not this one... (if my english was better, but i can't explain)

What I mean is where #FanSpeed# get is value from?

Can you build the complete code, with this I will understand more

### Re: Need help to convert fan speed RPM to percentage

Rambytes wrote:Are you sure? The result is 0

Where the #FanSpeed# and #MaxFanSpeed# is for?

I really don't understand... most of the time I understand but not this one... (if my english was better, but i can't explain)

What I mean is where #FanSpeed# get is value from?

Can you build the complete code, with this I will understand more

I understood, don't worry...

First I can't try the above code, because I'm not using the SpeedFan Plugin, so this is a just theoretical solution.

Second sorry, I've copied the code of CyberTheWorm, without thinking too much. Now I see I've omitted something: based on your initial request, I'd say that probably you have to define the MaxFanSpeed variable into the [Variables] section of your code:

Code: Select all

`[Variables]`

MaxFanSpeed=1700

This is the value you've talked about in your initial request.

Now modify the Formula option of the [MeasurePercent] measure either to

`Formula=( 100 * MeasureSpeed / #MaxFanSpeed# )`

, or to `Formula=( 100 * [MeasureSpeed] / #MaxFanSpeed# )`

(see with red the differences between the two formulas). Try first the first formula, but I suppose it wont work. If it does, it's ok, you have nothing to do more, but if it doesn't, just try the second one, too. But in this case be careful to not forget to also add a `DynamicVariables=1`

option to the [MeasurePercent] measure.I hope this will make the code to work well. Sorry for the inconvenience caused by my inattention.

### Re: Need help to convert fan speed RPM to percentage

WooHoo.... now is working, and using the second formula

Thanks alot, you're my hero of the day!

Thanks alot, you're my hero of the day!

### Re: Need help to convert fan speed RPM to percentage

You're welcome and thanks for the appreciation.

Return to “Help: Rainmeter Skins”

### Who is online

Users browsing this forum: No registered users and 9 guests