CAN Over SPI Raw Send

This MotoHawk™ block allows a raw message to be rendered and sent on the named CAN Over SPI link.

Block ID

Send CAN Over SPI Raw

Library

motohawk_SPI_lib

Description

This MotoHawk™ block allows a raw message to be rendered and sent on the named CAN Over SPI link. Executing this block queues the message to be sent. It is a non-blocking, so the message may not have been sent when this block completes execution.

Inputs

ID (uint32)

The ID is used to implement a CAN like message ID. CAN supports a 29bit message ID and Standard and Extended message types. CAN Over SPI supports a 30 bit message ID. Thus Standard and Extendedmessage types could be encoded by using bit 30.

Length (uint8/uint16)

Defines the number of bytes from the Data port that shall be used in the message. The type is chosen to be large enough to handle the Max Number Message Bytes specified for the block.

Data (uint8(N])

A 1xN vector (where N is Max Number Message Bytes) of uint8 data that is to be sent. The Length signal specifies what data elements were used by the message.

Outputs

Was Queued (bool)

Optional port that indicates whether the request to send the data was successfully queued. Reports true if the message was queued for transmission and false otherwise.

A message that specifies a length that exceeds the Max Number Message Bytes for the message won't be queued. A message will also not be queued if there are already more messages pending transmission than there are queue entries.

Block Parameters

Parameter Field Values Comments/Description
Reference Name Alpha-numeric text, single-quote enclosed Specify the name of the CAN Over SPI link definition that the message is to be transmitted on.
Max Number Message Bytes Unsigned integer The maximum number of bytes that this message send block will ever need to send. This value can be less than the Message Byte Size defined for the link.
Show Queue Status Check box Check to expose a boolean output that will be true if the message was queued for transmission and false otherwise.