Jump to content
  • 0

FDwfDeviceOpen error with Python on Mac


Leon

Question

Hi Digilent, I am trying to use dwf.py to generate a square wave using Analog Discovery 2 device from my MacBook, but it always give the error shown below. The WaveForms GUI works fine with my MacBook though. And same code works fine with the device if I run it on my Windows10 laptop. I am not sure if it is a compatibility issue with Python on MackBook?

==========================================================================================================

Generating square wave (1 high, 1 low)...

DWF Version: 3.12.2

Opening first device...

Traceback (most recent call last):

  File "DigilentTest_SingleTap.py", line 64, in <module>

    dwf_ao = dwf.DwfAnalogOut()

  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dwf.py", line 2312, in __init__

    super(DwfAnalogOut, self).__init__(idxDevice, idxCfg)

  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dwf.py", line 1891, in __init__

    hdwf = FDwfDeviceOpen(idxDevice)

  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dwf.py", line 246, in _errcheck

    raise DWFError(err.value, _mkstring(errmsg), (func, args))

dwf.DWFError: ERROR(1): dmgrEnumDevicesEx 0xC12

No connected device found

==========================================================================================================

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Hi attila,

Thanks for your help. I got below error msg by executing the cmd above. Please help take a look.

==========================================================================================================

% python /Applications/WaveForms.app/Contents/Resources/SDK/samples/py/Device_Info.py
dyld: warning, LC_RPATH @executable_path/../Frameworks in /Applications/WaveForms.app/Contents/Frameworks/dwf.framework/dwf being ignored in restricted program because of @executable_path (Codesign main executable with Library Validation to allow @ paths)
firmware path not found
jtscInit 0x3F5
Reinstall Digilent Adept Runtime

DWF Version: 3.12.2
Number of Devices: 0

 

==========================================================================================================

Link to comment
Share on other sites

Hi @Leon

Please install the dwf.framework from the root of the digilent.waveforms...dmg file to /Library/Frameworks, open the DMG and drag-drop dwf.framework to Frameworks.

I suppose you wave not installed this and modified the python code to load the dwf from the app.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...