Displaying Specific Site Numbers in Custom C# Operator Interfaces (TSM)
- Updated2025-07-31
- 2 minute(s) read
You must complete the following steps to modify custom C# operator interfaces based on the TSM 2016 and earlier operator interfaces to display the configured site numbers when you disable sites in the default Configure Lot Settings dialog box or use the AvailableSites station setting. Refer to the C# source code for the operator interface for an example.
- Open a copy of MainForm.cs in the <TestStand Public>\UserInterfaces\NI_SemiconductorModule\<CSharp> directory.
- Complete the following steps to query the Semiconductor Module Manager to retrieve information about which site numbers the running test program includes.
- In the // Bin table member variables section of the file, add a new field to store the site numbers from the Semiconductor Module Manager.
- In the // Stop the lot statistics refresh timer while reconfiguring the controls section of the file, initialize the site numbers from the Semiconductor Module Manager.
- Change the existing // Reconfigure the controls if the number of sites has changed section of the file to detect if the site number information has changed in the Semiconductor Module Manager, update the operator interface information about the number of sites and the site numbers, and reconfigure the operator interface controls.
- To update the site status labels to show the correct site numbers, when you set the label text for the site in the // Site Label column section of the file, use the site index to get the appropriate site number from the stored site numbers of the operator interface.
- Complete the following steps in the // Add a column for each site section of the file to update the bin table to show the correct site numbers.
- (Optional) Rename the existing site variable for iterating over the sites to siteIndex to clarify that the variable is the index into the set of sites and not the site number itself.
- When you set the site column header text, use the site index to get the appropriate site number from the stored site numbers of the operator interface.
- Complete the following steps to update the code to avoid an error in the case that the Semiconductor Module Manager is using 0 sites, which can happen only when you disable sites in the default Configure Lot Settings dialog box or use the AvailableSites station setting.
- In the // Check if PartCountWindowSize has changed section of the file, use the AllSiteLotStatistics property to get the PartCountWindowSize instead of querying the siteLotStatistics array to get the PartCountWindowSize because the AllSiteLotStatistics object exists and is valid even when you use 0 sites.
- In the // Update part count window size if it has changed section of the file, remove the now unneeded parameter to the ConfigurePartCountWindowSizeIfChanged method and remove the comment that refers to the parameter.
- In the // Check if the SiteStatusIndicator controls have been drawn by checking if the width has been set section of the file, add a check to ensure that any site part count statistics controls exist before querying the property from the first one.