Notices
MEGAsquirt A place to collectively sort out this megasquirt gizmo

DIYPNP Scripting

Thread Tools
 
Search this Thread
 
Old Apr 20, 2017 | 10:01 AM
  #1  
ByteVenom's Avatar
Thread Starter
Junior Member
 
Joined: Jan 2017
Posts: 384
Total Cats: 15
From: "lol", MA
Default DIYPNP Scripting

I had an idea for me to be able to log which gear I'm in on my DIYPNP. However I fail to see a scripting function anywhere within Tunerstudio or MegaLog.
To determine what gear I'm in, I would use an equation to determine the ratio of engine RPM to wheel rotation's per minute, and from there I should be able to get a rough gear ratio. Then finally I could compare this rough gear ratio to the real ratio (within a certain % of the real ratio) to determine what gear I'm in .

So TL;DR, I'm looking for a way to add a script into TunerStudio or Megalog.
Old Apr 20, 2017 | 10:03 AM
  #2  
shuiend's Avatar
mkturbo.com
iTrader: (24)
 
Joined: May 2006
Posts: 15,235
Total Cats: 1,700
From: Charleston SC
Default

Do you have VSS hooked up to your DIYPNP? If so then MS can already calculate the gear and show it in logs.
Old Apr 20, 2017 | 11:01 AM
  #3  
aidandj's Avatar
SADFab Destructive Testing Engineer
iTrader: (5)
 
Joined: Apr 2014
Posts: 18,643
Total Cats: 1,870
From: Beaverton, USA
Default

Lars is right, the megasquirt can do that.

You can also do equations in megalog viewer

Old Apr 20, 2017 | 11:18 AM
  #4  
ByteVenom's Avatar
Thread Starter
Junior Member
 
Joined: Jan 2017
Posts: 384
Total Cats: 15
From: "lol", MA
Default

Originally Posted by shuiend
Do you have VSS hooked up to your DIYPNP? If so then MS can already calculate the gear and show it in logs.
I do have the VSS signal (the MPH value in the log). I was looking at basically creating a value that goes from 0-6 (Where 0 is neutral/clutch in, and 6 is reverse), so that in my logs I can see the change in gear without examining the RPMs.

Also, what value is the the calculated gear in Megalog? I've tried using MPH xth Gear, but I don't see that fulfilling what I want exactly.
Old Apr 20, 2017 | 11:36 AM
  #5  
ByteVenom's Avatar
Thread Starter
Junior Member
 
Joined: Jan 2017
Posts: 384
Total Cats: 15
From: "lol", MA
Default

Originally Posted by aidandj
Lars is right, the megasquirt can do that.

You can also do equations in megalog viewer

https://youtu.be/OlaSNZReUH0
I saw the equations part, however I'm not sure how to do conditionals.
I guess I would have to calculate a gear ratio based off known RPM and Wheel Speed. From there I would be able to create a gear ratio variable. This would more useful, because as I shift, there should be a dramatic shift in this gear ratio variable.
Old Apr 20, 2017 | 11:37 AM
  #6  
aidandj's Avatar
SADFab Destructive Testing Engineer
iTrader: (5)
 
Joined: Apr 2014
Posts: 18,643
Total Cats: 1,870
From: Beaverton, USA
Default

What you want to do is under Advanced Engine->Speed and Gear sensors->Gear detection
Old Apr 20, 2017 | 12:05 PM
  #7  
ByteVenom's Avatar
Thread Starter
Junior Member
 
Joined: Jan 2017
Posts: 384
Total Cats: 15
From: "lol", MA
Default

I may have misunderstood the VSS meaning. In my performance fields in TunerStudio, my Vehicle Speed Source is defined as userSpeedMph. Which is based off of a value in the custom.ini. I looked there and I don't see anything about calculating my MPH. Now I'm quite confused.
Old Apr 20, 2017 | 12:46 PM
  #8  
ridethecliche's Avatar
Elite Member
iTrader: (2)
 
Joined: Aug 2016
Posts: 3,890
Total Cats: 146
From: New Fucking Jersey
Default

Originally Posted by ByteVenom
I may have misunderstood the VSS meaning. In my performance fields in TunerStudio, my Vehicle Speed Source is defined as userSpeedMph. Which is based off of a value in the custom.ini. I looked there and I don't see anything about calculating my MPH. Now I'm quite confused.
It is 4/20 and you are in lowell. soooooo.....




All times are GMT -4. The time now is 05:23 PM.