Jump to content
  • 0

Is the new Digilent Toolbox version 1.3 compatible with the Matlab Compiler?


Mike Jessop

Question

I was using Matlab R2020a with the Data Acquisition Toolbox and the Data Acquisition Toolbox Support Package (v22.1.0) installed.  I built a Matlab App that interacts with the Analog Discovery 2 and receives data from it.  I compiled this App for deployment to other machines to run with the Matlab Runtime package and it works great.    I am going to refer to this as  App #1.   Note that to use App #1 on a target machine I must have the following Digilent driver installed:   digilent.waveforms_v3.7.21_64bit

Then, I noticed the Digilent Toolbox 1.3 that was recently made available.  I have R2022b also on my computer, so I installed the Digilent Toolbox 1.3 in R2022b and began comparing it to what I could do with the older Data Acquisition Toolbox Support Package.   I really love the fact that I can now perform Scans in the background and use a callback function such as "fetchData" to monitor the incoming data.  This feature can really improve my App, so I set to work on those improvements and have spent a lot of time make a newer and better version of my App -- which I will refer to as App #2.   The problem is, when I compile App #2,  I find that it cannot start a DAQ Session

Note that to use App #2 on a target machine I must have the following Digilent driver installed:   digilent.waveforms_v3.20.1_64bit.exe

I put an error catch on it and told it to output daqvendorlist to the screen and  I am attaching the screen shot of that result.  It says something about uninstalling other NI software, which I did. 

Clipboard01-error.png

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @Mike Jessop,
We're not that familiar with the Matlab runtime package, but it seems that the toolbox wasn't included in the compilation (for App 2) or is missing something, since 'digilent' is not visible in the vendor list.
When you install the toolbox, you should have a file called VendorInfo.m located at <INSTALLATION_PATH>/+daq/+digilentadaptor/VendorInfo.m
There's also a file (Session.m) containing initial DAQ session settings.

Did you include these in your compilation? In my case, if I comment out the VendorInfo.m file, I get the same error as you.

Let me know if this solves anything.
Thanks,
Eduard

Link to comment
Share on other sites

  • 0

Thanks for the tip.  I tried including  VendorInfo.m and Session.m in the Application compiler, and it still didn't work, but then I also added the file   DigilentAdaptor.mexw64  and it now works!   I guess I assumed that would get included because the  <INSTALLATION_PATH> was already part of my Matlab environment path, but I was wrong.   Problem solved!  Thank you!  Here is the full location of my toolbox installation path:

C:\Users\<Username>\Documents\MATLAB\Add-Ons\Collections\Digilent Toolbox\digilent

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...