CAN communication problem

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.
flak monkey
Posts: 50
Joined: Sun Sep 21, 2014 11:28 am

CAN communication problem

Post by flak monkey »

I'm having what I think are CAN comms issues. It's a new Megashift install that I've just hooked up to an existing MS2 installation that has been working very well in my '79 Camaro. Connection is via serial cable to the MS2 via a proven USB-Serial adapter.

When the GPIO is hooked up via CAN I have a number of problems, all intermittent. After a couple of minutes I get various settings errors flash up and then all of the gauges in TS move to junk figures. Disconnecting the CAN I can get good comms to the MS2 only, and similarly to the GPIO via serial. It's only when CAN is hooked up I have a problem.

While it is working OK I seem to have communications between the MS2 and GPIO.

Tunerstudio v2.6.14
MSExtra 3.2.4
GPIO 4.14.6

I've got the CAN outputs from the MS2 out on SPR1 and SPR2 and linked directly to the CAN inputs of the GPIO via a twisted pair.

I've set the GPIO in the Tunerstudio project properties as device 1, enabled CAN comms in the configuration settings and selected the INI file for the GPIO per the instructions in the GPIO manuals. I haven't fiddled with any other settings, everything is as default.

I assume that there's no need to change the CAN parameters in the 'Advanced' settings menu for the MS2?

I've attached an MSQ, but I'm not sure it'll help much in this case?

Any ideas of where to start would be great.... I don't know much about CAN at all to be honest.

ETA: its acting like this without the engine running at all.
Attachments
2015-04-22_18.17.25.msq
(85.38 KiB) Downloaded 700 times
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: CAN communication problem

Post by Bernard Fife »

flak monkey,

Do you have trouble with the CANbus communication between the GPIO and engine controller (i.e. getting the engine variables over the CANbus to MShift), or does the problem only occur when using the CANbus pass-through (connecting to the MShift/GPIO for logging and editing parameters when the serial is attached to the engine controller)?

Communication problems are often the result of mis-matched INIs. If this was mine, I would start by create a new project from scratch in TunerStudio using freshly downloaded INIs. Don't use the INI suggested by TS, instead navigate to the INI you downloaded.

However, before doing that, you might want to consider updating the MShift code to the latest release 5.100 (http://www.msgpio.com/manuals/mshift/V5code.html) as 4.146 is now obsolete, and any fixes would be applied to 5.10x. Also, 5.100 has a number of changes to the interrupt infrastructure that might solve your communications issues.

A debug comms log in TS would tell us why the comms are failing, so that would be a useful thing to grab and post.

I don't know about the CANbus settings in msextra, you'll have to ask about the that on the msextra forums unless someone here is using ms2/extra and can comment.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
flak monkey
Posts: 50
Joined: Sun Sep 21, 2014 11:28 am

Re: CAN communication problem

Post by flak monkey »

Thanks Lance, I will try the latest versions of the code tonight and report back. I'll also take a comms log and post that if I still have the same issue. I was simply trying to load the MSQ into the Megashift. Initially it would detect the differences and report, but wouldn't send the settings and would get stuck in a loop of reporting the differences and not sending them. I reloaded the code and then I managed to get comms between the MS2 and Megashift which worked for a minute or so before all the gauges went mad and endless settings error warnings popped up. Engine wasn't running.

I'll revert to an old version of my MS2 MSQ. Load up a new project with the latest release codes for both the MS2 and Megashift and then start again.

I am a little worried that I might have screwed something up by forgetting to pull the fuses for the solenoid power when using the bootloader. But I'll worry about that later if I can fix the communication issues.

To be honest I initially struggled to find the latest version of the code without going back to the main page, even then I managed to find a link to what looks to be an earlier version - though this morning I can't find where I downloaded 4.146 from now. Both the links on the 4L80E build page for the code here: http://www.msgpio.com/manuals/mshift/4L80E/4L80.html on step 12 are broken. Links to this page which is dead: http://www.msgpio.com/manuals/mshift/4L ... sions.html

On the subject of broken links, both links in the build guide (same main page as above) for the troubleshooting of VSS/VR sensor issues on VR1/VR3 circuits is also broken. They link to this page: http://www.msgpio.com/manuals/mshift/4L80E/vss.html which is dead. Should be this one: http://www.msgpio.com/manuals/mshift/vss.html
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: CAN communication problem

Post by Bernard Fife »

flak monkey,

I will fix the broken links. The latest code is here: http://www.msgpio.com/manuals/mshift/V5code.html

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
flak monkey
Posts: 50
Joined: Sun Sep 21, 2014 11:28 am

Re: CAN communication problem

Post by flak monkey »

Thanks for your help Lance :)
Addicted
Posts: 188
Joined: Mon Oct 14, 2013 7:14 am
Location: Winchester, England

Re: CAN communication problem

Post by Addicted »

You CAN (pardon the pun) connect to your megashift via the MS2, but I found some time ago that its not really good practice for exatly the reasons you state above. Now I always connect directly to the megashift with a seperate megashift project to do any tuning/flashing of software and now have zero coms issues.

The only thing to be aware of is that when you connect back to the MS2 you will need to be sure to have updated the megashift ini file under CAN communications in TS.

A good thing that I have found is that when TS performs its difference report it does megashift and megasquirt seperatly.
flak monkey
Posts: 50
Joined: Sun Sep 21, 2014 11:28 am

Re: CAN communication problem

Post by flak monkey »

I was having problems just transferring run data between the 2 controllers as well, that's the problem. With both controllers connected and powered up, just sitting there without the engine running after a minute or so all the TS gauges would go mad and endless configuration error pop ups would appear. Up until that point it would seem to be ok. It was just totally intermittent comms and errors.

I finish work in a hour, then I can try it again tonight with the latest versions of the code for both MS2 and MShift and see if that resolves the problem. I'll run a comms log tonight as well and see if I can see what's going on if it doesn't work.

If it's still acting up I'll take a video of the screens and settings which might help as well.
flak monkey
Posts: 50
Joined: Sun Sep 21, 2014 11:28 am

Re: CAN communication problem

Post by flak monkey »

Loading the most up to date firmware seems to have fixed the problem. Will see how it goes when I get the engine running again tomorrow afternoon. :D
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: CAN communication problem

Post by Bernard Fife »

flak monkey,

That's progress! Thanks for letting us know. Hopefully it will work fine from now on, but be sure to let us know if there are further issues.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
flak monkey
Posts: 50
Joined: Sun Sep 21, 2014 11:28 am

Re: CAN communication problem

Post by flak monkey »

Fired the engine up over the weekend and it all looks to be working OK. All the variables from the MShift were displayed in Tunerstudio correctly - noticed that the VSS signal was noisy though, so as soon as I have my DRAC I'll be doing some modifications to hopefully help with that.

Haven't driven it yet, car is up on stands, but had it running for a while over the weekend and in gear too. So happy it's functional. Can move on to the next job now :D
Post Reply