It is currently March 29th, 2024, 2:00 am

Value to %

Get help with creating, editing & fixing problems with skins
tekgeek
Posts: 3
Joined: June 30th, 2017, 10:40 pm

Value to %

Post by tekgeek »

So im having problems setting up a line graph for a GTX1070's core clock. the problem im coming in to is setting the bottom of the line to 1500. Setting MinValue's in the measure sets the bar graph fine. Even setting MinValue in the line section doesnt do anything. setting MaxValue works.

My thoughts were to convert the values in to % but im not sure thats the correct rout or how to do it.


Code:

Code: Select all

[GPUCoreClock]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xe0002000
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x6000000
HWiNFOType=CurrentValue
MinValue=1500
MaxValue=2300

[GPUCoreClockLabel]
Meter=String
MeterStyle=StyleLeft
FontSize=#TextSizeSmall#
Text="Core Clock"

[GPUCoreClockOut]
Meter=String
MeasureName=GPUCoreClock
MeterStyle=StyleRight
FontSize=#TextSizeSmall#
Text="%1 mhz"


[GPUCoreClockLine]
Meter=Line
MeterStyle=LineStyle
MeasureName=GPUCoreClock

[GPUCoreClockBar]
Meter=Bar
MeterStyle=TeksBarStyle
MeasureName=GPUCoreClock
MinValue=1500
MaxValue=2300

[GPUCoreClockSeparator]
Meter=Image
MeterStyle=GenSeparator
Last edited by Brian on July 1st, 2017, 2:34 am, edited 1 time in total.
Reason: Please use [code] tags.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Value to %

Post by jsmorley »

Yes, the Line meter is not based on percentages, but the actual value being measured, and will always have a baseline of zero.

If you want to have it based on a percentage, so MinValue becomes zero, or the baseline, you can do this:

Code: Select all

[GPUCoreClock]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xe0002000
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x6000000
HWiNFOType=CurrentValue
MinValue=1500
MaxValue=2300

[MeasurePercent]
Measure=Calc
Formula=[GPUCoreClock:%]
DynamicVariables=1

[MeterLine]
Meter=Line
MeasureName=MeasurePercent
https://docs.rainmeter.net/manual-beta/variables/section-variables/#Percentual

So you turn [GPUCoreClock] into a percentage from 0 to 100, and then the Line meter will track it the way you are looking for.

Note that I think you would need this if your measured value has a range that falls below zero as well. I don't think the Line meter is capable of dealing with negative numbers, as again, the baseline is zero.
tekgeek
Posts: 3
Joined: June 30th, 2017, 10:40 pm

Re: Value to %

Post by tekgeek »

Thanks for the quick reply.

That results with the graph at 100 all the time. I think you on the right path, maybe somethings missing in the Formula, or I did something wrong. I did have to add in my MeterStyle to get everything to line up.

Code: Select all

[GPUCoreClock]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xe0002000
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x6000000
HWiNFOType=CurrentValue
MinValue=1500
MaxValue=2300

[GPUCoreClockLabel]
Meter=String
MeterStyle=StyleLeft
FontSize=#TextSizeSmall#
Text="Core Clock"

[GPUCoreClockOut]
Meter=String
MeasureName=GPUCoreClock
MeterStyle=StyleRight
FontSize=#TextSizeSmall#
Text="%1 mhz"

[MeasurePercent]
Measure=Calc
Formula=[GPUCoreClock:%]
DynamicVariables=1

[MeterLine]
Meter=Line
MeasureName=MeasurePercent
MeterStyle=LineStyle

[GPUCoreClockBar]
Meter=Bar
MeterStyle=TeksBarStyle
MeasureName=GPUCoreClock

Here is the code for the whole skin. The skin uses a setting file, but its mostly just style variables.

Code: Select all

[Rainmeter]
Author=Tekgeek
Update=1000
Background=#@#Backgrounds\#BG#.png
BackgroundMode=3
BackgroundMargins=0,34,0,14

[Metadata]
Information=!Requires HWiNFO to be working in background!||Shows temperatures of CPU and more.
Version=.5

[Variables]
@Include=#@#SettingsBasic.inc

[meterTitle]
Meter=String
MeterStyle=TeksStyleTitle
Text="GTX 1070"

[GPUCoreLoad]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xe0002000
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x7000000
HWiNFOType=CurrentValue
MinValue=0
MaxValue=100

[GPUCoreLoadLabel]
Meter=String
MeterStyle=StyleLeft
FontSize=#TextSizeSmall#
Text="Core Load"
Y=40

[GPUCoreLoadOut]
Meter=String
MeasureName=GPUCoreLoad
MeterStyle=StyleRight
FontSize=#TextSizeSmall#
Text="%1 %"

[GPUCoreLoadLine]
Meter=Line
MeterStyle=LineStyle
MeasureName=GPUCoreLoad

[GPUCoreLoadBar]
Meter=Bar
MeterStyle=TeksBarStyle 
MeasureName=GPUCoreLoad



[GPUCoreLoadSeparator]
Meter=Image
MeterStyle=GenSeparator



[GPUCoreClock]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xe0002000
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x6000000
HWiNFOType=CurrentValue
MinValue=1500
MaxValue=2300

[GPUCoreClockLabel]
Meter=String
MeterStyle=StyleLeft
FontSize=#TextSizeSmall#
Text="Core Clock"

