Documentation

This is machine translation

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

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

canMessageReplayBlockStruct

Convert CAN messages for use as CAN Replay block output

Syntax

msgstructofarrays = canMessageReplayBlockStruct(msgs)

Description

example

msgstructofarrays = canMessageReplayBlockStruct(msgs) formats specified CAN messages for use with the CAN Replay block. The CAN Replay block requires a specific format for CAN messages, defined by a structure of arrays containing the ID, Extended, Data, and other message elements.

Use this function to assign the formatted message structure to a variable. Then save this variable to a MAT-file. The CAN Replay block mask allows selection of this MAT file and the variable within it, to define the messages to replay in a Simulink® model.

Examples

collapse all

Create a message structure for the CAN Replay block, and save it to a MAT-file.

canMsgs = canMessageReplayBlockStruct(messages);
save('ReplayBlockMessages.mat','canMsgs');

Input Arguments

collapse all

Original CAN messages, specified as a CAN message timetable or an array of CAN message objects.

Output Arguments

collapse all

Formatted CAN messages, returned as structure of arrays containing the ID, Extended, Data, and other elements of the messages.

See Also

Functions

Blocks

Introduced in R2017a

Was this topic helpful?