Documentation Center

  • Trial Software
  • Product Updates

transmit

Send CAN messages to CAN bus

Syntax

transmit(canch, message)

Description

transmit(canch, message) sends the array of messages onto the bus via the CAN channel.

To understand the elements of a message, refer to canMessage.

Input Arguments

canch

The CAN channel that you specify to transmit the message.

message

The message or an array of messages that you specify to transmit via a CAN channel.

Examples

message = canMessage (250, false, 8)
message.Data = ([45 213 53 1 3 213 123 43])
canch = canChannel('Vector','CANCaseXL 1', 1)
start(canch)
transmit(canch, message)

To transmit an array, construct message1 and message2 as in this example, and type:

transmit(canch, [message, message1 message2])

To transmit messages on a remote frame, type:

message = canMessage (250, false 8, true)
message.Data = ([45 213 53 1 3 213 123 43])
message.Remote = true
canch = canChannel('Vector','CANCaseXL 1', 1)
start(canch)
transmit(canch, message)

More About

expand all

Tips

The Transmit function ignores the Timestamp property and the Error property.

See Also

| |

Was this topic helpful?