Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

configBusSpeed (J1939)

Configure bit timing of J1939 channel

Syntax

configBusSpeed(chan,busspeed)
configBusSpeed(chan,busspeed,SJW,TSeg1,TSeg2,numsamples)

Description

example

configBusSpeed(chan,busspeed) sets the speed of the J1939 channel chan to busspeed in a direct form that uses default bit timing calculation factors.

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.

Note

Unless you have specific timing requirements provided for your network, you should use the direct form of the function.

Examples

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)

Input Arguments

collapse all

J1939 channel, specified as a channel object. Use thej1939Channel function to create and define the channel.

Bit rate for channel, specified as a double. Provide the speed of the network in bits per second.

Example: 250000

Data Types: double

Synchronization Jump Width, specified as a double. Define the length of a bit on a network.

Data Types: double

Time segment 1, specified as a double, which defines the section before a bit is sampled on a network.

Data Types: double

Time segment 2, specified as a double, which defines the section after a bit is sampled on a network.

Data Types: double

Number of samples for bit state, specified as a double. Specify the number of samples used for determining the bit state of a network.

Data Types: double

See Also

Functions

Introduced in R2015b

Was this topic helpful?