REDCKER Posted May 1, 2023 Share Posted May 1, 2023 (edited) I am trying to connect my device with a code. My waveforms software has recognized the device correctly, but my code always says no device detected. The code I use is the “DWF Python Example” I only change one line of code to correct open dwf file, I show that code below: self.dwf = cdll.LoadLibrary("/Applications/WaveForms.app/Contents/Frameworks/dwf.framework/dwf") Try to connect Analog Discovery 2 Runing on MacOS Ventura Any help would be useful to me!! Edited May 1, 2023 by REDCKER Link to comment Share on other sites More sharing options...
0 JColvin Posted May 1, 2023 Share Posted May 1, 2023 Hi @REDCKER, I'm not certain which example you are running (or at least I'm not aware of an example with that exact name). Do you have the WaveForms software open at the same time? If the WaveForms software is already connected to the Analog Discovery 2 in the WaveForms Device Manager, you won't be able to control that same device from a separate script as it already has its handle claimed. You can either close the WaveForms software or switch to a demo device in the WaveForms software in order to let other applications (C, Python, etc) be able to then control that device. Please let me know if I've misunderstood your question. Thanks, JColvin Link to comment Share on other sites More sharing options...
0 REDCKER Posted May 1, 2023 Author Share Posted May 1, 2023 21 minutes ago, JColvin said: Hi @REDCKER, I'm not certain which example you are running (or at least I'm not aware of an example with that exact name). Do you have the WaveForms software open at the same time? If the WaveForms software is already connected to the Analog Discovery 2 in the WaveForms Device Manager, you won't be able to control that same device from a separate script as it already has its handle claimed. You can either close the WaveForms software or switch to a demo device in the WaveForms software in order to let other applications (C, Python, etc) be able to then control that device. Please let me know if I've misunderstood your question. Thanks, JColvin Hi JClovin. I confirmed that I had closed the WaveForms software while running my code. It still doesn't detect any devices. I will show the code I use below: Every time my screen output "no devices detected" Thanks Link to comment Share on other sites More sharing options...
0 REDCKER Posted May 2, 2023 Author Share Posted May 2, 2023 I have solved my problem. The problem was because dwf was not properly installed in the library library in my mac. here is my solution: 1. Download the WaveForms software from the Digilent website, which contains the latest version of the dwf library. You can download the WaveForms software from the following website: https://reference.digilentinc.com/reference/software/waveforms/waveforms-3/start On this page, select your operating system (Mac) and WaveForms version (WaveForms 3). Then, agree to Digilent's license agreement and provide your email address. You will receive an email with a download link. 2. Extract the downloaded WaveForms software package. 3. Open the terminal and navigate to the extracted WaveForms software package directory. 4. Enter the frameworks subdirectory, which contains the dwf library files. bashCopy code: cd WaveForms.app/Contents/Frameworks 5. Copy the dwf library to the system-level Frameworks directory. bashCopy code sudo cp -R dwf.framework /Library/Frameworks/ This command will copy the dwf.framework directory and its files to the /Library/Frameworks directory, which is typically used for system-level libraries and programs. 6. Set permissions for the dwf library files. bashCopy code sudo chmod -R 755 /Library/Frameworks/dwf.framework This command will modify the permissions of the dwf library files to ensure that other users can read and execute them. 7. Verify that the dwf library is installed successfully. Enter the following command in the terminal: bashCopy code ls /Library/Frameworks/dwf.framework If the output contains the dwf file, it means that the dwf library has been installed successfully. 8. Use "self.dwf = cdll.LoadLibrary("/Library/Frameworks/dwf.framework/dwf")" to connect device(Python). Hope that helpful!! Thx Link to comment Share on other sites More sharing options...
0 attila Posted May 2, 2023 Share Posted May 2, 2023 or Drag&Drop On 6/29/2020 at 3:43 PM, attila said: Did you install the dwf.framework ? Link to comment Share on other sites More sharing options...
Question
REDCKER
I am trying to connect my device with a code. My waveforms software has recognized the device correctly, but my code always says no device detected.
The code I use is the “DWF Python Example”
I only change one line of code to correct open dwf file, I show that code below:
self.dwf = cdll.LoadLibrary("/Applications/WaveForms.app/Contents/Frameworks/dwf.framework/dwf")
Try to connect Analog Discovery 2
Runing on MacOS Ventura
Any help would be useful to me!!
Edited by REDCKERLink to comment
Share on other sites
4 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now