This script logs CAN messages in a data format which can be easily imported into EXCEL or any other data analysis tool. The entire CAN message is stored in a comma separated ASCII data - a well supported data format. A real time timestamp (time and date), as well as a millisecond timestamp makes event analysis easy.
Powerfull filter mechanism helps to focus on specific data. By giving ether a list of CAN IDs to be logged, or by setting a range of IDs, almost all needs are covered.
| Script name: | mc5-4.txt |
| Current version: | v 4 , dated from 13.01.2009 |
| Firmware: | v3.28 or higher required |
| Hardware: | Logger cube, logger box or logger module |
| History: | v4: added filter with list of CAN IDs v1: initial version |
Download Script: MC5-4.txt (1,3 kB) (right mouse-button and 'save under ..' to download)
Power Up and Connect to your device as described
here in the User Manual section "First Steps".
Typically, this Script is loaded when an Avisaro Logger product was purchased. Please see
here for details on how to load the script into the logger if there is the need for update or reload.
Configure the CAN port, such as baudrate and stop bits, as described
here using SD memory cards.
The default settings of the CAN interface are:
Baudrate: 125 kbits/s
CAN ID send: 49 (hex)
CAN ID receive: 49 (hex)
To log an area of CAN ID's (e.g., CAN ID 0 to 100) use the "CANFLT" command in the autorun.txt (not through the script!). Here you will find a description of the command. This method is preferable, if the relevant CAN ID in an area. The scope filter selects faster than using a list of ID's as describt next.
Another way to filter the recorded CAN IDs is to provide a list of IDs to be logged. This list is hardcoded into the script file.
The script file is a simple text file - so it can be edited with any editor of your choice. Below the first lines of the script are shown. The list of CAN IDs to be stored is entered behind the keyword 'data'. Notice the following:
' ' CAN Datenlogger "mc5.txt" Rev 4 (c) Avisaro AG, 14.01.2009 ' ' ---------------- ' List of CAN-IDs to be logged. All = -2. Last element of list = -1. Enter IDs as decimal values. ' Example 1: data 100 , 200 , -1 ' Example 2: data -2 , -1 data -2 , -1 ' ------------ inmode -3 outmode -2 ....
The logfile can be imported into Excel to do further data processing: Navigate in Excel to "File" > "Open"
To select the log-file, the file type in the selection box need to be changed to show all files (*.* - see screenshot to the right). Select the logfile and click ok.
The import box appears. Select "separated" and "continue" as shown in the screen shot.
There is no need to select a certain format - simply select "finish"
Done.
Process the data in Excel as needed.
Key:
Is used to start and stop logging process.
The logging process is automatically started or stopped when a card is extracted or inserted.
The logging process is also automatically started when the device is powered up.
Green LED:
Indicates power up.
Red LED:
Indicates that the logging process is active.