This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

Basic CAN Communication

Configure CAN hardware; send and receive messages on network

Hardware connection functions define a connection to a CAN interface hardware that establishes a physical connection to a CAN bus. The CAN Transmit Workflow shows how to pack and transmit CAN messages with MATLAB®. You can also employ event-based message transmission; load and replay messages. The CAN Receive Workflow shows how to receive and unpack CAN messages.

With Simulink® you can build models with the CAN blocks to transmit and receive messages on the network.


canChannelListInformation on available CAN devices
canChannelConstruct CAN channel connected to specified device
discardDiscard all messages from CAN channel
configBusSpeedSet bit timing rate of CAN channel
canTool Open Vehicle CAN Bus Monitor
canSupportGenerate technical support log
canMessageBuild CAN message based on user-specified structure
packPack signal data into CAN message
startSet CAN channel online
transmitSend CAN messages to CAN bus
replayRetransmit messages from CAN bus
transmitConfigurationDisplay messages configured for automatic transmission
transmitEventConfigure messages for event-based transmission
transmitPeriodicConfigure messages for periodic transmission
receiveReceive messages from CAN bus
attachDatabaseAttach CAN database to messages and remove CAN database from messages
stopSet CAN channel offline
unpackUnpack signal data from CAN message
extractAllSelect all instances of CAN message from message array
extractRecentSelect most recent CAN message from array of messages
extractTimeSelect CAN messages occurring within specified time range
canMessageImport Import CAN messages from third-party log file
canSignalImportImport CAN log file into decoded signal timetables
canMessageTimetableConvert CAN messages into timetable
canSignalTimetableCreate CAN signal timetable from CAN message timetable


BusLoadLoad on CAN bus
DatabaseStore CAN database information
OnboardTerminationConfigure bus termination on device
RunningDetermine status of channel
SilentModeSpecify if channel is active or silent
StartTriggerTerminalSpecify start trigger source terminal
TransceiverNameName of device transceiver
TransceiverStateDisplay state or mode of transceiver
UserDataEnter custom data
DeviceDisplay channel device type
Device(NI)Display NI CAN channel device type
DeviceChannelIndexDisplay device channel index
DeviceSerialNumberDisplay device serial number
DeviceVendorDisplay device vendor name
InitializationAccessDetermine control of device channel
BusSpeedBit rate of bus
NumOfSamplesDisplay number of samples available to channel
SJWSynchronization jump width (SJW) of bit time segment
TSEG1Display amount that channel can lengthen sample time
TSEG2Display amount that channel can shorten sample time
DataCAN message or J1939 parameter group data
DatabaseStore CAN database information
ErrorCAN message error frame
ExtendedIdentifier type for CAN message
IDIdentifier for CAN message
Name (CAN)CAN message name
RemoteSpecify CAN message remote frame
SignalsPhysical signals defined in CAN message or J1939 parameter group
UserDataEnter custom data
MessageReceivedFcnSpecify function to run
MessageReceivedFcnCountSpecify number of messages available before function is triggered
MessagesAvailableDisplay number of messages available to be received by CAN channel
MessagesReceivedDisplay number of messages received by CAN channel
MessagesTransmittedDisplay number of messages transmitted by CAN channel
InitialTimestampIndicate when channel started
Timestamp (CAN)Display message received timestamp
ReceiveErrorCountDisplay number of received errors detected by channel
TransmitErrorCountDisplay number of transmitted errors by channel


Vehicle CAN Bus MonitorMonitor vehicle CAN bus message traffic


CAN ConfigurationConfigure parameters for specified CAN device
CAN PackPack individual signals into CAN message
CAN TransmitTransmit CAN message to selected CAN device
CAN ReplayReplay logged CAN messages
CAN ReceiveReceive CAN messages from specified CAN device
CAN UnpackUnpack individual signals from CAN messages
CAN LogLog received CAN messages


Programmatic Workflow

Transmit and Receive CAN Messages

Discover CAN devices and communicate over a network.

Filter Messages

Set up filters to accept messages based on specified parameters.

Configure Silent Mode

Observe and analyze message activity without affecting the network state or behavior.

Multiplex Signals

Use multiplexing to represent multiple signals in one signal location in a CAN message’s data.

Tools Workflow

Vehicle CAN Bus Monitor

Explore the Vehicle CAN Bus Monitor.

Using the Vehicle CAN Bus Monitor

Select a CAN device and channel; view, filter, and save messages.

Model Workflow

Build CAN Communication Simulink Models

Examples of using Vehicle Network Toolbox™ blocks.

Was this topic helpful?