Post Go back to editing

Streaming Data from the CN0549 into Python Tools - calibrate() returns error

I'm running code similar to that in pyadi-iio/examples/cn0549/collect_data.py, but get an error when trying to run calibrate() to remove DC bias:

import adi

xl = adi.cn0532(uri='ip:169.254.16.121')

xl.calibrate()

runfile('C:/ChirpDecoder/MEMS/captureCN0549.py', wdir='C:/ChirpDecoder/MEMS')
Traceback (most recent call last):

File "C:\ChirpDecoder\MEMS\captureCN0549.py", line 19, in <module>
xl.calibrate()

File "C:\Users\kochs\anaconda3\lib\site-packages\adi\cn0532.py", line 54, in calibrate
raw = self._get_iio_attr("voltage0", "raw", False, adc_chan)

File "C:\Users\kochs\anaconda3\lib\site-packages\adi\attribute.py", line 147, in _get_iio_attr
self._get_iio_attr_str(channel_name, attr_name, output, _ctrl)

File "C:\Users\kochs\anaconda3\lib\site-packages\adi\attribute.py", line 142, in _get_iio_attr_str
return channel.attrs[attr_name].value

File "C:\Users\kochs\anaconda3\lib\site-packages\iio.py", line 711, in <lambda>
lambda self: self._read(),

File "C:\Users\kochs\anaconda3\lib\site-packages\iio.py", line 740, in _read
_c_read_attr(self._channel, self._name_ascii, buf, len(buf))

File "C:\Users\kochs\anaconda3\lib\site-packages\iio.py", line 62, in _check_negative
raise OSError(-result, _strerror(-result))

OSError: [Errno 16] Resource device

What's missing here?

Parents Reply Children