Did you run the program as root?
I didn't run your program because life's too short to hand craft Python code to interface directly to C. Instead I did the following. I probably should have backed up the ADP3250 first, but I YOLOed it instead.
digilent@ADPro:~$ sudo -i
root@ADPro:~# apt update
root@ADPro:~# apt install python3-pip
root@ADPro:~# pip3 install pydwf
Note that installing pip will pull in a full C development environment because pip sometimes needs it, so don't be alarmed about the number if packages that get installed. I was expecting to need to install numpy which is a requirement of pydwf, but unlike the C development packages, numpy was already installed.
Then I copied AnalogIO.py from Github in to the ADP3250 and then I unplugged the the ethernet cable from my ADP3250. Then I ran
digilent@ADPro:~$ sudo python3 AnalogIO.py
analogIO.enableSet() supported ......... : True
analogIO.enableStatus() supported ...... : True
analogIO.enableGet() ................... : False
analogIO.enableStatus() ................ : False
...
Channel #1 (2 of 4 channels) named ('Zynq', 'Zynq') has 7 nodes:
node #0 (1 of 7):
node_name ............. ('Temperature', 'C')
node_info ............. DwfAnalogIO.Temperature
node_set_info ......... (0.0, 0.0, 0)
node_get .............. 0.0
node_status_info ...... (0.0, 100.0, 1000)
node_status ........... 51.17009353637701
...
Traceback (most recent call last):
File "AnalogIO.py", line 119, in <module>
main()
File "AnalogIO.py", line 111, in main
demo_analog_io_continuous_readout(device.analogIO, "USB Monitor")
File "AnalogIO.py", line 68, in demo_analog_io_continuous_readout
raise RuntimeError("Unable to find unique channel {!r}.".format(channel_name))
RuntimeError: Unable to find unique channel 'USB Monitor'.
If you don't unplug the ethernet cable, then AnalogIO.py will find the ethernet interface to the ADP5230 as well as the USB one and not know which one to use. AnalogIO.py supports selecting the device based on the serial number, but that isn't going to help here.
Cheers,
Lloyd
p.s. Working out how to filter out the unwanted ethernet connect to the ADP3250 was a complete pain in the proverbial.The two interfaces to the ADP3250 have different device version numbers, which I can only assume is how the WaveForms software differentiates them. In my case the version number of the non-ethernet interface was 1796 and so I just hard-coded "device_version_filter=1796" into the call to openDwfDevice() in AnalogIO.py and I could now run it without having to unplug the ethernet.