Jump to content
  • 0

WF Sample Code - Running AnalogIn_FFT.py


Caleb Messerly

Question

I am currently running my ADP3450 in Linux mode. I have uploaded the python samples located in .\Digilent\WaveFormsSDK\samples\py onto the device, and running several scripts provides correct results. 

However, when running AnalogIn_FFT.py via the command python3 AnalogIn_FFT.py, I run into an error, which is pasted directly below:

 

digilent@ADPro:~/wf$ python3 AnalogIn_FFT.py
Loading libdwf.so
DONE LOADING
DWF Version: b'3.17.1'
Opening first device
fpga_manager fpga0: writing design_1_wrapper.bit.bin to Xilinx Zynq FPGA Manager
Generating sine wave...
Samples: 32768
Starting oscilloscope
Acquisition done
Traceback (most recent call last):
  File "AnalogIn_FFT.py", line 106, in <module>
    dwf.FDwfSpectrumWindow(byref(rgdWindow), c_int(nSamples), DwfWindowFlatTop, vBeta, byref(vNEBW))
  File "/usr/lib/python3.7/ctypes/__init__.py", line 369, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.7/ctypes/__init__.py", line 374, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /lib/libdwf.so.3.17.1: undefined symbol: FDwfSpectrumWindow


As can be seen, the device loads in, and the sine wave is generated. However, something with the linker library appears to not be working?
I located the libdwf.so file in the lib directory, but opening the file just shows garbage data. There were two other versions of the file in the lib directory, libdwf.so and libdwf.so.3, but changing the AnalogIn_FFT.py to reference those still gets the same error.

Is anyone aware of why the FDwfSpectrumWindow is not appearing? Any help would be appreciated, and if any other information is provided, please do not hesitate to ask.


Thanks again,

Caleb 
 

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 1

Hi @Caleb Messerly

Download digilent.adept.runtime...armhf.deb and digilent.waveforms.adp3X50...armhf.deb
https://digilent.com/reference/software/adept/start
https://digilent.com/reference/software/waveforms/waveforms-3/start

sudo apt install ./digilent.adept.runtime...armhf.deb ./digilent.waveforms.adp3X50..armhf.deb

See the manual and examples WF SDK/ samples/ py/ 
Command line script/app can be developed/tested on computer then ported to the embedded Linux.

image.png

or see the following:

 

Link to comment
Share on other sites

  • 0

@attila Thanks for the response. Apologies for the delay.

I am a little confused as to how I should update those two files. I ran an FFT in standard mode in waveforms and it works as expected, but as I mentioned I am attempting to run the FFT in linux mode on the device. 

Could you briefly explain how I would go about updating those files using the downloads from the links you sent me? Thanks so much. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...