Include Custom Scales When Building an Executable

Updated Jan 19, 2023

Environment

Software

  • LabVIEW
  • Measurement & Automation Explorer (MAX)

Driver

  • NI-DAQmx

  • I am working on a project that uses custom scales. When I build an executable, it runs properly on the development machine, but when I run it on the target machine I get inaccurate measurements.
  • I think the target machine is missing the scales. How do I include those scales when building an EXE file? How can I export custom scales from Measurement & Automation Explorer (NI-MAX) and include them in my application distribution?

When distributing a LabVIEW application that uses custom scales, you must ensure that the remote computer that the application will run on has information about these scales. Though there are many ways to export a custom scale (or other information from Measurement & Automation Explorer), it is best to use one of the two methods below for including a custom scale in your application distribution.
 
  1. In LabVIEW 8.x and later you can create an executable file and installer using the Project Explorer. Within the project explorer, right click on My Computer then select New » NI-DAQmx Scale. After selecting the appropriate options for your custom scale, the scale will appear under My Computer in your Project Explorer window. When building an executable, your NI-DAQmx custom scale will automatically be saved in an .ini file in the build destination folder. Create an installer to distribute the EXE file and other associated files to a remote machine.
 
  1. You can also import NI-DAQmx custom scales that you have created in NI-MAX into your application installer. This may be a good option when you have already created custom scales in NI-MAX, or if you need to import NI-DAQmx task or hardware configuration information in addition to your scale. To include a custom scale in your application installer, create an installer by right clicking on Build Specifications and then selecting New » Installer. In LabVIEW 8.2 or later, navigate within the My Installer Properties window to the Hardware Configuration category on the left. Select Include hardware configuration from MAX, then click on the Configure button to import selected scales, tasks, and hardware devices in .ini, .nce, or .txt format. You can also use the Import Mode selection to automatically launch the MAX Configuration Import Wizard during installation, or silently update the MAX database without running the wizard. 
  • If you are using LabVIEW 8.0, navigate within the My Installer Properties window to the Advanced category on the left. Under Hardware Configuration, select Include hardware configuration from NI-MAX then click on the Configure button to import selected scales, tasks, and hardware devices in .ini, .nce, or .txt format. 
  • If you are using LabVIEW 7.1, navigate to Tools » Build Application or Shared Library (DLL). Under the Installer tab, check Create Installer and then click on the Advanced... button. Check Hardware Configuration (at the bottom) and then either select a configuration you already have or click Configure to open up the Measurement & Automation Export Wizard to do so.
Restart your Computer after that.

Additional Information

Note: LabVIEW Professional Development System, Developer Suite, or Application Builder add-on is required in order to utilize this capability.