Case Studies

Integrating DewesoftX into LabVIEW Software using Python Nodes

radio frequency
Posted in LabVIEW, Test & Measurement Automation

Summary

A DMC client requested that their automated test equipment (ATE) leverage the capabilities of DewesoftX to record and manipulate radio frequency (RF) data. DMC delivered a flexible and automated solution by integrating DewesoftX into LabVIEW, treating it like any other measurement device in the test system while maintaining its powerful native GUI capabilities.

The Problem: The GUI

DewesoftX software is distributed as a standalone executable (EXE) with its own built-in graphical user interface. However, it does not come with native LabVIEW support or drivers. As a result, the functions of DewesoftX cannot be directly called in LabVIEW code and must instead be manually controlled through the EXE. While the EXE provides users with a rich and familiar environment, it comes with trade-offs. Most notably, the GUI cannot be modified or customized like a native LabVIEW front panel.

Solution

Embedding an Executable GUI

This is a common scenario, as many manufacturers only provide an EXE-based interface. Rather than working against this limitation, we embraced it by embedding the DewesoftX window directly into our LabVIEW application. LabVIEW’s support for displaying external executables allows us to present DewesoftX as just another “device” in the system, maintaining a unified user experience while respecting the boundaries of what can and cannot be customized. 

DCOM Interface and Python Integration

What DewesoftX does expose is a DCOM interface that allows external programs to control it. Functions such as loading setup files, starting acquisition, and retrieving data are available through this API. Unfortunately, LabVIEW does not have strong native support or comprehensive documentation for directly calling DCOM interfaces. 

To work around this limitation, we introduced a Python wrapper. LabVIEW can call Python code using built-in Python nodes. We wrote a Python module that wraps the DCOM calls, making them accessible to LabVIEW as simple function calls, such as StartAcquisition(), LoadSetupFile(), and GetChannelValues()

This allowed us to bridge LabVIEW and DewesoftX programmatically while staying within the client’s preferred software stack. 

Additional Hurdles: Reference Handling and Launch Timing

During development, we discovered that the DCOM object reference didn’t behave consistently in all contexts. When LabVIEW was called from TestStand, or when using object-oriented LabVIEW code, the reference would sometimes become invalid. To address this, we made the DCOM object a global variable inside the Python code, ensuring a stable and persistent reference regardless of how or when the call was made. 

We also encountered timing issues when launching DewesoftX. Simply initializing the DCOM interface wasn’t always sufficient; the EXE had to be launched and ready before certain functions could be called. To solve this, we added a command-line call from LabVIEW to launch the DewesoftX EXE, followed by the DCOM initialization steps. This two-step launch process ensured consistent startup behavior. 

reference handling in Python

Outcome

The result of this project was a testing solution that seamlessly integrated DewesoftX into the client’s preferred tools, NI LabVIEW and NI TestStand, while preserving powerful measurement functionality and adding automation and flexibility.

test and measurement computer  

Why Use DMC for Your Next Project?

DMC specializes in solving tough integration challenges by bridging best-in-class platforms through creative engineering. Our ability to combine commercial software tools like LabVIEW and Python with OEM measurement devices like DewesoftX, using custom scripts and flexible architecture, ensures that clients retain the functionality they know while gaining the automation they need. 

Contact us today to learn more about our Test and Measurement solutions and how we can help you achieve your goals. 

 

Customer Benefits

  • Flexibility: Creating an interface between LabVIEW and DewesoftX easily allows any of DEWESoft's specialized equipment to be used or swapped in if the hardware setup ever needs to be drastically changed.
  • Familiarity: The customer was already familiar with DewesoftX, so integrating it into the custom LabVIEW software allowed them to leverage their experience.
  • Resource Efficient: Leveraging existing, specialized tools meant that DMC could implement a rich pool of tools into the customized software quickly.

Technologies

  • LabVIEW
  • Python
  • DewesoftX
  • DEWESoft