CAN LOG TRIGGER ASC Format
CAN LOG TRIGGER ASC Format
Number of Pages: 21
Specification --- CAN, Log & Trigger ASC Logging Format II
Document Management
Release and Release History
Name Role Version Date
Stephan, Michael (Sn) PLD 1.1.0 2005-03-07
Tinnirello, Gianfranco (Gia) PLD 1.1.9 2009-03-27
Tinnirello, Gianfranco (Gia) PLD 1.2.0 2009-05-18
Tinnirello, Gianfranco (Gia) PLD 1.2.2 2010-12-23
Tinnirello, Gianfranco (Gia) PLD 1.2.3 2011-04-07
Tinnirello, Gianfranco (Gia) PLD 1.2.6 2011-10-24
Hesselmaier, Bodo (Hb) PLD 1.2.7 2012-04-20
Hesselmaier, Bodo (Hb) PLD 1.2.8 2012-04-23
Van Splunter, Ronald (Vrd) PLD 1.3.3 2014-04-16
Van Splunter, Ronald (Vrd) PLD 1.3.5 2014-10-07
Revision list
Version Date Editor Section Changes, comments
1.0.0 2005-03-04 Gia All Creation
1.1.0 2005-03-07 Gia 3.4 Added Begin Triggerblock Event and End Trig-
gerblock Event
1.1.1 2006-11-10 Gia 3.3 Added CAN events with symbolic names >32
characters
1.1.2 2007-05-25 Nb 3.7 Macros: Record Signals
1.1.3 2007-07-10 Tn 3.3 CAN-DLC > 8
1.1.4 2007-10-04 Gia 3.3 Special flags for CAN messages (Spyflag, Wake-
Up & etc.)
1.1.5 2007-10-09 Sn 3.1.1 Added version number into header
1.1.6 2007-10-17 Nb 3.5, 3.6 Added system variables and environment varia-
bles
1.1.7 2008-06-18 Msc 3.1.2 Added split information into header
1.1.8 2008-09-08 Tn 3.8 GPS event added
1.1.9 2009-03-27 Gia 3.6 Correction in SystemVariableEvent
1.2.0 2009-05-18 Gia 1 Added Disclaimer
1.2.1 2010-10-26 Sha 3.3; 3.9 New fields added to CAN Messages
1.2.2 2010-11-29 Hb Changes in CAN message and CAN error frame
1.2.3 2011-04-07 Mp 3.9 Comment Event (for comments in Trace Win-
dow) added
1.2.4 2011-04-12 Sha 3.3 Hint 2 added
1.2.5 2011-09-08 Sha 3.10 Clarification to CAN frame message length and
message duration
1.2.6 2011-10-24 Mp 3.11 Event for Global Markers added
1.2.7 2012-04-20 Hb 3.3 CAN error frame description
1.2.8 2012-04-23 Hb 3.3 Numerical ID-field in CAN frame
1.2.9 2012-08-24 Chk 3.4, 3.12 Add CAN FD event description. Add symbol
description for CAN FD and modify CAN FD
specifics for some symbols
1.3.0 2013-04-11 Fsi New CAN FD message and error frame descrip-
tion with 64 byte support.
1.3.1 2013-10-15 Chk 3.4 Add chapter 3.4.1 and 3.4.2, for CAN message
logging on CAN FD channel
1.3.2 2014-03-13 Chk 3.3, 3.4.1 Format description for remote frames updated
Wrong channel description under 3.4.1 CAN
Extended Message Event changed
1.3.3 2014-04-15 Srj/Vrd 3.3.1, Added milliseconds to <FullTime> and update of
3.3.12 header section.
1.3.4 2014-05-12 Srj 3.3 Changed order of <MessageFlags> and ID for
CAN Events.
Revision list
Version Date Editor Section Changes, comments
1.3.5 2014-10-07 Vrd 3 Defined newline representation
Table of contents
1 Disclaimer .................................................................................................................... 1
2 Overview ...................................................................................................................... 1
3 Format.......................................................................................................................... 1
3.1 Header .................................................................................................................................... 1
3.1.1 Version number ........................................................................................................... 2
3.1.2 Split information.......................................................................................................... 2
3.2 Example ................................................................................................................................. 3
3.3 CAN Events ........................................................................................................................... 4
3.4 CAN FD Events ..................................................................................................................... 7
3.4.1 CAN Events on CAN FD channel ............................................................................... 7
3.4.2 CAN FD Events........................................................................................................... 8
3.5 Log and Trigger Events ......................................................................................................... 9
3.6 Environment variables ......................................................................................................... 10
3.7 System Variables ................................................................................................................. 10
3.8 Macros: Signalevents ........................................................................................................... 11
3.9 GPS events ........................................................................................................................... 11
3.10 Comment events .................................................................................................................. 12
3.11 Global marker events ........................................................................................................... 12
3.12 Symbols ............................................................................................................................... 13
1 Disclaimer
Severability clause - Restrictions for the usage of Vector logging data formats outside of Vector
products
The format specification / access functions for the Vector BLF and ASC logging data formats are
made available under the restrictions and conditions cited hereafter.
Please note that Vector Informatik neither gives any guarantee nor assumes any liability beyond
compulsory legal regulations for the BLF or ASC logging format respectively as well as for the
access functions to the single objects.
Vector Informatik disclaims all liability for errors which might be contained in the access functions
or the format specification itself.
Vector Informatik does neither provide support for the integration into your software nor for prob-
lems occurring inside your software on the customer side.
Beyond that Vector Informatik reserves the right to change the BLF or ASC data format respective-
ly anytime without prior notification. Therefore, the compatibility of the format is not ensured.
2 Overview
The document specifies the format of CAN, Log and Trigger events in the CANoe/CANalyzer
ASC logging.
3 Format
Newline is coded in the CR+LF representation.
3.1 Header
A log file in ASCII format starts with a header. The header contains general information about the
logging file. See also section 3.12 for an explanation of the symbols.
Format date <WeekDay> <Month> <Date> <Fulltime> <Year>
base <hex|dec> timestamps <absolute|relative>
<””|no> internal events logged
date Wed Apr 16 09:21:13.159 am 2014
Example base hex timestamps absolute
internal events logged
• base indicates the number system in which values are logged. It can be in hexadecimal or
decimal notation.
• timestamps indicates whether the timestamps are written absolute to the start of the meas-
urement or relative to the preceding event.
• internal events logged indicates whether internal events were logged or not.
Hint: Starting with CANalyzer/CANoe v8.2 SP2 the <Fulltime> is stored in milliseconds.
This can be disabled by setting the flag ASCII_Format_Milliseconds = 0 in section
[SYSTEM] of the CAN.INI file.
<major>.<minor> denotes the CANalyzer/CANoe version number excluding the build number
(e.g. v7.0, v7.1, etc…) and <patch> denotes changes version within a CANalyzer/CANoe main
release (e.g. changes made in a service pack).
The <major>.<minor> numbers are generally increased with each new main release of CANalyz-
er/CANoe regardless whether changes have been made to the ASCII format or not. The <patch>
number of the main release is always zero.
In service packs the <patch> number is increased if and only if changes and/or additions have been
made to the ASCII format.
<time> is the last absolute time stamp of the previous log file and <filename> is the filename of the
previous log file without path information. This time stamp is always absolute even if the events
are logged with relative time stamps. With this information it is possible to restore the original time
stamps of events logged with relative time stamps if a subsequent file is replayed.
3.2 Example
The following logging contains CAN Message events, CAN Extended Message events, contains
CAN FD Message events, CAN FD Extended Message events, Errorframes, CAN Bus Statistic
descriptions, Log Trigger events, Log Direct Start events, CAN Status events, CAN Remote Frame
events and CAN Error events.
date Die Dez 21 11:29:01 2004
base hex timestamps absolute
internal events logged
// version 7.0.0
Begin Triggerblock Mon Mar 7 01:21:51 pm 2005
0.0000 Start der Messung
0.0006 CAN 1 Status:chip status error active
0.0006 CAN 2 Status:chip status error active
1.0100 1 Statistic: D 0 R 0 XD 0 XR 0 E 0 O 0 B 0.0%
1.0100 2 Statistic: D 0 R 0 XD 0 XR 0 E 0 O 0 B 0.0%
2.0000 log direct start (0ms)
2.0000 log trigger event
2.5009 1 64 Tx d 8 00 01 02 03 04 05 06 07
2.5010 2 C8x Rx d 8 09 08 07 06 05 04 03 02
2.5010 1 200 Tx r
0.010460 CANFD 1 101 Tx 1 0 d 8 8 F1 F1 F1 F1 F1 F1 F1 F1 Length = 209000 BitCount = 128 ID = 257
0.014165 CANFD 1 1C4D80A7x Tx 1 0 d 8 8 88 88 88 88 88 88 88 88 Length = 278000 BitCount = 140 ID =
474841255x
0.010235 CANFD 1 100 Tx 1 0 r 8 Length = 138000 BitCount = 57 ID = 256
2.5010 1 ErrorFrame
2.5010 CAN 1 Status:chip status error active - TxErr: 0 RxErr: 1
2.5010 CAN 2 Status:chip status error active - TxErr: 0 RxErr: 1
2.7000 log trigger event (this trigger was in post trigger time of last block)
3.0100 1 Statistic: D 1 R 0 XD 0 XR 0 E 1 O 0 B 0.2%
3.0100 2 Statistic: D 1 R 0 XD 0 XR 0 E 1 O 0 B 0.2%
4.0000 log direct stop (0ms)
4.0000 log trigger event
End TriggerBlock
Hint 1: The format of <ID> differs when using symbolic logging. In this case the symbolic
names are written instead. In this form:
<Time> <Channel> <ID> <Dir> d <DLC> <D0> <D1>...<D8>
Symbolic logging is also valid for CAN Extended Message Events & CAN Remote
Frame Events.
Hint 2: The Length, BitCount, and numerical ID-fields can be suppressed by setting the flag
ASCII_Format_7_2=1 in section [CAN] of the CAN.INI file, which is located in the
Exec32 folder. This flag is available from CANoe/CANalyzer version 7.5 SP3.
Flags:
Bit field defining the validity of the parameters Code, CodeExt, ID, DLC, Position, and
Length.
Bit Meaning
0 SJA 1000 ECC is valid
1 Vector CAN Core Error Code is valid
2 Vector CAN Core Error Position is valid
4 Vector CAN Core Frame Length in ns is valid
Code:
Content of Philips SJA1000 Error Code Capture (ECC) register, or the Vector CAN-
Core error register (see also mFlags).
SJA1000-ECC
See documentation of Philips SJA1000 CAN Controller.
Vector CAN-Core
Bit Meaning
0-5 0: Bit Error
1: Form Error
2: Stuff Error
3: Other Error
4: CRC Error
5: Ack-Del-Error
6-7 0: RX-NAK-Error
1: TX-NAK-Error
2: RX-Error
3: TX-Error
CodeExt:
Remarks
1 Only valid for interfaces with Vector CAN-Core (CANcardXLe, VN7600, VN16xx, VN89xx, and oth-
ers).
2 The validity of ID, DLC, and the data field depends on the type and position of the disturbance. Exam-
ple: If the message is disturbed in the ID-field, then only the first bits of the ID may be valid, but not
the DLC and the data field. The error position is not the position of the disturbance. Example: If the er-
ror position is located in the CRC-field, then the message may have been disturbed in any other field,
and the erroneous CRC is the result of that disturbance.
Note:
<D1> … <D64> refer to the data fields of the CAN FD message, opposed to standard CAN log for-
mat, this field is not fixed to 8 bytes, instead the length is depending on the value of the
field <Datalength>. For example, when <Datalength> is 12, <D1> … <D12> is
logged. For CAN remote frames the <Datalength> is 0.
<BitTimingConfArb>, <BitTimingConfData> refer to the bit timing parameters used for arbitra-
tion and data phase. These fields can be interpreted 32 bit long bit fields:
Bit 0-7: Quartz Frequency
Bit 8-15: Prescaler
Bit 16-23: BTL Cycles
Bit 24-31: Sampling Point
These values are only available, if supported by the hardware/driver, otherwise <Bit-
TimingConfArb> and <BitTimingConfData> are 0.
3.12 Symbols
Symbol Width Width Meaning Range Example Special
in chars in chars
(hex) (dec)
<Time> >=9 absolute or relative time 1234.5678 usually 4
in seconds decimal
places
<Channel> 2 - 10 Number of the CAN [A-Za-z0-9] 1, CAN 1,
channel. {2,10} CAN FD
1
<ID> 15 15 Numeric identifier Normal mode: In extended
(numeric log- 0x0…0x7FF mode only a
ging) width of 14
Extended Mode: characters,
0x0…0x1FFFFF because of
‘x’ at the
end. CAN
FD represen-
tation only in
hex.
<ID> >= 32 >=32 Symbolic identifier
(symbolic log-
Differences to numeric
ging)
format:
1. Four spaces instead
of one after the Identifi-
er
2. Length of <ID> is
>=32. For short sym-
bolic names (<32) the
remaining positions are
filled with spaces.
<Dir> 4 direction of transmis- Rx, Tx, TxRq Rx
sion
<DLC> 1 2 data length code Hex: 0…F B CAN FD
Note: the DLC field is Dec: 0…15 12 representa-
written as one hex digit. tion is always
In case DLC is greater dec
8, there are max. 8 data
bytes written/read in.
<MessageFlags> 2 2 Some special message TE, WU, XX TE
flags that are written at
the end of a logging
line. Possible values
are:
- “TE”: Transmission
Error (NERR signal).
Indicates whether a line
has failed during a two-
wire operation. Espe-
cially available on Sin-
gle-Wire mode.
- “WU”: Wake-Up.
1
Starting with CANalyzer/CANoe 8.2 SP2 the <Fulltime> is stored in milliseconds. This can be disabled by setting the
flag ASCII_Format_Milliseconds = 0 in section [SYSTEM] of the CAN.INI file. In that case the string-width is 4
characters smaller.