canFDMessageTimetable
Convert CAN or CAN FD messages into timetable
Description
creates a CAN FD message timetable from an existing CAN FD message timetable, an array of
CAN message objects, or a CAN FD message structure from the CAN FD Log block. The output
message timetable contains the raw message information (ID, Extended, Data, etc.) from the
messages. If CAN message objects are input which contain decoded information, that decoding
is retained in the CAN FD message timetable.msgtimetable = canFDMessageTimetable(msg)
uses the database to decode the message names and signals for the timetable along with the
raw message information. Specify multiple databases in an array to decode message names and
signals in the timetable within a single call.msgtimetable = canFDMessageTimetable(msg,database)
The input msg can also be a timetable of data created by using
read on an
mdfDatastore
object. In this case, the function converts the timetable of ASAM standard logging format
data to a Vehicle Network Toolbox™ CAN FD message timetable.
Examples
Convert log block output to a CAN FD message timetable.
load LogBlockOutput.mat; db = canDatabase('myDatabase.dbc'); msgTimetable = canFDMessageTimetable(canMsgs,db);
Convert an array of CAN message objects to a CAN FD message timetable.
msgTimetable = canFDMessageTimetable(canMsgs);
Decode an existing CAN FD message timetable with a database.
db = canDatabase('myDatabase.dbc')
msgTimetable = canFDMessageTimetable(msgTimetable,db)The result is returned to the original timetable variable.
Convert an existing ASAM format message timetable, and decode using a database.
db = canDatabase("CustomerDatabase.dbc"); mdfData = mdfRead("CANandCANFD.MF4"); msgTimetable = canFDMessageTimetable(mdfData{2},db);
Compare the two timetables.
mdfData{2}ans =
131×27 timetable with 0 events
t CAN_DataFrame.BusChannel CAN_DataFrame.FlagsEx CAN_DataFrame.Dir CAN_DataFrame.SingleWire CAN_DataFrame.WakeUp CAN_DataFrame.SRR CAN_DataFrame.R0 CAN_DataFrame.R1 CAN_DataFrame.EDL CAN_DataFrame.BRS CAN_DataFrame.ESI CAN_DataFrame.ID CAN_DataFrame.IDE CAN_DataFrame.FrameDuration CAN_DataFrame.BitCount CAN_DataFrame.DLC CAN_DataFrame.DataLength CAN_DataFrame.DataBytes CAN_DataFrame.TimeOffsetBRS CAN_DataFrame.TimeOffsetCRCDel CAN_DataFrame.TxAttemptsReq CAN_DataFrame.TxAttemptsMax CAN_DataFrame.CRC CAN_DataFrame.BtrExtCfg CAN_DataFrame.StuffBitCount CAN_DataFrame.StuffBitCountParityBit CAN_DataFrame.StuffBitCountValidBit
___________ ________________________ _____________________ _________________ ________________________ ____________________ _________________ ________________ ________________ _________________ _________________ _________________ ________________ _________________ ___________________________ ______________________ _________________ ________________________ ________________________________________________________________________________________________________________________ ___________________________ ______________________________ ___________________________ ___________________________ _________________ _______________________ ___________________________ ____________________________________ ___________________________________
0.30022 sec 1 2109504 "Tx" 0 0 0 0 0 1 1 0 768 0 219000 683 15 64 {[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 … ] (1×64 uint8)} 0 0 0 0 0 {[54 23 1 32 5 2 1 32]} 0 0 1
0.45025 sec 1 2097216 "Tx" 0 0 0 0 0 0 0 0 1104 0 246000 126 8 8 {[ 0 0 0 0 0 0 0 0]} 0 0 0 0 0 {[54 23 1 32 5 2 1 32]} 0 0 0
0.60022 sec 1 2109504 "Tx" 0 0 0 0 0 1 1 0 768 0 219000 683 15 64 {[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 … ] (1×64 uint8)} 0 0 0 0 0 {[54 23 1 32 5 2 1 32]} 0 0 1
0.75013 sec 1 2109504 "Tx" 0 0 0 0 0 1 1 0 1872 0 121000 298 12 24 {[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]} 0 0 0 0 0 {[54 23 1 32 5 2 1 32]} 0 0 1
0.90022 sec 1 2109504 "Tx" 0 0 0 0 0 1 1 0 768 0 219000 683 15 64 {[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 … ] (1×64 uint8)} 0 0 0 0 0 {[54 23 1 32 5 2 1 32]} 0 0 1
0.90048 sec 1 2228288 "Tx" 0 0 0 0 0 0 0 0 1104 0 246000 126 8 8 {[ 0 0 0 0 0 0 0 0]} 0 0 0 0 0 {[54 23 1 32 5 2 1 32]} 0 0 0
: : : : : : : : : : : : : : : : : : : : : : : : : : : :
18.45 sec 1 2097216 "Tx" 0 0 0 0 0 0 0 0 1104 0 246000 126 8 8 {[ 0 0 0 0 0 0 0 0]} 0 0 0 0 0 {[54 23 1 32 5 2 1 32]} 0 0 0
18.6 sec 1 2109504 "Tx" 0 0 0 0 0 1 1 0 768 0 219000 683 15 64 {[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 … ] (1×64 uint8)} 0 0 0 0 0 {[54 23 1 32 5 2 1 32]} 0 0 1
18.75 sec 1 2109504 "Tx" 0 0 0 0 0 1 1 0 1872 0 121000 298 12 24 {[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]} 0 0 0 0 0 {[54 23 1 32 5 2 1 32]} 0 0 1
18.9 sec 1 2109504 "Tx" 0 0 0 0 0 1 1 0 768 0 219000 683 15 64 {[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 … ] (1×64 uint8)} 0 0 0 0 0 {[54 23 1 32 5 2 1 32]} 0 0 1
18.9 sec 1 2228288 "Tx" 0 0 0 0 0 0 0 0 1104 0 246000 126 8 8 {[ 0 0 0 0 0 0 0 0]} 0 0 0 0 0 {[54 23 1 32 5 2 1 32]} 0 0 0
19.2 sec 1 2109504 "Tx" 0 0 0 0 0 1 1 0 768 0 219000 683 15 64 {[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 … ] (1×64 uint8)} 0 0 0 0 0 {[54 23 1 32 5 2 1 32]} 0 0 1 msgTimetable
msgTimetable =
131×12 timetable
Time ID Extended Name ProtocolMode Data Length DLC Signals Error Remote BRS ESI
___________ ____ ________ __________ ____________ ______________________________________________________________________________________________________________________ ______ ___ ____________ _____ ______ _____ _____
0.30022 sec 768 false {0×0 char} {'CAN FD'} {[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 … ] (1×64 uint8)} 64 15 {0×0 struct} false false true false
0.45025 sec 1104 false {0×0 char} {'CAN' } {[ 0 0 0 0 0 0 0 0]} 8 8 {0×0 struct} false false false false
0.60022 sec 768 false {0×0 char} {'CAN FD'} {[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 … ] (1×64 uint8)} 64 15 {0×0 struct} false false true false
0.75013 sec 1872 false {0×0 char} {'CAN FD'} {[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]} 24 12 {0×0 struct} false false true false
0.90022 sec 768 false {0×0 char} {'CAN FD'} {[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 … ] (1×64 uint8)} 64 15 {0×0 struct} false false true false
0.90048 sec 1104 false {0×0 char} {'CAN' } {[ 0 0 0 0 0 0 0 0]} 8 8 {0×0 struct} false false false false
: : : : : : : : : : : : :
18.45 sec 1104 false {0×0 char} {'CAN' } {[ 0 0 0 0 0 0 0 0]} 8 8 {0×0 struct} false false false false
18.6 sec 768 false {0×0 char} {'CAN FD'} {[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 … ] (1×64 uint8)} 64 15 {0×0 struct} false false true false
18.75 sec 1872 false {0×0 char} {'CAN FD'} {[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]} 24 12 {0×0 struct} false false true false
18.9 sec 768 false {0×0 char} {'CAN FD'} {[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 … ] (1×64 uint8)} 64 15 {0×0 struct} false false true false
18.9 sec 1104 false {0×0 char} {'CAN' } {[ 0 0 0 0 0 0 0 0]} 8 8 {0×0 struct} false false false false
19.2 sec 768 false {0×0 char} {'CAN FD'} {[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 … ] (1×64 uint8)} 64 15 {0×0 struct} false false true falseInput Arguments
Raw CAN messages, specified as one of the following:
Array of
can.MessageobjectsTimetable of CAN FD messages
Timetable of ASAM MDF CAN FD messages
Struct of CAN FD messages from a CAN FD Log block
Example: canFDMessage()
CAN database, specified as a database object.
Example: database = canDatabase('CANDatabase.dbc')
Output Arguments
CAN FD messages returned as a timetable.
Version History
Introduced in R2018b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)