Search

Dynamic Customization of User Interfaces Using LabVIEW

Dynamic Customization of User Interfaces Using LabVIEW

Chances are, there are multiple people interacting with your test and measurement systems, each with their own job functions requiring access to different information at different times. Wouldn’t it be great if each of these users could customize the user interface (UI) themselves, even if they don’t know how to program?

Let’s say you are creating an aircraft validation and verification (V&V) test system. Structural analysis engineers want to monitor strain gage data taken at several locations on the plane, while avionics engineers want to see the avionics data on their user interface. Or if you are creating a production line monitoring application, production managers want to view test cycle time data to monitor throughput, while quality assurance managers want test performance statistics.

Using LabVIEW, developers can provide the functionality that allows users to customize the UI without ever touching the source code.LabVIEW Tools for UI Customization
LabVIEW provides several useful tools for implementing programmatic customization. Depending on your specific application requirements, consider using one or more of the following:

  • Virtual Instrument (VI) Server: allows developers to set and get properties of front panel objects, VIs, and the LabVIEW environment; for example, it can be used to obtain the current position of the UI
  • Pop-up menus and direct modification: used to make run-time changes to certain properties of VIs and front panel objects; for example, line types for graph traces are easily changed using a popup menu
  • Event structures: provides property data useful in creating configurable monitoring screens; for example, the developer can retrieve values from the event structure for current mouse position or mouse clicks to facilitate more graphical interaction with the user
  • LabVIEW VI templates: helps programmers to create “instantiable” objects; for example, a programmer can launch the same UI multiple times but with different values using templates
  • Direct calls to operating system API: achieve behaviors not available through native LabVIEW VIs; for example, Windows API functions can be used to programmatically launch, draw on, or even integrate third party executables into a LabVIEW built application
  • Picture control toolkit: provides several useful utilities for customizing Graphical User Interfaces (GUI)s; for example, the software at run time shows a different image or picture depending on the specific user’s needs
  • Sub-panels: used to display the front panel of another VI on the front panel of a current VI; for example, when a user wants to configure a digital channel, they might select the digital channel from a list and the specific settings for the digital channel would show up in sub-panel on the same screen
blank
The data acquisition system configuration GUI provided for system setup and control, created for the Orion spacecraft

Key Architectural Components to Achieve Customization

  • Configuration State Management: setting or getting all configurable properties for UI objects
  • Data Abstraction: since the goal is to have user-configurable objects, there can be no direct connections from a data source to UI object
  • Event-driven: rather than polling for changes to the data source, event-driven data abstraction architecture should be created to allow UI clients to only update when new data is available

Use Cases for UI Customization
There are endless use cases for customization of a test system UI, but let’s look at the most commonly requested customization functionality by users:

  • Instantiate multiple UI object types
  • Reposition or resize UI objects and windows
  • Assign data channels to UI object
  • Store and recall view configurations
  • Store and reuse individual UI object configurations
  • Define colors, names, and appearance
  • Adapt view preferences to current user

Programmers may know the types of UI objects that the system’s various users will require, but the desired quantity, position, and size of these objects may remain undefined. In this case, users need the ability to select the object type they wish to add onto their UI, reposition and resize it, and configure specific settings as needed. After the creation of a customized view, users should be able to save and reload their configuration settings for future usage.

3 Methods for Implementing UI Customization Use Cases
Here are three techniques G Systems has used to achieve the most commonly requested customization functionality mentioned in the use cases above, listed in order of increasing complexity. These implementations are specifically for monitoring applications, but the same methodology can apply to control and analysis applications.

Method 1: Configurable Fixed-Position Regions
In this method, we configured a user interface with pre-defined window regions to display several indicator types. We used a hidden tab control or sub-panels to flip through the different indicator types. This approach meets all of the most commonly requested features, except for repositioning and resizing objects. And for instantiation of multiple objects, the quantity is limited to the number of visible regions.

Method 2: Drag-And-Drop UI Objects
This technique extends method 1 to provide object repositioning and resizing by using mouse events to track mouse position and clicks. This approach allows for repositioning and resizing objects; however instantiation of multiple objects is still limited to the number of visible regions.

Method 3: “Instantiated” UI Objects
While this method is a bit more complex, instantiation of multiple objects is no longer limited to the number of visible regions. We used VI templates and multiple windows to “instantiate” or create LabVIEW UI objects at runtime.

blank 
LabVIEW-based graphical user interface we created for the Orion spacecraft

See the comparison chart below for more information on the pros and cons of the three methods. 

blank

Learn more about how to ensure your high-channel-count systems are designed to be highly configurable and easy to integrate with other systems in your facility in our latest white paper, Three Must-Have Features for High-Channel-Count Test Systems. 

Latest Posts

blank

Automated Test System for SunPower

G Systems, known for their expertise in test system development, was granted the task to help SunPower develop a solar power automated test system to test new printed circuit boards (PCBs). Through this project, G Systems aided in the increase of production line accuracy, reliability, and efficiency, all while decreasing costs to SunPower.

blank

A True Test of Our Measure

The global pandemic challenged and connected us like never before. It’s not unusual for the test systems we design to test and characterize our customer’s

Categories