VSS from GPIO to MSIII over can

A forum for discussing applications and implementations of the MegaShift transmission controller code for the GPIO from B&G. This can control up to 8-speeds and 6 shift solenoids (plus a 16x9 table for controlling a PWM line pressure valve). It has manual and fully automatic modes (16x9 load x speed table), with under and over rev-limit protection, and full data logging of all inputs and outputs (among many other abilities). A TransStim to test your completed board is also available.
Post Reply
Halldorsson
Posts: 3
Joined: Mon Jan 04, 2016 12:23 am

VSS from GPIO to MSIII over can

Post by Halldorsson »

Hello

I´m running MS III and GPIO megashift linked via can and have no trouble getting tach and map signal from MS to GPIO.
I´m trying to get VSS signal from the GPIO to MS. VSS is working good in GPIO but I can´t get the signal over to MS.
The reason for this I want to read speedo on a tablet linked to MSIII.
I´ve tried all kind of different settings back and forth. MSQ of both projects attach
Can anyone help me on this?

Stefan
Attachments
Megashift.msq
(59.02 KiB) Downloaded 679 times
MS III.msq
(231.08 KiB) Downloaded 694 times
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: VSS from GPIO to MSIII over can

Post by Bernard Fife »

Halldorsson, The speed value is an unsigned 16bit (2 bytes) integer at offset 2 in the outpc structure in the MShift code. The value is in mph x 10, so you have to multiply by 0.100 to get mph, or multiply by 0.16093 to get kph. It is up to your ms3 controller to request this value from the GPIO (and properly convert and report it). You need it to do it similarly to what the MShift code is requesting from the ms3 for the tach and MAP. So you need to ask the ms3 support folks how to get the info to ms3.

The speed ("speedo") memory location and format info can be found in the INI's OutputChannels section:

Code: Select all

[OutputChannels]
; These are from the outpc. structure in the main.c file of the source code
; the size and format are the same as above

   deadValue        = { 0 } ; Convenient unchanging value.

   ochBlockSize     = 104
   
#if CAN_COMMANDS
; full version that works anywhere
   ochGetCommand    = "r\x01\x07%2o%2c"
#else
   ochGetCommand    = "a\x00\x06"
#endif 
  
  seconds           = scalar, U16,    0,     "sec",      1.000, 0.0 
#if SI_LENGTHS
  speedo            = scalar, U16,    2,     "kph",      0.16093, 0.0
  odometer          = scalar, U32,    4,      "km",      0.00161, 0.0 
#else
  speedo            = scalar, U16,    2,     "mph",      0.100, 0.0
  odometer          = scalar, U32,    4,   "miles",      0.001, 0.0 
#endif 
...
...
...
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Post Reply