| Contents | Index |
Vehicle Network Toolbox: CAN Communication

The CAN Configuration block configures parameters for a CAN device that you can use to transmit and receive messages.
Specify the configuration of your CAN device before you configure other CAN blocks.
Use one CAN Configuration block to configure each device that sends and receives messages in your model. If you use a CAN Receive or a CAN Transmit block to receive and send messages on a device, your model checks to see if there is a corresponding CAN Configuration block for the specified device. If the device is not configured, you will see a prompt advising you to use a CAN Configuration block to configure the specified device.
The CAN Configuration block supports the use of Simulink Accelerator™ mode. Using this feature, you can speed up the execution of Simulink models.
For more information on this feature, see the Simulink documentation.
The CAN Configuration block supports the use of code generation when you use it with the CAN Receive and CAN Transmit blocks.
Use the Block Parameters dialog box to select your CAN device configuration.

Select the CAN 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.
Set the bus speed property for the selected device. The default bus speed is the default assigned by the selected device.
Select this check box to specify bit parameter settings manually. The bit parameter settings include:
Synchronization jump width, Time segment 1, Time segment 2, and Number of samples. If you do not select this option, the device automatically assigns the bit parameters depending on the bus speed setting.
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. To change this value, select the Enable bit parameters manually check box first. Refer to the SJW property for more information.
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. To change this value, select the Enable bit parameters manually check box first. Refer to the TSEG1 property for more information.
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. To change this value, select the Enable bit parameters manually check box first. Refer to the TSEG2 property for more information.
Specify the total number of samples available to this channel. The specified value must be a positive integer. If you do not specify a value, the selected bus speed setting determines the default value. To change this value, select the Enable bit parameters manually check box first. Refer to the NumOfSamples property for more information.
If you have set the bit parameter settings manually, click this button to see if your settings are valid. The block then runs a check to see if the combination of your bus speed setting and the bit parameter value forms a valid value for the CAN device. If the new bit parameter values do not form a valid combination, the verification fails and displays an error message.
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.

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |