How to ensure that a MATLAB executable can communicate with NI Data Acquisition Cards
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Dear community,
I want to create a small Matlab GUI which can handle NI DAQ devices. Later, I want to compile my application to an executable (.exe), such that the non Matlab user can do some easy measurements on the fly.
I know that I need to install the NI DAQmx support package from the addon installer to make it possible to work with the DAQs in Matlab, but how can I provide that package in such a way that the user can use my executable (of course together with the respective Matlab Runtime). Is it possible, that the user installs the NI DAQmx driver externally, such that the executable can use it? Which NI DAQmx version does it have to be? Is the base variant already enough for that purpose?
best regards
Jonas
5 comentarios
Mario Malic
el 21 de Abr. de 2023
Hey Jonas, I posted my DAQ app, which you might be interested in https://uk.mathworks.com/matlabcentral/fileexchange/128118-daqx
Respuestas (1)
Shubham
el 7 de Abr. de 2023
Hi Jonas,
To create a small Matlab GUI that can handle NI DAQ devices, you will need to use the Data Acquisition Toolbox and the NI-DAQmx support package. You can create a standalone executable of your Matlab application by using the MATLAB Compiler.
To deploy your application to a non-Matlab user, you will need to provide them with the compiled executable and the respective Matlab Runtime that your application was built on. You can package these files together into a single installer file using the MATLAB Compiler.
As for the NI-DAQmx driver, you have a few options. You can include the NI-DAQmx driver installer with your application installer and ask the user to install it before running your application. Alternatively, you can include the driver files directly in your application installer and install them automatically during the installation process.
The version of the NI-DAQmx driver you will need depends on the version of the NI-DAQmx support package you are using in Matlab. You can find this information in the release notes of the support package. The base version of the NI-DAQmx driver may be sufficient for your application, but it's best to check the compatibility requirements of your version of the support package to be sure.
1 comentario
Brian
el 12 de Jul. de 2023
"Alternatively, you can include the driver files directly in your application installer and install them automatically during the installation process."
How do you enable this? I added ni-daqmx_21.3_online.exe in the "Files installed for your end user" section of the deploy tool, but all that does is add it to the install folder. I could detect that the driver isn't installed on the first run of the app and trigger the install from there, but I'd rather it happen on app install.
Ver también
Categorías
Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!