Off-line analysis of CAN messages: X-CAN platform for off-line analysis

Software Description

This X-CAN software as my personal development, development of the original intention to meet me personally to be analyzed off-line data extracted repeatedly CAN bus data acquisition and post from time to time in the scientific research and experimental testing process. My habit is an experiment to save the CAN protocol when the second version of the document in each of the experimental testing, CAN data file and the necessary experiments summary. This X-CAN software can be performed according to times when the CAN protocol and CAN data files of the original data file various analyzes, the drawing.

The software from the initial personal development for their own use, to supply internal laboratory use, to the current package free for everyone to use, has gone through several versions. Each version features continue to improve, at the same time, we hope you can actively some suggestions and comments when using this software, if any, please direct comments to this blog.

This X-CAN software shortcuts below, unified display as X-CAN.
Here Insert Picture Description
The latest version V2.2.5.0 [] updates are as follows:
1, support the preservation and consolidation of analytical Vector CANoe / CANape and Peak CAN software ASC documents;
2, support trc file saved merger Peak CAN software;
3, improved update function, automatically exit the old version of the X-CAN updating;
4, save amendments Peak CAN software trc file parsing function.

Download and run the software environment

This software is based on NI LabVIEW 2015 32 Wei write, install and run LabVIEW 2015 requires the engine running, install LabVIEW 2015 or later, or install LabVIEW 2015 running engine.
Download X-CAN provides software operating environment here:

Software item version Size of software download link Remark
The software: X-CAN 2.2.5.0 14.2 MB Channel 1: I website
Channel 2: CSDN download
Must be installed
The software: X-CAN (the previous version) 2.2.4.2 14.0 MB CSDN download -
Runtime engine: LabVIEW
the Run - Time Engine
2015 SP1 - (32-bit) 274.57 MB Official website ftp download Optional
Development Software: LabVIEW 2015 Chinese version 1.41 GB Official website ftp download Optional

This software is free to download in CSDN development is recognition of my work. If you no points CSDN download or contact me QQ: 19627152 QQ mailbox or the corresponding request, you can also add Q group: 646 900 507 mutual exchange of learning. In addition, this software, I made a special website: http://www.xcantec.cn/ , you can also download and feedback through this website.

Software Supported file formats

1, CAN protocol file
Currently, the software only supports CAN protocol .dbc file format, if demand in other formats, please contact me.
CAN dbc file format protocol using Vector CANdb ++ software development, if necessary, you can click here to Baidu network disk download , extract code: mrnd, or click here to download CSDN

2, CAN offline data file
(1) X-CAN 1.9 and the following version only supports real-time saving or save the ZLG CANpro software under CAN tab
.txt / .asc file .
(2) X-CAN version 2.0, support ZLG CANpro software stored in the CAN tab
.can / .txt / .asc files ; support ZLG ZCANPRO software saved .can / .csv / .txt / .asc file .
(3) X-CAN 2.2.0.0 version, support ZLG CANpro software stored in the CAN tab
.can / .txt / .asc files ; support ZLG ZCANPRO software saved .can / .csv / .txt / .asc file ; support ZLG CANtest software saved .can /.csv /.txt /.asc file .
(4) X-CAN 2.2.2.0 version, support ZLG CANpro software stored in the CAN tab
.can / .txt / .asc files ; support ZLG ZCANPRO software saved .can / .csv / .txt / .asc file ; support ZLG CANtest software saved .can /.csv /.txt /.asc files ; support ZLG CANDTU saved .can /.csv /.txt /.asc file .
(5) X-CAN 2.2.4.0 version, support ZLG CANpro software stored in the CAN tab
.can / .txt / .asc files ; support ZLG ZCANPRO software saved .can / .csv / .txt / .asc file ; support ZLG CANtest software saved .can /.csv /.txt /.asc files ; support ZLG CANDTU saved .can /.csv /.txt /.asc documents ; support the preservation of PCAN software .trc file .
(Interpretation can define the file format of CANpro and ZCANPRO see my other blog: " ZLG of CANpro saved .can file parsing " and " ZCANPRO of .can file parsing .")
(6) If the needs of other formats, Please contact me.

