The toolbox is a collection of functions built on the MATLAB® technical computing environment.
You can use the toolbox to:
Vehicle Network Toolbox™ provides host-side CAN connectivity using defined CAN devices. CAN is the predominant protocol in automotive electronics by which many distributed control systems in a vehicle function.
For example, in a common design when you press a button to lock the doors in your car, a control unit in the door reads that input and transmits lock commands to control units in the other doors. These commands exist as data in CAN messages, which the control units in the other doors receive and act on by triggering their individual locks in response.
You can use Vehicle Network Toolbox to communicate over the CAN bus using supported Vector, Kvaser, PEAK-System, or National Instruments® devices and drivers.
See Vehicle Network Toolbox Supported Hardware for more information.
Using a set of well-defined functions, you can transfer messages between the MATLAB workspace and a CAN bus using a CAN device. You can run test applications that can log and record CAN messages for you to process and analyze. You can also replay recorded sequences of messages.
With Vehicle Network Toolbox block library and other blocks from the Simulink® library, you can create sophisticated models to connect to a live network and to simulate message traffic on a CAN bus.
Vehicle Network Toolbox is a conduit between MATLAB and the CAN bus.
In this illustration:
Six CAN modules are attached to a CAN bus.
One module, which is a CAN device, is attached to the Vehicle Network Toolbox, built on the MATLAB technical computing environment.
Using Vehicle Network Toolbox from MATLAB, you can configure a channel on the CAN device to:
Transmit messages to the CAN bus.
Receive messages from the CAN bus.
Trigger a callback function to run when the channel receives a message.
Attach the database to the configured CAN channel to interpret received CAN messages.
Use the CAN database to construct messages to transmit.
Log and record messages and analyze them in MATLAB.
Replay live recorded sequence of messages in MATLAB.
Build Simulink models to connect to a CAN bus and to simulate message traffic.
Vehicle Network Toolbox is a comprehensive solution for CAN connectivity in MATLAB and Simulink. Refer to the Functions and Simulink Blocks for more information.
The Vehicle Network Toolbox document set assumes that you are familiar with these products:
MATLAB — To write scripts and functions, and to use functions with the command-line interface.
Simulink — To create simple models to connect to a CAN bus or to simulate those models.
Vector CANdb — To understand CAN databases, along with message and signal definitions.