Main Content

Deploying Standalone Applications with Instrument Control Toolbox

This topic contains tips for deploying standalone applications with MATLAB® Compiler™ (deploytool or mcc) and Instrument Control Toolbox™. Refer to these tips when creating standalone applications that use functionality from Instrument Control Toolbox.

Tips for both interface based communication and driver-based communication

  • Device identifiers/resource names should not be hard-coded, as instrument resource names are likely to be different on other machines.

  • A best practice is to use instrhwinfo and query the return output in your MATLAB code that you intend to deploy.

Tips for interface based communication

For direct interface based communication using I2C, SPI, GPIB, and VISA, on the deployment machine, install all required third-party drivers separately from the deployed application.

Tips for driver based communication

In addition to your MATLAB code, your deployed standalone application package should include files required by your application:

  • Include MATLAB Instrument Driver (MDD file) in your standalone application project from deploytool or by passing a -a flag to mcc when compiling your MATLAB code.

IVI-C

Include the following in your deployed standalone application package:

  • MATLAB Instrument Driver (MDD file)

  • For 64-bit applications, MATLAB prototype and thunk files

  • For 32-bit applications, MATLAB prototype file

The location of generated prototype and thunk files can be obtained from the result of executing:

sprintf('%s',[tempdir 'ICTDeploymentFiles'])

On the machine where you deploy your standalone application:

  • All third-party drivers and dependencies need to be installed separately from the deployed standalone application.

  • To reduce runtime unknowns, install the same version of IVI-C driver on the deployment system as used on the development system.

  • To reduce runtime unknowns, install the same version of VISA driver libraries on the deployment system as used on the development system.

Note

To troubleshoot vendor driver installation issues, it is recommended that the deployed application provide a way to simulate connection to the hardware by instantiating the driver with 'optionstring', 'simulate=true' as arguments for icdevice. This will help narrow down the root cause of deployment issues to vendor driver installation issue, or hardware issues.

Quick Control Interfaces

If you are not using the default SCPI-based drivers for Quick Control Oscilloscope ('tektronix') and Quick Control Function Generator ('Agilent332x0_SCPI'), and are instead using an IVI-C driver, include the following in your deployed standalone application package:

  • For 64-bit applications, MATLAB prototype and thunk files for IVIScope or IVIFGen

  • For 32-bit applications, MATLAB prototype file for IVIScope or IVIFGen

The location of generated prototype and thunk files can be obtained from the result of executing:

sprintf('%s',[tempdir 'ICTDeploymentFiles'])

On the machine where you deploy your standalone application:

  • If required, all third-party drivers and dependencies need to be installed separately from the deployed standalone application.

  • To reduce runtime unknowns, install the same version of IVI-C driver on the deployment system as used on the development system.

  • To reduce runtime unknowns, install the same version of VISA driver libraries on the deployment system as used on the development system.

Generic MDD

For use with the generic MDD, include the following in your deployed standalone application package:

  • MATLAB Instrument Driver (MDD file)

If your MDD uses LOADLIBRARY to interface with a C shared library, include:

  • For 64-bit applications, MATLAB prototype and thunk files for the C shared library

  • For 32-bit applications, MATLAB prototype file for the C shared library

  • MATLAB prototype and thunk files for a C shared library can be generated on a development machine (with a supported C compiler) by using LOADLIBRARY command.

On the machine where you deploy your standalone application:

  • If required, all third-party drivers and dependencies need to be installed separately from the deployed standalone application.

Hardware Support packages

For more info on deploying standalone applications which use functionality installed as a support package:

web(fullfile(docroot, 'compiler/manage-support-packages.html'))