主要内容

CAN Type

R2026b

CAN interface type

Model Configuration Pane: Hardware Implementation / Hardware board settings / Target hardware resources / Groups / CAN

Description

Specify whether the CAN interface represents a physical device or a virtual interface.

Dependencies

To enable this parameter, set Interface configuration to Specify via Simulink. To enable this parameter for additional interfaces, set Number of interfaces to a value greater than or equal to the interface number.

Settings

Real (default) | Virtual

Select the interface type.

Real (default)

Physical CAN bus interface connected to a CAN controller (such as MCP2518FD). The generated code uses ip link set type can commands to configure the interface with the specified bit rate parameters.

Virtual

Virtual CAN interface (vcan) for loopback testing. Messages transmitted on a virtual interface are immediately received on the same interface. No physical CAN hardware is required. The generated code uses ip link add type vcan to create the interface.

Recommended Settings

No recommendation.

Programmatic Use

No programmatic use is available.

Version History

Introduced in R2019b