The UXP expansion port found on ProXR series controllers (equipped with a UXP port) support up to 48 Channels of Analog to Digital Conversion with 12-Bit resolution. These controllers allow you to read analog voltages from 0 to 5VDC, ideal for sensor monitoring applications. UXP series controllers are able to be read ADC inputs based on a polled protocol. Polling is the process of asking the controller the current voltage on any of the inputs and receiving a reply. Push notification is not supported for any UXP expansions. Users should exercise caution not to exceed 5VDC on any of the analog inputs to prevent permanent damage.
The ADC Inputs are divided into (I) Inputs and Devices (See Function Column). Each devices has 16 available inputs (I), which will return (R) a standard 8-bit value based on the voltage present on the input at the time of reading. Up to 3 devices are supported per UXP port for a total of 16 inputs per device, or 48 total available input channels.
The following commands demonstrate how to read individual analog inputs in 8-Bit mode from ProXR controllers equipped with UXP hardware and firmware:
CK = Checksum (00-FF)
I = Input
R = Return Value
TX: | 2 | 3 | 4 | I | CK | FUNCTION: READ 8-BIT ADC DEVICE 0 | RX: | 2 | R | CK |
---|---|---|---|---|---|---|---|---|---|---|
AA | 03 | FE | C3 | 00 | 6E | Read ADC Input Channel 0 8-Bit | AA | 01 | FF | AA |
AA | 03 | FE | C3 | 0F | 7D | Read ADC Input Channel 15 8-Bit | AA | 01 | FF | AA |
TX: | 2 | 3 | 4 | I | CK | FUNCTION: READ 8-BIT ADC DEVICE 1 | RX: | 2 | R | CK |
---|---|---|---|---|---|---|---|---|---|---|
AA | 03 | FE | CB | 00 | 76 | Read ADC Input Channel 0 8-Bit | AA | 01 | FF | AA |
AA | 03 | FE | CB | 0F | 85 | Read ADC Input Channel 15 8-Bit | AA | 01 | FF | AA |
TX: | 2 | 3 | 4 | I | CK | FUNCTION: READ 8-BIT ADC DEVICE 2 | RX: | 2 | R | CK |
---|---|---|---|---|---|---|---|---|---|---|
AA | 03 | FE | D0 | 00 | 7B | Read ADC Input Channel 0 8-Bit | AA | 01 | FF | AA |
AA | 03 | FE | D0 | 0F | 8A | Read ADC Input Channel 15 8-Bit | AA | 01 | FF | AA |
The following commands will read all 16 channels at 8-Bit resolution:
CK = Checksum (00-FF)TX: | 2 | 3 | 4 | CK | FUNCTION: READ 16 CHANNELS 8-BIT | RX: | 2 | Value | NOTE |
---|---|---|---|---|---|---|---|---|---|
AA | 02 | FE | C0 | 6A | Read ADC Device 0, 16 Channels | AA | 10 | FF | Bytes 3 Channel 0 |
AA | 02 | FE | C1 | 6B | Read ADC Device 1, 16 Channels | AA | 10 | FF | Bytes 4 Channel 1 |
AA | 02 | FE | C2 | 6C | Read ADC Device 2, 16 Channels | AA | 10 | FF | Bytes 5 Channel 2 |
FF | Bytes 6 Channel 3 | ||||||||
FF | Bytes 7 Channel 4 | ||||||||
FF | Bytes 8 Channel 5 | ||||||||
FF | Bytes 9 Channel 6 | ||||||||
FF | Bytes 10 Channel 7 | ||||||||
FF | Bytes 11 Channel 8 | ||||||||
FF | Bytes 12 Channel 9 | ||||||||
FF | Bytes 13 Channel 10 | ||||||||
FF | Bytes 14 Channel 11 | ||||||||
FF | Bytes 15 Channel 12 | ||||||||
FF | Bytes 16 Channel 13 | ||||||||
FF | Bytes 17 Channel 14 | ||||||||
FF | Bytes 18 Channel 15 | ||||||||
AA | Byte 19 Checksum |
The following samples read individual channels with 12-bit resolution. These commands return 2 bytes, LSB and MSB. The actual returned value can be computed using the following equation:
AD Value = (MSB x 256) + LSB
CK = Checksum (00-FF)
I = Input
LSB = Least Significant Byte of Return Value
MSB = Most Significant Byte of Return Value
TX: | 2 | 3 | 4 | I | CK | FUNCTION: READ 12-BIT ADC DEVICE 0 | RX: | 2 | LSB | MSB | CK |
---|---|---|---|---|---|---|---|---|---|---|---|
AA | 03 | FE | C7 | 00 | 72 | Read ADC Input Channel 0 12-Bit | AA | 02 | FF | 0F | BA |
AA | 03 | FE | C7 | 0F | 81 | Read ADC Input Channel 15 12-Bit | AA | 02 | FF | 0F | BA |
TX: | 2 | 3 | 4 | I | CK | FUNCTION: READ 12-BIT ADC DEVICE 1 | RX: | 2 | LSB | MSB | CK |
---|---|---|---|---|---|---|---|---|---|---|---|
AA | 03 | FE | CF | 00 | 7A | Read ADC Input Channel 0 12-Bit | AA | 02 | FF | 0F | BA |
AA | 03 | FE | CF | 0F | 89 | Read ADC Input Channel 15 12-Bit | AA | 02 | FF | 0F | BA |
TX: | 2 | 3 | 4 | I | CK | FUNCTION: READ 12-BIT ADC DEVICE 2 | RX: | 2 | LSB | MSB | CK |
---|---|---|---|---|---|---|---|---|---|---|---|
AA | 03 | FE | D1 | 00 | 7C | Read ADC Input Channel 0 12-Bit | AA | 02 | FF | 0F | BA |
AA | 03 | FE | D1 | 0F | 8B | Read ADC Input Channel 15 12-Bit | AA | 02 | FF | 0F | BA |
The following commands read 16 channels at 12-Bit resolution, returning a total of 32 bytes:
CK = Checksum (00-FF)TX: | 2 | 3 | 4 | CK | FUNCTION: READ 16 CHANNELS 12-BIT | RX: | 2 | LSB | MSB | NOTE |
---|---|---|---|---|---|---|---|---|---|---|
AA | 02 | FE | C4 | 6E | Read ADC Device 0, 16 Channels | AA | 10 | FF | 0F | Bytes 3/4 Channel 0 |
AA | 02 | FE | C5 | 6F | Read ADC Device 1, 16 Channels | AA | 10 | FF | 0F | Bytes 5/6 Channel 1 |
AA | 02 | FE | C6 | 70 | Read ADC Device 2, 16 Channels | AA | 10 | FF | 0F | Bytes 7/8 Channel 2 |
FF | 0F | Bytes 9/10 Channel 3 | ||||||||
FF | 0F | Bytes 11/12 Channel 4 | ||||||||
FF | 0F | Bytes 13/14 Channel 5 | ||||||||
FF | 0F | Bytes 15/16 Channel 6 | ||||||||
FF | 0F | Bytes 17/18 Channel 7 | ||||||||
FF | 0F | Bytes 19/20 Channel 8 | ||||||||
FF | 0F | Bytes 21/22 Channel 9 | ||||||||
FF | 0F | Bytes 23/24 Channel 10 | ||||||||
FF | 0F | Bytes 25/26 Channel 11 | ||||||||
FF | 0F | Bytes 27/28 Channel 12 | ||||||||
FF | 0F | Bytes 29/30 Channel 13 | ||||||||
FF | 0F | Bytes 31/32 Channel 14 | ||||||||
FF | 0F | Bytes 33/34 Channel 15 | ||||||||
AA | Byte 35 Checksum |