Page 1 of 4

Custom CAN message

PostPosted: Sun Feb 25, 2018 1:03 pm
by fsae_mst
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?

Re: Custom CAN message

PostPosted: Mon Feb 26, 2018 4:52 am
by David Ferguson
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.

Re: Custom CAN message

PostPosted: Tue Feb 27, 2018 5:14 pm
by fsae_mst
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.

Re: Custom CAN message

PostPosted: Wed Feb 28, 2018 3:16 am
by David Ferguson
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.

Re: Custom CAN message

PostPosted: Mon Jul 16, 2018 1:35 am
by Rex-Racer
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.

Re: Custom CAN message

PostPosted: Mon Jul 16, 2018 2:20 am
by David Ferguson
That is in M1 Build, you code the items to be transmitted into the firmware.

Re: Custom CAN message

PostPosted: Mon Jul 16, 2018 10:00 am
by Rex-Racer
Ok, I have other questions, will start a new thread.

Re: Custom CAN message

PostPosted: Mon Jul 23, 2018 9:19 pm
by gtihk
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?

Re: Custom CAN message

PostPosted: Tue Jul 24, 2018 9:23 am
by David Ferguson
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.

Re: Custom CAN message

PostPosted: Fri Aug 10, 2018 7:11 pm
by gtihk
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?