Overview of Lesson 6

Basics

Real-Time Testing provides the following Python modules to implement CAN communication via Real‑Time Testing:

  • rttlib.dscanapilib

  • rttlib.canlib

In this lesson, you will use the rttlib.canlib module. If you are interested in using the rttlib.dscanapilib module, refer to Lesson 5: Implementing CAN Communication with the rttlib.dscanapilib Module.

rttlib.canlib module

The rttlib.canlib module can be used if the CAN communication of a Simulink model is implemented via the RTI CAN MultiMessage Blockset. The blockset lets you specify experimental messages. The rttlib.canlib module uses these experimental messages to send and receive CAN messages in raw data format.

The rttlib.canlib module contains all classes and methods which are necessary for handling CAN messages. The rttlib.canlib module supports CAN and CAN FD messages in the standard or extended format.

Supported simulation platforms

You can use the rttlib.canlib module on the following simulation platforms:

  • MicroAutoBox II

  • MicroLabBox

A hardware platform must have an I/O board or module with CAN controller.

Used simulation platform

Note

As of dSPACE Release 2025‑A, you can no longer use the rttlib.canlib module on SCALEXIO systems. The support of the RTI CAN MultiMessage Blockset for SCALEXIO was removed.

This lesson uses the rttlib.canlib module on a SCALEXIO system, which is no longer supported. Instead, you can use one of the other supported platforms to implement CAN communication via the rttlib.canlib module. If you do this, the build process of the simulation application deviates from the instructions described.


What you will learn

In this lesson, you will learn how to implement CAN communication via Real‑Time Testing using the rttlib.canlib module:

  • You will learn how to adapt a Simulink model to make it RTT-capable.

  • You will learn how to build a real-time application for a SCALEXIO system with ConfigurationDesk.

  • You will learn how to write an RTT sequence to transmit and receive CAN messages via Real‑Time Testing.


Required knowledge

Basic knowledge in handling ConfigurationDesk is assumed.


Steps


Result and further information

To check the learning results of the steps you executed and for further information, refer to Result of Lesson 6.


Duration

Working through this lesson will take you about 30 minutes.


Redaction