MATLAB Answers

Downloaded Support Package [Digilent DAQ] not accessed by stand-alone executable

11 views (last 30 days)
Brian Moore
Brian Moore on 22 Apr 2015
Answered: Lowell Day on 14 Jan 2016
I'm having an issue with running a stand-alone matlab script. I'm trying to interface with a Digilent Analog Discovery, and have it log data with the oscilloscope. The test script is below. The program itself runs just fine when run from Matlab itself - it just creates a session and uses the first oscilloscope channel to sample for 2 seconds at a given rate, then plot the data. Obviously, the Digilent Support Package has been downloaded, and Digilent appears as a vendor, and the Analog Discovery appears as a device.
However, when the program is compiled into a stand-alone executable, it does not know of 'digilent' as a Vendor. It is acting just as the script would in Matlab prior to the Digilent Support Package being installed. The first line of code reports as much, when executed from window's command prompt, that only National Instruments (default) is a known Vendor.
When I compile the program for stand-alone, the Digilent Support Package is automatically added as a Suggested Support Package. However when run, the stand-alone executable does not seem to recognize it exists.
Upon execution, it announces that "the vendor 'digilent' is not known. Use 'daq.getVendors()' for a list of vendors", provides the error message (line 14)
I'm running R2015a, with full DAQ toolbox and Compiler.
It would seem that the necessary support package is not being accessed by the stand-alone executable. But I have no reference for how downloaded support packages get stored with or accessed by stand-alone executables in general. Any guidance would be appreciated.
%%%% daq_digilent2.m : %%%%%%
r_samples = 100000;
n_samples = 2*r_samples;
in_range = [-5 5];
s1 = daq.createSession('digilent')
ch1 = addAnalogInputChannel(s1,'AD1',[1,2],'Voltage')
s2h = s1.addlistener('DataAvailable',@(src,event) plot(event.TimeStamps, event.Data));
[data2,ts2] = s1.startForeground();
%%%%%end of script %%%%%
%%% Program Call and Output from Windows Command Prompt: %%%
Data acquisition vendor 'National Instruments':
ID: 'ni'
FullName: 'National Instruments'
AdaptorVersion: '3.7 (R2015a)'
DriverVersion: '9.7.0 NI-DAQmx'
IsOperational: true
No data acquisition devices available. Error using daq_digilent2 (line 14) The vendor 'digilent' is not known. Use 'daq.getVendors()' for a list of vendors .


Sign in to comment.

Answers (2)

Nalini Vishnoi
Nalini Vishnoi on 24 Apr 2015
Hi Brian,
This error might be occurring because the drivers for Digilent are not installed on the deployment machine. To resolve this error, install the Digilent drivers from the link mentioned in the Additional Installer Options of DEPLOYTOOL.
In R2014b, when using DEPLOYTOOL the support package for the vendors specified in the .m file are automatically detected and added to the installer. Hence, on the development machine since the drivers for Digilent are already installed, this error does not occur.
For the deployment machine, the installer installs the Support Package for Digilent along with the MCR. However, the Additional Installer Options specify the drivers that need to be installed separately by the user.


Brian Moore
Brian Moore on 24 Apr 2015
Hi Nalini,
I appreciate the response. I should have clarified, however, that the computer I am testing the compiled code on is the same computer I run the (working) script. The development and deployment machines are one in the same. Waveforms is installed on the computer.
Additionally, (though please correct me) I would assume that with support package added to the compiled file, the compiled program would know of Digilent as an available Vendor ( daq.getVendors() ), even if it lacked the drivers to be able to execute any data logging commands.
Nalini Vishnoi
Nalini Vishnoi on 24 Apr 2015
Hi Brian,
Do you have MCR installed on your machine? If yes, I would recommend checking if MCR is present before MATLAB in the 'PATH' environment variable. This ensures that your 'exe' application opens with MCR instead of MATLAB. Also, you need to run the daqregister command once to register the hardware driver adaptor.
Even though the support package is present, if the drivers for the hardware device have not been installed on the deployment machine (assuming it does not have those drivers already), the code would not be able to talk to the hardware.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!