MEGAsquirt A place to collectively sort out this megasquirt gizmo

DIYPNP Scripting

Old 04-20-2017, 10:01 AM
  #1  
Junior Member
Thread Starter
 
ByteVenom's Avatar
 
Join Date: Jan 2017
Location: "lol", MA
Posts: 384
Total Cats: 14
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.
ByteVenom is offline  
Old 04-20-2017, 10:03 AM
  #2  
mkturbo.com
iTrader: (24)
 
shuiend's Avatar
 
Join Date: May 2006
Location: Charleston SC
Posts: 15,176
Total Cats: 1,680
Default

Do you have VSS hooked up to your DIYPNP? If so then MS can already calculate the gear and show it in logs.
shuiend is offline  
Old 04-20-2017, 11:01 AM
  #3  
SADFab Destructive Testing Engineer
iTrader: (5)
 
aidandj's Avatar
 
Join Date: Apr 2014
Location: Beaverton, USA
Posts: 18,642
Total Cats: 1,866
Default

Lars is right, the megasquirt can do that.

You can also do equations in megalog viewer

aidandj is offline  
Old 04-20-2017, 11:18 AM
  #4  
Junior Member
Thread Starter
 
ByteVenom's Avatar
 
Join Date: Jan 2017
Location: "lol", MA
Posts: 384
Total Cats: 14
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.
ByteVenom is offline  
Old 04-20-2017, 11:36 AM
  #5  
Junior Member
Thread Starter
 
ByteVenom's Avatar
 
Join Date: Jan 2017
Location: "lol", MA
Posts: 384
Total Cats: 14
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.
ByteVenom is offline  
Old 04-20-2017, 11:37 AM
  #6  
SADFab Destructive Testing Engineer
iTrader: (5)
 
aidandj's Avatar
 
Join Date: Apr 2014
Location: Beaverton, USA
Posts: 18,642
Total Cats: 1,866
Default

What you want to do is under Advanced Engine->Speed and Gear sensors->Gear detection
aidandj is offline  
Old 04-20-2017, 12:05 PM
  #7  
Junior Member
Thread Starter
 
ByteVenom's Avatar
 
Join Date: Jan 2017
Location: "lol", MA
Posts: 384
Total Cats: 14
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.
ByteVenom is offline  
Old 04-20-2017, 12:46 PM
  #8  
Elite Member
iTrader: (2)
 
ridethecliche's Avatar
 
Join Date: Aug 2016
Location: New Fucking Jersey
Posts: 3,890
Total Cats: 143
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.....
ridethecliche is offline  


Thread Tools
Search this Thread

All times are GMT -4. The time now is 12:31 AM.