Set bit timing rate of CAN channel
configBusSpeed(canch, busspeed, sjw, tseg1, tseg2, numberofsamples)
configBusSpeed(canch, busspeed) sets the
speed of the CAN channel in a direct form that uses baseline bit timing
configBusSpeed(canch, busspeed, sjw, tseg1, tseg2,
numberofsamples) sets the speed of the CAN channel
the specified bit timing calculation factors to control the timing
in an advanced form.
The CAN channel object that you want to set the bit timing rate for.
The user-specified bit timing rate for the specified object.
The synchronization jump width. This value is the maximum value of time bit adjustments.
The length of time at the start of the sample point within a bit time.
The length of time at the end of the sample point within a bit time.
The specified count of bit samples used.
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)
Unless you have specific timing requirements for your
CAN connection, use the direct form of
Also note that you can set the bus speed only when the CAN channel
is offline. The channel must also have initialization access to the
Synchronize all nodes on the network for CAN to work
successfully. However, over time, clocks on different nodes will get
out of sync, and must resynchronize.
the maximum width (in time) that you can add to
a slower transmitter), or subtract from
a faster transmitter) to regain synchronization during the receipt
of a CAN message.