Apologies for the basic level of this question, but I'm genuinely confused about something from the script examples provided with the Waveforms SDK. Why do all analogin examples use while loops, in which data is repeatedly sampled with FDwfAnalogInStatus?
What I would really like to be able to do is the following: set the acquisition mode to record (and set other parameters accordingly), then start acquisition using FDwfAnalogInConfigure, then NOT enter any kind of Digilent-related while loop, and then at the end of a set time (close to the RecordLength parameter), collect the data in the buffer with FDwfAnalogInStatus.
The reason for this is that I'm trying to control my Discovery 3 from within code that controls a neuroscience experiment, which has its own complex set of loops and conditionals. Critically, these loops are dependent on the frame rate of the monitor we are using to present stimuli. There isn't any clean way I can see of incorporating the kinds of loops that are in every example in the SDK inside these other control loops, which is why I was hoping to just use a simple "start acquisition" "do other stuff" "stop acquisition" model.
Question
Marcus Watson
Hi all,
Apologies for the basic level of this question, but I'm genuinely confused about something from the script examples provided with the Waveforms SDK. Why do all analogin examples use while loops, in which data is repeatedly sampled with FDwfAnalogInStatus?
What I would really like to be able to do is the following: set the acquisition mode to record (and set other parameters accordingly), then start acquisition using FDwfAnalogInConfigure, then NOT enter any kind of Digilent-related while loop, and then at the end of a set time (close to the RecordLength parameter), collect the data in the buffer with FDwfAnalogInStatus.
The reason for this is that I'm trying to control my Discovery 3 from within code that controls a neuroscience experiment, which has its own complex set of loops and conditionals. Critically, these loops are dependent on the frame rate of the monitor we are using to present stimuli. There isn't any clean way I can see of incorporating the kinds of loops that are in every example in the SDK inside these other control loops, which is why I was hoping to just use a simple "start acquisition" "do other stuff" "stop acquisition" model.
Thoughts?
Marcus
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