Publishing Results (TSM)
- Updated2025-04-10
- 3 minute(s) read
After you take measurements, you typically publish the results to the test sockets to evaluate and log. It might become difficult to know which piece of data to associate with each site and pin because you typically take measurement using multiple instruments connected to multiple DUTs and return arrays with the measurements mixed among each site. Use the appropriate Pin Query VI or .NET method with the Publish Data VI or Publish .NET method to return data to the correct site. Because the Publish Data VI and Publish .NET method manage arrays of different dimensions and extract the required data in the required order, you do not need to manage arrays before publishing measurements. The Pin Query VI or .NET method returns a Pin Query Context to associate a pin query operation with a matching instance of the publish operation.
The following figure shows how to publish pin-based data from a measurement taken with an NI-DCPower instrument.
LabVIEW

.NET (C#)
public static void ExampleCodeModule(ISemiconductorModuleContext semiconductorModuleContext, string[] pins) { NIDCPower[] dcPowerSessions; string[] dcPowerChannelStrings; var pinQuery = semiconductorModuleContext.GetNIDCPowerSessions(pins, out dcPowerSessions, out dcPowerChannelStrings); var measurementResults = new double[dcPowerSessions.Length]; Parallel.For(0, dcPowerSessions.Length, i => { measurementResults[i] = PerformMeasurement(dcPowerSessions[i], dcPowerChannelStrings[i]); }); pinQuery.Publish(measurementResults); }
In C# use the var keyword to declare the variable to store the Pin Query Context return value of the Pin Query method with a dynamic type. Using this technique can make it easier to select the correct Pin Query Context type based on which overload of the Pin Query method you select.
Per-Site Publishing
You can also use a site-based instance of the Publish Data VI or the Publish method on the SemiconductorModuleContext .NET object to publish values for each site. Use the optional Pin and Published Data Id parameters of the Publish Data VI or PublishPerSite .NET method to publish data for each site to tests that have non-empty Pin and Published Data Id fields.
LabVIEW

.NET (C#)
public static void ExampleCodeModule(ISemiconductorModuleContext semiconductorModuleContext, string comparisonPin1, string comparisonPin2, double comparisonTolerance) { NIDCPower[] dcPowerSessions; string[] channelStrings; string[] pins = {comparisonPin1, comparisonPin2}; var pinQuery = semiconductorModuleContext.GetNIDCPowerSessions(pins, out dcPowerSessions, out channelStrings); var results = PerformComparisonMeasurement(dcPowerSessions, channelStrings); var perSiteDataForPin1 = pinQuery.ExtractPinData(results, comparisonPin1); var perSiteDataForPin2 = pinQuery.ExtractPinData(results, comparisonPin2); int numSites = semiconductorModuleContext.SiteNumbers.Count; bool[] comparisonResult = new bool[numSites]; for (int siteIndex = 0; siteIndex < numSites; siteIndex++) { comparisonResult[siteIndex] = Math.Abs(perSiteDataForPin1[siteIndex] - perSiteDataForPin2[siteIndex]) < comparisonTolerance; } semiconductorModuleContext.PublishPerSite(comparisonResult); }