Uad1216 with fxr16x and python

I made a GUI that monitors values of relays and analog inputs as well as sending button presses. I’m trying to convert it to work with fusion and uad1216 boards as that would really simplify our setup. I cannot seem to read anything from the uad1216 boards, and I’m honestly confused about what I’m seeing when I read the inputs on this fusion board. When I iterate through a range of 20, I get these results:

  <---- Iteration number 0

[3, <— Read Value 44]
[3, 109]
[3, 105]
[3, 255]
[3, 109]
[3, 91]
[3, 49]
[3, 44]
[3, 44]
[219, 218, 255, 219, 214, 204, 203, 203]
[3, 108, 3, 105, 3, 255, 3, 109, 3, 91, 3, 49, 3, 44, 3, 44]
timed out

I don’t understand why some of the entries have multiple values, and some don’t. Any adding the uad1216 to the UXP connector on the fxr16x doesn’t change anything. Any help?


Not sure which commands you’re sending to get these responses, but if you’re querying ADC values there are a few options that would alter the number of bytes you receive in response.

Primarily you can request 8 or 10 bit values (8 or 12 bit for the UAD12 series). 8 Bit values return 1 byte, 10 or 12 bit values will return 2 bytes.

The UAD12 series isnt’ supported in our Python library, but you can view the pertinent commands and info at: AD1216 Analog to Digital Converter Quick Start Guide -

Thanks for the response. I got those values by using the read_single_ad8() command from the python library. It looks like it sends [254, 149+channel]

I was able to get values using information from the link you shared. It returns 255 regardless of which board, which channel, and removing the uad1216 changes nothing. I tested it by reading channels 0-100 for device 0, ([254, 195, i]) and I just get 255 for all of them, which is confusing. why am I getting values for channels that I don’t even have? The pull down jumper changes nothing, it’s still always 255 on every channel.

I definitely can read values from the AD8 on board. I’ve tested that, and it works. It seems like it always thinks uxp is connected and it thinks that it has infinite channels or something.

On top of that, I tried chaining the uad1216 devices by connecting them in series with the included ribbon cable, and a capacitor audibly popped and sizzled, so I guess connecting the cable to the connector destroyed that board… I don’t understand why that would happen as there are jumpers for devices 0-2, but only 2 uxp connectors on this board. seems that chaining them would be necessary, and I’m not sure what the second ribbon cable connector would be for if not that.


I would recommend an RMA for the device that blew a capacitor: NCD Login -

The UXP devices are designed to be chained together so that capacitor should not have blown.

If you jump an input to ground or set the pull up/down jumper to low do the commands to monitor that input still return 255? With the inputs pulled low they should respond with ~0.

I’ll look into an RMA for that. I’m a little scared that all 3 may be broken as this isn’t the first time I’ve chained them together.

To clarify, moving the pull up/down jumper does nothing to the value I’m reading. I’m getting 255 for every channel, even ones I don’t have.

Here’s my test code:

import socket
import ncd_industrial_relay
from time
import time, sleep

port = 2101
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
board = ncd_industrial_relay.Relay_Controller(sock)
address = ‘’
sock.connect((address, port))

while True:
for i in range(100):
cmd = board.wrap_in_api([254, 203, i])
print(board.translate_ad(board.process_read_command_return(board.send_command(cmd, 1)), 8))
except Exception as i:


I get 255 for every channel from 0 to 500 regardless of pull up/down jumper placement. Am I doing something wrong?


According to the command you’re sending you’re wanting to read channels 0 through 100 on device “1”. If you have a device connected to the UXP port with the jumpers of the Device pins set to 1 then you should be getting a reading.

You can remove the pull up/down jumper entirely to have the inputs be floating so that you can see changes.

Can you test this functionality using Base Station: Start -

I was able to see results from the uxp port for a while. I stopped, and I’m now getting just 255 again.

I’m trying to understand if any of these components are working correctly or if whatever blew the chained uad1216 also damaged the fxr16x and other the other uad1216 connected to it. Before the audible capacitor issues, we had attempted pretty much every fxr with every uad, so they may all be broken.

When I read all from my fxr, I get just 8 values. Does the board need something to point at ad8-2? From playing with the jumper, it seems like I’m only seeing ad8-1.

I’ll try to test them with base station