Archived:Using LabVIEW Statecharts Without the LabVIEW Statechart Module Installed

Updated Nov 13, 2019

National Instruments does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.

Reported In

Software

  • LabVIEW
  • LabVIEW Statechart Module

Issue Details

How do I use LabVIEW statecharts and their calling VIs on a computer where the LabVIEW Statechart Module is not installed?

Solution

The creation of LabVIEW statecharts and VIs that call them requires the installation of the LabVIEW Statechart Module. If you create such statecharts and calling VIs and then try to open them in a LabVIEW installation without the Statechart Module present, you will likely encounter search dialogs and broken calling VIs. You can solve this issue by Building a Source Distribution of the Statecharts and calling VIs using appropriate settings.

Note: This issue does not affect built applications. Built applications using statecharts do not require anything besides the standard LabVIEW Runtime Engine.

To allow your statecharts and calling VIs to be used in a LabVIEW installation without the Statechart Module present, you must create and build a Source Distribution from a LabVIEW installation with the Statechart Module present. You can then use the output of this Source Distribution, instead of the original statecharts and calling VIs, in a LabVIEW installation without the Statechart Module present. Complete the following steps to build a source distribution for a statechart:
 
  1. Create and save a new project. Create a project folder in the project called Statecharts and Calling VIs.
  2. Add your Statecharts and their calling VIs to the Statecharts and Calling VIs folder.
  3. Verify that debugging is disabled on any statecharts you added. You can check this by right-clicking on each statechart .lvsc project item in the Project Window, choosing Properties, and navigating to the Statechart Code Generation category. Debugging should be Disabled. After changing this property for any statechart, you must generate code for the statechart. You do this by opening the Statechart Diagram VI and clicking the Generate LabVIEW Code button.
  4. Create a new Source Distribution by right-clicking on Build Specifications in your project and choosing New » Source Distribution. Pick an appropriate destination directory for the copies of the statecharts and calling VIs you wish to use in a LabVIEW installation without the Statechart Module present.
  5. In the Source Files category for the Source Distribution, include the Statecharts and Calling VIs folder by highlighting the folder in the Project Files tree and pressing the right arrow to send the folder to the Always Included section.
  6. In the Source File Settings category for the Source Distribution, highlight the Statecharts and Calling VIs folder and then check the boxes to Set save settings for all contained items and to Remove block diagram.
  7. In the Additional Exclusions category for the Source Distribution, verify that Disconnect type definitions are checked.
  8. Click the OK button.
  9. Save your project.
  10. Right-click on the Source Distribution you created and choose Build.
  11. Verify the build succeeds and that copies of your statecharts and calling VIs are placed in the destination directory. (You can navigate to this directory by right-clicking on the Source Distribution and choosing Explore.) You can now use these files in a LabVIEW installation without the Statechart Module present.