Configuring the CAN Bus
To enable
-
Use the J1939CONFIG command to specify J1939 NAME and desired address.
This step is optional and only required if the default NAME parameters are to be changed.
-
Use the CANCONFIG command to place the receiver on bus.
-
Optionally, use the J1939STATUS log to monitor CAN status on the receiver.
Configuration Notes
-
The J1939CONFIG and CANCONFIG commands can be entered in any order. After the CANCONFIG command is used to place the receiver on the CAN bus, J1939CONFIG commands take effect immediately. Until then, J1939CONFIG can be entered many times to change the settings because they have not taken affect yet (the receiver is not yet on the bus).
-
The J1939 Address claim procedure is executed if and only if both J1939CONFIG NODEx CANx and CANCONFIG CANx ON are entered.
-
Use J1939STATUS log to determine the receiver's CAN status and the actual address claimed by a particular node.
-
Once the receiver is "on bus", it must be taken "off-bus" using CANCONFIG for any further configuration changes using J1939CONFIG.
-
The receiver is fully "on-bus" only once the J1939 address has been successfully claimed. This is reported as "CLAIMED" status by J1939STATUS log.
-
No messages will be sent or received until the receiver is "online" and an address is claimed. Outgoing messages are not buffered; they are discarded until the receiver is online.
Example of Enabling the CAN Bus
-
LOG J1939STATUS ONCHANGED
-
J1939CONFIG NODE1 CAN1 <addresses>
-
CANCONFIG CAN1 ON 250K
-
SAVECONFIG
< J1939STATUS NODE1 DISABLED 0 0xFE
< J1939STATUS NODE1 CLAIMING 1 <address>
< J1939STATUS NODE1 CLAIMED <attempt count> <address>
Example of Modifying the CAN Bus Parameters
-
LOG J1939STATUS ONCHANGED
-
CANCONFIG CAN1 OFF
-
J1939CONFIG NODE1 CAN1 <addresses>
-
CANCONFIG CAN1 ON
-
SAVECONFIG
< J1939STATUS NODE1 DISABLED 0 0xFE
< J1939STATUS NODE1 CLAIMING 1 <address>
< J1939STATUS NODE1 CLAIMED <attempt count> <address>
Example of Detecting an Address Claim Failure and Reconfiguring
-
LOG J1939STATUS ONCHANGED
-
J1939CONFIG NODE1 CAN1 <addresses>
-
CANCONFIG CAN1 ON
< J1939STATUS NODE1 DISABLED 0 0xFE
< J1939STATUS NODE1 CLAIMING 1 <address>
< J1939STATUS NODE1 FAILED <attempt count> 0xFE
-
CANCONFIG CAN1 OFF
< J1939STATUS NODE1 DISABLED 0 0xFE
-
J1939CONFIG NODE1 CAN1 <addresses>
-
CANCONFIG CAN1 ON
< J1939STATUS NODE1 CLAIMING 1 <address>
< J1939STATUS NODE1 CLAIMED <attempt count> <address>
Address Claim Procedure
To become operational on the CAN bus,
While the device is attempting to claim an address, the J1939STATUS log reports a status of CLAIMING and automatically tries to claim the next allowed address. Depending on the J1939CONFIG parameters, an address different from the J1939CONFIG preferred address may be claimed or the address claim procedure can fail entirely. If no addresses could be claimed, a FAILED status is reported and the receiver takes no further action. To recover from this failure, take the receiver off bus using the CANCONFIG command and change the CAN address configuration using the J1939CONFIG command.
The address can also be assigned using J1939 Commanded Address message sent by another ECU on the bus, such as a tester unit. The commanded address always overrides the address specified using J1939CONFIG command. When the Commanded Address is received, the receiver reports a status of CLAIMING followed by CLAIMED. Restarting CAN using the J1939CONFIG command or CANCONFIG command clears the commanded address; the Address Claim procedure will be executed again based on parameters specified in the J1939CONFIG command.