receive
Receive messages from CAN bus
Description
returns a timetable of CAN messages received on the CAN channel
message = receive(canch,numMsgs,OutputFormat="timetable")canch. The number of messages returned is less than or equal
to numMsgs. If fewer messages are available than
numMsgs specifies, the function returns the currently
available messages. If no messages are available, the function returns an empty
array. If numMsgs is Inf, the function returns
all available messages. Incoming available messages are retained in a FIFO buffer,
so that receive returns the oldest available message
first.
To understand the elements of a message, refer to canMessage.
The OutputFormat option value of "timetable"
specifies that results are returned in a timetable of messages, rather than as
message objects. This output format is recommended for optimal performance and
representation of CAN messages in MATLAB®.
returns an array of CAN message objects instead of a timetable if the channel
message = receive(canch,numMsgs)ProtocolMode is 'CAN'. If the channel
ProtocolMode is 'CAN FD' the
receive function always returns a timetable.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2009a