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.

discard

Discard all messages from CAN channel

Syntax

discard(canch)

Description

discard(canch) discards messages that are available to receive on the channel, canch.

Input Arguments

canch

CAN channel that you want to discard the messages from.

Examples

Set up a CAN channel to receive messages and discard the messages received by the channel.

Discard Messages Received by a CAN Channel

Create a CAN channel to receive messages and start the channel:

rxCh = canChannel('Vector','CANcaseXL 1',1);
start (rxCh)

Discard all messages in this channel:

discard(rxCh);

See Also

Introduced in R2012a

Was this topic helpful?