TestHeadPublicApi
Overview
The TestHeadPublicApi is a C# API designed to control and monitor the STS (Semiconductor Test System). It provides a simple and structured way to interact with the STS through seven core services, each handling specific aspects of the system.
Core Services
- General: Retrieve system information, status, and identification.
- Power: Control and monitor power supplies, subsystems, and distributions.
- DIB: Manage Device Interface Board (DIB) safety and interlocks.
- IO: Control digital I/O lines and air purge functionality.
- Sensor: Monitor temperature, fan, and proximity sensors.
- Device: Manage hardware devices (e.g., MUX silos).
- I2C: Perform low-level I2C communication.
Key Features
- Target Framework: .NET Framework 4.6.2
- Modes of Operation:
- Simulation Mode (
simulate = true): Offline mode for development without hardware
- Hardware Mode (
simulate = false): Connects to STS hardware. If remote IP is not provided, will use SystemController IP defined in STS_Definition.xml.
Quickstart
Option 1: Using NuGet Package
- Install the package in Visual Studio:
Install-Package NationalInstruments.STS.TestHeadApi
Option 2: Using DLLs Directly
- Reference this dll in your project:
NationalInstruments.STS.TestHeadApi.dll
Using the API
Create a TestHead instance:
// Include required namespace
using NationalInstruments.STS.TestHeadApi;
// Create TestHead instance
var testHead = new TestHeadPublicApi(customTestIp: null, timeoutMs: 5000, simulate: false); // Use true for offline testing
Common Operations:
// System information
var status = testHead.General.GetSystemStatus();
var dateTime = testHead.General.GetDateTime();
// Power control
testHead.Power.Supply("SystemPos12V").Enable();
// Sensor monitoring
var temps = testHead.Sensor.GetTemperatureSensors();
// DIB operations
var dibStatus = testHead.DIB.GetDIBInterlockStatus();
Service Methods
General Service
| Method |
Description |
Parameters |
Returns |
GetDateTime |
Gets the current date and time of the system controller |
None |
DateTime |
GetRunTimes |
Gets the total and current run time of the STS system. |
None |
RunTimeInfo |
GetControllerFirmwareVersion |
Gets the STS firmware version |
None |
Version |
GetSerialNumber |
Gets serial numbers |
None |
ComponentInfo |
GetPartNumber |
Gets part numbers |
None |
ComponentInfo |
GetSystemTag |
Gets system identifier |
None |
string |
GetSystemStatus |
Gets system status |
None |
SystemStatus |
Power Service
Manages all power-related operations through three main interfaces: Supply, Subsystem, and Distribution.
| Method |
Description |
Parameters |
Returns |
Supply |
Gets supply |
string supplyName - Name or alias from TesterDefinition.xml |
IPowerSupply |
Subsystem |
Gets subsystem |
string subsystemName - Name |
IPowerSubsystem |
Distribution |
Gets distribution |
string distributionName - Name |
IPowerDistribution |
Note: See Offline Mode in STS Maintenance Software for more information on TesterDefinition.xml
Valid Parameter Names
Power Supplies (valid supplyName)
| Constant |
String Value |
Description |
PowerNames.Supply.SYSTEM_POS_12V |
"SystemPos12V" |
System +12V power supply |
PowerNames.Supply.SYSTEM_POS_48V |
"SystemPos48V" |
System +48V power supply |
PowerNames.Supply.INTERNAL_12V |
"Internal12V" |
Internal 12V power supply (Read Only) |
PowerNames.Supply.INTERNAL_48V |
"Internal48V" |
Internal 48V power supply (Read Only) |
PowerNames.Supply.AUX_PS1_0 |
"AuxPs1/0" |
AUX power supply 1, channel 0 |
PowerNames.Supply.AUX_PS1_1 |
"AuxPs1/1" |
AUX power supply 1, channel 1 |
PowerNames.Supply.AUX_PS1_2 |
"AuxPs1/2" |
AUX power supply 1, channel 2 |
PowerNames.Supply.AUX_PS1_3 |
"AuxPs1/3" |
AUX power supply 1, channel 3 |
PowerNames.Supply.AUX_PS2_0 |
"AuxPs2/0" |
AUX power supply 2, channel 0 |
PowerNames.Supply.AUX_PS2_1 |
"AuxPs2/1" |
AUX power supply 2, channel 1 |
PowerNames.Supply.AUX_PS2_2 |
"AuxPs2/2" |
AUX power supply 2, channel 2 |
PowerNames.Supply.AUX_PS2_3 |
"AuxPs2/3" |
AUX power supply 2, channel 3 |
Note: Multi-channel AUX supply names (e.g., AuxPs1/1,2 or AuxPs1/0:3) will be supported in a future release.
Power Subsystems (valid subsystemName)
| Constant |
String Value |
Description |
PowerNames.Subsystem.SUBSYSTEM_48V |
"48V" |
48V power subsystem |
Power Distribution (valid distributionName)
| Constant |
String Value |
Description |
PowerNames.Distribution.RF |
"Rf" |
RF power distribution board |
Note: Both constants and string literals are supported. Using constants is recommended for type safety.
Three main interfaces
1. Power Supply Interface
Methods
| Method |
Description |
Example |
Enable() |
Turns ON the supply |
supply.Enable() |
Disable() |
Turns OFF the supply |
supply.Disable() |
GetPowerSupplyReading() |
Gets voltage/current readings |
var reading = supply.GetPowerSupplyReading() |
Properties
| Property |
Access |
Type |
Description |
Status |
get |
PowerSupplyStatus |
Current state (IsEnabled, IsInhibited, IsPowerGood, IsDIB) |
2. Power Subsystem Interface
Methods
| Method |
Description |
Example |
ResetMaxValues() |
Clears recorded maximums |
subsystem.ResetMaxValues() |
ResetConfig() |
Resets to default config |
subsystem.ResetConfig() |
ClearFaults() |
Clears fault conditions |
subsystem.ClearFaults() |
Properties
| Property |
Access |
Type |
Description |
FETState |
get/set |
bool |
FET transistor state |
PowerLimit |
get/set |
double |
Power limit in watts |
Info |
get |
PowerSubsystemInfo |
Detailed status and measurements |
IsPresent |
get |
bool |
Subsystem presence |
3. Power Distribution Interface
Properties
| Property |
Access |
Type |
Description |
BoardInfo |
get |
List<PowerDistributionInfo> |
Distribution board status |
DIB Service
| Method |
Description |
Parameters |
Returns |
GetDIBInterlockStatus |
Gets DIB interlock status |
None |
DIBInterlockStatus |
GetActuateInhibit |
Gets the state of the actuate inhibit setting |
None |
bool |
SetActuateInhibit |
Set the state of the actuate inhibit feature. When enabled, requests to change the state of pneumatic actuators are ignored. |
bool enable |
void |
GetDIBButtonLockout |
Gets the state of the DIB button lockout setting |
None |
bool |
SetDIBButtonLockout |
Set the state of the DIB button lockout setting. When enabled, pressing the DIB buttons will not unlock the DIB. |
bool enable |
void |
GetCLBLockCount |
Gets the number of times the CLB on the tester has been locked to an STS. |
None |
int |
GetSystemLockCount |
Gets the number of times CLBs have been locked on this tester. Returns total count and count per unique CLB by PN and SN. |
None |
string |
IO Service
| Method |
Description |
Parameters |
Returns |
GetTTLLine |
Gets TTL line status |
TTL line |
TTLLine |
SetTTLLine |
Sets TTL line state |
TTL line, bool isOutput, bool value |
void |
GetAllTTL |
Gets all TTL line identifiers |
None |
List<TTL> |
GetAirPurge |
Gets air purge state |
None |
bool |
SetAirPurge |
Sets air purge state |
bool enable |
void |
Sensor Service
| Method |
Description |
Parameters |
Returns |
GetFanSensors |
Gets all fan sensors |
None |
List<FanSensor> |
GetTemperatureSensors |
Gets all temperature sensors |
None |
List<TemperatureSensor> |
GetProximitySensors |
Gets all proximity sensors |
None |
List<ProximitySensor> |
SetFanSpeedMode |
Sets the fan speed mode for all fan sensors |
FanMode mode |
void |
DeviceService
| Method |
Description |
Parameters |
Returns |
GetMsMuxSilos |
Gets a list of the MS Mux Silos in the system |
None |
List<MsMuxSilo> |
I2C Service
| Method |
Description |
Parameters |
Returns |
Configure |
Configures I2C bus |
I2CBus bus <br> ushort baseAddress <br> I2CRate rate |
void |
Write |
Writes to I2C device |
I2CBus bus <br> ushort address <br> byte[] values <br> I2CAddressWidth addressWidth <br> bool writeAddress <br> byte pageSizeBytes <br> byte msDelayBetweenPages |
void |
Read |
Reads from I2C device |
I2CBus bus <br> ushort address <br> ushort numberBytesToRead <br> I2CAddressWidth addressWidth <br> bool writeAddress |
byte[] |
IDPROMRead |
Reads the IDPROM header from the DIB locked to the tester. Header data format is defined in Designing a DIB for STS T4M2 |
None |
IDPROMHeader |
IDPROMWrite |
Writes IDPROM header |
byte Format <br> DateTime DateManufactured <br> byte Revision <br> string Manufacturer <br> string PartNumber <br> uint SerialNumber <br> string Description <br> string Password <br> bool ClearUserArea = false |
void |
Data Types
General Types
| Type |
Properties |
Description |
DateTime |
Uses System.DateTime |
System date/time information |
RunTimeInfo |
string TotalRunTime<br>string CurrentRunTime |
CurrentRunTime: time since the system was last powered on <br> TotalRunTime: Cumulative time the system has been powered on |
Version |
int Major<br>int Minor<br>int Build<br>int Revision |
Version number components |
ComponentInfo |
string System<br>string Frame<br> string PowerBox <br> string PrimaryRCB <br> string SOMCarrier <br> string Corner2 <br> string PDD <br> string IOBoard |
Hardware component identification information |
SystemStatus |
string OverallStatus<br>string PowerState |
System status information |
Power Types
| Type |
Properties |
Description |
PowerSupplyStatus |
bool IsEnabled<br>bool IsInhibited<br>bool IsPowerGood <br> bool IsDIB <br> |
Power supply status flags:<br>- IsEnabled: Power supply channel is enabled and should be ON (either set by the user or on by default) <br> - IsInhibited: Power Supply channel has been turned OFF (either by the system or the user) <br>- IsPowerGood: Power Supply is ON and generating an acceptable voltage. <br> - IsDIB: Power supply is routed to the DIB (auxiliary power supplies only) |
PowerSupplyReading |
double Voltage<br>double Current |
Power supply measurements |
PowerSubsystemInfo |
double VoltageIn<br>double VoltageOut<br>double Current<br>double Power<br>double Temperature<br>string MaxStartTime<br>double MaxOutVoltage<br>double MaxOutCurrent<br>double MaxOutPower<br>bool GateState<br>bool FETControlState<br>bool FETBadFault<br>bool FETShortFault<br>bool OverPowerFault<br>bool OverCurrentFault<br>bool OverVoltageFault<br> bool UnderVoltageFault <br> bool OverTempFault |
Subsystem status and measurements |
PowerDistributionInfo |
string BoardType<br>byte State<br>double Temperature<br>double Humidity<br>double V_In_3p3<br>double V_In_12<br>double[] VoltInRipple<br>double[] VoltageOut<br>double[] CurrentOut<br>bool[] PowerGood |
Power distribution board status and measurements |
PowerNames |
Static Classes:<br>Supply - Power supply name constants<br>Subsystem - Power subsystem name constants<br>Distribution - Power distribution name constants<br><br> Properties: <br>Each class contains ValidNames array and individual name constants |
Static class containing predefined names for power components, used for validation and standardized naming |
DIB Types
| Type |
Properties |
Description |
DIBInterlockStatus |
bool DIBLocked<br>bool DIBPresent |
DIB interlock status indicating presence and lock state |
IO Types
| Type |
Properties |
Description |
TTL (enum) |
TTL0 = 0<br>TTL1 = 1<br>TTL2 = 2<br>TTL3 = 3 |
Available TTL line identifiers (0-3) |
TTLLine |
TTL line<br>bool output<br>bool value |
TTL line configuration:<br>- Line identifier<br>- Direction (true=output)<br>- State (true=high) |
Sensor Types
| Type |
Properties |
Description |
FanMode (enum) |
Auto = 0<br>HighSpeed = 1 |
Fan speed modes |
FanSensor |
FanMode Mode<br>string FanName<br>double Speed |
Fan sensor information and control |
TemperatureSensor |
string SensorName<br>double UpperLimit<br>double LowerLimit<br>double CriticalUpperLimit<br>double CriticalLowerLimit<br>double CurrentValue<br>bool OverLimits<br>bool IsCritical |
Temperature sensor with limits and readings |
ProximitySensor |
string SensorName<br>string Location<br>string SerialNumber<br>ushort Proximity<br>ushort AmbientLight<br>ushort WhiteData<br>bool Interrupt<br>ushort Threshold<br>string CalDate<br>string CalDueDate<br>double CalTemperature |
Proximity sensor with calibration data |
Device Types
| Type |
Properties |
Description |
MsMuxSilo |
string MuxType<br>byte State<br>string PartNumber<br>string SerialNumber<br>bool PowerGood_3p3<br>bool MezzPresent<br>bool eFuseFault |
MS Mux silo status and identification |
I2C Types
| Type |
Properties |
Description |
I2CBus (enum) |
IDPROM = 0, USER = 1 |
Available I2C bus selections |
I2CAddressWidth (enum) |
_8Bit = 0, _16Bit = 1 |
I2C address width options |
I2CRate (enum) |
_100kHz = 0,_400kHz = 1 |
I2C communication speed options |
IDPROMHeader |
byte Format <br> DateTime DateManufactured <br> byte Revision <br> string Manufacturer <br> string PartNumber <br> uint SerialNumber <br> string SerialNumberHex <br> string Description <br> bool ChecksumPassed <br> byte[] HeaderBytes |
IDPROM header information |
Note: SerialNumberHex is a computed property that returns the hexadecimal representation of SerialNumber (e.g., 0x3039). It is read-only and calculated from the SerialNumber field.