I have a Discovery 2 and have trialled the Waveforms application on Windows and it is very nice however I need to be able to get data out of it at 20MHz. The most that Waveforms can do is able 3-4MHz.
I have created a standalone program based of the example analogin_acquisition.cpp using the SDK and found that the FDwfAnalogInStatusData16 call takes less than about 200us to read and in most cases much faster. The buffer is 8192 in size so should take 409us to capture at 20MHz so in theory we should be able to capture data at 20Mhz easily.
A single acquisition works nicely.
My issue however is that if you use the ScanScreen mode then to use the FDwfAnalogInStatusIndexWrite to get the location of the buffer pointer (I assume this is the pointer where the Discovery 2 is up to) then you have to first call FDwfAnalogInStatus. A call to FDwfAnalogInStatus followed by FDwfAnalogInStatusIndexWrite takes about 2.3ms.
Any thoughts?
Why is a read of data much faster than a call to get the status?
I have used the internal Windows QueryPerformanceCounter to measure 409us frames and read the data in and it seems to work fine at full speed (at least for 20ms). Assumption that the Windows performance counter is reasonably accurate. Still yet to validate the captured data as this is on my desk - not in the lab.
Update: OK the data is not valid. it looks like it copies the same data over and over. So it looks like using ScanScreen mode, you still have to use FDwfAnalogInStatus to update the buffer.
Question
Alanf
Hi,
I have a Discovery 2 and have trialled the Waveforms application on Windows and it is very nice however I need to be able to get data out of it at 20MHz. The most that Waveforms can do is able 3-4MHz.
I have created a standalone program based of the example analogin_acquisition.cpp using the SDK and found that the FDwfAnalogInStatusData16 call takes less than about 200us to read and in most cases much faster. The buffer is 8192 in size so should take 409us to capture at 20MHz so in theory we should be able to capture data at 20Mhz easily.
A single acquisition works nicely.
My issue however is that if you use the ScanScreen mode then to use the FDwfAnalogInStatusIndexWrite to get the location of the buffer pointer (I assume this is the pointer where the Discovery 2 is up to) then you have to first call FDwfAnalogInStatus. A call to FDwfAnalogInStatus followed by FDwfAnalogInStatusIndexWrite takes about 2.3ms.
Any thoughts?
Why is a read of data much faster than a call to get the status?
I have used the internal Windows QueryPerformanceCounter to measure 409us frames and read the data in and it seems to work fine at full speed (at least for 20ms). Assumption that the Windows performance counter is reasonably accurate. Still yet to validate the captured data as this is on my desk - not in the lab.
Update: OK the data is not valid. it looks like it copies the same data over and over. So it looks like using ScanScreen mode, you still have to use FDwfAnalogInStatus to update the buffer.
Edited by AlanfAddition
Link to comment
Share on other sites
26 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