Main Content

CAN FD Configuration

Configure parameters for specified CAN FD device

  • CAN FD Configuration block

Libraries:
Vehicle Network Toolbox / CAN FD Communication

Description

The CAN FD Configuration block configures parameters for a CAN FD device that you can use to transmit and receive messages.

Specify the configuration of your CAN FD device before you configure other CAN FD blocks.

Use one CAN FD Configuration block to configure each device that sends and receives messages in your model. If you use a CAN FD Receive or a CAN FD Transmit block to receive and send messages on a device, your model checks to see if there is a corresponding CAN FD Configuration block for the specified device.

Note

You need a license for both Vehicle Network Toolbox™ and Simulink® software to use this block.

Other Supported Features

The CAN FD Configuration block supports the use of Simulink accelerator mode. Using this feature, you can speed up the execution of Simulink models. For more information, see Acceleration (Simulink).

Examples

Parameters

expand all

Select the CAN FD device and a channel on the device that you want to use from the list. Use this device to transmit and/or receive messages. The device driver determines the default bus speed.

Programmatic Use

Block Parameter: Device
Type: character vector, string

Set arbitration bus speed for the selected device, in bits per second. The default speed is assigned by the selected device.

Programmatic Use

Block Parameter: ArbitrationBusSpeed
Type: character vector, string
Values: integer

Set data bus speed for the selected device, in bits per second. The default speed is assigned by the selected device.

Programmatic Use

Block Parameter: DataBusSpeed
Type: character vector, string
Values: integer

(PEAK-System only.) Set the bus frequency, in megahertz.

Programmatic Use

Block Parameter: BusFrequency
Type: character vector, string
Values: numeric

(PEAK-System only.) Set separate bit rate prescaler values for arbitration and data bit rates.

Programmatic Use

Block Parameter: ArbitrationPrescaler, DataPrescaler
Type: character vector, string
Values: integer

For Vector and PEAK-System devices, the next three parameters are available in two sets for manually setting bit parameters for data and arbitration bus speeds. For more information on these parameters, see Bit Timing.

Specify the maximum limit of bit time adjustment in the case of resynchronization. The specified value must be a positive integer indicating a number of bit time quanta segments. If you do not specify a value, the selected bus speed setting determines the default value.

Programmatic Use

Block Parameter: ArbitrationSJW, DataSJW
Type: character vector, string
Values: integer

Specify the number of bit time quanta before the sampling point. The specified value must be a positive integer. Typically, an adjustment of this value is made with a corresponding inverse adjustment to Time segment 2 so that their sum remains constant. If you do not specify a value, the selected bus speed setting determines the default value.

Programmatic Use

Block Parameter: ArbitrationTSEG1, DataTSEG1
Type: character vector, string
Values: integer

Specify the number of bit time quanta after the sampling point. The specified value must be a positive integer. Typically, an adjustment of this value is made with a corresponding inverse adjustment to Time segment 1 so that their sum remains constant. If you do not specify a value, the selected bus speed setting determines the default value.

Programmatic Use

Block Parameter: ArbitrationTSEG2, DataTSEG2
Type: character vector, string
Values: integer

If you have altered the bit parameter settings, click this button to see if your settings are valid. The block runs a check to see if the combination of your bus speed settings and the bit parameter values form a valid value for the device. If the new bit parameter values do not form a valid combination, the verification fails and displays an error message.

Programmatic Use

None

Specify whether the channel is in Normal or Silent mode. By default Acknowledge mode is Normal. In this mode, the channel both receives and transmits messages normally and performs other tasks on the network such as acknowledging messages and creating error frames. To observe all message activity on the network and perform analysis, without affecting the network state or behavior, select Silent. In Silent mode, you can only receive messages and not transmit.

Programmatic Use

Block Parameter: AckMode
Type: character vector, string
Values: 'Normal' | 'Silent'
Default: 'Normal'

Extended Capabilities

Version History

Introduced in R2018a