Set odometer value?

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
WestfieldMX5
Master MS/Extra'er
Posts: 403
Joined: Tue Dec 30, 2008 9:46 am
Location: Belgium
Contact:

Set odometer value?

Post by WestfieldMX5 »

I tried changing the values in the dashboard designer properties (current value and historical peak value), but these change back to the last saved value when closing the window.
I know how to reset the odometer to zero with a click, but is it possible to set it to a choosen value as well? I want it to read the value that my car currently has.
2016 Westfield SEiW MX5 1.8 - 6sp - Torsen - MSM turbo - MS3 Pro - 2.3kg/hp
LT401Vette
Super MS/Extra'er
Posts: 12729
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Set odometer value?

Post by LT401Vette »

The only way to currently set it to a specific value is to edit the project.properties file in the projectCfg folder.
Search through for lines starting with :
PersistedAccumulatedValue_

You should be able to find the right formula that will end in the =whatEverValueItCurrentlyIs.
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
WestfieldMX5
Master MS/Extra'er
Posts: 403
Joined: Tue Dec 30, 2008 9:46 am
Location: Belgium
Contact:

Re: Set odometer value?

Post by WestfieldMX5 »

found it, thank you.
2016 Westfield SEiW MX5 1.8 - 6sp - Torsen - MSM turbo - MS3 Pro - 2.3kg/hp
simonclavelle
MS/Extra Newbie
Posts: 8
Joined: Wed Feb 12, 2020 8:16 pm
Location: Canada, QC

Re: Set odometer value?

Post by simonclavelle »

I know it's an old thread, but i'm having the same odometer problem. I would like to set my current TunerStudio odometer to 285 000 km, but it always reset to it's current value (1 km because i traveled 1 km with my PC connected to my MS3 Pro EVO in the truck yesterday. I tried the method Phil talked about earlier, which is to go edit the value in the project.properties file.

I set it like this : PersistedAccumulatedValue_(\ (\ tsInputSpeedMPH\ *\ 1.60934\ )\ /\ 3600.0\ *\ deltatime\ )=285000.0

But it always come back to : PersistedAccumulatedValue_(\ (\ tsInputSpeedMPH\ *\ 1.60934\ )\ /\ 3600.0\ *\ deltatime\ )=0.9345256620540474

Is there any solution ?

Also, I would like to know why is the odometer not changing if I don't have my PC with TunerStudio connected to my MS3 ?
And why does my tripmeter always reset when I turn off my truck (hence the MS3) ?

Best regards,
Simon Clavelle
Simon Clavelle
MS3 Pro Evo / 2007 Ford Ranger 4x4 5.0L GT40P EFI
LT401Vette
Super MS/Extra'er
Posts: 12729
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Set odometer value?

Post by LT401Vette »

Make sure you don't have the project open when you edit the file.

Are you on version 3.1.x
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
LT401Vette
Super MS/Extra'er
Posts: 12729
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Set odometer value?

Post by LT401Vette »

And this is important:
In version 3.1 the persisteted values were moved from project.properties to:
persistedChannelValues.properties
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
simonclavelle
MS/Extra Newbie
Posts: 8
Joined: Wed Feb 12, 2020 8:16 pm
Location: Canada, QC

Re: Set odometer value?

Post by simonclavelle »

Thanks a lot Phil for that quick and accurate answer, it works now !
So just like you said, I just had to make sure that my project was close before editing the "persistedChannelValues.properties".

Yes, my TunerStudio version is the V3.1.02

Also, I would like to know is it would be possible to make the odometer and the trip meter change even if my pc with TunerStudio is not connected to my MS3 ? (So the MS3 would just update my pc projet when I connect it back.)

And why does my trip meter always reset when I turn off my truck (hence the MS3) ? Would it be possible to make it remember its last value (like the odometer) ?

Best regards,
Simon
Simon Clavelle
MS3 Pro Evo / 2007 Ford Ranger 4x4 5.0L GT40P EFI
LT401Vette
Super MS/Extra'er
Posts: 12729
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Set odometer value?

Post by LT401Vette »

Nope, the odometer in TS needs to be connected as all the calcs are done in TS. There is no persisted speed or distance in the MS3.

The trip meter shouldn't restart if you disconnect from your MS3, only if you close TS or reload the project.
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
simonclavelle
MS/Extra Newbie
Posts: 8
Joined: Wed Feb 12, 2020 8:16 pm
Location: Canada, QC

Re: Set odometer value?

Post by simonclavelle »

Ok, I see. And is there a way for the trip meter to not reset every time we close TunerStudio ? I would like it to only reset when I click and hold on the gauge. (like a normal car trip meter would do)

Best regards,
Simon
Simon Clavelle
MS3 Pro Evo / 2007 Ford Ranger 4x4 5.0L GT40P EFI
LT401Vette
Super MS/Extra'er
Posts: 12729
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Set odometer value?

Post by LT401Vette »

The trip meter is based on the accumulate() function, that only tracks during the session. For it to hold it'ts value, you need to create a new OutputChannel that uses the persistentAccumulate() function.

So, create a new OutputChannel, use this for an expression:

persistentAccumulate( 0 + (tsInputSpeedMPH / 3600) * (deltatime) )

The 0 + is just there to make sure it is stored in persistedChannelValues.properties as a different expression from the Odometer
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
simonclavelle
MS/Extra Newbie
Posts: 8
Joined: Wed Feb 12, 2020 8:16 pm
Location: Canada, QC

Re: Set odometer value?

Post by simonclavelle »

I don't see were I could place the expression ''persistentAccumulate( 0 + (tsInputSpeedMPH / 3600) * (deltatime) )'' in the steps of creating a new OutputChannel.
Add channel 1.jpg
Add channel 1.jpg (60.34 KiB) Viewed 2082 times
Add channel 2.jpg
Add channel 2.jpg (70.95 KiB) Viewed 2082 times
Do I need to add a new line in the persistedChannelValues.properties file and/or in the project.properties file ?

Also, the expression for my odometer in the persistedChannelValues.properties file is ''_(\ (\ tsInputSpeedMPH\ *\ 1.60934\ )\ /\ 3600.0\ *\ deltatime\ )=285000" and in the project.properties file it is "PersistedAccumulatedValue_(\ (\ tsInputSpeedMPH\ *\ 1.60934\ )\ /\ 3600.0\ *\ deltatime\ )=285000.0''
persistedChannelValues.properties.jpg
persistedChannelValues.properties.jpg (101.42 KiB) Viewed 2081 times
project.properties.jpg
project.properties.jpg (175.63 KiB) Viewed 2081 times
Thanks again for your time !

Best regards,
Simon
Simon Clavelle
MS3 Pro Evo / 2007 Ford Ranger 4x4 5.0L GT40P EFI
LT401Vette
Super MS/Extra'er
Posts: 12729
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Set odometer value?

Post by LT401Vette »

You either need to use the "Custom Channel Editor" in TunerStudio MS Ultra, or create a custom.ini file.
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
simonclavelle
MS/Extra Newbie
Posts: 8
Joined: Wed Feb 12, 2020 8:16 pm
Location: Canada, QC

Re: Set odometer value?

Post by simonclavelle »

So I just bought the TunerStudio MS Ultra version and I am a little lost on what exactly to write in the expression. You said earlier that "persistentAccumulate( 0 + (tsInputSpeedMPH / 3600) * (deltatime) )" would do, but I noted some differences with my others persisted accumulated values. They are writen more like this to be exact : "PersistedAccumulatedValue_(\ (\ tsInputSpeedMPH\ *\ 1.60934\ )\ /\ 3600.0\ *\ deltatime\ )", this is the one for my odometer in the project.properties file. Also, I'm in Canada, so it should be in kilometers.

