Skip to Main Content Skip to Search
Product Documentation

configBusSpeed - Set bit timing rate of CAN channel

Syntax

configBusSpeed(canch, busspeed)
configBusSpeed(canch, busspeed, sjw, tseg1, tseg2, numberofsamples)

Description

configBusSpeed(canch, busspeed) sets the speed of the CAN channel in a direct form that uses baseline bit timing calculation factors.

configBusSpeed(canch, busspeed, sjw, tseg1, tseg2, numberofsamples) sets the speed of the CAN channel canch to busspeed using the specified bit timing calculation factors to control the timing in an advanced form.

Tips

Input Arguments

canch

The CAN channel object that you want to set the bit timing rate for.

busspeed

The user-specified bit timing rate for the specified object.

sjw

The synchronization jump width. This value is the maximum value of time bit adjustments.

tseg1

The length of time at the start of the sample point within a bit time.

tseg2

The length of time at the end of the sample point within a bit time.

numberofsamples

The specified count of bit samples used.

Examples

To configure the bus speed using baseline bit timing calculation, type:

canch = canChannel('Vector','CANCaseXL 1',1)
configBusSpeed(canch,250000)

To specify the bit timing calculations, type:

canch = canChannel('Kvaser', 'USBcan Professional 1', 1)
configBusSpeed(channel, 500000, 1, 4, 3, 1)

See Also

canChannel

  


Recommended Products

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