No outmsg configuration in MS2Extra ? CAN- Problems

A forum for discussing the MegaSquirt related (but non-B&G) board development, assembly, installation, and testing.

Moderators: jsmcortina, muythaibxr

Post Reply
ChrisV6
MS/Extra Newbie
Posts: 5
Joined: Mon Oct 28, 2013 1:37 pm

No outmsg configuration in MS2Extra ? CAN- Problems

Post by ChrisV6 »

Hi Community,

i'm tryin to design my own expansion board with an actual mbed controller. The modules should communicate via CAN. So what i wanna do is sending a REQ to ms2 and receiving data like rpm, clt,...
I've read the CAN technical documentation, and tried to understand how it works. I searched for the right ID's and now i'm faced with the problem, that i cant find the "configure outmsg" in my TS.

I found in old ms2 (notms2extra!!) Ini's this code:

Code: Select all

referenceTable = canOutmsgBurner, "Configure CAN Outmsg"
       ;topicHelp = "http://www.megamanual.com/mt29.htm#outmsg"
        tableIdentifier = 010, "outmsg Table"       ; id in octal, 010 = table 8
        adcCount    = 1024    ; length of the table
        bytesPerAdc    = 1    ; using bytes
        scale      = 1 ; scale before sending to controller
        ;tableGenerator   = Generator Type,       Label, xUnits, yUnits,  xLow, xHi,  yLow, yHi ; lows and Hi's are just default values, they will be user editable
       ;tableGenerator   = linearGenerator, "Custom Linear WB", "Volts","AFR",    1,   4,   9.7,  18.7
       solutionsLabel   = "CAN Outmsg"
       solution   = "CAN Outmsg",    { table(adcValue, "canOutmsg.inc") }
so i copied this in my actual ms2extra ini and added the canOutmsg.inc in the correct folder, but it won't display in TS.
Am I on the right way, or do i think the wrong way?

Thank you, Christian
jsmcortina
Site Admin
Posts: 39615
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: No outmsg configuration in MS2Extra ? CAN- Problems

Post by jsmcortina »

I wasn't aware of that TS facility and it isn't supported in MS2/Extra.

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".
LT401Vette
Super MS/Extra'er
Posts: 12731
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: No outmsg configuration in MS2Extra ? CAN- Problems

Post by LT401Vette »

It looks to be using a standard TS referenceTable writer with an inc file.
Searching for canOutmsgBurner I found it is in the B&G firmware ini.

The term canOutmsgBurner is simply the name Al likely gave it, that isn't any sort of key word.

To make it appear in TS you will need to add a menu to the [Menu] section that references that. Like this:

Code: Select all

[Menu]
 menuDialog = main
      menu = "T&ools"
         subMenu = canOutmsgBurner ,       "Configure &CAN outmsg..."
So that tool when you open it will write the values in canOutmsg.inc to the table Identifier at 010. Is that really what you need to do?
This isn't normally required for CAN Communication.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
ChrisV6
MS/Extra Newbie
Posts: 5
Joined: Mon Oct 28, 2013 1:37 pm

Re: No outmsg configuration in MS2Extra ? CAN- Problems

Post by ChrisV6 »

LT401Vette wrote: So that tool when you open it will write the values in canOutmsg.inc to the table Identifier at 010. Is that really what you need to do?
This isn't normally required for CAN Communication.
Hi, thank you for the information, but i really don't know if i need the table?

I thought i have to create this table, then sending a REQuesting can message with ID (OFFSET,somecontrolbits,type,fromid,toid, and here the TABLE 010 ) to the ms2, and it will answer.

Is there another way?

Thank you guys,

Christian
jsmcortina
Site Admin
Posts: 39615
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: No outmsg configuration in MS2Extra ? CAN- Problems

Post by jsmcortina »

Have you read the CAN pages (including CAN tech) in the MSEXTRA manual?

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".
ChrisV6
MS/Extra Newbie
Posts: 5
Joined: Mon Oct 28, 2013 1:37 pm

Re: No outmsg configuration in MS2Extra ? CAN- Problems

Post by ChrisV6 »

jsmcortina wrote:Have you read the CAN pages (including CAN tech) in the MSEXTRA manual?

James

Yes, serveral times, but it's not my mother language so maybe i don't get it.

But for a few minutes, i found that i could work with table 7 and the offset 6 from the ini file to get rpm.
I'll test it tonight.

thank you chris
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: No outmsg configuration in MS2Extra ? CAN- Problems

Post by racingmini_mtl »

ChrisV6 wrote:But for a few minutes, i found that i could work with table 7 and the offset 6 from the ini file to get rpm.
That's correct and that's the way to do it.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
ChrisV6
MS/Extra Newbie
Posts: 5
Joined: Mon Oct 28, 2013 1:37 pm

Re: No outmsg configuration in MS2Extra ? CAN- Problems

Post by ChrisV6 »

Hi guys, it's me again :)

i can't get the can bus working...
i tried different id's for example 110010000100000111000 (29 bit ident), with ide, rtr and ssr enabled.

I dont get a response.

Do i have to activate the can communication in the code, ini or TS?
I didnt changed any settings in TS, or should is set it to:

Advanced: Can Parameters

Poll Remote: Generic Board
Can Polling Master or Slave?
...

Thanks for your help,
maybe I need just a small hint :)

Regards, Christian
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: No outmsg configuration in MS2Extra ? CAN- Problems

Post by racingmini_mtl »

You don't need to set anything; just send a CAN request message with the correct header and you will receive the response message with the correct data. Have you seen this page: http://www.msextra.com/doc/ms3/can_tech.html ? And what did you write in each of the fields shown here (extract from the linked page):
can_format.png
Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
ChrisV6
MS/Extra Newbie
Posts: 5
Joined: Mon Oct 28, 2013 1:37 pm

Re: No outmsg configuration in MS2Extra ? CAN- Problems

Post by ChrisV6 »

I've read it serveral times, but i dont get it.

This is my requesting ID:
| 11bit var_offset | 1bit SSR | 1bit IDE | 3bit type | 4bit FromID | 4bit ToID | 4bit blk | 1bit extrablk MS3 | 2bit spare | 1bit RTR |
| 00000000110 | 1 | 1 | 0 1 0 | 0 0 0 1 | 0 0 0 0 | 0 1 1 1 | 0 | 0 0 | 1 |

// OFFSET: rpm = 6
// SSR : 1 ?
// IDE : Extended = 1
// type: 000 = cmd, 001 = res, 010 = req, 011 = xsub, 100=burn
// FromID 0001
// ToID: 0000
// blk = 7 = 0111
// extra_blk = 0
// spare 0 0
// RTR = 1


= 00000000110110100001000001110001



is this ok?
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: No outmsg configuration in MS2Extra ? CAN- Problems

Post by racingmini_mtl »

The request message type is not 2 (010) but 1 (001). You can see it just below the image in the link I gave (MSG_REQ). Also, RTR should be set to 0.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
Post Reply