How To Transmit CAN Bus Messages: OBD-II PID Example


NOTE: We've now made it even easier to log OBD2 data!

See our OBD2 Data Logger guide if this is what you need.

Want to log messages that need to be requested - like OBD2?

If so, you're in luck:

It is now possible to use the CLX000 to transmit messages to the CAN-bus.

  • Messages are easily specified with our free CANvas software
  • Up to 20 transmit messages can be specified per logger
  • Messages can be set up as either single-shot or periodic
  • You can customize cycle time and delay in ms

In the figure above, the OBD-based speed and RPM parameters have been queried by the vehicle logger, the responses logged, converted and plotted. Below we explain how to log OBD2 PIDs with a CLX000.

Before starting, you may want to check our OBD2 intro for OBD-II PIDs explained in simple terms!

Example Application: OBD-II PID Requests

To illustrate this feature, let's do an example on how to log OBD-II parameter data.

Below, we've added a few OBD-II PIDs to show how they can appear in the CLX000 CONFIG.ini file.

A few comments:

  • Parameters are offset by 10 ms to avoid overlap in the message queries
  • The msgID field is 7DF, which for OBD-II reflects a "request" message (while 7E8 is a "response" message)
  • The msgData field reflects the unique HEX ID for a given parameter (cf. Wikipedia for a full list of PIDs)

Let's take a specific example:

If you wish to query the RPM parameter in an OBD2 context, you'll need to set the msgData field to 02 01 0C 55 55 55 55 55.

  • Here, the first byte is 02 and corresponds to the number of additional bytes (in this case 2)
  • The second byte is 01 and corresponds to the OBD2 "mode", cf. Wikipedia for details 
  • The third byte is 0C, which under Mode 01 reflects the parameter ID of RPM
  • Finally, the remaining bytes of the data field are set to 55 ('dummy loads') and ignored 


So how do you set this up in our CANvas software? 

Below image shows an example of the CANvas 'Transmit List', which is set to log three OBD-II messages (Speed, RPM, MAF). 

Note that 'Destination' is set to None, which means that only 'response messages' are logged - this is of course configurable.

Note: As mentioned above the specific case of OBD2 is now "plug & play" in CANvas - learn more here.


Output Example

You're probably wondering what the output looks like!

Below is a log file example recorded from a regular passenger car using a CL2000. 

The logger has been configured to query OBD2 data on Speed and RPM. Notice how this example includes both the request (denote as Type 8 below) and the following response (Type 0). 

Want to try and convert some of the messages below?
Try out our OBD-II online conversion tool!


Again, the above example is simply a case example using OBD2. The transmit feature is fully flexible and allows for countless other applications.

That's not all CANvas can do, however...

Check out our full break down of our free CANvas software here - or go to our GUIDES page for other cool use case articles!

If you have questions, please contact us - we aim to respond within 24 hours.

We use cookies to improve our site (see our privacy policy)