I've been working with the WaveForms SDK for over a year now to control a collection of nine Digilent Analog Discovery II's connected to a powered USB hub. For the most part, it's been great - but recently I've encountered a problem that I can't seem to debug.
This is primarily because on encountering most errors within the SDK, the SDK appears to abort the main Python script's execution silently, without raising an exception in Python. In this case, I've attempted to use FDwfGetLastErrorMsg, but no error is recognized by this method either.
Question 1: Is there a more powerful way to access error messages from the WaveForms SDK when using Python?
As for the issue itself, it's hard to pin down without those messages.
Something appears to happen within the WaveForms SDK, a fixed time after several functions from the WaveForms SDK are called by my Python process. These functions are called repeatedly, in a measurement loop that is meant to run for hours or days. Everything works correctly for some number of iterations, but eventually the execution always aborts silently. The number of successful iterations varies semi-randomly, but it appears to fail earlier if I have more Digilents connected. (With five, it runs for quite some time; with seven, it fails in a few minutes; with nine, it fails within one minute.)
I have verified that the timing of the silent failure does not coincide with any line of Python code that I am executing; it occurs a fixed amount of time after I have called the most recent SDK function.
Overall, it sounds very much like some kind of communication error between the Digilents and the WaveForms process, with multiple devices stepping on each other's toes.
Question 2: Does this sound familiar? Is there a tutorial for best practices when communicating with multiple Digilent Analog Discovery II's? And/or do you have any tips for debugging in situations like these?
Question
maling
Hello all!
I've been working with the WaveForms SDK for over a year now to control a collection of nine Digilent Analog Discovery II's connected to a powered USB hub. For the most part, it's been great - but recently I've encountered a problem that I can't seem to debug.
This is primarily because on encountering most errors within the SDK, the SDK appears to abort the main Python script's execution silently, without raising an exception in Python. In this case, I've attempted to use FDwfGetLastErrorMsg, but no error is recognized by this method either.
Question 1: Is there a more powerful way to access error messages from the WaveForms SDK when using Python?
As for the issue itself, it's hard to pin down without those messages.
Something appears to happen within the WaveForms SDK, a fixed time after several functions from the WaveForms SDK are called by my Python process. These functions are called repeatedly, in a measurement loop that is meant to run for hours or days. Everything works correctly for some number of iterations, but eventually the execution always aborts silently. The number of successful iterations varies semi-randomly, but it appears to fail earlier if I have more Digilents connected. (With five, it runs for quite some time; with seven, it fails in a few minutes; with nine, it fails within one minute.)
I have verified that the timing of the silent failure does not coincide with any line of Python code that I am executing; it occurs a fixed amount of time after I have called the most recent SDK function.
Overall, it sounds very much like some kind of communication error between the Digilents and the WaveForms process, with multiple devices stepping on each other's toes.
Question 2: Does this sound familiar? Is there a tutorial for best practices when communicating with multiple Digilent Analog Discovery II's? And/or do you have any tips for debugging in situations like these?
System details:
Thank you!
Link to comment
Share on other sites
12 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