Jump to content
  • 0

Analog Discovery2 Connect Problem


REDCKER

Question

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 REDCKER
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

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

  • 0
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:

image.thumb.png.3e56c12ffe38cf3fcbbdc7b0dce886f3.png

image.thumb.png.ebfe57cfe0ca643e81ae952d90ce7400.png

Every time my screen output "no devices detected"

 

Thanks

Link to comment
Share on other sites

  • 0

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

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...