Main Content

j1939ParameterGroupImport

Import J1939 log file

Description

pgs = j1939ParameterGroupImport(file,vendor,database) reads the input file as a CAN message log file from the specified vendor. Using the specified CAN database, the CAN messages are converted into J1939 parameter groups, and assigned to the timetable pgs.

pgs = j1939ParameterGroupImport(___,ChannelID=chanID) returns data for only the specified channel, chanID. By default, all channels are returned..

example

Examples

collapse all

Read a CAN message log file, and generate J1939 parameter groups according to a CAN database.

db = canDatabase('MyDatabase.dbc');
pgs = j1939ParameterGroupImport('MsgLog.asc','Vector',db);

Input Arguments

collapse all

CAN message log file, specified as a character vector or string.

Example: 'MsgLog.asc'

Data Types: char | string

Vendor file format, specified as a character vector or string. The supported file formats are those defined by Vector and Kvaser.

Example: 'Vector'

Data Types: char | string

CAN database, specified as a database handle.

Channel ID, specified as a numeric scalar value, indicating which channel data to import from the log file. If not specified, all channels are read. When importing only one channel, the function returns a timetable. When importing multiple channels, the function returns a cell array of timetables, with one element per channel.

Example: 2

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Output Arguments

collapse all

J1939 parameter groups, returned as a timetable of parameter groups when importing one channel. When importing multiple channels, the output is a cell array of timetables.

Version History

Introduced in R2017a

expand all