[GPUCoreClockOut]
Meter=String
MeasureName=GPUCoreClock
MeterStyle=StyleRight
FontSize=#TextSizeSmall#
Text="%1 mhz"

[MeasurePercent]
Measure=Calc
Formula=[GPUCoreClock:%]
DynamicVariables=1

[MeterLine]
Meter=Line
MeasureName=MeasurePercent
MeterStyle=LineStyle

[GPUCoreClockBar]
Meter=Bar
MeterStyle=TeksBarStyle
MeasureName=GPUCoreClock



[GPUCoreClockSeparator]
Meter=Image
MeterStyle=GenSeparator



[GPUTemp]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xe0002000
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000003
HWiNFOType=CurrentValue
MinValue=15
MaxValue=60

[GPUTempLabel]
Meter=String
MeterStyle=StyleLeft
FontSize=#TextSizeSmall#
Text="Core Temp"

[GPUTempOut]
Meter=String
MeasureName=GPUTemp
MeterStyle=StyleRight
FontSize=#TextSizeSmall#
NumOfDecimals=1
Text="%1 °C"

[GPULine]
Meter=Line
MeterStyle=LineStyle
MeasureName=GPUTemp
MinValue=15
MaxValue=60

[GPUBar]
Meter=Bar
MeterStyle=TeksBarStyle
MeasureName=GPUTemp


[GPUTempSeparator]
Meter=Image
MeterStyle=GenSeparator



[GPUVcore]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xe0002000
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x2000000
HWiNFOType=CurrentValue
MinValue=.7
MaxValue=2

[GPUVcoreLabel]
Meter=String
MeterStyle=StyleLeft
FontSize=#TextSizeSmall#
Text="Vcore"

[GPUVcoreVoltage]
Meter=String
MeasureName=GPUVcore
MeterStyle=StyleRight
FontSize=#TextSizeSmall#
Text="%1 V"
NumOfDecimals=1

[GPUVcoreLine]
Meter=Line
MeterStyle=LineStyle
MeasreName=GPUVcore

[GPUVcoreBar]
Meter=Bar
MeterStyle=TeksBarStyle
MeasureName=GPUVcore



[GPUVcoreSeparator]
Meter=Image
MeterStyle=GenSeparator



[GPUPower]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xe0002000
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x800003b
HWiNFOType=CurrentValue
MinValue=0
MaxValue=120

[GPUPowerLabel]
Meter=String
MeterStyle=StyleLeft
FontSize=#TextSizeSmall#
Text="Power"

[GPUPowerOut]
Meter=String
MeasureName="GPUPower"
MeterStyle=StyleRight
FontSize=#TextSizeSmall#
Text="%1 %"
NumOfDecimals=1

[GPUPowerLine]
Meter=Line
MeterStyle=LineStyle
MeasureName=GPUPower

[GPUPowerBar]
Meter=Bar
MeterStyle=TeksBarStyle
MeasureName=GPUPower



[GPUPowerSeparator]
Meter=Image
MeterStyle=GenSeparator



[VcoreTemp]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0ec0502
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000001
HWiNFOType=CurrentValue
MinValue=0
MaxValue=80

[VcoreTempLabel]
Meter=String
MeterStyle=StyleLeft
FontSize=#TextSizeSmall#
Text="Vcore Temp"

[VcoreTempOut]
Meter=String
MeasureName=VcoreTemp
MeterStyle=StyleRight
FontSize=#TextSizeSmall#
NumOfDecimals=1
Text="%1 °C"

[VcoreTempLine]
Meter=Line
MeterStyle=LineStyle
MeasureName=VcoreTemp

[VcoreTempBar]
Meter=Bar
MeterStyle=TeksBarStyle
MeasureName=VcoreTemp



[VcoreTempSeparator]
Meter=Image
MeterStyle=GenSeparator



[RAMUsage]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000301
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x8000003
HWiNFOType=CurrentValue
MinValue=0
MaxValue=16384

[RAMUsageLabel]
Meter=String
MeterStyle=StyleLeft
FontSize=#TextSizeSmall#
Text="RAM"

[RAMUsageOut]
Meter=String
MeasureName=RAMUsage
MeterStyle=StyleRight
FontSize=#TextSizeSmall#
NumOfDecimals=1
Text="%1 MB"

[RAMUsageLine]
Meter=Line
MeterStyle=LineStyle
MeasureName=RAMUsage

[VRAMUsageBar]
Meter=Bar
MeterStyle=TeksBarStyle
MeasureName=RAMUsage
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Value to %

Post by jsmorley »

Dunno. The approach I am using works for me, although I don't have your video card to directly test, and I don't see anything wrong with what you have right off.

Be sure to use the About dialog with the Skins tab to watch your measure values to be sure you are getting what you think you are.
tekgeek
Posts: 3
Joined: June 30th, 2017, 10:40 pm

Re: Value to %

Post by tekgeek »

theres something funky with my graph, but you formula works. Im getting the correct output in a string. With a little plying around I should be able to get it going. thanks!
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Value to %

Post by mak_kawa »

As W and H options are probably included in setting file, I don't know whether you want to display horizontal or vertical bar. If horizontal, is the line BarOrientation=Horizontal in your bar style section(TeksBarStyle)?