Software version CAN protocol compatible format CAN-compatible data file formats
X-CAN 2.2.5.0 and above .dbc (1) .ZLG CANpro software stored in the CAN tab .can / .txt / .asc file;
(2) .ZLG saved ZCANPRO software .can / .csv / .txt / .asc file;
(3). ZLG CANtest software stored .csv / .txt / .asc document;
(. 4) .ZLG CANDTU saved .csv / .txt / .asc / .can document;
(. 5) .PCAN .trc software stored documents;
(6 ) .asc file saved .PCAN, Vector CANoe / CANape other hardware and software.
X-CAN 2.2.4.0~2.2.4.2 .dbc (1).ZLG CANpro软件在CAN选项卡下保存的.can/.txt/.asc文件;
(2).ZLG ZCANPRO软件保存的.can/.csv/.txt/.asc文件;
(3).ZLG CANtest软件保存的.csv/.txt/.asc文件;
(4).ZLG CANDTU保存的.csv/.txt/.asc/.can文件;
(5).PCAN软件保存的.trc文件。
X-CAN 2.2.2.0~2.2.3.2 .dbc (1).ZLG CANpro软件在CAN选项卡下保存的.can/.txt/.asc文件;
(2).ZLG ZCANPRO软件保存的.can/.csv/.txt/.asc文件;
(3).ZLG CANtest软件保存的.csv/.txt/.asc文件;
(4).ZLG CANDTU保存的.csv/.txt/.asc/.can文件。
X-CAN 2.2.0.0~2.2.1.3 .dbc (1).ZLG CANpro软件在CAN选项卡下保存的.can/.txt/.asc文件;
(2).ZLG ZCANPRO软件保存的.can/.csv/.txt/.asc文件;
(3).ZLG CANtest软件保存的.csv/.txt/.asc文件。
X-CAN 2.0~2.1.1 .dbc (1).ZLG CANpro软件在CAN选项卡下保存的.can/.txt/.asc文件;
(2).ZLG ZCANPRO软件保存的.can/.csv/.txt/.asc文件。
X-CAN 1.9及以下版本 .dbc ZLG CANpro软件在CAN选项卡下保存的.txt/.asc文件。

注意:不推荐使用.asc格式保存离线数据,CANpro和ZCANPRO保存生成的.asc文件的时间序列与其他几种格式相差较大。
ZCANPRO软件请自行到ZLG官网下载。而CANpro软件ZLG官网则已不再提供下载,如有需要,可以点击这里到百度网盘下载,提取码:001q 。

前言

CAN是控制器局域网络(Controller Area Network, CAN)的简称,是ISO国际标准化的串行通信协议。1986 年德国博世公司开发出面向汽车的CAN 通信协议。此后,CAN 通过ISO11898 及ISO11519 进行了标准化,目前已是汽车网络的标准协议。CAN 的高性能和可靠性已被认同,并被广泛地应用于工业自动化、船舶、医疗设备、工业设备等方面。它的出现为分布式控制系统实现各节点之间实时、可靠的数据通信提供了强有力的技术支持。
在开发人员进行CAN总线相关装置进行调试测试时,通常会采用CAN卡连接CAN网络和PC电脑进行数据的采集、观察和记录。目前国内外有一些列配套的在线分析工具和软件,但是价格昂贵。但长期以来,人们对采集的CAN数据每次都借助EXCEL、Matlab、LabVIEW等工具以及相应的通讯协议配置进行手动解算信号,而且需要非常了解相应的通讯协议和分析处理过程,操作十分繁琐且费时。
为了更便捷地对采集并储存到存储器中的CAN数据进行分析和绘图,基于LabVIEW平台开发了此X-CAN离线分析平台(以下简称X-CAN)。该X-CAN离线分析平台能够自动解析dbc格式的CAN通讯协议文件和CAN离线数据,并根据所选信号进行图标绘制。本人在进行CAN总线调试时采用CAN卡进行CAN总线数据采集和记录,并利用X-CAN离线分析平台能够高效、低成本的对CAN网络数据进行分析。

X-CAN

X-CAN离线分析平台所具有的主要功能如下:

  • 能够加载并读取CAN通讯协议DBC文件,并自动解析DBC文件内的报文信息(包括报文名、ID、字节数、发送节点)以及报文所含的各个信号的信息(包括信号名、起始位、长度、排序格式、有无符号、比例因子、偏移量、最小值、最大值、单位、发送节点),还有各个信号的值定义,并自动绘表显示;
  • 用户可以根据解析的DBC信号表自由选取所需要绘图的信号;
  • 用户可以查看任意信号的值定义;
  • 能够加载并读取ZLG相关软件保存的txt、can、asc、csv等格式的CAN离线数据,并根据所选信号自动绘制曲线;
  • 用户可以对绘制的图表进行缩放、移动、游标读取等操作,也可以导出所选择信号的曲线数据到EXCEL或位图中。

