dmacnz Posted December 29, 2017 Report Share Posted December 29, 2017 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 Quote Link to comment Share on other sites More sharing options...
Adamw Posted December 29, 2017 Report Share Posted December 29, 2017 To do this you would need some sort of hardware CAN interface, most of them have a software package that allows you to set up a broadcast stream. Quote Link to comment Share on other sites More sharing options...
dmacnz Posted December 29, 2017 Author Report Share Posted December 29, 2017 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 Quote Link to comment Share on other sites More sharing options...
Adamw Posted December 30, 2017 Report Share Posted December 30, 2017 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. Quote Link to comment Share on other sites More sharing options...
dmacnz Posted December 30, 2017 Author Report Share Posted December 30, 2017 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 Quote Link to comment Share on other sites More sharing options...
dmacnz Posted December 31, 2017 Author Report Share Posted December 31, 2017 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 Quote Link to comment Share on other sites More sharing options...
CamB Posted January 4, 2018 Report Share Posted January 4, 2018 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?) Davidv 1 Quote Link to comment Share on other sites More sharing options...
Davidv Posted January 4, 2018 Report Share Posted January 4, 2018 @CamB you can set the byte order to MS first or LS first to swap the order when setting up incoming frames (In G4+ at least) CamB 1 Quote Link to comment Share on other sites More sharing options...
CamB Posted January 4, 2018 Report Share Posted January 4, 2018 @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). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.