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.


CAN message or J1939 parameter group data


Use the Data property to define your message data in a CAN message or parameter group data in a J1939 parameter group.



CAN message, J1939 parameter group

Read only


Data type



The data value is a uint8 array, based on the data length you specify in the message.


Specify CAN Message Data

Create a CAN message and load data into a message.

message = canMessage(2500, true, 4)
message.Data = [23 43 23 43 54 34 123 1]

If you are using a CAN database for your message definitions, change values of the specific signals in the message directly.

You can also use the pack function to load data into your message.

Specify J1939 Parameter Group Data

Create a parameter group and specify data.

pg = j1939ParameterGroup(db, 'PackedData')
pg.Data(1:2) = [50 0]

See Also


canMessage, pack