CAN FD Configuration

Configure parameters for specified CAN FD device

Library

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).

The CAN FD Configuration block supports the use of code generation when you use it with the CAN FD Receive and CAN FD Transmit blocks.

Parameters

Device

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.

Arbitration Bus speed

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

Data Bus speed

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

Bus frequency

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

Arbitration/Data bit rate prescaler

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

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.

Synchronization jump width

Specify the maximum value of the bit time adjustments. The specified value must be a positive integer. If you do not specify a value, the selected bus speed setting determine the default value.

Time segment 1

Specify the amount of bit time segments that the channel can lengthen the sample time. The specified value must be a positive integer. If you do not specify a value, the selected bus speed setting determines the default value.

Time segment 2

Specify the amount of bit time segments that the channel can shorten the sample time to resynchronize. The specified value must be a positive integer. If you do not specify a value, the selected bus speed setting determines the default value.

Verify bit parameter settings validity

If you have set the bit parameter settings separately, 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.

Acknowledge mode

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.

Notes

  • You cannot specify the mode if you are using NI virtual channels.

  • Use Silent mode only if you want to observe and analyze your network activity.

Introduced in R2018a