I've created a custom PCBA that allows a Raspberry Pi CM4 to be connected via a USB hub (TUSB2036) to 3x AD2s. The system works and I'm able to identify and run example Waveforms SDK scripts using each of the AD2s individually. I can also open them up with the GUI version of Waveforms just fine.
However, when I run multiple instances of these Waveforms SDK example scripts simultaneously (using the `&` character in a parent BASH script to run my Python scripts in parallel in the background), the script(s) hang (I've included my script in this post). The following are worth mentioning:
When I kill the scripts, they print that the error occurs at the line which contains the following: `dwf.FDwfAnalogInStatus(hdwf, c_int(1), byref(sts))` (line 140 in attached). Again, just running a single instance of this code works fine; when running multiple, parallel instances, the code just hangs here, it doesn't crash.
It is worth noting that I can open 3x simultaneous instances of the Waveforms GUI, simultaneously, across my three separate AD2s. They will successfully open and run Oscilloscope VIs without error, so it doesn't seem to be a processing or USB issue...
Again, I've attached an abbreviated version of my modified SDK example code if that helps.
Question
mowoodsiii
Hello!
I've created a custom PCBA that allows a Raspberry Pi CM4 to be connected via a USB hub (TUSB2036) to 3x AD2s. The system works and I'm able to identify and run example Waveforms SDK scripts using each of the AD2s individually. I can also open them up with the GUI version of Waveforms just fine.
However, when I run multiple instances of these Waveforms SDK example scripts simultaneously (using the `&` character in a parent BASH script to run my Python scripts in parallel in the background), the script(s) hang (I've included my script in this post). The following are worth mentioning:
Again, I've attached an abbreviated version of my modified SDK example code if that helps.
CM4AD2DAQ.py
Link to comment
Share on other sites
9 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