So should I use the exact line you post earlier or should I adapt it to the current language that my others persisted accumulated values use ?
Custom Channel Editor.jpg
Custom Channel Editor.jpg (134.48 KiB) Viewed 2070 times
Best regards,
Simon
Simon Clavelle
MS3 Pro Evo / 2007 Ford Ranger 4x4 5.0L GT40P EFI
LT401Vette
Super MS/Extra'er
Posts: 12729
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Set odometer value?

Post by LT401Vette »

Exactly what I posted should be good. It will then use all the underlying channels that support the current Odometer and trip meter instead of having to re-invent them.

Click the green arrow to check it.

Then set up a gauge to point at your new channel and a click action to reset your channel.
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
simonclavelle
MS/Extra Newbie
Posts: 8
Joined: Wed Feb 12, 2020 8:16 pm
Location: Canada, QC

Re: Set odometer value?

Post by simonclavelle »

Perfect, I will try that and I'll let you know if it works.

Thanks again for your support !

Best regards,
Simon
Simon Clavelle
MS3 Pro Evo / 2007 Ford Ranger 4x4 5.0L GT40P EFI
Nitroking
Helpful MS/Extra'er
Posts: 131
Joined: Fri Feb 28, 2014 6:03 am

Re: Set odometer value?

Post by Nitroking »

Hi guys,

I have set my mileage in both miles and km in persistedChannelValues.properties and it appears correctly there as also in project.properties file but the gauge in ts will always show 0. Even if I set the current value to the correct one, when I press save dashboard it returns to zero.

Same happens to my custom trip gauge (according to LT1Vette's expression).

Anyone know how to overcome this?

Thank you
Miata NBFL 1.6 (EU), GT2560R, MS2Extra, Zeitronix.
Fiesta 1.25 Zetec-SE, N/A mods, MS3, AEM.
LT401Vette
Super MS/Extra'er
Posts: 12729
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Set odometer value?

Post by LT401Vette »

Don't mess with the one in the project properties if you are running TS 3.1+.

Make sure TS is closed when you edit the files.
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
clubman
MS/Extra Newbie
Posts: 18
Joined: Thu Jan 17, 2019 5:36 am

Re: Set odometer value?

Post by clubman »

Well the problem was that I was working on the bench. When I connected to the car it worked fine.

One problem though is the calibration. I finally made a custom odometer multiplying by 0.6 to get correct mileage. Why would it not count correctly using the default odometer?
Is there any setting that could affect that?

Thank you
Dookie454
Experienced MS/Extra'er
Posts: 344
Joined: Mon Jul 25, 2011 9:18 pm

Re: Set odometer value?

Post by Dookie454 »

clubman wrote:Well the problem was that I was working on the bench. When I connected to the car it worked fine.

One problem though is the calibration. I finally made a custom odometer multiplying by 0.6 to get correct mileage. Why would it not count correctly using the default odometer?
Is there any setting that could affect that?

Thank you

I just got my odometer working, however it is also somewhere in the range of 1.6-2.0x fast even though my VSS signal is dead nuts. I haven't tried to correct it yet, but I am assuming it is due to the 1.60934 in this equation? Anybody know why that is there? I did choose Miles, not kM.

PersistedAccumulatedValue_(\ (\ tsInputSpeedMPH\ *\ 1.60934\ )\ /\ 3600.0\ *\ deltatime\ )"
MS3X on 2010 Camaro LS3 + Whipple @ 10psi + HPT + AEM 30-0333/0334 WB
MS3 Knock Module + JBPerf Dual VR v2.1 (Removed), didnt play well with LS3 DBW Motor, works for VSS.
OLD: 1997 Chevy Z71 Vortec 350, + BOSCH 0261231036 WB Knock Sensor
OLD: LT1 TA 700hp + MS3X
LT401Vette
Super MS/Extra'er
Posts: 12729
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Set odometer value?

Post by LT401Vette »

That formula is tuning stored miles into km. It would be 1.6 times if you are looking for miles.
Are you sure you have the right odometer selected?
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
Post Reply