CAN Baud Select

This MotoHawk™ block selects the bit timing of a CAN bus at runtime.

Block ID

CAN Baud Select

Library

MotoHawk_lib/CAN Blocks

Description

This MotoHawk™ block works with the MotoHawk CAN Definition block in order to select the indicated CAN Bus' Baudrate at runtime.

In order to use this block, the CAN Reference Name parameter must be configured to match the Name parameter of a MotoHawk CAN Definition block in the model.

The MotoHawk CAN Definition block must be configured for 'Custom' Bit Timing and each Bit Timing parameter must be reference via named data store.

This block will assign bit timing parameters to the linked data stores based upon the input port. The input port values may be one of 0, 1, or 2 to select 250 KBaud, 500 KBaud and 1000 KBaud, respectively.

This block can be considered an example, and may be futher extended by the end user, should additional (or different) baud rate speeds be required. This block contains MotoHawk Data Store Definition blocks in order to set the default bit timing parameters correctly on the first application boot. The application designer may delete (or relocate) the data definifion blocks as needed.

The Block Initialization Script Name can be changed if the example needs further customization. It is recommended to make a copy of 'motohawk_can_baud_select_initmask.m' with a different name to the local Simulink project. Change the Block Initialization Script Name accordingly and implement the needed customizations.

Block Parameters

Parameter Field Values Comments/Description
CAN Reference Name Alpha-numeric text, single-quote enclosed Name of CAN definition. Should be unique and C-legal (no special characters such as spaces, dashes, commas, though underscore allowed.)