User`s guide
14 Block Reference
14-6
CAN Log
Log received CAN messages
Library
Vehicle Network Toolbox: CAN Communication
Description
The CAN Log block logs CAN messages from the CAN network or messages sent to the
blocks input port to a .mat file. You can load the saved messages into MATLAB for
further analysis or into another Simulink model.
Note: If your model uses a National Instruments device, you cannot connect CAN
Receive block and CAN Log to the same channel on the device.
You cannot connect a channel on a National Instruments device to more than one block.
Configure your CAN Log block to log from the Simulink input port. Refer to the Basic
CAN Message Replay and Logging example for more information.
The Log block appends the specified filename with the current date and time, creating
unique log files for repeated logging.
If you want to use messages logged using Simulink blocks in the MATLAB Command
window, use canMessage to convert messages to the correct format. Refer to the Basic
CAN Message Replay and Logging example for information.
Note: You need a license for both Vehicle Network Toolbox and Simulink software to use
this block.