黄磊 何亚楠
摘 要:文章介绍了一种自主设计开发的TCU自动测试工具。主要介绍了基于C#的上位机软件的设计开发,包括页面、类库、测试项目和变量信息的设计编程,Kvaser CAN通讯库的使用,XCP协议的实现,A2L文件解读,Excel报告生成等。另外还介绍了CAN-extender的硬件接口和软件脚本开发,测试负载箱电路原理和改装方法。通过以上项目的研究工作,可以设计出一种自动测试TCU的试验台,大大提高量产TCU测试验收的工作效率。关键词:TCU自动测试;C#软件编程;XCP协议;CAN-extender脚本;负载箱控制中图分类号:U466 文献标识码:B 文章编号:1671-7988(2020)02-91-03
Abstract: This paper introduces an automatic testing tool for TCU, which is designed and developed independently. The paper mainly introduces the design and development of PC software based on C#, including the design and programming of user interface, class libraries, test items and variable information, the use of Kvaser CAN communication library, the implementation of XCP protocol, A2L file interpretation, Excel report generation, etc. In addition, the hardware interface and software script development of CAN-extender are introduced, and the circuit principle and modification method of the load box. Through the research work of the above projects, we can design a test-bed for automatic testing TCU, which greatly improves the efficiency of TCU test.Keywords: TCU automatic test; C# software programming; XCP protocol; CAN-extender script; Load box controlCLC NO.: U466 Document Code: B Article ID: 1671-7988(2020)02-91-03
前言
TCU生产过程中,需要对成品TCU电路板进行完整的测试验证,便于生产验收和质量控制。传统测试过程需要连好相关测试负载后人工操作,拨动控制开关,使用VISION标定工具更改软件标定,观察指示灯、仪表和测量变量,之后再手动填写测试报告,不仅效率低下,而且测试人员需要对测试项目和标定变量有较深的了解。
为了解决以上问题,本课题设计了一种自动化的TCU测试工具,通过Windows操作系统下自主开发的应用程序TestTool,与TCU和测试负载箱进行信息交互,实现TCU的一键式测试验证,并生成测试报告。
1 总体方案
总体自动测试方案由PC机及自主开发的TestTool软件,通过Kvaser工具,使用CAN总线和CAN-extender通讯,XCP协议和待测TCU通讯;CAN-extender将CAN指令转换为电气信号到继电器控制负载箱工作;同时TestTool软件和待测TCU通过XCP协议进行相关标定测量,负载箱和TCU在测试工具的控制下共同完成测量,并将测试结果反馈给TestTool,由TestTool生成测试报告。……