Developing a Measurement Plug-In Client with LabVIEW

This section outlines the required steps for developing a measurement plug-in client in LabVIEW. Use the LabVIEW examples in github and the remaining topics in this manual to understand how to develop a working measurement plug-in client for your application.

Creating a LabVIEW Measurement Plug-In Client

Complete the following steps to create a measurement plug-in client using LabVIEW.

Make sure LabVIEW development dependencies are installed before you begin.
  1. Open or create a LabVIEW project and save the project file.
  2. In the Project Explorer window, go to Tools » Plug-In SDKs » Measurements » Create Measurement Plug-In Client.
    A dialog box title Create Measurement Plug-In Client displaying all registered services opens.
  3. Select one more more Measurement services from the list.
  4. Click Create Measurement Plug-In Client(s).
    A new library is added to the LabVIEW project containing your measurement plug-in client.
Refer to LabVIEW Measurement Plug-In Client Project File Descriptions for more details about the generated measurement plug-in client library.

LabVIEW Measurement Plug-In Client Project File Descriptions

Each LabVIEW measurement plug-in client is created as a separate library (.lvlib) in your project. The following sections describe important files within that library.

  • Measurement Configuration.ctl— Defines measurement input parameters with LabVIEW controls. This control is a copy of the Measurement Configuration.ctl in the Measurement Plug-In.
  • Measurement Results.ctl— Defines measurement return values with LabVIEW indicators. This control is a copy of the Measurement Results.ctl in the Measurement Plug-In.
  • Create Measurement.vi— Creates a client to communicate with the Measurement Plug-In Service and registers the measurement metadata for the created client.
  • Measure.vi— Invokes the measurement logic and returns the result.
  • Close Measurement.vi— Closes the client connection with the Measurement Plug-In.
  • Run Client.vi— A wrapper VI that demonstrates the usage of Create Measurement.vi, Measure.vi and Close Measurement.vi present in the client library. It communicates with the Measurement Plug-In Service and returns the measurement result values.

Registering a Pin Map for a LabVIEW Measurement Plug-In Client

If your measurement service requires a pin map, you must register that pin map before performing a measurement. To register a pin map file for a pin-based measurement plug-in, complete the following steps.

  1. Create a new VI.
  2. From the Measurement I/O palette, select and place the Register Pin Map.vi in the new VI.
  3. Provide the pin map path as input to the Register Pin Map VI.
  4. Wire the pin map id output of the Register Pin Map VI to the input of the Run Client VI.
  5. Configure your measurement and run the new VI.

Running a LabVIEW Measurement Plug-In Client

Complete the following step to run a LabVIEW measurement plug-in client from your LabVIEW project.

Open and run the Run Client.vi located in your measurement plug-in client library. This VI communicates with the Measurement Plug-In Service and returns the measurement results.
Note Ensure that the Measurement Service is running when interacting with measurements via the Measurement Plug-In Client.