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();
%%% Program Call and Output from Windows Command Prompt: %%%
Data acquisition vendor 'National Instruments':
FullName: 'National Instruments'
AdaptorVersion: '3.7 (R2015a)'
DriverVersion: '9.7.0 NI-DAQmx'
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 .