AnalogX

AnalogX CAN bus API

Overview

The CAN bus API provides the configuration and control interface for AnalogX

CAN base ID

CAN base ID is 0xE4600 (935424)

Adjusting Base ID

The base address is determined by the state of the ADR1 and ADR2 jumpers. By default, the jumpers are closed (bridged); the jumper can be opened by cutting the trace between the pads. To re-close the jumper, add a small amount of solder to bridge the gap between the pads you want to close.

  • Opening the jumper ADR1 will add 256 to the base ID
  • Opening the jumper ADR2 will add 512 to the base ID.

The combination of jumper settings will allow up to 4 AnalogX units to coexist on the same CAN bus.

ADR2 Jumper ADR1 Jumper Address
Closed Closed 0xE4600 (935424)
Closed Open 0xE4700 (935680)
Open Closed 0xE4800 (935936)
Open Open 0xE4900 (936192)

CAN Baud rate

500K and 1MB rates are supported.

500K is enabled by default; cut the jumper labeled BAUD on the bottom of AnalogX to enable 1MB rate.

CAN Messages

Announcement

The announcement message is broadcast by the AnalogX upon power up.

Address

CAN ID: Base + 0

Offset What Value
0 Channel Count Total number of channels on device
1 Reserved
2 Reserved
3 Reserved
4 Reserved
5 Major Version Firmware Major Version Number
6 Minor Version Firmware Minor Version Number
7 Patch Version Firmware Patch version number

Configuration Group 1

Configures options for AnalogX.

Send this message to AnalogX to configure runtime settings.

  • Note: Settings are volatile and are not persisted across power cycles.

Address

CAN ID: Base + 3

Offset What Value
0 Sample Rate Rate to report sensor values ( 1 - 255Hz). Default sample rate is 50Hz.
1 Reserved
2 Reserved
3 Reserved
4 Reserved
5 Reserved
6 Reserved
7 Reserved

Statistics

Broadcast by AnalogX every 1 second.

Address

CAN ID: Base + 2

Offset What Value
0 Current Sample Rate 1 - 255Hz
1 Reserved
2 Reserved
3 Reserved
4 Reserved
5 Major Version Firmware Major Version Number
6 Minor Version Firmware Minor Version Number
7 Patch Version Firmware Patch version number

Sample Broadcast

Sample Broadcast for Analog inputs. The samples are broadcast based on the configured sample rate (default is 50Hz)

Scaling and Data format

  • Scaling: 0-5000mV
  • Data format: Little Endian

Address

  • CAN ID: Base + 20
Offset What Value
0 Channel 1, low byte
1 Channel 1, high byte
2 Channel 2, low byte
3 Channel 2, high byte
4 Channel 3, low byte
5 Channel 3, high byte
6 Channel 4, low byte
7 Channel 4, high byte