The MatLab DAQ toolbox support for Analog Discovery offers limited functionality, but the underlying WaveForms SDK functions can be accessed too.
For manual and examples in Python and C++ see the SDK located in the default Windows installation path:
- 32bitC:Program FilesDigilentWaveFormsSDK
- 64bitC:Program Files (x86)DigilentWaveFormsSDK
function DWFtest();
% 32 bit system
%hfile = 'C:Program FilesDigilentWaveFormsSDKincdwf.h';
%64 bit system
hfile = 'C:Program Files (x86)DigilentWaveFormsSDKincdwf.h';
display(['Set variable hfile: ' hfile]);
if ~libisloaded('dwf')
loadlibrary('dwf', hfile);
end
islibloaded = libisloaded('dwf');
fprintf('Check if dwf library is loaded: islibloaded = %dn',islibloaded)
% This is necessary to get the character strings
pBuffer = libpointer('int8Ptr',zeros(32,1));
calllib('dwf','FDwfGetVersion',pBuffer);
display(['Version: ' char(pBuffer.Value')]);
%Just opening and making sure the device is in a known state
phdwf = libpointer('int32Ptr',0);
calllib('dwf','FDwfDeviceOpen',-1,phdwf);
display(['FDwfDeviceOpen returned: ' num2str(phdwf.Value)])
% Close device and unload library
if phdwf.Value > 0
calllib('dwf','FDwfDeviceCloseAll');
end
unloadlibrary('dwf')
end
Question
attila
The MatLab DAQ toolbox support for Analog Discovery offers limited functionality, but the underlying WaveForms SDK functions can be accessed too.
For manual and examples in Python and C++ see the SDK located in the default Windows installation path:
- 32bit C:Program FilesDigilentWaveFormsSDK
- 64bit C:Program Files (x86)DigilentWaveFormsSDK
Link to comment
Share on other sites
4 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