Main Content

canMessageBusType

Create Simulink CAN message bus

Description

example

canMessageBusType creates a Simulink® CAN message bus object named CAN_MESSAGE_BUS in the base workspace. The values of the object properties are read-only, but useful for showing the structure of its data.

canMessageBusType(modelName) creates a Simulink CAN message bus object of type CAN_MESSAGE_BUS in the data dictionary associated with the specified model, modelName.

Examples

collapse all

Create and view the properties of a Simulink CAN message bus object.

canMessageBusType
CAN_MESSAGE_BUS
CAN_MESSAGE_BUS = 

  Bus with properties:

    Description: ''
      DataScope: 'Auto'
     HeaderFile: ''
      Alignment: -1
       Elements: [7×1 Simulink.BusElement]

View the Elements properties.

CAN_MESSAGE_BUS.Elements
ans = 

  7×1 BusElement array with properties:

    Min
    Max
    DimensionsMode
    SampleTime
    Description
    Unit
    Name
    DataType
    Complexity
    Dimensions

Input Arguments

collapse all

Name of model, specified as a character vector or string, whose data dictionary is updated with the bus object.

Example: 'CANModel'

Data Types: char | string

Version History

Introduced in R2017b