aggregating custom gauge

For discussion of Phil Tobin's Tuner Studio software (Only about the tuning software itself, not about how to tune or firmware features)

Moderator: LT401Vette

Post Reply
W126
Experienced MS/Extra'er
Posts: 153
Joined: Sun Aug 24, 2014 10:32 am

aggregating custom gauge

Post by W126 »

there are some gauges in Tuner Studio which aggregate values like the odometer.
Is it possible to define an aggregating custom gauge ?
LT401Vette
Super MS/Extra'er
Posts: 12731
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: aggregating custom gauge

Post by LT401Vette »

Yes...
In the Custom Configuration Editor, the advanced OutputChannel editor;
In the list of functions you will see accumulate(..) and persistentAccumulate(..)
accumulate - Accumulate and sum the expression, this allows totaling distance, milage, fuel consumption, etc. The accumulated value is only for the session.
persistentAccumulate - Same as accumulate, except the accumulated value is persisted to the next session. Allows for an Odometer.

http://www.tunerstudio.com/index.php/ma ... -functions
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
W126
Experienced MS/Extra'er
Posts: 153
Joined: Sun Aug 24, 2014 10:32 am

Re: aggregating custom gauge

Post by W126 »

I see, wonderful !
Thank you very much.
W126
Experienced MS/Extra'er
Posts: 153
Joined: Sun Aug 24, 2014 10:32 am

Re: aggregating custom gauge

Post by W126 »

One more question:
What is the time base for the accumulation?
In other words: which unit must the accumulated value have?
XX/sec, XX/min, XX/h ?
LT401Vette
Super MS/Extra'er
Posts: 12731
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: aggregating custom gauge

Post by LT401Vette »

The best data rate offered...
So if your current date rate is 50 reads/sec it will be 20ms
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
W126
Experienced MS/Extra'er
Posts: 153
Joined: Sun Aug 24, 2014 10:32 am

Re: aggregating custom gauge

Post by W126 »

but how does Tuner Studio know the unit of the channel?
E.g. if I want to build an odometer based on vss,
the unit might be m/s or km/h, so time reference is per second or per hour.
There must be a general time reference for accumulation, maybe per second or per minute?
LT401Vette
Super MS/Extra'er
Posts: 12731
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: aggregating custom gauge

Post by LT401Vette »

You can define the units when you define the OutputChannel.

It will accumulate the value of your expression each time...

so if you are accumulating a VSS in MPH, and the time since the last read was 25ms, you will need to do the math to determine how far you moved in that 25ms.

Example OutputChannels:
deltatime = { timeNow() - lastValue(timeNow()) }, "s"
distanceTraveledMiles = { accumulate( (vss1 / 3600) * (deltatime) ) }, "Miles"
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
W126
Experienced MS/Extra'er
Posts: 153
Joined: Sun Aug 24, 2014 10:32 am

Re: aggregating custom gauge

Post by W126 »

Aahh, that's the trick.
Thanks alot.
W126
Experienced MS/Extra'er
Posts: 153
Joined: Sun Aug 24, 2014 10:32 am

Re: aggregating custom gauge

Post by W126 »

works great!
Two more questions:

How do I reset the value ?
Neither "Reset Value" nor "Clear Acion" or "Reset Runtime Value" does work.

I assume aggregating only works when Tuner Studio is running ?
LT401Vette
Super MS/Extra'er
Posts: 12731
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: aggregating custom gauge

Post by LT401Vette »

Reset from the dashboard?
That should do it...

Yes, if offline there is no runtime data so nothing to aggregate.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
W126
Experienced MS/Extra'er
Posts: 153
Joined: Sun Aug 24, 2014 10:32 am

Re: aggregating custom gauge

Post by W126 »

From the dashboard; popup-menu "Reset Value": nothing.

Setting "Single Click Action" to "Clear Action", then click from the dashboard: nothing.
Setting "Single Click Action" to "Reset Runtime Value", then click from the dashboard: nothing.

Tuner Studio 3.0.27
WestfieldMX5
Master MS/Extra'er
Posts: 403
Joined: Tue Dec 30, 2008 9:46 am
Location: Belgium
Contact:

Re: aggregating custom gauge

Post by WestfieldMX5 »

I did a similar thing when I read this thread last week :)

I added an odometer (actually a tripmeter) by selecting output channel tsDistanceTraveledKilometersStored. IOW, didn't use a custom output channel, but an existing one.
To reset I used a single click - reset runtime value.
Works fine, when I click the odometer, it goes to zero.

Maybe it works because I used an existing output channel, I didn't :RTFM: :oops:
2016 Westfield SEiW MX5 1.8 - 6sp - Torsen - MSM turbo - MS3 Pro - 2.3kg/hp
Post Reply