今天带大家认识一个CANoe的进阶功能,这个功能可以使多个CANoe工程同时运行在不同的计算机上,每个CANoe工程都有自己的独立界面,通过同步线进行时间同步,这个功能就是Multi CANoe。它的时间同步示意图如下:

看到这个功能我们第一时间可以想到的是ECU的联合仿真,这个过程涉及到大量信号的交互,有了Multi CANoe之后,一个很大的工程可以放在多个电脑上运行,从而有效降低电脑负载。除此之外,使用一台主机就可以控制所有设备上CANoe的运行,这大大简化了多设备联调的操作。Multi CANoe还可以为您节约资金,本来多设备联调需要每台设备上都集成CANoe相关license,如果使用Multi CANoe的话,从机上只需要集成Slave license即可,这使得整个系统的价格大大降低。
下面我们来了解一下Multi CANoe的几个重要特性:
1、数据交互
Multi CANoe使用windows IP堆栈进行数据连接,使用者需要确保所有电脑都连接在同样的IPv4子网中,并用网线连接起来。下图是两台计算机的IPv4地址,左边是主机,右边是从机。


在Windows网卡配置正确后,可以在Multi CANoe Settings对话框中使用IP地址。

2、时间同步
几乎所有Vector VN硬件都可以通过同步线实现时间同步。某个接口在这条线上发出一个脉冲,可以几乎同时被所有连接的接口检测到。然而,我们连接的接口越多,发送脉冲所需的时间就越长,脉冲边缘的质量就越弱。为了保证整个系统的实时性,我们通过把硬件用同步线连接来补偿这个延时。涉及到两个硬件时,可以使用同步线直接连接;涉及到多个硬件时,需要使用到同步盒。


使用Multi CANoe的过程中,当测量在任何一个Multi CANoe工程上启动时,它会向master发送一个启动请求,接着master会向所有的CANoe工程发送一个启动命令。收到这个命令之后,每个CANoe工程启动其当前配置,并将此状态报告给主机。在这个阶段,所有的驱动程序都在运行,但是 CANoe不处理任何事件。当master检测到所有的CANoe工程都达到这个状态时,它会通过同步接口发送一个同步脉冲,这个脉冲就是所有工程的时间戳0。此时,所有的CANoe工程开始处理驱动程序事件。
所以,除了物理连接,我们还需要确定整个系统的同步源。在主机的Network Hardware Configuration窗口中可以进行配置。如下图的同步源就是CAN1通道。

3、版本和License信息
对于Multi CANoe来说,所有计算机上安装的CANoe主版本、SP版本都必须相同。
Multi CANoe的主机需要一个pro/run license,从机需要CANoe Slave license或者对应的pro/run license,如果需要使用到诸如LIN、J1939等Option,只需要主机配置相应的CANoe pro/run Option.LIN/J1939即可。
举个例子:
一个SUT包含CAN、LIN和Ethernet网络,需要使用三台计算机来实现,license信息我们可以这样进行配置——

在理解了上述特点之后,我们来看看实现这个功能需要哪些步骤。
在以下场景中,我们使用了两台PC,用到的license为CANoe pro✖2,工程可以实现简单的开关灯、速度调节功能。











上面这个工程实现的功能相对简单,只使用了两台pc,希望可以抛砖引玉,唤醒大家的头脑风暴,将这个功能应用到更大的场景中去。CANoe还有更多更强大的功能有待开发,我们与大家共同努力。
北汇信息作为Vector中国的合作伙伴,始终专注于汽车电子领域的新技术和新产品,为整车厂和零部件企业提供完整的研发、测试解决方案。从测试工具、专用测试设备、完整测试方案到实车测试服务,我们正在努力,让中国的汽车变得越来越安全、越来越舒适、越来越智能。
注:文中部分图片来源于Vector。