应用X-CAN离线分析平台后,CAN数据分析过程中许多重复性的工作都可由计算机自动去执行,只需要鼠标进行简单点选即可完成以往繁琐的协议匹配、导入EXCEL、截取、排序、绘图等等操作,从而使得测试人员真正变为从事一些信息的分析、判断、决策等创造性的工作。

使用说明

最新版本的X-CAN离线分析平台主界面如下:
Here Insert Picture Description

软件功能

1 解析CAN通讯协议DBC

X-CAN离线分析平台主界面的左上部分为DBC解析和查看的主要界面。
Here Insert Picture Description
DBC文件是一种描述CAN通信协议的文件,德国 Vector的CANdb++软件可创建和编辑DBC文件,如果没有装这个软件的话,直接用记事本打开DBC文件也可以,但是由于文件的格式比较特殊,直接看文本的话难以理解,这时候可能就需要本软件直接读取解析。

DBC文件中包含了CAN网络的节点定义、CAN报文的定义、各个信号的定义以及相关值的含义说明等,具体详情用户可至Vector官网进行查询。

用户选择并加载DBC文件后,X-CAN立即自动解析DBC中的信息。X-CAN解析完DBC文件后会在路径下方显示该DBC文件中蕴含的报文数量和信号数量。

X-CAN自动解析DBC文件得到其中的信息后,将报文及信号、信号的起始位、长度、格式、缩放系数、偏移量、最小值、最大值、单位、节点等信息以树形表格的形式进行显示,用户可以通过操纵树形表右侧的滚动条可以查看各个报文和信号的定义。
Here Insert Picture Description
Here Insert Picture Description

也可以查看各信号的值表(值定义):
Here Insert Picture Description

2 加载CAN离线数据

在进行CAN数据绘图前,请先加载CAN离线数据。点击CAN离线数据栏目的文件夹按钮,即弹出文件选择框,选择txt或asc格式 的CAN离线数据,点击“加载”即可。点击“加载”后,X-CAN立即加载所选的CAN离线数据,并提示用户CAN离线数据的行数以及当前加载的百分比进度。加载完成后,提示语和进度条消失。说明程序已将数据读取到缓冲区。注:推荐使用ZLG的CANpro保存CAN离线数据

Here Insert Picture Description

3、信号绘图

在DBC树形表中双击信号来将信号添加到已选信号栏中,选择完毕后,点击“绘图”即可。
Here Insert Picture Description
Here Insert Picture Description

用户通过右侧的图例窗口,右键颜色框,即可弹出更改曲线的按钮列表,通过此按钮列表,用户可更改曲线的可见性、曲线类型、线条样式、宽度等等,功能十分丰富,请用户自行探索。

4、图表导出

另外,曲线数据也可以导出,在X-CAN中的主图右键可以将绘制得到的图导出到剪贴板、EXCEL或简化图像。
Here Insert Picture Description

以导出数据至EXCEL为例,点击“导出至EXCEL”即可将所选信号曲线的数据导出到EXCEL,其列顺序依已选信号顺序排列,即“信号1时间,信号1值,信号2时间,信号2值,信号3时间,信号3值……”
Here Insert Picture Description

5、CAN数据文件合并

从X-CAN 2.1版本开始,X-CAN集成CAN数据文件合并功能,在合并文件界面下,能够自动读取用户选择目录下后缀为can、txt、asc、csv四种格式的CAN数据文件,并能自动读取文件的大小、所包含的CAN报文数量、首帧时间、末帧时间、以及其所覆盖的时间长度。用户通过选择要合并的文件,可快速对多个CAN数据文件进行自动合并。
Here Insert Picture Description
关于CAN数据文件合并的使用,请参看本人另外一篇博客:《CANjoiner:CAN离线数据文件合并器》,其详细的功能使用在此就不再赘述。
Here Insert Picture Description

应用CAN离线数据文件合并器,可以快速查阅在计算机中保存的CAN离线数据文件,并根据需要对若干个数据文件进行合并,以便于后续的数据分析工作,使得数据分析人员可以不受文件分割而影响了数据或曲线的连续性,从而更快速的完成测试分析工作。

更新记录

X-CAN 版本 更新的内容
2.2.5.0 1、 支持解析及合并Vector CANoe/CANape和Peak CAN等软件保存的ASC文件;
2、支持合并Peak CAN等软件保存的trc文件;
3、改进更新功能,更新时自动退出老版本X-CAN;
4、修正Peak CAN等软件保存的trc文件解析功能。
2.2.4.2 1、绘图时自动选择插值方式,当有离散值定义时绘制为数字信号;
2、鼠标放置曲线上时一并显示值定义(如有)。
2.2.4.1 1、Y轴随曲线自动变颜色;
2、初始线宽可设。
2.2.4.0 1.新增支持解析PCAN软件保存的.trc格式CAN数据文件。
2.2.3.2 1.改进主图网格、图例显示;
2.发现新版本时显示新版本号。
2.2.3.1 1.降低了低分屏界面的错位程度。
2.2.3.0 1.添加鼠标放置在曲线上自动显示坐标的功能;
2.改进自动更新功能。
2.2.2.3 1.添加自动检查更新功能;
2.添加自动重排时间顺序功能;
3.优化部分bugs。
2.2.2.2 1.添加语言设置功能,全面支持中文、English界面。
2.2.2.1 1.添加若干按钮,可快速打开candb++、CANpro、CANtest等软件;
2.缩小初始面板至1366*768以下,以避免低分屏错位严重。
2.2.2.0 1.修改主界面背景;
2.添加检查更新按钮;
3.添加对CANDTU的txt和csv的支持。
2.2.1.3 1.适配CANtest保存的另一种txt数据文件;
2.修正CANpro.can文件的时间解析;
3.生成英文版。
2.2.0.0 1.适配CANtest保存的CAN数据文件(.csv/.txt/.asc);
2.合并文件完成后立即刷新文件列表;
3.添加时间轴的切换功能(相对时间(秒)/绝对时间(不显日期)/绝对时间(显示日期));
4.添加“文件详情”按钮,查看CAN离线数据文件详情;;
5.“关于”界面添加“前往网页”按钮,点击可打开浏览器显示博客;
6.修改安装程序,添加卸载快捷方式。
2.1.1.0 1.优化文本最后一行读取速度;
2.优化若干细节问题。
2.1.0 .0 1.添加合并文件的功能
2.0.1 .0 1.修正解析ZCANPRO的can文件时可能产生的错误
2.0.0 .0 1.增加解析ZCANPRO软件保存的数据文件能
1.9.0.0 1.增加关于和捐赠按钮
1.8.0.0 1.DBC添加有符号和无符号的区分
1.6.0.0 1. Add analytical ability .asc CAN data format;
stream 2 obtained offline data analysis time to 10us, Note: When the amount of time over 11.9 hour point overflows;
3, remove the cursor legend window will not maximize overlap;
4, increasing the "on a DBC loading" button, clicking directly loadable DBC last opened;
. 5, the signal DBC adjust the order, VECTOR__INDEPENDENT_SIG_MSG no longer appears in the front row;
6, increasing the "export to EXCEL "button, this function appears to solve some of the computer can not be exported to EXCEL the bug.

backup

Attached CANpro and ZCANPRO software interface follows two figures , I recommend using CANpro, because CANpro can display and save CAN messages is not a problem millions of frames, and .can file CANpro saved in only 24 bytes can be save a CAN message. The ZCANPRO, the largest non-real time saved can only save 100,000 packets (10ms on average have two words, will save more 500s, which is little more than eight minutes.), Save each file in real time will only save 10 ten thousand to automatically generate multiple files, and .can file saved in ZCANPRO need 58 to 66 bytes to save a CAN message, unusually large. In addition, there is no ZCANPRO "Import data" option, only through "Data Playback" reproducible data, but pro-test ZCANPRO "Data Playback" could lead to distortion timeline.

CANpro和ZCANPRO软件
CANpro
ZCANPRO

This article is a blogger original article, shall not be reproduced without the bloggers allowed. If you have questions, please correct me.

Published 26 original articles · won praise 14 · views 4904

Guess you like

Origin blog.csdn.net/jaysur/article/details/90040598