CAN Receive Slot Properties Set

This MotoHawk™ block adjusts the properties of a CAN receive slot at run time.

Block ID

CAN Receive 

Library

MotoHawk_lib/CAN Blocks

Description

 

This block is typically useful when the user does not exactly know at build time for which message ID the CAN receive block will look.

This block is intended to be used in conjunction with the MotoHawk Read CAN Message or CAN Raw Read blocks to allow adjustment of that block’s receive mask during runtime (on a module), by attaching Calibration blocks to the inputs of this block. In the CAN receive blocks, the user can define a slot name which the Slot Properties block must reference. The Slot Properties block can then be used to adjust which messages the associated CAN receive block will receive.

NOTE: The CAN receive blocks also contain fields that define message masks. The mask specified in Slot Properties block is applied after the mask defined in the respective CAN receive block, so the Slot Properties block can only make the masks more restrictive.

ID – This value is used in conjunction with the ID Mask to form a filter that only allows certain messages to be received. This field can be entered in either decimal format directly or in hex format by using the function hex2dec() with the ID as the argument (e.g. hex2dec('18FEE300')).

ID Mask - This specifies which parts of the received message's ID must exactly match the ID specified. For example, if the ID fed into the block is hex2dec('18FEE300') and the Mask is specified as hex2dec('00FFFF00') then the block will only receive messages with ID's of xxFEE3xx, where xx denotes the only parts of the ID allowed to vary. It is helpful to envision this relationship in binary, where a 1 bit in the mask means that the corresponding bit in the received message must match the bit value specified in the ID and a 0 bit in the mask means that the corresponding bit in the received message can be either 1 or 0.

Payload Value - This field can be used in conjunction with the Payload Mask to perform message filtering using the payload contents in the same manner as described for ID filtering. In this case, the payload is a vector of 8 bytes, so the value must be entered in the form [value1 value2 ... value8], where each element represents the value you wish the block to look for.

Payload Mask - This field specifies which parts of the received message's payload must exactly match the Payload specified.

Block Parameters

Parameter Field Values Comments/Description
Reference Slot Name Alpha-numeric text, single-quote enclosed Reference to Slot to adjust. Match a slot name defined in the CAN Read block. No special characters, such as spaces, dashes, commas (underscore allowed).
Use ID Filter Check Box (enable) Enable to adjust the value of the ID used to filter the messages
Use Payload Filter Check Box (enable) Enable to adjust the value of the Payload used to filter the message.