Configure messages for event-based transmission
Configure a channel with an event-based message.
Construct a CAN channel and configure a message on the channel.
canch = canChannel('MathWorks','Virtual 1',1); msg = canMessage(200,false,4);
Enable the message for event-based transmit, start the channel, and pack the message to trigger the event-based transmit.
transmitEvent(canch,msg,'On'); start(canch); pack(msg,int32(1000),0,32,'LittleEndian')
canch— CAN channel
CAN channel, specified as a CAN channel object. This is the channel by which you access the CAN bus, and the channel on which the specified message is enabled for event-based transmit.
msg— Message to transmit
Message to transmit, specified as a CAN message object or array of message objects. This is the message enabled for event-based transmission on the specified CAN channel.
state— Enable event-based transmission
Enable event-based transmission, specified as