CANoe快速入门PPT幻灯片课件

上传人:日度 文档编号:134478910 上传时间:2020-06-05 格式:PPT 页数:96 大小:4.31MB
返回 下载 相关 举报
CANoe快速入门PPT幻灯片课件_第1页
第1页 / 共96页
CANoe快速入门PPT幻灯片课件_第2页
第2页 / 共96页
CANoe快速入门PPT幻灯片课件_第3页
第3页 / 共96页
CANoe快速入门PPT幻灯片课件_第4页
第4页 / 共96页
CANoe快速入门PPT幻灯片课件_第5页
第5页 / 共96页
点击查看更多>>
资源描述

《CANoe快速入门PPT幻灯片课件》由会员分享,可在线阅读,更多相关《CANoe快速入门PPT幻灯片课件(96页珍藏版)》请在金锄头文库上搜索。

1、CANoe快速入门 CANoe概述 CAN总线开发工具测试分析仿真记录 2 CANoe在总线开发中的作用 1 3 Phase1 Simulatedbus Virtualtotalsystem CANoe在总线开发中的作用 2 4 Phase2 simulatedrest of bus Kl15 Virtualsubystem Realsubsystem phys bus CANoe在总线开发中的作用 3 5 Phase3 Kl15 Realtotalsystem Physicalbus Analysis inreal time 硬件接口卡 狗 CANcardXLCANcaseXL收发器CANc

2、ab CANpiggy 251 1041 1054 LINcab LINpiggy 7259 6 CAN卡 CANoe组成 功能强大 操作简单CANoe数据库支持CANdb Editor可编程CAPL虚拟仪表PanelEditor PanelDesigner 7 CANoe工程环境 8 多总线 软件硬件控制面板VectorHardwareLicense Overview 9 设置 1 硬件CAN卡类型 编号 收发器类型应用程序通道应用程序License信息 10 设置 2 CANoe通道设置Configuration OptionsConfigurationSettings ChannelUs

3、age 11 灵活 复杂 12 Application 从复杂到简单 CANoe波特率设置Configuration HardwareConfiguration 13 基本术语 报文 消息 与信号 14 报文 enginedata ID100 ID100 B0 B1 B2 CRC 信号 发动机温度 第二字节 0 6位 未用 第二字节 第七位 发动机转速 第一 二字节 转换规则发动机转速 rpm 1 Bitvalue 0 xFF代表错误 发动机温度 C 2 Bitvalue 50 0 x7F代表错误 基本术语 环境变量与系统变量 环境变量节点的I O信号可用于面板或真实I O系统变量节点内部参数

4、或需要观测的某个数值例如 系统变量1 报文1 信号1 报文2 信号2 15 欢迎进入CANoe的世界 CANoeCANdb EditorCAPLPanelEditor PanelDesigner 16 欢迎进入CANoe的世界 CANoe8大窗口TraceWindowBusStatisticsWindowStatisticsWindowDataWindowGraphicWindowWriteWindowSimulationSetupMeasurementSetup 17 CANoe窗口介绍 1 TraceWindow报文ID和报文名称 数据库 信号 数据库 时间 相对值或绝对值 通道DLCDi

5、r Tx或Rx 更多内容见右键点击窗口空白处 Configuration Columns 18 蒙太奇 1 在CANoe中添加数据库View SimulatioinSetup 19 蒙太奇 2 符号化显示与十进制 十六进制切换 20 Globalswitches Hex DecandNumeric Symbolictoggles CANoe窗口介绍 1 21 清空Trace窗口 暂停Trace窗口 时间显示切换 报文显示切换 CANoe窗口介绍 2 DataWindow数据库 信号名称信号值 Value 信号单位原始值 RawValue Bar图 22 CANoe窗口介绍 2 DataWind

6、ow添加信号右键单击空白处AddSignals选择需要的信号 23 CANoe窗口介绍 3 GraphicsWindows数据库 显示信号曲线不同的颜色和线形右键单击空白处选择Configuration放大 缩小 平移 24 CANoe窗口介绍 3 GraphicsWindows添加信号右键单击空白处AddSignals选择需要的信号 25 CANoe窗口介绍 4 StatisticsWindow显示报文出现频率显示错误帧出现频率统计报告右键单击空白处ConfigurationActive生成统计报告 WriteWindow 26 Messagefrequency ID CANoe窗口介绍 5

7、 BusStatisticsWindow总线负载数据帧错误帧CAN卡控制器状态 27 CANoe窗口介绍 6 WriteWindowCAN卡控制器状态License信息统计报告CAPL输出窗口Printf Write 28 蒙太奇 3 DesktopCreateNewDesktopRenameDesktop 29 蒙太奇 4 固定窗口 30 CANoe窗口介绍 7 MeasurementSetupView MeasurementSetup每个模块对应一个窗口增加新模块 窗口 插入功能块数据记录 31 CANoe窗口介绍 7 新增模块 窗口 32 CANoe窗口介绍 7 插入功能块CAPL节点发

