Post Go back to editing

Connecting to SDP-K1 in Python

Category: Software
Product Number: EVAL-SDP-CK1Z

Hi, 

I've been trying to run python example for the AD5754R from this link: pyadi-iio/examples/ad5754r_example.py at master · analogdevicesinc/pyadi-iio · GitHub and also a modified code

libiio and pyadi-iio has been installed and updated as instructed here: Quick Start - Analog Devices Hardware Python Interfaces 0.0.16 (analogdevicesinc.github.io)

Below is the error message I keep getting. From what I could understand, there seems to be an issue connecting to the SDP-K1 COM port. I verified that I am using the correct port via IIO oscilloscope.

Any thoughts on where the issue might be? 

Best regards

Ian

Traceback (most recent call last):
  File "C:\Users\IAndal\AppData\Local\Programs\Python\Python312-32\Lib\site-packages\adi\context_manager.py", line 36, in __init__
    self._ctx = iio.Context(self.uri)
                ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\IAndal\AppData\Local\Programs\Python\Python312-32\Lib\site-packages\iio.py", line 1328, in __init__
    self._context = _new_uri(_context.encode("ascii"))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: exception: access violation writing 0x0000863C

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\IAndal\OneDrive - Analog Devices, Inc\PCT_DAC\Ian_Work\01_Projects\FY21_HW_CN-0586-HVDAC\02_Architecture_and_Design\03_Software_and_Drivers\012224_wavegen\actualExample5754r.py", line 38, in 
<module>
    ad5754r_dev = ad5754r(uri="serial:COM12,230400,8n1n")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\IAndal\AppData\Local\Programs\Python\Python312-32\Lib\site-packages\adi\ad5754r.py", line 22, in __init__
    context_manager.__init__(self, uri, self._device_name)
  File "C:\Users\IAndal\AppData\Local\Programs\Python\Python312-32\Lib\site-packages\adi\context_manager.py", line 38, in __init__
    raise Exception("No device found")
Exception: No device found