Custom CAN message

Discussion and Support for MoTeC's M1 series ECUs

Custom CAN message

Postby fsae_mst on Sun Feb 25, 2018 1:03 pm

We are trying to create a custom data set for a CAN message. We have not been able to locate the setting for this in M1 tune or M1 build. How can I create a custom message?
fsae_mst
 
Posts: 4
Joined: Thu Feb 22, 2018 3:35 am

Re: Custom CAN message

Postby David Ferguson on Mon Feb 26, 2018 4:52 am

Do you want to transmit a message from the M1, or receive a message? What firmware package are you using?

Some more details on what you want to do -- perhaps what you want is already implemented.
David Ferguson
Veracity Racing Data
David Ferguson
Pro User
 
Posts: 1362
Joined: Fri Nov 07, 2008 2:45 am
Location: Paso Robles, California

Re: Custom CAN message

Postby fsae_mst on Tue Feb 27, 2018 5:14 pm

We have a development license, so I am unsure of what you mean by the firmware.

I want to send ECU data to a custom made dash, that will then read the CAN message.
fsae_mst
 
Posts: 4
Joined: Thu Feb 22, 2018 3:35 am

Re: Custom CAN message

Postby David Ferguson on Wed Feb 28, 2018 3:16 am

The firmware is the package that is installed in your ECU. In your case, the answer is "we have our own custom firmware based on the XXX package".

In your package, you will find the code that transmits various messages from the ECU over the CAN bus is under the ECU transmit group. Here is a screen shot showing the VCS transmit, you will likely want to do something similar for your dash.

Hope that is enough to get you started.
Attachments
M1 Build CAN Transmit.JPG
M1 CAN Transmit
M1 Build CAN Transmit.JPG (133.52 KiB) Viewed 17220 times
David Ferguson
Veracity Racing Data
David Ferguson
Pro User
 
Posts: 1362
Joined: Fri Nov 07, 2008 2:45 am
Location: Paso Robles, California

Re: Custom CAN message

Postby Rex-Racer on Mon Jul 16, 2018 1:35 am

David, where do you find this page? I've looked everywhere and cannot find this page in M1tune for my package, which is a custom package based off GPRP.
Rex-Racer
 
Posts: 12
Joined: Sun Jun 24, 2018 5:16 am

Re: Custom CAN message

Postby David Ferguson on Mon Jul 16, 2018 2:20 am

That is in M1 Build, you code the items to be transmitted into the firmware.
David Ferguson
Veracity Racing Data
David Ferguson
Pro User
 
Posts: 1362
Joined: Fri Nov 07, 2008 2:45 am
Location: Paso Robles, California

Re: Custom CAN message

Postby Rex-Racer on Mon Jul 16, 2018 10:00 am

Ok, I have other questions, will start a new thread.
Rex-Racer
 
Posts: 12
Joined: Sun Jun 24, 2018 5:16 am

Re: Custom CAN message

Postby gtihk on Mon Jul 23, 2018 9:19 pm

David,

What does the value of VCSCompound represent please?
Do you have a sample Scheduled Function for a modified Transmit VCS you could send or post?
gtihk
 
Posts: 76
Joined: Thu Jul 19, 2018 1:37 pm

Re: Custom CAN message

Postby David Ferguson on Tue Jul 24, 2018 9:23 am

VCSCompound is a static local variable (which means it's value is preserved across invocations of the function), which represents which of the compound messages to send. You can see that the VCS (Video Capture System) sends all of this data to the CAN ID 0x1F, but the data contained in the message depends on the value of the first byte (offset 0), which is the value of VCSCompound. Notice after the message is sent that VCSCompound is set to the next message to send.

You can learn about CAN Compound messages from the "What is CAN?" webinar found here:

https://www.motec.com.au/webinars-view/ ... chive/#CAN

The Transmit VCS is a perfect sample for your dash board -- in fact you probably want to send a lot of the same channels. To make your own, just select "VCS Transmit" in M1 Build's Ojbect view, copy (Control-C), and paste (Control-V), then rename the new "Transmit VCS 1" to be "Transmit MyDash" (or whatever) -- then edit the function, starting with CAN ID (you don't want to send to 0x01F, but some other non-conflicting CAN ID -- heck maybe your project even has that as a parameter that can be set in M1 Tune).

That should get you started.
David Ferguson
Veracity Racing Data
David Ferguson
Pro User
 
Posts: 1362
Joined: Fri Nov 07, 2008 2:45 am
Location: Paso Robles, California

Re: Custom CAN message

Postby gtihk on Fri Aug 10, 2018 7:11 pm

Thanks,David!
I will give it a go.
One more question please.
How is CAN speed handled?
I suppose VCS communicates at 1M as other Motec products.
The Dash is receiving at 500K.
Where do I go to in Build to change this please?
gtihk
 
Posts: 76
Joined: Thu Jul 19, 2018 1:37 pm

Next

Return to M1 ECUs

Who is online

Users browsing this forum: No registered users and 69 guests