Jump to content
  • 0

Diligent Analog Pro


Taimur

Question

Hi Diligent Team,

I am using an analog pro board to acquire data at 2 MSPS using one of your python API example. 

I would like to do some processing in the background as the data is being collected, essentially implement non-blocking acquisition as in Matlab. Do you have any example script? 

Thank you,

Taimur

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello @Taimur.

Which release of MATLAB are you using? 

Are you using the latest 'Digilent Toolbox' add-on, in MATLAB?  If not, then install the latest version of WaveForms (https://digilent.com/reference/software/waveforms/waveforms-3/start), which is compatible with MATLAB R2021b and newer.  Next, you will need to install the ‘Digilent Toolbox’ add-on via MATLAB's Add-On Explorer.  Search for ‘Digilent Toolbox’ and then select the add-on.

The new Digilent Toolbox files are saved to the 'C:\users\{user}\AppData\Roaming\MathWorks\MATLAB Add-Ons\Collections\Digilent Toolbox' directory.

image.png

 

Take a look at the examples provided with the Digilent Toolbox.

 

Regards,

Fausto

Link to comment
Share on other sites

  • 0

Hi @Taimur

The WF SDK/API functions are only slightly blocking. I mean it does not wait for the capture to finish.
With acqmodeSingle, the FDwfAnalogInStatus communicates with the device and fetches the data only if the capture is done and the device automatically starts a new capture. If the capture is not done returns other than DwfStateDone so you can check it again.
With acqmodeRecord for continuous streaming, the FDwfAnalogInStatus fetches the new samples and you can use the FDwfAnalogInStatusRecord to see how many new samples are available.
The FDwfAnalogInStatusData... returns the fetched data, again without device communication.
If you want less blocking you can use multithreading app/script.
You can find many examples in the WF SDK/ samples/ py/ AnalogIn_Record.py AnalogIn_Trigger.py ... but not for multithreading. 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...