I am just starting my business here in Brazil, which one of my services is to test cars for magazines using RCP Pro2 to record acceleration, speed and CAN data. For that, I need to be able to read the CAN data from the vehicles.

It would be very easy if Brazil had chosen OBD2 language for CAN output data. But Brazil created its own "addresses", called OBD-BR2. I have some of the OBD-BR2 addresses and Ryan, from Autosportlabs, helped me to write them in the RCP script. However, it did not work

Now, what I am doing is reading the data that came out from the CAN logger. At least I could read a lot of data from a Suzuki Grand Vitara 2013. But, I don´t have any idea on how to convert these numbers into LUA language and start reading RPM and Pedal Position, at least. I have done this before using other softwares, so I have some idea that I need to check difference that could indicate RPM or Pedal Position "shape". The problem is that I am very fresh and new on RCP and LUA scripting and for this reason I am feeling quite lost on how to create a script file based on the data that I recorded.

Would someone be able to help me with that? The data read is attached.

Thank you guys for your support!

Thu Sep 01, 2016 6:36 pm

brentpSite Admin

Joined: 24 Jan 2007
Posts: 5650

Hi,

Are you doing a type of OBDII 'request / reply' in your Lua script, and this data is the ECU's reply to the requests?

or, is this a capture of data that is streaming automatically from the ECU?

To support a custom OBDII style protocol you could re-create the request / reply behavior in Lua scripting, and turn off the built-in OBDII feature in the firmware. With virtual channels you would be able to get the same effect as the built-in OBDII.

This will require some custom Lua scripting work to code in the behavior. It will be some work, but completely do-able.

The function map_chan takes the channel id, CAN data, offset, length, multiplier and adder. You can see in the example the CAN_map hash has the CAN id of 62469 and passes the tempId, CAN data, offset, multiplier and adder to map_chan. "

So, my question, or difficulty, is on how to use all this information to create a script that I could read the OBD-BR2 data. I have read several times the page suggested (https://wiki.autosportlabs.com/RaceCapturePro_Lua_Scripting) but my limited brain is not able to create the script that I need from that as well.

Could you help me with that?

Thank you again for your support and great product!

Kind regards,

_________________Felipe

Sun Sep 04, 2016 5:39 pm

brentpSite Admin

Joined: 24 Jan 2007
Posts: 5650

Hi,

Your best bet is to find someone local with some programming skills, like a university student that can help you write the script, once you understand the format of the streaming data. We can support you with RaceCapture specific questions and ensure it is operating as advertised (fixing bugs).

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou cannot download files in this forum