How to ensure that a MATLAB executable can communicate with NI Data Acquisition Cards

23 visualizzazioni (ultimi 30 giorni)
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 Commenti
Jonas
Jonas il 7 Feb 2023
i know the internet ;-) but no nice solution for spontaneous application on any offline computer. Too heavy for a usb stick

Accedi per commentare.

Risposte (1)

Shubham
Shubham il 7 Apr 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 Commento
Brian
Brian il 12 Lug 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.

Accedi per commentare.

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Tag

Prodotti


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by