Jump to content
dmacnz

Can protocol sample

Recommended Posts

Is there anyway of getting a sample of the can stream output when set to motec adl dash?

I am currently the other side of the world from my ecu and trying to build a can based project. 

Any more details available other than what’s in the help file?!

i am building a can simulator and would like it to output the same as what I can expect from my g4+ when set to motec or generic dash. 

 

Thanks

Dan

Share this post


Link to post
Share on other sites

Thanks for the reply.
The hardware simulator is being built. But I want to make sure I am going to replicate exactly what my dash will receive from my G4+. Only way I can test and debug my project being 9000km away from my race cars!!

Looking at the help file for the Generic dash for .data 2-3 is 0x000-- 0xfff for 0-15000rpm?? , I cant quite make heads or tails of the help file. Any more info on the CAN protocol specifically when using generic dash as aout would be great.
Thanks

Share this post


Link to post
Share on other sites

Engine speed is an easy one, it is sent as a 16bit number with a resolution of 1 and a smallest value of 0.  So:

0x0000 would be 0RPM

0xffff would be 65535RPM

Some other parameters get a little more tricky to allow finer resolution or negative values, there is a handy tool called the test calculator on the CAN setup utility that allows you to look up resolution and offset for any parameter.

 

 

Share this post


Link to post
Share on other sites

Thanks for the reply. 

Very helpful. 

I will go fwoars with 11bit 500k with a can id of 1000 for the simulator using the help files “generic dash” data and hope for the best. 

Thanks

dan

Share this post


Link to post
Share on other sites

Sorry One more question on the CAN output for Generic dash. 
The help file says raw. But can i assume for say the oil temp in frame 9. It is calculated (data 3*256 )- data 2). Is purely transmitted in the data 2, with data 3 being "00". (Disregaring the 50 degree offset).

Thanks

Screenshot (25).png

Share this post


Link to post
Share on other sites

From my messing around with it, all the raw data in the Generic stream is the second parameter + 256 * the first parameter (in the pair). Interestingly when you set a custom stream the order is reversed... 

Is there a reason not to just use the standard convention? (I guess efficient coding?)

Share this post


Link to post
Share on other sites

@Davidv - thanks, I should have looked more closely at that! It was easy enough to change the code (I ended up using a custom stream rather than the generic one as I had trouble capturing all the incoming CAN messages if there were too many).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×