Hello,
I'm writing into the forum because I need to acquire 2 analog input signals (multilevel signals) and 1 digital input signal in order to sample the analog ones. I'm retrieving the 2 analog signals using the 2 analog scopes of the Analog Discovery 2, while I saw that I can retrieve the digital one using a DIO port. This is simple using the Waveforms software, but I would like to use a Python script (code as attachment).
Basically I acquire the analog signals using:
dwf.FDwfAnalogInStatusData2(hdwf, c_int(0), byref(rgdSamples1, sizeof(c_double) * iSample), c_int(iBuffer), c_int(cSamples)) # get channel 1 data
dwf.FDwfAnalogInStatusData2(hdwf, c_int(1), byref(rgdSamples2, sizeof(c_double) * iSample), c_int(iBuffer), c_int(cSamples)) # get channel 2 data
These analog signals are synchronous.
The question is: How can I acquire the digital signal from the DIO port? Is it possible to have a digital signal that is synchronized (or shifted by an offset) with respect to the analog signals?
Thank you!
Question
Alessandro
Hello,
I'm writing into the forum because I need to acquire 2 analog input signals (multilevel signals) and 1 digital input signal in order to sample the analog ones. I'm retrieving the 2 analog signals using the 2 analog scopes of the Analog Discovery 2, while I saw that I can retrieve the digital one using a DIO port. This is simple using the Waveforms software, but I would like to use a Python script (code as attachment).
Basically I acquire the analog signals using:
dwf.FDwfAnalogInStatusData2(hdwf, c_int(0), byref(rgdSamples1, sizeof(c_double) * iSample), c_int(iBuffer), c_int(cSamples)) # get channel 1 data
dwf.FDwfAnalogInStatusData2(hdwf, c_int(1), byref(rgdSamples2, sizeof(c_double) * iSample), c_int(iBuffer), c_int(cSamples)) # get channel 2 data
These analog signals are synchronous.
The question is: How can I acquire the digital signal from the DIO port? Is it possible to have a digital signal that is synchronized (or shifted by an offset) with respect to the analog signals?
Thank you!
Alessandro
Link to comment
Share on other sites
1 answer 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