English Page  German Page

CANbus Toolset

CANbus Access Tools Extension for Matlab and Simulink® on PCs

CANusb BoxThe CANbus Toolset enables the user to access, influence and monitor the data flow on the Canbus in realtime, directly from Matlab and/or from the Simulink simulation environment. Easy- to-use Canbus read and write functions integrate seemlessly into Matlab and easy-to-use Canbus read and write blocks integrate seamlessly into Simulink.

Find more in our DataSheet area.

CANbus Toolset Application Areas

The CANbus Toolset allows:

Highlights of The CANbus Toolset

CANcard 2Access Steps in Matlab

Basically there is four functions which may be called from the Matlab command level or from a Matlab program:

  1. initialization
  2. read from the Canbus
  3. write to the Canbus
  4. stop the access to the hardware

Access and Modeling Steps in Simulink

There are four simple steps to access the CANbus via the CANbus Toolset:

1. Define all “To CANbus” activities

In order to make modeling in Simulink easy, the CANbus Toolset provides a definition menu (shown below). All signals are defined with respect to the CANbus identifier, the bits carrying the information, and a Simulink access name (SAN). The user defines the bits and the byte orientation information only once. These hardware-oriented details can thereafter be ignored while building the Simulink model and running the simulation. The simulation model simply writes to the CANbus via a user-defined variable name.


So in the above example, Identifier 3ba has 3 signals defined. Signal 1 uses bits 0 to 7, signal 2; bit 10, and signal 3 bits 22 to 25. By clicking on the "Define signal(s)" pushbutton, You are able to see and change the details of all the signals from the selected identifier, as shown below.

CANbus Signal

2. Build the Simulink model

The Simulink model contains CANbus-specific blocks taken from the CANbus Toolset block library. This library consists of five blocks:

CANbus Simulink Model

3. Define all “Canbus Read” and “Canbus Write” activities

CANbus read and write functionality are provided by the FromCAN Block and ToCAN Block respectively. These blocks allow you to select signals defined in step 1.

4. Run the simulation

Now you are ready to start the real-time simulation. The model shown below reads from and writes data to the CANbus and visualizes signals via the standard Simulink scope block.

CANbus Example

Prerequisites for CANbus Access

Special hardware is required in order to use the CANbus Toolset functionality.

For example, the CANCard software and PCMCIA card, from Softing GmbH or Vector Informatik GmbH, may be used to couple a laptop computer running Simulink to the CANbus, enabling Simulink to access CANbus data. If the Canbus shall be linked to the computer via USB based Canbus hardware, the CANbus Toolset supports up to 10 channels at the same time. Please contact ExpertControl for further details.

Templates are also provided to enable the user to customize the CANbus Toolkit to access CANbus hardware made by other manufacturers.

Supported development environment

CANbus ToolsetTM is a trademark of ExpertControl GmbH, Germany. MATLAB, Simulink, and Real-Time Workshop are trademarks or registered trademarks of The MathWorks, Inc., U.S.A.