Help Center
Configure bit timing of J1939 channel
configBusSpeed(chan,busspeed)
configBusSpeed(chan,busspeed,SJW,TSeg1,TSeg2,numsamples)
configBusSpeed(chan,busspeed) sets the speed of the J1939 channel chan to busspeed in a direct form that uses default bit timing calculation factors.
chan
busspeed
Note
You can set bit timing only when the channel is offline and has initialization access to the device.
example
configBusSpeed(chan,busspeed,SJW,TSeg1,TSeg2,numsamples) sets the speed of the channel using specified bit timing calculation factors.
SJW
TSeg1
TSeg2
numsamples
Unless you have specific timing requirements provided for your network, you should use the direct form of the function.
collapse all
Use the direct form of syntax to configure a J1939 channel bus speed.
db = canDatabase('MyDatabase.dbc'); chan = j1939Channel(db,'Vector','CANCaseXL 1',1); configBusSpeed(chan,250000)
Use the advanced form of syntax to configure a J1939 channel bus speed with specific calculation factors.
db = canDatabase('MyDatabase.dbc'); chan = j1939Channel(db,'Vector','CANCaseXL 1',1); configBusSpeed(chan,500000,1,4,3,1)
J1939 channel, specified as a channel object. Use the j1939Channel function to create and define the channel.
j1939Channel
Bit rate for channel, specified as a double. Provide the speed of the network in bits per second.
Example: 250000
250000
Data Types: double
double
Synchronization Jump Width, specified as a double. Define the length of a bit on a network.
Time segment 1, specified as a double, which defines the section before a bit is sampled on a network.
Time segment 2, specified as a double, which defines the section after a bit is sampled on a network.
Number of samples for bit state, specified as a double. Specify the number of samples used for determining the bit state of a network.
Introduced in R2015b
start
stop
transmit
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
Europe
Asia Pacific
Contact your local office