REXGEN 1REXGEN 2REXGEN 2 IMU GNSSREXGEN AirREXGEN ProSoftware

Analyse REXGEN MF4 files in asammdf

Updated

Use asammdf, a free MDF4 viewer, to look at raw CAN and CAN FD frames from a REXGEN logger. In asammdf you can decode the frames with a DBC file and plot signals and GPS tracks. You can also export to CSV or MATLAB and merge several logs into one.

Before you start

A REXGEN logger records RXD files. asammdf reads MDF4 (.mf4), so export your logs to MDF4 first. Use one of these tools.

From the logger's storage to analysis formats DATA · FILE FLOW From the logger's storage to analysis formats Logger storage SD card or eMMC Raw log file RXD or IVD Export configuration software Raw CAN frames ASC BLF MDF4 Decode with a DBC optional step Physical values MDF4 CSV MAT Files reach the PC over USB, through a card reader or over the air, depending on the product. A dashed box is an optional step. Which formats are offered depends on the product and the software version: the product guide lists them.

asammdf is an open-source project licensed under the LGPL. Install it from the asammdf releases on GitHub, or with Python: pip install asammdf[gui]. The asammdf GUI documentation explains every panel.

View raw CAN frames

  1. Open the file. Select File > Open and choose the .mf4 file.
  2. Choose the frame fields. On the Channels tab, tick the parts of the CAN frame you want to see, such as CAN_DataFrame.ID, CAN_DataFrame.DLC and CAN_DataFrame.DataBytes.
    The Channels tab listing CAN_DataFrame channels such as BusChannel, DLC, DataBytes, ID and IDE, each with a tick box
    Each field of the recorded frames is a channel you can tick.
  3. Open a table. Select Create window at the bottom of the panel and choose Tabular. The frames appear one per row, with their timestamps.
  4. Filter if you need to. Use Add new filter and Apply filters to narrow the rows, for example to one identifier.
    A tabular window with columns for timestamps, CAN identifier, DLC and data bytes, and Add new filter and Apply filters buttons below
    Raw frames in a tabular window.

Export raw frames to CSV or MATLAB

  1. Open the file. Select File > Open and choose the .mf4 file.
  2. Go to the Export tab. Select the Export tab on the left.
  3. Choose the format and options. Select the type, such as csv or mat, and set its options, such as a single time base or time from 0 s.
    The Export tab with the type list open showing csv, hdf5, mat and parquet, and options for time base, raster, compression and MAT format
    Export types and options.
  4. Export. Select Export and choose where to save the file.

Decode signals with a DBC file

A DBC file turns raw frames into named physical values such as engine speed or battery voltage. For how DBC files work, see understanding CAN DBC files.

  1. Open the file. Select File > Open and choose the .mf4 file.
  2. Go to the CAN logging tab. Select CAN logging in the panel on the left.
  3. Load the database. Select Load CAN database and choose your DBC file.

Save the decoded signals as CSV

  1. Set the CSV options. Choose the time base, raster and how to handle empty channels.
  2. Export. Select Export to CSV and choose where to save the file.
    The CSV section of the CAN logging tab with time and raster options and an Export to CSV button
    Decoded signals go straight to CSV.

Save the decoded signals as MF4

  1. Set the MDF options. Choose the compression and the MDF version, for example 4.11.
  2. Extract. Select Extract CAN signals and choose where to save. The new file opens, ready for plotting.
    The MDF section of the CAN logging tab with compression and version settings and an Extract CAN signals button
    Extracting decoded signals to a new MDF4 file.

Plot decoded signals and GPS tracks

  1. Open the decoded file. Open the MDF4 file you saved with Extract CAN signals.
  2. Choose the signals. Tick the signals you want on the Channels tab.
  3. Create a window. Select Create window and choose Plot for graphs, Tabular for a table or Numeric for a numeric view. You can open several windows side by side.
    asammdf with the channel list on the left and four plot windows showing engine speed, ambient air temperature, engine torque and accelerator pedal position over time
    Four plot windows from one decoded log.
  4. Plot a GPS track. Choose the GPS window type and select OK. Use the search button to find your latitude and longitude channels, then select Apply to draw the track on the map.

A GPS track needs latitude and longitude in the log. REXGEN 2 IMU GNSS, REXGEN Air and REXGEN Pro record them.

Merge several log files

  1. Switch mode. Select Mode > Batch processing.
  2. Go to Concatenate. Select the Concatenate tab on the left.
  3. Add the files. Select File > Open and choose every file to merge. You can select several at once. Drag the rows to change the order, from top to bottom. Press Del to remove a file.
  4. Merge. Choose the settings, including an output format of 4.0 or higher, then select Concatenate. asammdf writes one MDF4 file.

Products in this guide

REXGEN 1

Vehicle black box

View REXGEN 1 Ask an engineer

REXGEN 2

Evidence data logger

View REXGEN 2 Ask an engineer

REXGEN 2 IMU GNSS

Motion & location data logging

View REXGEN 2 IMU GNSS Ask an engineer

REXGEN Air

CAN to cloud

View REXGEN Air Ask an engineer

REXGEN Pro

Edge data platform

View REXGEN Pro Ask an engineer

Still stuck?

Our engineers answer support questions on every Influx Technology product.