What Is CAN Bus?
Learn how a Controller Area Network Bus (CAN Bus) operates as well as its applications in different industries. This video covers how a CAN Bus connects nodes and ECUs in a single system and the specific protocols that define different CAN operations. It also highlights how traditional CAN differs from CAN Flexible Data Rate (CAN FD). You can use MATLAB®, Simulink®,以及车辆网络工具箱™直接与您的罐头总线接口并开发以下应用程序:
- Support hardware manufacturers such as Kvaser, NI®, PEAK-System, and Vector
- Collect raw CAN data, process the data using DBC files, and visualize the results in a single environment
- 利用罐头工具在应用程序中直接与您的CAN BUS合作,而无需编写MATLAB代码
- 实施更高级别的协议,例如XCP和J1939,以定义特定应用程序操作
- Convert into C or C++ code and deploy to embedded targets
Controller Area Network, also known as CAN bus, is a standard messaging protocol that allows microcontrollers and devices to communicate with each other. CAN bus was originally designed to address wiring complexity challenges in the automobile industry, but its use has spread to other areas such as industrial automation, aerospace, and more. Nowadays, you can find CAN bus used in a variety of applications such as passenger vehicles, heavy trucks, medical equipment, and elevators.
MATLAB,S金宝appIMULINK和车辆网络工具箱提供功能,块和应用程序,以与CAN Buses的数据接口并检索数据。
CAN Bus is the system that connects nodes and electronic control units, or ECUs, in a vehicle network system. The CAN bus provides a low-level interface that allows ECUs to communicate directly with each other through a simple serial bus.
CAN FD, or Controller Area Network Flexible Data-Rate, is a protocol that builds upon CAN. The main difference between CAN and CAN FD is that the Flexible Data Rate in CAN FD allows for higher data throughput on the bus. For comparison, the maximum CAN frame is 8 bytes, while the maximum CAN FD frame is 64 bytes.
CAN和CAN FD由于其低成本,分散网络系统,效率和节点灵活性而具有优势。
Higher level protocols such as J1939 or XCP define communication systems on top of the CAN bus that define operations for specific applications, such as heavy vehicles for J1939 and vehicle calibration for XCP. Raw data from a CAN bus can extracted and decoded into protocol specific information using a CAN Database File, or DBC.
MATLAB和SIMU金宝appLINK金宝app支持可以从Kvaser,National Instruments,Peak-System和Vector等制造商的巴士接口。车辆网络工具箱支持可以通过USB,PCI,PCI金宝app-Express,PXI和PCMCIA直接连接到PC的总线接口。
Vehicle Network Toolbox provides Simulink blocks for generating C or C++ code from your CAN bus workflow. Certain blocks such as CAN and CAN FD Pack and Unpack support code generation for embedded targets. You can also generate code for custom targets through the documented Pack/Unpack interfaces.
车辆网络工具箱以及MATLAB和SIMULINK旁边提供了一个单个环境,可以在跨职能工程工作金宝app流程中进行通信和分析CAN和FD数据。您可以使用虚拟罐或FD通道直接从CAN BUS收集RAW CAN和可以直接从MATLAB传输ECU数据的FD数据。收到罐头数据后,您可以将原始数据解开并将其解码为CAN消息。您可以使用MATLAB或SIMULINK算法存储CAN消息日志或对其进行处理,并可视化结果。金宝app
车辆CAN BUS监视器提供了直接的接口来可视化CAN和可以使用FD通道流量,而无需编写MATLAB代码。使用Interactive Can工具,您可以在罐头或罐头通道上查看原始数据,并配置罐头总线以过滤感兴趣的消息。您还可以将DBC文件导入罐头工具,以解码并直接查看消息信号信息。一旦隔离了所有感兴趣的消息,就可以将CAN BUS数据保存并导出到MATLAB中的记录文件。
For more information about using the CAN bus from MATLAB or Simulink, explore the Vehicle Network Toolbox product page. You can also explore the MATLAB documentation for examples on how to get started using the CAN bus.
Related Products
Featured Product
Vehicle Network Toolbox
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:.
You can also select a web site from the following list:
如何获得最佳网站性能
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- AméricaLatina(Español)
- Canada(English)
- United States(English)
欧洲
Asia Pacific
- Australia(English)
- India(English)
- 新西兰(English)
- 中国
- 日本Japanese(日本語)
- 한국Korean(한국어)