CAN VSS and Gear# format. - Listen mode message format
Moderators: jsmcortina, muythaibxr
CAN VSS and Gear# format. - Listen mode message format
I've decided to build a CAN translator to bridge between the PCS proprietary CAN format, and MS. I'm using a STM32F105 with 2 CANs, one connected to the MS3pro and the other to the TCM-2000. This way I can use the spare ADCs on the transmission controller for MS sensors and display it's outputs on a TunerStudio dash.
It looks like I can use the MS dash broadcast function to get the info I need to feed to the transmission controller (RPM, MAP, TPS, CLT), and MS can read any 11-bit ID under "CAN Receiving" as an ADC. But I can't find any info on the message MS expects when I set up CAN VSS and gear to listen mode. I could fake it as an ADC and read everything that way, but I'd prefer to use the dedicated message if I can find it since there's only 16 fields under CAN Receiving, and I'll run out real quick if I want to display/log everything.
I assume I'm looking for a MSG_CMD into table 7, but I can't understand the ini file well enough to figure out the offset. Am I close??
It looks like I can use the MS dash broadcast function to get the info I need to feed to the transmission controller (RPM, MAP, TPS, CLT), and MS can read any 11-bit ID under "CAN Receiving" as an ADC. But I can't find any info on the message MS expects when I set up CAN VSS and gear to listen mode. I could fake it as an ADC and read everything that way, but I'd prefer to use the dedicated message if I can find it since there's only 16 fields under CAN Receiving, and I'll run out real quick if I want to display/log everything.
I assume I'm looking for a MSG_CMD into table 7, but I can't understand the ini file well enough to figure out the offset. Am I close??
-
- Site Admin
- Posts: 39619
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Re: CAN VSS and Gear# format. - Listen mode message format
Instead of adding another microcontroller, why not add receiving of the 29bit broadcasts to the Megasquirt firmware?
James
James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk
My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
-
- Super MS/Extra'er
- Posts: 9130
- Joined: Sun May 02, 2004 6:51 am
- Location: Quebec, Canada
- Contact:
Re: CAN VSS and Gear# format. - Listen mode message format
How will you avoid the possible conflicts with the MS protocol? You also have to think about any other device that might be on the CAN bus and may not be able to identify the messages as being not from an MS-compatible device.jsmcortina wrote:Instead of adding another microcontroller, why not add receiving of the 29bit broadcasts to the Megasquirt firmware?
James
Jean
-
- Site Admin
- Posts: 39619
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Re: CAN VSS and Gear# format. - Listen mode message format
It depends on the specific messages - I didn't work out the acceptance mask required to see if it does or not. My first hunch was not.
James
James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk
My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
-
- Super MS/Extra'er
- Posts: 9130
- Joined: Sun May 02, 2004 6:51 am
- Location: Quebec, Canada
- Contact:
Re: CAN VSS and Gear# format. - Listen mode message format
I was editing my previous message when you were replying so I don't know if you saw it.
And while this subset may not be an issue, if you allow this in a generic manner there is no way to say in advance that this will always be the case. And that would mean the CAN bus is no longer MS-compatible with this feature activated.
Jean
And while this subset may not be an issue, if you allow this in a generic manner there is no way to say in advance that this will always be the case. And that would mean the CAN bus is no longer MS-compatible with this feature activated.
Jean
Re: CAN VSS and Gear# format. - Listen mode message format
I'd like to avoid messing with the MS code and having my own copy, for upgradability in the future if nothing else. The code to make the STM32 translate can fit in 1 small file and would be completely self contained, so I have some chance of understanding it a year from now if I need to make any changes.
I think I've figured out what I'm looking for in the ini file now.
Based on
I think I need to send a MSG_CMD to table 7, offsets 232 for gear and 336 for vss.
It looks like the polling that happens in the MS code, just gets the other device to write back to it's table 7, and MSG_CMD and MSG_RSP are handled by the same code.
I feel like I'm missing something though, can I just write to any part of table 7? If I want to write 2 shaft speeds from the transmission to ss1 and ss2, and I just write to offsets 340/342, without setting them up in TunerStudio?
I think I've figured out what I'm looking for in the ini file now.
Based on
Code: Select all
gear = scalar, U08, 232, "", 1, 0
vss1 = scalar, U16, 336, { bitStringValue( prefSpeedUnits , prefSpeedUnits ) }, { msToPrefUnitsScale }, 0.0
It looks like the polling that happens in the MS code, just gets the other device to write back to it's table 7, and MSG_CMD and MSG_RSP are handled by the same code.
Code: Select all
(void)can_build_msg_req(ram4.vss1_can_id, ram4.vss1_can_table, ram4.vss1_can_offset, 7, off, num);
Re: CAN VSS and Gear# format. - Listen mode message format
Just a comment from the peanut gallery; I have no idea what your current situation is nor how anything CAN related works internally. Have you given any consideration to using James' transmission code for the Microsquirt?
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Re: CAN VSS and Gear# format. - Listen mode message format
It's a Mercedes 722.6 transmission. I haven't seen anyone successfully control one with the MegaShift, and I did look into it for a bit before shelling out for the PCS unit. Starting over after all the time and money I have in this controller does not sound appealing even it I could.dontz125 wrote:Just a comment from the peanut gallery; I have no idea what your current situation is nor how anything CAN related works internally. Have you given any consideration to using James' transmission code for the Microsquirt?