AnalogX: Difference between revisions
Line 9: | Line 9: | ||
====Adjusting Base ID==== | ====Adjusting Base ID==== | ||
The base address is determined by the state of the '''ADR1''' and '''ADR2''' jumpers. By default, the jumpers are bridged; cutting the jumper ADR1 will add 256 to the 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. | The combination of jumper settings will allow up to 4 AnalogX units to coexist on the same CAN bus. | ||
Line 15: | Line 18: | ||
{| class="wikitable" | width="600px" | {| class="wikitable" | width="600px" | ||
|- | |- | ||
! ADR2 | ! ADR2 Jumper | ||
! ADR1 | ! ADR1 Jumper | ||
! Address | ! Address | ||
|- | |- | ||
| | | Closed | ||
| | | Closed | ||
| 0xE4600 (935424) | | 0xE4600 (935424) | ||
|- | |- | ||
| | | Closed | ||
| | | Open | ||
| 0xE4700 (935680) | | 0xE4700 (935680) | ||
|- | |- | ||
| | | Open | ||
| | | Closed | ||
| 0xE4800 (935936) | | 0xE4800 (935936) | ||
|- | |- | ||
| | | Open | ||
| | | Open | ||
| 0xE4900 (936192) | | 0xE4900 (936192) | ||
|} | |} |
Revision as of 21:14, 26 July 2017
AnalogX CAN bus API
Overview
The CAN bus API provides the configuration and control interface for AnalogX
CAN Messages
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.
Announcement
Broadcast by the device 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. These settings are volatile.
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 |
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 |