Writing TSM Global and Per Site Data from Custom Instrument Panels

Updated Aug 30, 2023

Reported In

Software

  • TestStand Semiconductor Module
  • TestStand
  • LabVIEW

Issue Details

I can use TestStand Semiconductor Module (TSM) Global Data and Per Site Data to communicate data between code modules correctly. However, when I try to use it in Custom Instrument Panels to communicate between code modules and the panels, I see the values updating in the Custom Instrument Panel during debugging, but when the panel is closed and I return to TestStand, the Global and Per Site Data values are as they were before the Custom Instrument Panel executed.

Solution

TSM Global Data and Site Data VIs cannot be used to share data between code modules and Custom Instrument Panels. The custom instrument panel has its own copy of the SemiconductorModuleContext, which it's a snapshot of the one in the code module. So, you can see values set by the code module, but changes made in the panels are not written back to the code module.

There is not a standard solution to communicate between Custom Instrument Panels and code modules. As a workaround, LabVIEW's shared variables or DVRs, which can be accessed, written and read by code modules and Custom Instrument Panels alike, can be used to share the needed data between them.

Additional Information

Implementing LabVIEW Shared Variables is simple and convenient because can be accessed by any VI in the system, but will need to be deployed. For more information, refer to Related Links and the Shared Variable.lvproj shipping example in the Example Finder.

DVRs can need more work but are more efficient and powerful for complex architectures. The simples way to implement them in this scenario is creating a DVRs in LabVIEW during Process Setup and store the reference in TSM as the Site or Global Data. The DVR can then be retrieved and modified in LabVIEW in the Custom Instrument Panel.

The downside is that the DVR will need to be released during Process Cleanup and the Custom Instrument Panel needs to run in the same context as the test program (LabVIEW Application Development Environment vs LabVIEW Runtime Engine).