Overview
SignalExpress is an interactive measurement tool for generating, acquiring, analyzing, and saving signals through an interactive, dialog box-driven approach. You can use SignalExpress to configure a series of steps quickly to create a measurement procedure without programming. A key feature of SignalExpress is that you can extend the functionality of the environment with plug-in steps created with LabVIEW. These plug-in steps are sometimes referred to as a user VI and are used by SignalExpress using the User-Defined Step. Some examples in which a user VI might be required for use in SignalExpress include the following:
- Controlling an instrument or any measurement hardware not supported by the native SignalExpress steps
- Reading or writing to custom file formats
- Performing more advanced analysis computations
- Displaying pop-up dialog boxes to the user at execution time for instructions or notifications
This document describes how to build plug-ins for SignalExpress using LabVIEW. Refer to the Getting Started with SignalExpress manual to familiarize yourself with SignalExpress interactive measurements and the basic SignalExpress features that you use to acquire and analyze signals.
Note: To use VIs from LabVIEW 8 and 8.20 download the SignalExpress patch from Drivers and Updates
Table of Contents
- What Defines a SignalExpress Step?
- The Basics - Calling Any LabVIEW VI from SignalExpress
- The Facts - What To Be Aware Of
- Understanding the SignalExpress Execution Model
- An Example - Exploring the SignalExpress User VI Template
- Calling a VI from LabVIEW SignalExpress 2.0
- Calling a VI from SignalExpress 1.1
- Calling a VI from SignalExpress 1.0
What Defines a SignalExpress Step?
Steps in SignalExpress have the following features:- Steps can have input and/or output signals – an input is a signal that a step needs in order to produce a result. An output is the result of a step and can be used as an input to a following step. Output signals can also be dragged to interactive displays in SignalExpress for viewing or even dragged to other applications which support text drag and drop.
- Steps have parameters which can be interactively set by the user by entering values or moving controls (sliders, knobs, etc) on an interactive dialog for configuring the operation of the step
- Steps can run once, or be run continuously based on the run mode of SignalExpress (Run or Run Once)
- Step have some parameters which can be swept through a range by the Sweep step within the SignalExpress environment.
- Steps can be converted into LabVIEW sub-VIs or Express VIs when converting a SignalExpress projects to LabVIEW diagrams from with the LabVIEW environment.
You can call almost any LabVIEW VI from SignalExpress with only a few basic requirements on the VI. By simply packaging the VI following a few steps and without touching the actual VI block diagram, you can execute the VI within the SignalExpress environment.
However, depending on what your VI does, you may want to use the User Step VI template included with SignalExpress for handling events from the SignalExpress engine. By responding to the SignalExpress events in your VI, your VI will become aware of the SignalExpress execution model and will take full advantage of the continuously running mode as well as the run once execution mode allowing your VI to behave like regular SignalExpress steps. The following sections describes the process for calling a VI from SignalExpress, and explain how to use the User Step VI template to build plug-ins for SignalExpress.
The Basics - Calling Any LabVIEW VI from SignalExpress
Most VIs can be called directly from SignalExpress with very few changes. If you have a VI you would like to use in SignalExpress, make sure that it meets the following requirements:
All inputs and outputs must be wired to the connector pane of the VI. When calling a VI from SignalExpress, it interrogates the connector pane of the VI to learn what the VIs inputs and outputs are. If you do not wire an input or output to the connector pane, SignalExpress will not be able to pass data into or out of the VI and the default value will be used instead. This is also necessary to be able to properly convert a project into a LabVIEW block diagram.
Any inputs or outputs that you expect to use as Inputs or Outputs to the User-Defined step within the SignalExpress environment must conform to a list of supported SignalExpress datatypes. The supported datatypes are:
-
Double-precision scalars
-
Time-Domain waveform
-
Frequency-domain waveform magnitude (in dB or absolute)
-
Frequency-domain waveform phase (in radians or degrees)
-
Booleans
Note: It is often the case that not all inputs to your LabVIEW VI are also Inputs within the SignalExpress environment. For example, a LabVIEW VI with an input called "Device Name" may not be of a supported SignalExpress datatype as shown in the list above. This does not mean however that this "input" cannot be interacted with within SignalExpress, but instead, this "input" is now considered to be a "parameter" regardless of its datatype and MUST still be connected to the connector pane. The different between a SignalExpress "Input" and a "Parameter" is that an Input's value comes from a previous step, whereas a parameter's value comes from that step's configuration dialog and can be edited manually by the user.
- The VI must be saved as a reentrant VI (VI Properties>Execution).
- The VI should be saved with options (File >Save with Options) as a linked library (llb) with all of its sub-VIs and vi.lib files included. By placing all sub-VIs into the LLB, you ensure that all of the components necessary to execute the VI are there.
- The procedure for creating an LLB for your main VI is a bit different in LabVIEW 8.x than it is in 7.x. For example, the following steps define how to create a LabVIEW 8.0 user-defined step to be used in LabVIEW SignalExpress 2.0:
- Create a new blank project in LabVIEW 8.0.
- Add your main User Step VI to the project.
- Save the project and VI. Right click on Build Specifications in the Project Explorer window and select New»Source Distribution.
- In the Source Distribution Properties dialog box, go to the Distribution Settings page. Select the Packaging Option "Single Destination" and uncheck "Exclude vi.lib" and “Exclude instr.lib”. Modify the Distribution destination directory such that the final destination location ends with a *.LLB extension, and select "Yes" at the prompt. An example would be C:\Documents\UserStep34970A.LLB
Note: In LabVIEW 8.2, the "Exclude vi.lib" is found in the Additional Exclusions page, not the Distribution Settings page - Click the Build button. The source distribution will contain your VI as well as all the instrument driver VIs in a single LLB file. You will notice that another folder called <code>data</code> was also created. It contains all non-VI files. The <code>data</code> folder is irrelevant in this case. We are interested only in the LLB we just created.
- To set your main User Step VI as your top VI in the LLB click on Tools»LLBManager
- Browse to your LLB file and double click on it
- Once the contents of the LLB file is displayed inside the LLB Manager, right-click on your main User Step VI and select Top Level.

