Download Script language manual (pdf, online) - MKT

Transcript
Dok-Nr. 85122
Script Language for programmable CAN Terminals
6 2.3.3 Trace History
The trace history can be used any time to check the events listed below, in chronological order. It is
implemented in the firmware of most devices (if the device supports scripting), but also in the
programming tool (simulator). Typically, up to 255 entries can be stored in the history; more
(newer) entries will overwrite the oldest part (as in a FIFO - first in, first out).
Events which can be recorded in the history are:
1.
2.
3.
4.
5.
CAN messages which have been sent by the terminal ("Tx")
CAN messages which have been received by the terminal ("Rx")
Error messages and warnings by the system (device firmware or simulator)
Messages which have been "printed" into the history by the user application (script)
Other events, when enabled by the trace.enable flags
Chapter overview: Trace History display format, Trace History usage, Trace History invocation .
6.1 2.3.3.1 Trace History display format
The display format of CAN messages in the Trace History is half-way compatible with Vector's
widespread "ASII" format for CAN logfiles. Thus, even for devices without an integrated CAN
logger / snooper, it is possible to trace CAN-bus related problems (which is especially helpful when
implementing 'exotic' CAN protocols in the script language).
CAN message format in the Trace History:
Rx/
Byte Byte Byte Byte Byte Byte Byte Byte
d Length
Tx
1
2
3
4
5
6
7
8
57.211
1 12345678 Rx d 8
F2 68 11 76 EE 86 6C 9D
CAN-Identifiers with 11 bit (standard frames) are displayed with 3 digits. 29-Bit-Identifier
(extended frames) are shown with 8 digits as in the example.
Messages (text lines) entered into the history by command ('trace.print') can have any format; only
the timestamp (in seconds, with three decimal places) are added automatically at the begin of each
line. The second counter starts at zero when the device is turned on, or when the simulator is started
/ reset.
Timestamp Bus CAN-ID
6.2 2.3.3.2 Trace History usage
In the simulator (integrated in the programming tool), the Trace History can be displayed on the
right side of the 'Script' tab. To achieve this, select 'Show Trace History' in a combo box on the
script toolbar:
(Trace History displayed in the programming tool)
© MKT / Dok.-Nr. 85122
Version 2.0
17 / 138