8、生器模块回放模块触发模块过滤器模块 33 CANoe窗口介绍 7 过滤器模块通道过滤 ChannelFilter 报文过滤 Filter 变量过滤 Variables 34 CANoe窗口介绍 7 数据记录默认状态关闭多种记录文件类型多种记录配置方式 35 CANoe窗口介绍 7 记录文件右键点击文件图标 Loggingfileconfiguration 36 CANoe窗口介绍 7 记录配置方式双击Logging模块全部记录单次记录触发记录 37 蒙太奇 5 数据记录的目的是为了离线分析Mode ToOffline 38 CANoe窗口介绍 8 SimulationSetupView Sim

9、ulationSetup发生器交互式发生器CAPL节点 39 CANoe窗口介绍 8 发生器模块 40 CANoe窗口介绍 8 发生器模块 41 CANoe窗口介绍 8 发生器模块 42 CANoe窗口介绍 8 交互式发生器模块 43 欢迎进入CAPL的世界 CAPL CANAccessProgrammingLanguage 类C语言仿真单个节点和整个网络外部环境测试面向事件的编程语言总线事件键盘事件时间事件 44 CAPLBrowser 45 标题栏 菜单条 工具条 浏览树窗格 编译信息窗格 状态条 全局变量编辑窗格 CAPL程序编辑窗格 CAPL事件 46 CAPL基本语法 类C语言 语法

10、与C语言基本相同注释 放置在需要注释的语句之前 注释单行 注释起始符 其后的内容被注释 注释结束符 结束由 开始的注释分号程序结束标识大括号函数体 47 counter counter 1 if counter 256 counter 0 stop 消息事件 onmessage123 对消息123 dec 反应onmessage0 x123 对消息123 hex 反应onmessageMotorData 对消息MotorData 符号名字 反应onmessageCAN1 123 对CAN通道1收到消息123反应onmessage 对所有消息反应onmessage100 200 对100 200

11、间消息反应 48 键盘事件 onkey a 按 a 键反应onkey 按空格键反应onkey0 x20 按空格键反应onkeyF1 按F1键反应onkeyCtrl F12 按Ctrl F12键反应onkeyPageUP 按PageUp键反应onkeyHome 按Home键反应onkey 按所有键反应 49 时间事件 定时器声明msTimermyTimer 将myTimer申明ms为单位的变量timermyTimer 将myTimer申明s为单位的变量定时器函数setTimer myTimer 20 将定时值设定为20ms 并启动cancelTimer myTimer 停止定时器myTimer定

12、时器事件ontimermyTimer 对myTimer设定的时间到反应 50 环境变量事件 环境变量函数getValue 获取环境变量的值putValue 设置环境变量的值环境变量事件onenvVarXXX 51 数据类型 52 数据定义 全局变量和局部变量变量定义inti message0 x123HiRain messageMotorDataVector 53 完整的CAPL程序 三个部分变量各种事件自定义函数 54 onstart 过程指令块 onmessagexxx 过程指令块 onkey 1 过程指令块 My function 1 Para 1 Para 2 函数体 My funct

13、ion n Para 1 Para 2 函数体 variables 申明全局变量 CAPL输出文本 WriteWindowwrite函数 55 inth 100 charch a chars100 8 hundred write Hundredasanumber d x h h write Hundredasastring s s100 write Thesquarerootoftwois 6 4g sqrt 2 0 消息处理常用语句 if this id 100 msg can 2 msg dlc 8 dwordt t this time if this dir RX return this

14、 CarSpeed 200 56 关键字this this代表触发事件的对象 57 onmessage100 bytebyte 0 byte 0 this byte 0 onenvVarSwitch intval val getvalue this 报文处理 onmessage0 x64 if this byte 2 0 xFF write Thirdbyteofthemessageisinvalid onmessageMotorData if this temperature phys 150 write Warning criticaltemperature 58 键盘处理 onkey a

15、 messageMotorDatamMoDa mMoDa temperature phys 60 mMoDa speed phys 4300 output mMoDa onkey b message100m100 dlc 1 m100 byte 0 0 x0B output m100 59 定时器处理 Variables message0 x555msg1 dlc 1 msTimertimer1 onstart setTimer timer1 100 ontimertimer1 setTimer timer1 100 msg1 byte 0 msg1 byte 0 1 output msg1

16、60 环境变量处理 onenvVarevSwitch messageMotorDatamsg msg bsSwitch getValue this output msg 61 练习1 当CANoe启动时 向WriteWindow输出一句话 例如 Hellotheworld 62 练习2 利用发生器模块周期性发送某一报文 例如每隔200ms发送一条EngineData报文 每当按下a键 在WriteWindow窗口输出一句话 例如 XXXEngineDatamessageshavesent 注 XXX为已经发送的EngineData报文数量 63 练习3 不用发生器模块实现Enginedata报文的周期性发送 每当按下a键时 EngineData里面EngSpeed信号值为2000 当按下b键盘时 EngineData里面EngSpeed信号值为4000 如果EngineData里面EngSpeed信号为4000 则发送ABSData报文 同时在WriteWindow输出 Warning 当按下c键时 停止EngineData报文发送 64 欢迎进入CANdb Editor的世界 DBC

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 电子/通信 > 电子设计/PCB

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号