Skip to content

CANBUS Configuration

Settings for CANBUS apply only to Controllers with a CANBUS interface installed. Further, the CANBUS Configuration may only be set using the CANBUS interface.

After changing settings, the Controller must be reset (via power cycle or RESET command) before the new settings will take effect.

Note: the examples in this section assume the Controller's CANBUS address is 0x80 while the Host device is 0x90. Different values must be substituted if your CANBUS network is designed differently.

Configuration Commands sent to the Controller should be formatted as follows:

Priority:       Any (0-7)
PGN:            0xEF00
Destination:    (Controller Device ID)
Source:         (Host Device ID)
Payload:
    Byte 0:     Function Code 0x49
    Byte 1:     Op Code
        Read: 0x43
        Write: 0x2B
    Byte 2:     Parameter to be accessed
    Byte 3:     Ignored
    Bytes 4-8:  Data (depends on Op Code)

Responses from the Controller will be formatted as follows:

Priority:       Same as incoming request
PGN:            Same as incoming request
Destination:    (Host Device ID)
Source:         (Controller Device ID)
Payload:
    Byte 0:     Success: Function Code 0x49
                Error: MSB set (0xC9)
    Byte 1:     Op Code: Same as incoming request
    Byte 2:     Parameter accessed
    Byte 3:     Ignored
    Bytes 4-8:  Data
        For Write: zeros
        For Read: contains the requested data

The examples on this page use a Host Device ID of 0x90, and a Controller address of 0x80. These values will vary according to the design of the CANBUS network.

Diagnostic Info

The following Parameters may be read from the controller for diagnostic purposes:

Parameter Description Value
0x01 System ID 2-byte little endian system identifier
0x02 Version 2-byte CAN software version (major.minor)
0x03 CAN Errors 1-byte, nonzero indicates that the Controller has detected multiple communication errors.

Example Read the System ID (0x1234)

Command:    10EF8090 49 43 01 00 00 00
Response:   10EF9080 49 43 01 00 12 34

Available Info and Settings

(0x02) Software Version Address

Parameter: 0x02
B0 B1 B2 B3 B4 B5 B6 B7
0x49 {OP} {Parameter} 0 0 0 Minor Version Major Version

Example

Read the version

Command:    10EF8090 49 43 02 
Response:   10EF9080 49 43 05 00 00 00 02 03  Version 3.02

(0x06) CANBUS Baud Rate

Parameter: 0x06
B0 B1 B2 B3 B4 B5 B6 B7
0x49 {OP} {Parameter} 0 Rate - - -

The Rate is an enumeration:

Rate Selected Baud Rate
0 125 Kb/s
1 250 Kb/s (default)
2 500 Kb/s
3 1 Mb/s

Example

Read the baud rate (250k)

Command:    10EF8090 49 43 06  
Response:   10EF9080 49 43 06 00 02 00 00 00

Write the baud rate (500K)

Command:    10EF8090 49 2B 06 00 02
Response:   10EF9080 49 2B 06 00 00 00 00 00

(0x07) TX Message Priority

Parameter: 0x07
B0 B1 B2 B3 B4 B5 B6 B7
0x49 {OP} {Parameter} 0 Priority - - -

The Priority determines the J1939 priority used by the Controller when sending messages. Messages with higher priority are less likely to be delayed. Adjusting this value allows the system designer to indicate which messages are most important within a given system.

Priority may be set to a value between 0 and 7 inclusive. Zero indicates the highest priority.

(0x08) Joystick Address

Parameter: 0x08
B0 B1 B2 B3 B4 B5 B6 B7
0x49 {Parameter} {ID} 0 Joystick Source Address PS Number - -

This setting identifies the address from which the Controller will accept a Joystick (throttle) message. For more information about the Joystick Message, see CANBUS Messages

Joystick Address is the one-byte address of the device which emits the Joystick message. If an incoming Joystick message does NOT contain a matching Source Address, it is ignored.

PS Number indicates the required PS field of the Joystick message. If an incoming Joystick message does NOT contain a matching PS, it is ignored.

Example

Read the Joystick Address (address=0xAE, PS=0x39)

Command:    10EF8090 49 43 08
Response:   10EF9080 49 43 08 00 AE 39 00 00

Joystick Options

Parameter: 0x09
B0 B1 B2 B3 B4 B5
0x49 {OP} {Parameter} 0 Flags LSB Flags MSB

Flags is a bitmapped value. The default value is 0x0070.

Bit If set to '1'
0x0001 Enable joystick message reception
0x0002 Use 2nd axis rather than 1st
0x0004 Reserved - Always set to 0
0x0008 Reserved - Always set to 0
0x0010 Enable Digital control commands.
0x0020 Enable Quick Stop when flow of digital throttle commands stops.
0x0040 Set Digital Throttle to zero when flow of digital throttle commands stops.
0x0080 Force stop if motor is running and no CAN commands are being received. This requires at least Bit 5 or 6 to be set. This is different than the two features above in that it takes action when the throttle is not zero or the quick stop is not engaged. This feature makes sure the motor stops on power up or anytime the motor is running without CAN control.
0x0100 Force Digital Control register 0x57 to be in control of throttle. This changes the shadow EEPROM value so that as long as digital throttle commands are being received they will take precedence over other throttle controls. If the power is cycled the value returns to its normal state. This mode allows analog throttle to be overridden if CAN 0x50 or 49 2B 16 commands are received. See Throttle Mode Control and EE Register 0x57 for more information.
0xFE00 Reserved

Examples

Read joystick setting

Command:    10EF8090 49 43 09
Response:   10EF9080 49 43 09 00 70 00 00 00  
Digital commands enabled and auto quick stop and auto throttle to 0 after commands stop.

Enable joystick, using 1st axis, and failband scaling, use digital commands, use quick stop

Command:    10EF8090 49 2B 09 00 31 00
Response:   10EF9080 49 2B 09 00 00 00

Set digital throttle to 0 when CAN throttle commands cease. Force controller to enable Digital Throttle when throttle commands start being received.

Command:    10EF8090 49 2B 09 00 05 01
Response:   10EF9080 49 2B 09 00 00 00

Status Message Configuration

Parameter: 0x14
B0 B1 B2 B3 B4
0x49 {OP} {Parameter} 0 MSG Enable Flags

MSG Enable Flags is a bitmapped value. All messages are enabled by default.

Bit Mask If set to '1'
0x01 Message FF00 Enabled
0x02 Message FF01 Enabled
0x04 Message FF02 Enabled
0x08 Message FF03 Enabled
0x10 Message FF04 Enabled
0x20 Message FF05 Enabled
0x40 Message FF06 Enabled
0x80 Reserved

Example

Enable Messages FF00 and FF05 only

Command:    10EF8090 49 2B 14 00 21 
Response:   10EF9080 49 2B 14 00 00