The Source Distribution dialog in LabVIEW 8.0 showing the needed settings.
- Refer to the next section for things NOT to do when creating a LabVIEW VI you want to call from SignalExpress.
The Facts - What To Be Aware Of
As mentioned in the previous section, most VI can be called directly from SignalExpress with very few changes. However, there are cases where a VI cannot just be used within SignalExpress without either making some changes or using the User Step VI Template. This section discusses these reasons.
While Loop with Stop Button
For information on how to modify your VI to accomplish the same behavior, please read the following two sections which discuss the SignalExpress execution model and how to use the User Step VI Template.
Event Structures
Popup Dialogs
Be aware that when any of your VIs or subVIs call a DLL, the path to that DLL is stored within the VI as either an absolute path or a relative path. Since DLL cannot be placed inside a LabVIEW llb, this is an important dependency that must be kept track of.
Most common problems arise when a VI saves using a relative path to a DLL and the saved llb is then moved to a different relative location. This will case the VI to open in a broken state due to not being able to find the location of the DLL.
Cases where issues should not arise:
- If your User Defined VI only uses the LV analysis VI, then this does not become an issue since SignalExpress pre-loads this DLL for you.
- If your VI uses DLLs which are location in your Operating System's system folders, these folders automatically get searched.
Cases where issues could arise:
- If your VI uses a DLL whose location is neither of the above and the llb containing your VIs is moved. For this case, one solution is to copy the DLL you are using next to your llb, and have your VIs link to that copied DLL. After that, when moving the llb containing your VIs, move the llb AND the DLL(s) so that the relative path does not change or break.
Note: adding the path to these DLL(s) to your LabVIEW development environment search path does NOT solve these issues.
Understanding the SignalExpress Execution Model
When you press the Run Once button, SignalExpress passes the following events to each of the steps in the project:
- Configure
- Run
- Stop
When you press the Run button to execute your project repeatedly, SignalExpress passes the following events to each of the steps in your project:
- Configure
- Run
- Run
- Run... (over and over, until the Stop button is pushed or until a parameter value is changed)
- Reconfigure (if the user changes the value of a parameter on a step)
- Run...
- Stop (when the Stop button is pushed)
For the case when you are controlling a GPIB instrument, your VI will operate more smoothly in SignalExpress if you take advantage of the event structure in the user step template . Let’s look at the specific case of controlling an Oscilloscope from SignalExpress. When you control a Scope over GPIB, you have to configure its settings (vertical, horizontal, triggering, etc) and then fetch the waveform data or measurement values from the Scope. If you were to call an oscilloscope driver VI directly from SignalExpress, the VI will reconfigure the oscilloscope every time the VI is called. When running in SignalExpress, this is every time the Run event is called – which will result in a very slow, unwieldy performance of your SignalExpress projects. A better solution is to break up the oscilloscope VI such that:
- the scope is configured only when the Configure event fires
- the scope returns data whenever the Run event fires
- the scope closes when the Stop event fires
With this approach, the scope will be controlled in the following manner when the user presses the Run button to run continuously:
- Configure event fires – scope is initialized and all settings are configured based on default values
- Run – waveform is fetched and displayed
- Run – waveform is fetched and displayed
- Run – etc
- Stop - when the Stop button is pressed, the scope session is closed
When the user changes the value of a scope parameter while running:
- Reconfigure event fires – scope settings are configured based on new value. Notice the scope is not re-initialized - that only occurs in the Configure event, not Reconfigure
Note for the previous section: This is equivalent to using a While Loop in LabVIEW. But in the SignalExpress case, the Stop button that you would connect to the LabVIEW While Loop's termination condition is replaced but SignalExpress' own Stop button which fires the Stop event in the User Step VI Template.
An Example - Exploring the SignalExpress User VI Template
Modifying your LabVIEW VIs to respond to the SignalExpress events may appear difficult based on this discussion. However, a User Step VI Template included with SignalExpress makes the process of modifying your VIs to use this event structure almost trivial. The User Step VI Template can generally be found under the [SignalExpress dir]\User Step Templates directory. The figures below illustrate how the code is organized in the template, using an oscilloscope driver as an example (the oscilloscope control code was taken directly from the driver's Getting Started VI that is included with the driver). To illustrate more easily, the example's diagram images have been split into the 4 main components: Configure, Reconfigure, Run, and Stop. At the bottom of each image is a small version of the entire VI with the current viewing location highlighted in red.

Figure 1.1 - The Configure case inside the configuration loop.
When looking at the User Step VI Template, the first thing to mention is what should not be edited or changed. In Figure 1.1, you should noticed the subVI and controls in the top-left corner of the diagram. This code is used by the SignalExpress engine and should not be changed. It is used to determine which event is fired and tell the template code which case to run. Next, notice the Configure case which will execute when the Configure event is fired from SignalExpress. For User VIs which do not require special initialization, placing code in this case is optional. We'll discuss the While Loop and Shift Registers which the next image.
Figure 1.2 shows the Reconfigure case. Here, we see that the Configure and Reconfigure cases are related by both being inside of the while loop. In this example, we've modified the standard template to OR the Configure and Reconfigure event together. When the Configure event fires, both the Configure and Reconfigure code will execute – initializing the Oscilloscope and configuring its vertical, horizontal, and triggering setup. However, while running continuously, if the user changes a parameter value, only the Reconfigure code will execute, reconfiguring the scope without re-initializing it. This allows the scope to update its configuration while running continuously in SignalExpress. By OR-ing these two events for the Reconfigure code, we do not have to duplicate reconfigure code in the Configure case as well. Using the Shift Registers visible on both sides of the While Loop is a way in LabVIEW to store data across multiple runs, thus, the Oscilloscope's session handle will be stored on the Shift Register to use every run even when the Configure and Reconfigure cases are not called. Also notice that a Constant TRUE is connected to the loop's termination condition - this means the loop will always execute only once - which is what we want. For User VIs which do not require special reconfiguration, placing code in this case is optional.
Figure 1.3 shows that the Run event simply reads the waveform from the scope. Most User VIs which do work during regular SignalExpress execution will have to implement this case. The only reason for not implementing this case would be if the User VI only wanted to do all the work once at the begin only (in that case, all the code would be in the Configure or Reconfigure case), or do all the work once at end only (in that case, all the code would be in the Stop case).

Figure 1.4 - The Stop case.
Figure 1.4 shows that the Stop event quite simply closes the scope session. For User VIs which do not require special clean-up, placing code in this case is optional.
By understanding how these four basic events are used, you can easily make your VIs behave as regular SignalExpress step. Keep in mind, that in many cases, you will not even need to do this much – you can just call the VI "as is" without using the User Step VI Template. As long as the Configure step of the VI is not time-consuming, you can run your VI without affecting performance in SignalExpress.
See Also:
Product Manuals: Getting Started with SignalExpress
Calling a VI from LabVIEW SignalExpress 2.0
The process for calling a VI from LabVIEW SignalExpress 2.0 as a user step is almost exactly the same as in SignalExpress 1.1 described in the next section. The main difference is in the very first step.
- Open LabVIEW SignalExpress 2.0 and click on Add Step. Expand the Run LabVIEW VI option. Select the corresponding LabVIEW version for your main VI.
For the rest of the steps, read the next section.
Calling a VI from SignalExpress 1.1
The process for calling a VI from SignalExpress 1.1 as a user step is straightforward. Refer to the following steps to call a LabVIEW VI from SignalExpress:
- From the SignalExpress environment, insert a User-Defined Step into your project. The User-Defined Step configuration page will appear, as shown in Figure 2.1
- Select a VI by either typing a path to the VI manually into the "Select VI" box or by using the browse button.
- SignalExpress then interrogates the connector pane to create a list of the inputs to the VI, and displays them in the inputs list control. You must define which inputs to the VI are SignalExpress signal inputs and which are to be parameters. By default, inputs to a LabVIEW VI are parameters in SignalExpress, but you can make a parameter into a SignalExpress Input by selecting the "Connect Input..." button. From the dialog which appears, select the control name you would like to convert to an Input, and click Ok. To remove the Input, press the "Disconnect Input" button.
- Note: Parameters are controls that will be set interactively on the front panel of the VI. For example, if you have a VI that performs a filter on a signal, you would configure the input signal as an Input to the step, but the values that configure the characteristics of the filter are considered to be parameters. Remember, parameters can also be changed automatically by the Sweep Step in SignalExpress.
- The User-Defined Step builds a list of the VI's outputs and displays them in the Outputs list. For each output signal, you must specify the appropriate SignalExpress signal type. Doing this will enable steps downstream in your project to process these signals correctly.

[+] Enlarge Image
Figure 2.2 - You can view the front panel of the VI and change values of the parameters by selecting the Configure VI tab.
After specifying information about the Input signals and Output signals of your User-Defined Step, you can now run the step continuously within your SignalExpress projects. Simply select the "Configure VI" tab and change the parameters of the step while it is executing, and it will execute appropriately, very similar to regular SignalExpress steps. For more technical information regarding building and using LabVIEW VIs to extend the functionality of SignalExpress, refer to the SignalExpress documentation.
Calling a VI from SignalExpress 1.0
The process for calling a VI from SignalExpress 1.0 as a user step is straightforward. Refer to the following steps to call a LabVIEW VI from SignalExpress:
- From the SignalExpress environment, insert a User-Defined Step into your project. The User-Defined Step configuration page will appear, as shown in Figure 3.1
- Select a VI by either typing a path to the VI manually into the "Select VI" box or by using the browse button.
- SignalExpress then interrogates the connector pane to create a list of the inputs to the VI, and displays them in the inputs list control. You must define which inputs to the VI are SignalExpress signal inputs and which are to be parameters. By default, inputs to a LabVIEW VI are parameters in SignalExpress, but you can make a parameter into a SignalExpress Input by selecting the parameter name and pressing the "Make Input" button. To reverse the process, press the "Make Parameter" button.
- Note: Parameters are controls that will be set interactively on the front panel of the VI. For example, if you have a VI that performs a filter on a signal, you would configure the input signal as an Input to the step, but the values that configure the characteristics of the filter are considered to be parameters. Remember, parameters can also be changed automatically by the Sweep Step in SignalExpress.
- The User-Defined Step builds a list of the VI's outputs and displays them in the Outputs list. For each output signal, you must specify the appropriate SignalExpress signal type. Doing this will enable steps downstream in your project to process these signals correctly.

[+] Enlarge Image
Figure 3.2 - You can view the front panel of the VI and change values of the parameters by pressing the Open VI Front Panel button.
After specifying information about the Input signals, Output signals, and Parameters of your User-Defined Step, you can now run the step continuously within your SignalExpress projects. Simply open the dialog and change the parameters of the step while it is executing, and it will execute appropriately, very similar to regular SignalExpress steps. For more technical information regarding building and using LabVIEW VIs to extend the functionality of SignalExpress, refer to the SignalExpress documentation.
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).






