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. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

canMessageBusType

Create Simulink CAN message bus

Syntax

canMessageBusType
canMessageBusType(modelName)

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

Introduced in R2017b