-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
TD01
authored and
TD01
committed
Feb 10, 2021
1 parent
89982b8
commit 897bc2e
Showing
105 changed files
with
984 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
> TSMaster 应用笔记 | ||
> AN0002 | ||
> Seed and Key algorithm implementation in XCP controller | ||
> 如何使用同星XCP模块加载Seed&Key算法动态链接库 | ||
> 作者: Link | ||
> 2021-01-17 | ||
目录 | ||
|
||
[TSMaster 应用笔记 1](#_Toc61799923) | ||
|
||
[AN0002 1](#_Toc61799924) | ||
|
||
[Seed and Key algorithm implementation in XCP controller 1](#_Toc61799925) | ||
|
||
[如何使用同星XCP模块加载Seed&Key算法动态链接库 1](#_Toc61799926) | ||
|
||
[作者: Link 1](#_Toc61799927) | ||
|
||
[2021-01-17 1](#_Toc61799928) | ||
|
||
[Chapter 1 示例VC工程 3](#_Toc61799929) | ||
|
||
1. 示例VC工程 | ||
|
||
TSMaster XCP加载的DLL示例工程在TSMaster安装目录 bin\\Help\\Application | ||
Notes\\AN0002\\SeedNKeyDll 文件夹下: | ||
|
||
 | ||
|
||
图表 1 VC示例工程 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
> TSMaster 应用笔记 | ||
> AN0003 | ||
> TOSUN XCP controller mat log file format | ||
> 同星XCP模块输出的mat文件格式说明 | ||
> 作者: Link | ||
> 2021-01-17 | ||
目录 | ||
|
||
[TSMaster 应用笔记 1](#_Toc61816710) | ||
|
||
[AN0003 1](#_Toc61816711) | ||
|
||
[TOSUN XCP controller mat log file format 1](#_Toc61816712) | ||
|
||
[同星XCP模块输出的mat文件格式说明 1](#_Toc61816713) | ||
|
||
[作者: Link 1](#_Toc61816714) | ||
|
||
[2021-01-17 1](#_Toc61816715) | ||
|
||
[Chapter 1 mat变量格式定义 3](#_Toc61816716) | ||
|
||
> [1.1 固定变量定义 3](#_Toc61816717) | ||
> [1.2 时间解析方法 4](#_Toc61816718) | ||
> [1.3 时间关联的信号解析方法 5](#_Toc61816719) | ||
> [1.4 构建timeseries 6](#_Toc61816720) | ||
[Chapter 2 Simulink信号回放 7](#_Toc61816721) | ||
|
||
> [2.1 模型中回放工作区变量 7](#_Toc61816722) | ||
1. mat变量格式定义 | ||
|
||
TSMasterXCP模块支持直接输出压缩的HDF5格式的mat文件(Matlab | ||
7.3版本及以上),为基于Simulink的模型开发创造了便利。TSMaster | ||
输出的mat文件载入Matlab后,其工作区变量列表如下: | ||
|
||
 | ||
|
||
图表 1 载入工作区的mat文件 | ||
|
||
1. 固定变量定义 | ||
|
||
固定变量列表如下: | ||
|
||
| 序号 | 变量名称 | 含义 | | ||
|------|-------------------------|--------------------------------------------------------------------------------------| | ||
| 1 | Comment | 注释信息,在同星标定模块的记录引擎配置中可以更改,若注释信息为空,则不会记录这个变量 | | ||
| 2 | MeasurementStartTime | 测量启动时间,TDateTime格式,double类型,用于自动化 | | ||
| 3 | MeasurementStartTimeStr | 字符串表达的测量启动时间 | | ||
| 4 | MeasurementStopTime | 测量结束时间,TDateTime格式,double类型,用于自动化 | | ||
| 5 | MeasurementStopTimeStr | 字符串表达的测量结束时间 | | ||
| 6 | ECU_LIST | 参与标定的ECU列表,逗号分隔 | | ||
| 7 | TIME_LIST | 时间列表,包含所有信号的时间信息 | | ||
|
||
1. 时间解析方法 | ||
|
||
首先分隔时间序列,获取所有时间轴: | ||
|
||
 | ||
|
||
图表 2 分隔时间序列 | ||
|
||
以AN0001中记录的信号为例,其时间序列TIME_LIST字符串变量如下: | ||
|
||
ecu1_TIME_DAQ_Cyclic,ecu1_TIME_DAQ_10_ms,ecu1_TIME_DAQ_100ms,ecu1_TIME_POLL_noiseSignal,TIME_XCPSimBus__engine_speed | ||
|
||
分隔后可根据名称在工作区取得每一根时间轴数组,每根时间轴数组可关联一个或一组信号,时间轴有三种类型,分别是DAQ时间(一根时间轴包含一个或一组信号);Poll时间(一根时间轴对应一个信号)和系统变量时间(一根时间轴对应一个信号): | ||
|
||
| 序号 | 时间轴 | 类型 | | ||
|------|------------------------------|------------------------------| | ||
| 1 | ecu1_TIME_DAQ_Cyclic | DAQ时间,对应Cyclic类型的DAQ | | ||
| 2 | ecu1_TIME_DAQ_10_ms | DAQ时间,对应10\_ms类型的DAQ | | ||
| 3 | ecu1_TIME_DAQ_100ms | DAQ时间,对应100ms类型的DAQ | | ||
| 4 | ecu1_TIME_POLL_noiseSignal | Poll时间,对应查询类型的变量 | | ||
| 5 | TIME_XCPSimBus__engine_speed | 系统变量时间,对应系统变量 | | ||
|
||
根据每根时间轴数组名称可以提取时间轴的每个时刻绝对时间,单位时秒,以ecu1\_TIME_DAQ_100ms为例,如下图所示: | ||
|
||
 | ||
|
||
图表 3 时间轴数组 | ||
|
||
1. 时间关联的信号解析方法 | ||
|
||
获取了时间轴后,需要获取时间轴所关联的信号列表,并根据列表中信号名称定位信号。以时间轴ecu1\_TIME_DAQ_100ms为例,其对应的信号列表存放于名称 | ||
ecu1\_TIME_DAQ_100ms_LIST 的字符串变量里(逗号分隔),其变量名称规则为: | ||
|
||
时间轴名称\_LIST | ||
|
||
按逗号分隔方式展开字符串变量ecu1\_TIME_DAQ_100ms_LIST即可得到时间轴ecu1\_TIME_DAQ_100ms所对应的一个或一组变量名称,在本例中,只有一个名称: | ||
|
||
ecu1_triangleSignal | ||
|
||
这个变量名称最终定位到信号值数组“ecu1_triangleSignal”,该信号值数组的每一个元素与时间信号数组的每一个元素在时间上是一一对应的。 | ||
|
||
在这个信号上右击可以绘制信号按点分布的曲线(不带时间信息),如下图所示: | ||
|
||
 | ||
|
||
图表 4 信号上右键选择plot以绘制不带时间信息的值序列 | ||
|
||
1. 构建timeseries | ||
|
||
若需要构建带时间信息的信号值序列,需要额外执行一段m脚本来构造timeseris,以信号ecu1_triangleSignal为例,其对应的时间轴是ecu1\_TIME_DAQ_100ms,则timeseries可以通过如下脚本构造: | ||
|
||
Triangle_signal = timeseries(ecu1_triangleSignal, ecu1\_TIME_DAQ_100ms) | ||
|
||
构造后,在工作区出现一个新的信号“Triangle_signal”: | ||
|
||
 | ||
|
||
图表 5 生成timeseries | ||
|
||
右键绘制其变化曲线,可以看出横纵坐标分别是时间和值: | ||
|
||
 | ||
|
||
图表 6 绘制timeseries信号 | ||
|
||
1. Simulink信号回放 | ||
|
||
1. 模型中回放工作区变量 | ||
|
||
在模型中回放XCP信号有如下几个步骤: | ||
|
||
打开Simulink模块,在模块空白处双击,选择“From Workspace”: | ||
|
||
 | ||
|
||
图表 7 双击空白处搜索“From Workspace”信号 | ||
|
||
根据timeseries的名称,将Simulink中的信号名称改为“Triangle_signal”,即可参与模型相关的算法仿真和测试过程: | ||
|
||
 | ||
|
||
图表 8 修改信号名称 | ||
|
||
连接Scope后,仿真结果如下: | ||
|
||
 | ||
|
||
图表 9 Simulink仿真结果 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
> TSMaster 应用笔记 | ||
> AN0004 | ||
> How to replay video with bus log files synchronously | ||
> 如何同步播放视频和总线记录文件 | ||
> 作者: Link | ||
> 2021-02-05 | ||
目录 | ||
|
||
[TSMaster 应用笔记 1](#_Toc63420067) | ||
|
||
[AN0004 1](#_Toc63420068) | ||
|
||
[How to replay video with bus log files synchronously 1](#_Toc63420069) | ||
|
||
[如何同步播放视频和总线记录文件 1](#_Toc63420070) | ||
|
||
[作者: Link 1](#_Toc63420071) | ||
|
||
[2021-02-05 1](#_Toc63420072) | ||
|
||
[Chapter 1 视频回放窗口 3](#_Toc63420073) | ||
|
||
> [1.1 直接回放视频 3](#_Toc63420074) | ||
> [1.2 关联总线回放引擎回放视频 4](#_Toc63420075) | ||
[1.2.1 配置总线在线回放引擎 4](#_Toc63420076) | ||
|
||
[1.2.2 将视频回放界面关联至某个总线回放引擎 5](#_Toc63420077) | ||
|
||
[1.2.3 运行在线回放,视频回放将同步触发 5](#_Toc63420078) | ||
|
||
[1.2.4 应用时间偏移 6](#_Toc63420079) | ||
|
||
1. 视频回放窗口 | ||
|
||
TSMaster视频回放窗口可播放主流视频格式,用户可以打开一个或多个视频回放窗口: | ||
|
||
 | ||
|
||
图表 1 TSMaster视频回放窗口 | ||
|
||
1. 直接回放视频 | ||
|
||
点击打开按钮选择视频文件,确认“关联总线回放引擎”的下拉框选中的是“无”,则视频可自由播放、暂停和停止。 | ||
|
||
 | ||
|
||
图表 2 选择视频文件 | ||
|
||
点击播放按钮即可自由播放视频文件(快捷键F9)。播放启动后可点击暂停按钮以暂停视频播放(快捷键F10),再次点击播放按钮(F9)可继续播放。 | ||
|
||
点击停止播放按钮可停止视频文件的播放(快捷键F11)。 | ||
|
||
点击拉伸按钮可使图像最大化拉伸显示于窗口中(快捷键F4): | ||
|
||
 | ||
|
||
图表 3 图像拉伸显示 | ||
|
||
1. 关联总线回放引擎回放视频 | ||
|
||
1. 配置总线在线回放引擎 | ||
|
||
打开“总线回放”窗口,并选择在线回放配置: | ||
|
||
 | ||
|
||
图表 4 视频回放仅支持在线回放引擎 | ||
|
||
在列表空白处点击右键,添加blf文件到列表中。 | ||
|
||
从列表中选择某个回放引擎,配置其参数,例如是否自动启动回放,往哪个总线通道回放等等: | ||
|
||
 | ||
|
||
图表 5 配置在线回放引擎 | ||
|
||
1. 将视频回放界面关联至某个总线回放引擎 | ||
|
||
打开“视频回放”窗口,在“关联总线回放引擎”下拉框中,勾选所需要关联的在线回放引擎: | ||
|
||
 | ||
|
||
图表 6关联在线回放引擎 | ||
|
||
关联回放引擎后,手动播放控制按钮将不起作用,此时视频回放的启动、暂停和停止功能将完全受控于总线回放引擎: | ||
|
||
 | ||
|
||
图表 7 关联总线回放引擎后,视频回放功能手动控制按钮被禁止 | ||
|
||
1. 运行在线回放,视频回放将同步触发 | ||
|
||
连接TSMaster的通道后,启动在线回放引擎,可以看到视频回放与总线回放同步进行: | ||
|
||
 | ||
|
||
图表 8 启动总线回放后视频回放将同步进行 | ||
|
||
在总线回放引擎上点击暂停后,视频回放也会随之暂停: | ||
|
||
 | ||
|
||
图表 9 视频回放将与总线回放实时同步 | ||
|
||
1. 应用时间偏移 | ||
|
||
若视频的起始时间相对总线时间的起始有个偏差(例如10秒),则需要在视频回放界面中设置这个相对偏差时间: | ||
|
||
 | ||
|
||
图表 10 设置时间偏移 | ||
|
||
此时启动总线回放,视频的起始时间将从10秒开始。 | ||
|
||
 | ||
|
||
图表 11 应用了时间偏移后的视频回放 | ||
|
||
1. 视频分析 | ||
|
||
1. 单帧分析 | ||
|
||
使用工具栏菜单中的步进按钮实现单帧步进等功能: | ||
|
||
 | ||
|
||
图表 12 单帧分析功能按钮 | ||
|
||
由于视频播放的单方向特性,TSMaster支持视频在时间正向流逝的方向上步进调试,支持步进调试的按钮颜色不同于其他按钮。四个按钮中的三个绿色的按钮表示单纯移动视频到指定帧,而蓝色的步进按钮则是同时步进视频和报文(若关联了在线回放引擎)。 | ||
|
||
 移动到第一帧(快捷键F3) | ||
|
||
 移动到上一帧(快捷键F7) | ||
|
||
 | ||
移动到下一帧(快捷键F8),同时回放当前帧到下一帧时间之内的所有报文 | ||
|
||
 移动到最后一帧(快捷键F12) | ||
|
||
单帧步进后,下方的状态栏将同步显示当前所处的帧和时间信息: | ||
|
||
 | ||
|
||
图表 13 状态栏显示的帧位置信息 | ||
|
||
1. 视频定位 | ||
|
||
使用下方的拖动条可在视频中定位到指定的帧,在拖动过程中,光标旁边和下方的状态栏将实时显示视频的定位信息: | ||
|
||
 | ||
|
||
图表 14 拖动过程中实时显示定位信息 | ||
|
||
当拖动视频到指定位置后,可基于此位置继续播放视频(快捷键F9),或单帧分析视频(快捷键F8)。 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters