Skip to main content
Skip table of contents

SECS/GEM API Reference

Introduction

SECS/GEM is an application-level communication protocol that is commonly used in the semiconductor fabrication, or fab, industry. Its primary purpose is to handle the details of sending/receiving commands from a master host control machine to several tools on the fab floor.

The exact SECS/GEM protocol specification is described at http://www.hume.com . nSpec uses third-party software to handle the protocol's implementation details.

The SECS/GEM protocol defines a large list of control commands that it supports. However, nSpec handles a small subset of all the SECS/GEM defined control commands sent from host machines, e.g., start jobs remotely. This document outlines the supported commands the nSpec tool supports along with specific examples.

SECS/GEM Basics

From the SECS-II standard:

"SECS-II defines the method of conveying information between equipment and host in the form of messages. These messages are organized into categories of activities, called streams, which contain specific messages, called functions."

Each SECS message specifies a stream and a function. Specific SECS messages are often referred to in this format: S(number)F(number). For example S1F13 refers to SECS message Stream 1, Function 13.

There are two kinds of messages:

  • Request: sometimes called the primary message. These originate from the Host. Requests are odd-number functions, such as S1F1.

  • Response: sometimes known as a secondary message. These originate from the Equipment, which is nSpec is our case. Responses are even-number functions, such as S1F2.

Thus, the Host can send an S1F1 Request, which establishes if the Equipment is on-line. If so, then the Equipment will respond with an S1F2 Response, which signifies that the Equipment is on-line. Each request can only have a single response message, or no response message if none is needed. This Request-and-Response pattern is the basis of the module, and the standard.

Stream Functions

The nSpec Application explicitly supports a subset of all StreamFunctions, though more are supported inherently through our underlying SECS/GEM library. This guide documents only those which surface within nSpec Application logic:

Stream Function

Type

Description

S1F3

Request

Obtain value of status variable from equipment

S1F4

Response

Obtain value of status variable from equipment response

S1F13

Request

Establish Communications Request

S2F15

Request

New Equipment Constant Send

S2F16

Response

New Equipment Constant Ack

S2F41

Request

Host Command Send

S2F42

Response

Host Command Acknowledge

S2F67

Request

Validate Wafer OCR ID

S2F69

Request

Verify Cassette Mapping Before Job

S5F1

Request

Alarm Report Send

S6F11

Request

Event Report Send

S6F13

Request

Annotated Event Report Send

States

Communication State

The communication state can be viewed in the UI but not requested via GEM.

Communication State

Description

COMM_UNKNOWN

Unknown SECS/GEM communication status

COMM_DISABLED

Communication over SECS/GEM is disabled

COMM_ENABLED

Communication over SECS/GEM is enabled and connected

COMM_ENABLED_NOT_COMMUNICATING

Communication over SECS/GEM is enabled but not connected

Control State

The control state can be viewed in the UI but not requested via GEM.

Control State

Description

CONTROL_UNKNOWN

Unknown SECS/GEM communication status

CONTROL_OFFLINE

SECS/GEM communication is offline

CONTROL_ONLINE_LOCAL

SECS/GEM communication is run locally

CONTROL_ONLINE_REMOTE

SECS/GEM communication is run via a remote

Control Location

Control location can be requested via GEM with VID = 300, with local control = 0 and remote control = 1.

For example, you can request to see the remote control equipment status with the following request:

CODE
 S1F3 W
  <L [1]
   <U2 300 >
  >.

Control Location

Value

Description

Control location (local)

CONTROL_LOCATION_LOCAL

0

SECS/GEM communication is run locally

Control location (remote)

CONTROL_LOCATION_REMOTE

1

SECS/GEM communication is run via a remote

Connection State

Connection state can be requested via GEM with VID = 301, with local control = 0 and remote control = 1.

For example, you can request to see the remote control equipment status with the following request:

CODE
 S1F3 W
  <L [1]
   <U2 301 >
  >.

 

State

Value

Description

Unknown

STATE_UNKNOWN

0

Client state is unknown

Offline

STATE_OFFLINE

1

Client is offline

Listening

STATE_LISTENING

2

Client is ready to accept a connection

Not Selected

STATE_NOT_SELECTED

3

Host rejected client’s connection

Online

STATE_ONLINE

4

Client is connected to Host

Process State

Connection state can be requested via GEM with VID = 810, with local control = 0 and remote control = 1.

For example, you can request to see the equipment status remotely with the following request:

CODE
 S1F3 W
  <L [1]
   <U2 810 >
  >.

GEM standard (SEMI E30) requires a Process State Model. The state values are integers >= 64.

State

Value

Description

INIT

PROCESS_INIT

64

nSpec is initializing SECS/GEM on Client

IDLE

PROCESS_IDLE

65

nSpec is waiting for commands from an operator

SETUP

PROCESS_SETUP

66

The Scan Settings dialog is opened in nSpec or a scan is being configured at the start of a run

START

PROCESS_START

67

An nSpec scan has been started

EXECUTING

PROCESS_EXECUTING

68

An nSpec scan is currently running

COMPLETE

PROCESS_COMPLETE

69

An nSpec scan has finished running

ERROR

PROCESS_ERROR

70

SECS/GEM is in an error state

Variables

The SECS/GEM protocol reserves Variable IDs (VIDs) 200 to 999 for protocol defined variables. VIDs 1000 to 9999 are reserved for application specific variables. nSpec breaks this section down as follows: ECVs from 1000 to 2999, SVs from 9000 to 9099, and DVVALs from 9100 to 9999.
All variable values can be retrieved from the Host via an S1F3 message. The application defined variables can be set via S2F15 message from the Host.

Note: S2F15 commands must ask for a response for nSpec to acknowledge and process the SECS message.

Protocol Defined Variables

VID

Variable Name

TSN

Class

Description

220

VID_AnnotateEventReports

TF

ECV

If true, event reports are sent in the annotated format of S6F13 instead of S6F11 (this is handled by nSpec’s program options)

715

VID_PPError

A

DVVAL

Contains information about a failure to verify a process program

720

VID_PPExecName

A

SV

The PPID of a selected program

722

VID_PPUsedName

A

SV

The PPID of the last used program for processing which may still be in use

800

VID_ProcessStatePrevious

U1

SV

The previous processing state of nSpec

810

VID_ProcessStateCurrent

U1

SV

The current processing state of nSpec

Application Defined Variables

 

VID

Variable Name

TSN

Class

Description

1101

ECV_ScanSingleWaferID

A:256

ECV

Wafer ID to be used for a single wafer scan

1102

ECV_ScanSingleJobName

A:256

ECV

Job to be used for a single wafer scan

1103

ECV_JobProperties

A:256

ECV

Job properties to be saved to job with the “SET_JOB_PROPERTIES“ Host command, or to be run with a job in the case of a Host commanded “START_SCAN”

VID

Variable Name

TSN

Class

Description

1201-1225

ECV_ScanCassetteWafer01_ID - ECV_ScanCassetteWafer25_ID

A:256

ECV

Wafer IDs to be used for a cassette scan (ECV_ScanCassetteWafer01_ID refers to the wafer ID for slot 1, ECV_ScanCassetteWafer02_ID refers to the wafer ID for slot 2, and so on)

1301-1325

ECV_ScanCassetteWafer01_Job - ECV_ScanCassetteWafer25_Job

A:256

ECV

Job to be used for a cassette scan (ECV_ScanCassetteWafer01_Job refers to the job name for slot 1, ECV_ScanCassetteWafer01_Job refers to the job name for slot 2, and so on)

1401 – 1425

ECV_ScanCassetteWafer01_Props ECV_ScanCassetteWafer25_Props

A:256

ECV

Job properties to be used for a cassette scan

ECV_ScanCassetteWafer01_Props refers to the job properties for slot 1, ECV_ScanCassetteWafer25_Props refers to the job properties for slot 25.

2000

ECV_ScanSubDirectory

A:256

ECV

Subdirectory to be used for scan (valid for single scan and cassette scan)

2100

ECV_ManualMovePositions

A:256

ECV

Stores the X, Y, Z and Objective positions to move to during a “MOVE_STAGE_AND_OBJECTIVE” Host command

9001

SV_ServerPID

U4

SV

The SECS server process ID

9002

SV_ApplicationPID

U4

SV

The application process ID

9003

SV_StartupTimestamp

A

SV

GEM communication startup timestamp

9004

SV_MicroscopeConfiguration

A

SV

nSpec configuration

9005

SV_ProcessBinDir

A

SV

nSpec bin folder

9006

SV_ProcessDataDir

A

SV

nSpec data folder

9007

SV_ProcessScanDir

A

SV

nSpec scan folder

9008

SV_ProcessTempDir

A

SV

nSpec temp folder

9009

SV_BusyFlag

TF

SV

nSpec busy flag

Note: this is the same as DVVAL_BusyFlag (just allows the host to retrieve data differently)

9100

DVVAL_BusyFlag

TF

DVVAL

nSpec busy flag

Note: this is the same as SV_BusyFlag (just allows the host to retrieve data differently)

9101

DVVAL_SampleId

A

DVVAL

Current scan’s sample ID

9102

DVVAL_CurTileNo

U4

DVVAL

Current tile number being scanned

9103

DVVAL_MaxTileNo

U4

DVVAL

Maximum tile count to be in a scan

9104

DVVAL_CassetteSlot

U4

DVVAL

A scan’s current cassette slot

9105

DVVAL_AnalysisOutputPath

A

DVVAL

Completed analysis’s output path

9106

DVVAL_AnalysisScanID

U4

DVVAL

Completed analysis’s scan ID

9107

DVVAL_AnalysisAnalysisID

U4

DVVAL

Completed analysis’s ID

9108

DVVAL_ScanErrorMessage

A

DVVAL

Error message of the previously failed scan

9109

DVVAL_AnalysisAnalysisType

A

DVVAL

Completed analysis’s type

9110

DVVAL_ScannedImagePath

A

DVVAL

Scanned image path

9111

DVVAL_SkippedWaferSlotNum

A

DVVAL

Skipped wafer slot

VID

Variable Name

TSN

Class

Description

9112

DVVAL_JobProperties

A

DVVAL

List of all job properties for all jobs

9114

DVVAL_CalibrationFactor

A

DVVAL

Last known calibration factor set by the calibration analysis and set in program options. This can be polled after the ACEID_AnalysisComplete (5002) event. Note that this is only available for specific, uncommon workflows.

9116

DVVAL_AnalysisSampleID

A

DVVAL

ID of sample being analyzed.

9118

DVVAL_AlignmentErrorMessage

A

DVVAL

Error message of the previously failed alignment

9119

DVVAL_ScanAbortMessage

TF

DVVAL

Status of most recent abort command (1 = successfully aborted job, 0 = job not aborted)

9120

DVVAL_InvalidCommandErrorMessage

A

DVVAL

Error message of previously failed S2F41 command

9121

DVVAL_LoadPortCassetteStates

A

DVVAL

Returns a list in the format of "Primary=[primary state], Secondary=[secondary state]" where primary is one load port and secondary is the other.

Each respective state will be "Uninitialized" before the hardware is available during boot, "NOT_LOADED" if carrier is not present, or "LOADED" if carrier is present.

Note that this is only available for Autoloader3 Gen2 systems.

9122

DVVAL_LoadPortStateChangeID

A

DVVAL

Returns state of a single load port. This only stores the state of the most recent change and is not meant to be used to poll each load port.

Load port states are the same as described for DVVAL_LoadPortCassetteStates.

Note that this is only available for Autoloader3 Gen2 systems.

9123

DVVAL_AnalysesLeftToRunWithCurrentSampleID

U4

DVVAL

Number of remaining analyses in queue for this specific sample ID (usually from a group analysis).

9124

DVVAL_AllAnalysesAbortedMessage

TF

DVVAL

Returns 1 if the analyses abort all command was successful, 0 if unsuccessful.
Note that this is dependent on the state of the program option How to Handle Queued Analyses When Scan is Canceled in the Scanning category. 

9125

DVVAL_AllAnalysesCompleteForSampleIDMessage

A

DVVAL

Returns the sample ID of the completed analysis group. Note that depending on workflow, this could either be the ID set by GEM host or the ID read at the OCR

9151

DVVAL_CurrentWaferSampleID

A

DVVAL

Sample ID of a wafer being currently scanned

9152

DVVAL_CurrentWaferOriginSlot

A

DVVAL

Origin slot of wafer currently being scanned.

9153

DVVAL_CurrentWaferOriginLoadPort

A

DVVAL

Origin load port of a wafer being currently scanned

VID

Variable Name

TSN

Class

Description

9201

DVVAL_MoveWaferFromCassetteSlot

A

DVVAL

Slot number of wafer moved from cassette.

9202

DVVAL_MoveWaferToCassetteSlot

A

DVVAL

Slot number of wafer moved to cassette.

9203

DVVAL_MoveWaferFromAlignerSlot

A

DVVAL

Slot number of wafer moved from aligner slot.

9204

DVVAL_MoveWaferToAlignerSlot

A

DVVAL

Slot number of wafer moved to aligner slot.

9205

DVVAL_MoveWaferFromStageSlot

A

DVVAL

Slot number of wafer moved from stage.

9206

DVVAL_MoveWaferToStageSlot

A

DVVAL

Slot number of wafer moved to stage.

9301

DVVAL_MoveWaferFromCassetteLoadPortId

A

DVVAL

ID of the load port that the wafer was moved from.

Note that this is only available for Autoloader3 Gen2 systems.

9302

DVVAL_MoveWaferToCassetteLoadPortId

A

DVVAL

ID of the load port that the wafer is moved to.

Note that this is only available for Autoloader3 Gen2 systems.

9303

DVVAL_MoveWaferFromAlignerLoadPortId

A

DVVAL

ID of the load port that the wafer being moved from the aligner is from.

Note that this is only available for Autoloader3 Gen2 systems.

9304

DVVAL_MoveWaferToAlignerLoadPortId

A

DVVAL

ID of the load port that the wafer being moved to the aligner is from.

Note that this is only available for Autoloader3 Gen2 systems.

9305

DVVAL_MoveWaferFromStageLoadPortId

A

DVVAL

ID of load port that the wafer being moved from the stage, is from.

Note that this is only available for Autoloader3 Gen2 systems.

9306

DVVAL_MoveWaferToStageLoadPortId

A

DVVAL

ID of load port that the wafer being moved to the stage, is from.

Note that this is only available for Autoloader3 Gen2 systems.

9401

DVVAL_MoveWaferFromCassetteSampleId

A

DVVAL

Sample ID of wafer being moved from cassette.

9402

DVVAL_MoveWaferToCassetteSampleId

A

DVVAL

Sample ID of wafer being moved to cassette.

9403

DVVAL_MoveWaferFromAlignerSampleId

A

DVVAL

Sample ID of wafer being moved from aligner.

9404

DVVAL_MoveWaferToAlignerSampleId

A

DVVAL

Sample ID of wafer being moved to aligner.

9405

DVVAL_MoveWaferFromStageSampleId

A

DVVAL

Sample ID of wafer being moved from stage.

9406

DVVAL_MoveWaferToStageSampleId

A

DVVAL

Sample ID of wafer being moved to stage.

Alarms

The SECS/GEM protocol contains alarms that are meant to notify hosts of abnormal situations on the system.

Application Defined Alarms

Sample ID Alarms

S5F1 alarm messages are sent when a requested sample ID does not match a read OCR wafer ID. The format of this message is:

CODE
S5F1
<L [3]>
    <B 0x80>
   <U4 [SlotErrorCode]>
   <A SampleId>
>.

Where ‘SlotErrorCode’ is a number that represents the slot which had the sample ID/OCR ID mismatch. The codes range 2001-2025 for slot 1-25. These alarms can be disabled by setting the program option “GEM->Send S5F1 alarms for OCR mismatches” to 0.

Events

The SECS/GEM protocol reserves Collection Event IDs (CEIDs) 4000 to 4999 for protocol defined events. CEIDs 5000 to 5999 are reserved for application specific events.

Protocol Defined Collection Events

CEID

Event Name

Description

4000

CEID_ControlStateOffline

SECS/GEM Control State switched to Offline

4001

CEID_ControlStateLocal

SECS/GEM Control State switched to “Online (local)”

4002

CEID_ControlStateRemote

SECS/GEM Control State switched to “Online (remote)”

4040

CEID_ProgramSelected

SECS/GEM Process State switched to “SETUP”

4047

CEID_ProcessStarted

SECS/GEM Process State switched to “START”

4048

CEID_ProcessCompleted

SECS/GEM Process State switched to “COMPLETE”

4049

CEID_ProcessStopped

SECS/GEM Process State switched to “ERROR”

4050

CEID_ProcessStateUpdate

SECS/GEM Process State has been updated (poll VID_ProcessStateCurrent to get the new Process State)

Application Defined Collection Events

CEID

Event Name

Description

DVVALs Updated With This Event

5000

ACEID_Busy

Microscope busy flag has been changed

DVVAL_BusyFlag

5001

ACEID_ScanProgress

Scan progress continues (cassette slot updated or tile count increments)

DVVAL_CurTileNo
DVVAL_MaxTileNo DVVAL_CassetteSlot

5002

ACEID_AnalysisComplete

Analysis completed

DVVAL_AnalysisOutputPath
DVVAL_AnalysisSampleID
DVVAL_AnalysisScanID DVVAL_AnalysisAnalysisID
DVVAL_AnalysisAnalysisType
DVVAL_AnalysesLeftToRunWithCurrentSampleID
DVVAL_CalibrationFactor

5003

ACEID_WaferScanStart

A cassette job has been started

DVVAL_CurrentWaferSampleID

5004

ACEID_WaferScanEnd

A cassette job has finished

DVVAL_CurrentWaferSampleID

DVVAL_ScannedImagePath

5005

ACEID_ScanningError

An error occurred during a scan

DVVAL_ScanErrorMessage

5006

ACEID_WaferScanSkipped

A wafer scan was aborted

DVVAL_SkippedWaferSlotNum

5007

ACEID_JobPropertiesSet

Saves the commanded job properties to the commanded job as set up by the “SET_JOB_PROPERTIES” S2F41 command from the Host

DVVAL_JobProperties

5009

ACEID_AlignmentError

An error occurred during alignment (focus failure, failure to find alignment points, etc.)

DVVAL_AlignmentErrorMessage

5010

ACEID_ScanAbort

Response to a job abort command sent from the Host

DVVAL_ScanAbortMessage

5011

ACEID_InvalidCommandError

An error occurred when processing the most

DVVAL_InvalidCommandErrorMessage

5012

ACEID_MoveWaferFromCassette

Wafer moved from cassette.

DVVAL_MoveWaferFromCassetteSlot
DVVAL_MoveWaferFromCassetteLoadPortId DVVAL_MoveWaferFromCassetteSampleId

5013

ACEID_MoveWaferToCassette

Wafer moved to cassette.

DVVAL_MoveWaferToCassetteSlot
DVVAL_MoveWaferToCassetteLoadPortId

DVVAL_MoveWaferToCassetteSampleId

5014

ACEID_MoveWaferFromAligner

Wafer moved from aligner.

DVVAL_MoveWaferFromAlignerSlot DVVAL_MoveWaferFromAlignerLoadPortId
DVVAL_MoveWaferFromAlignerSampleId

5015

ACEID_MoveWaferToAligner

Wafer moved to aligner.

DVVAL_MoveWaferToAlignerSlot
DVVAL_MoveWaferToAlignerLoadPortId DVVAL_MoveWaferToAlignerSampleId

5016

ACEID_MoveWaferFromStage

Wafer moved from stage.

DVVAL_MoveWaferFromStageSlot
DVVAL_MoveWaferFromStageLoadPortId
DVVAL_MoveWaferFromStageSampleId

5017

ACEID_MoveWaferToStage

Wafer moved to stage.

DVVAL_MoveWaferToStageSlot DVVAL_MoveWaferToStageLoadPortId DVVAL_MoveWaferToStageSampleId

5020

ACEID_LoadPortStateChangeToLoaded

Load port state changed to “Loaded”.

DVVAL_LoadPortCassetteStates DVVAL_LoadPortStateChangeID

5021

ACEID_LoadPortStateChangeToNotLoaded

Load port state changed to “Not Loaded”.

DVVAL_LoadPortCassetteStates
DVVAL_LoadPortStateChangeID

5022

ACEID_AllAnalysesAborted

All analyses aborted. Behavior following this event is dependent on a program option. See Event Use Cases below for more details.

DVVAL_AllAnalysesAbortedMessage

5023

ACEID_ScanJobEnd

A cassette or wafer job has finished.

N/A

5024

ACEID_AllAnalysesCompleteForSampleID

All analyses complete for a given sample ID.

DVVAL_AllAnalysesCompleteForSampleIDMessage

Event Use Cases

ACEID_BUSY (5000)

This event triggers once at the start and once at the end of a job. It will also trigger when initializing the system hardware.

This event is triggered when the system switches busy states. The busy state is set when a scan is currently executing or when the stage is initializing. To determine which state the system has just transitioned into, request data variable 9100 (DVVAL_BusyFlag) which will return a 0 for “not busy” or a 1 for “busy”. Note: the same data is available in status variable 9009 (SV_BusyFlag).

ACEID_SCANPROGRESS (5001)

This event triggers once per tile of a sample scan.

During a scan, progress updates will be posted during every newly scanned tile. Every time this event is triggered, data variables 9102 (DVVAL_CurTileNo) and 9103 (DVVAL_MaxTileNo) can be read to show the progress of how many tiles there will be in total and how many of them have been scanned so far.

ACEID_ANALYSISCOMPLETE (5002)

This event triggers once per analysis.

When an analysis completes, this event will be triggered to notify the host. At this point, the host can request the following pieces of data: the analysis output path in data variable 9105 (DVVAL_AnalysisOutputPath), the analysis scan ID in data variable 9106 (DVVAL_AnalysisScanID), the analysis ID in data variable 9107 (DVVAL_AnalysisAnalysisID), the analysis type in data variable 9109 (DVVAL_AnalysisAnalysisType), and the sample ID of the sample analyzed in data variable 9116 (DVVAL_AnalysisSampleID).

ACEID_WAFERSCANSTART (5003)

This event triggers once per sample scanned.

This event triggers whenever a wafer scan is started by the nSpec. The host can poll the data variable 9151 (DVVAL_CurrentWaferSampleID) to see the current wafer sample ID.

ACEID_WAFERSCANEND (5004)

This event triggers once per sample scanned.

This event triggers whenever a scan is completed by the nSpec. The output scan path will be included with this event if the host requests data variable 9110 (DVVAL_ScannedImagePath). As with the ACEID_WAFERSCANSTART event, the host can also poll data variable 9151 (DVVAL_CurrentWaferSampleID) to see the just scanned wafer sample ID. These data variables will be the same as they were when the ACEID_WAFERSCANSTART event was triggered.

ACEID_SCANNINGERROR (5005)

This event triggers once per sample scanned (if necessary, will not show unless there is an error).

This event can be triggered by a plethora of scanning errors. Any failure during a scan should trigger this event, including a failed analysis (instead of event 5002, ACEID_AnalysisComplete). To get a better understand of what the specific error was, a host should request data variable 9108 (DVVAL_ScanErrorMessage) when it sees this event triggered.

ACEID_WAFERSCANSKIPPED  (5006)

This event triggers once per sample skipped (if necessary, will not show unless there is a skipped wafer).

During a scan, a user has the option to skip a single wafer or to cancel a job entirely (more relevant for cassette jobs). If a user chooses to skip a specific wafer, this event will be triggered. To determine which wafer was the one skipped, request data variable 9111 (DVVAL_SkippedWaferSlotNum) which will identify the slot number that the wafer originated from.

ACEID_JOBPROPERTIESSET (5007)

This event triggers once per command sent by the GEM host to obtain job properties (GET_JOB_PROPERTIES).

Notifies the Host when equipment constant variable 1103 (ECV_JobProperties) was updated with the current job properties list for a selected job. This event happens shortly after a “GET_JOB_PROPERTIES” received from the Host.

ACEID_ALIGNMENTERROR (5009)

This event triggers once per sample (if necessary, will not show if there is no alignment error).

This event triggers any time that an alignment error occurs (during a scan or during layout creation). This can be caused by a number of reasons, but to determine which request the data variable 9118 (DVVAL_AlignmentErrorMessage).

ACEID_SCANABORT (5010)

This event triggers once per job (if necessary, will not show if there is no request to cancel the job).

This event triggers whenever a scan was attempted to be aborted. If a host requests to abort a scan but the scan was not aborted, false will be assigned to data variable 9119 (DVVAL_ScanAbortMessage). If the abort was successful, then true will be assigned to 9119. This verification event was implemented to prevent hosts from hanging up expecting nSpec to abort when nSpec never successfully processed the request.

ACEID_INVALIDCOMMANDERROR  (5011)

This event triggers once per invalid command sent (if necessary, will not show if all messages sent by GEM host are valid).

This event is triggered whenever an invalid command message is sent over from the Host. For example, when a “START_SCAN” command is sent without first setting the equipment constant variables 1101 and 1102 (ECV_ScanSingleWaferID and ECV_ScanSingleJobName respectively). When this event is triggered, the Host can request data variable 9120 (DVVAL_InvalidCommandErrorMessage) for a description of what specifically was invalid.

ACEID_ALLANALYSESABORTED (5022)

This event triggers when all analyses are aborted via the STOP_JOB command.

Following this event, nSpec behavior depends on the state of the program option How to Handle Queued Analyses When Job is Aborted in the Scanning category, and also on whether or not a scan or analysis is running.

The behavior of the How to Handle Queued Analyses When Job is Aborted program option is:

  • Continue → Queued analyses continue running

  • If Running → Queued analyses cancelled if a scan is running

  • Always → Queued analyses always cancelled

In the table below, “X” represents either yes or no. “Second” means that the scan will cancel and the analysis will finish, and which ever process ends last will send the 5022 event.

Program Option

Is Scan Running?

Is Analysis Running?

When 5022 Event is Triggered

5022 Event Response

Continue

X

X

Immediately

False

If Running

No

X

Immediately

False

If Running

Yes

No

When Scan is Cancelled

True

If Running

Yes

Yes

Second

True

Always

Yes

Yes

Second

True

Always

Yes

No

When Scan is Cancelled

True

Always

No

Yes

When Analysis Ends

True

Always

No

No

Immediately

True

ACEID_SCANJOBEND (5023)

This event triggers once per cassette or wafer job started by the nSpec tool (whether local or via SECS/GEM). This event notifies the Host that the scanning portions of the job have been complete (all scanning, state restoration of hardware, wafers returned, etc.). This event can be used to trigger a second job request from the Host to the nSpec tool. Note that if a second job is requested of the nSpec from the Host before this event is received from the previous job, the system will likely error out.

ACEID_ALLANALYSESCOMPLETEFORSAMPLEID (5024)

This event triggers when all analyses have completed for a given sample.

Once this event triggers, the Host can poll DVVAL_AllAnalysesCompleteForSampleIDMessage (9125) to get the sample ID for the analyses that are complete. Depending on recipe setup, this sample ID can be the sample ID sent from the Host or it can be the OCR-read ID.

If a Host is configured to store the last sample ID of a given carrier (can be collected from other GEM messages like DVVAL_MoveWaferToStageSampleId (9406), it can use this analyses complete event to signal a completed carrier.

Host Commands

The SECS/GEM protocol allows for the Host and Client to establish custom commands via S2F41 and S2F15 messages.

Note: S2F41 commands must ask for a response for nSpec to acknowledge and process the SECS message.

Accepted Host Command List

Command

Description

START_SCAN

Starts a scan with the given wafer ID, job name and optional job properties (Note: wafer ID is used as the name the scan database and folder)

START_CASSETTE

Starts a cassette scan with the currently setup wafer IDs (ECV_ScanCassetteWafer01_ID - ECV_ScanCassetteWafer25_ID), corresponding job names (ECV_ScanCassetteWafer01_Job - ECV_ScanCassetteWafer25_Job) and optional job properties (ECV_ScanCassetteWafer01_Props – ECV_ScanCassetteWafer25_Props)

STOP_JOB

Stops the current job if one is in progress and cancels all scheduled analyses

SET_JOB_PROPERTIES

Will save the job properties set in ECV_ScanSingleJobName to the job name set in ECV_JobProperties

TURN_LIGHTS_OFF

Will turn off all the lights for the system

MOVE_STAGE_AND_OBJECTIVE

Will move the stage and objective to the set positions in ECV_ManualMovePositions

CLEAN_OBJECTIVES

Starts air knife cleaning of the objectives

nSpec Host Command Acknowledgement

ACK ID

Host Command ACK Name

Description

0

HCACK_COMPLETED

Okay, successful acknowledgement

1

HCACK_INVALID_COMMAND

Invalid command sent from Host

2

HCACK_CANNOT_DO_NOW

Host is busy

3

HCACK_PARAMETER_ERROR

Parameter error for the given Host command

4

HCACK_INITIATED_ASYNCHRONOUS

Initiated command for asynchronous completion

6

HCACK_INVALID_OBJECT

Invalid GEM object

7

HCACK_STOP_JOB_COMMAND

Acknowledgement of “STOP_JOB” Host command

Host Command Examples

START_SCAN

This command is documented in the Workflows section.

START_CASSETTE

This command is documented in the Workflows section.

STOP_JOB

During a wafer or cassette scan, a Host can command the job to be completely aborted via a “STOP_JOB” command. This command uses a special acknowledge ID, HCACK_STOP_JOB_COMMAND (7). To verify that the Host and nSpec stay in sync, an ACEID_ScanAbort (5010) event will trigger once nSpec has successfully processed the “STOP_JOB” command. When this event is detected by the Host, the Host should request SECS/GEM variable

DVVAL_ScanAbortMessage (9119) which will notify the Host if nSpec successfully aborted (true = successful, false= not aborted). The event was added so any Host will not assume nSpec aborted if the command was received at an invalid time (like when a job is not running for example).

Note: if a “STOP_JOB” command is successfully received, all queued analyses will also be aborted.

SET_JOB_PROPERTIES

After the ECV_JobProperties (1103) is updated with job properties, the Host can run a job via a “START_SCAN”

command or to save the job properties via a “SET_JOB_PROPERTIES” command. If the scan is started immediately, then the current job properties in ECV_JobProperties will be used for that run but then discarded. To permanently save the job properties in the ECV_JobProperties variable, run the command “SET_JOB_PROPERTIES”.

TURN_LIGHTS_OFF

When nSpec is in an IDLE state, sending the command “TURN_LIGHTS_OFF” will result in all lighting sources (including lasers) on nSpec to be turned off.

MOVE_STAGE_AND_OBJECTIVE

When nSpec is in an IDLE state, the stage and the objective position can be controlled remotely in two steps. First, set the X, Y, Z and Objective values respectively with the StageAndObjectivePositions_Modify command, which will set the ECV_ManualMovePositions (2100) SECS/GEM variable. The X and Y parameters are required, but the Z and Objective parameters are optional. The X, Y and Z parameters can accept any value along their respective axes range. The Objective parameter can accept any of the objective position values that can be found in the Select Objectives dialog (which can be found by clicking Objective->Define Objectives in the Camera View window).

Once valid parameters are set with the StageAndObjectivePositions_Modify command, send a StageAndObjectivePositions_Move (MOVE_STAGE_AND_OBJECTIVE) command to move to all the positions stored in the ECV_ManualMovePositions (2100) SECS/GEM variable.

CLEAN_OBJECTIVES

When nSpec is in and IDLE state, this will start an air knife cleaning of the objectives. When the air knife hardware is present, the stage will move away from the objectives and the objective turret will rotate to its farthest position. The oxygen and nitrogen gases will then turn on as the objective turret rotates to the opposite end, cleaning each objective as it passes over the gas “knife” that is formed. When the cleaning is complete, the objective turret and stage will return to their original positions from before the cleaning process was started.

Workflows

Running a Cassette Scan via SECS/GEM

A cassette job is run in two steps. Step one is to set up the cassette job via an S2F15 message. The message should include a wafer scan ID (ECV_ScanCassetteWafer01_ID – ECV_ScanCassetteWafer25_ID)*, a job name (ECV_ScanCassetteWafer01_Job – ECV_ScanCassetteWafer25_Job) and optional job properties (ECV_ScanCassetteWafer01_Props – ECV_ScanCassetteWafer25_props set for every slot in the cassette that you want to run the job for. The pairings are mapped out so the 1201 – 1225/1301 – 1325/1401 – 1425 maps to slot 1 – 25 respectively.

For example, if you want to scan the wafers in slots 5 and 12, you would set up the following message:

CODE
S2F15 W
  <L [5]
    <L [2]
      <U4 1205 >
      <A "Slot05_ID_1" >
  >
  <L [2]
    <U4 1305 >
    <A "Slot05_Job" >
  >
  <L [2]
    <U4 1405>
    <A “JobProp1,Value1;JobProp2,Value2”>
  >
  <L [2]
    <U4 1212 >
    <A "Slot12_ID_1" >
  >
  <L [2]
    <U4 1312 >
    <A "Slot12_Job" >
  >
  <L [2]
    <U4 1412>
    <A >
  >
>.

Note: optional job properties were provided for slot 5 but none for slot 12. A blank value was sent for slot 12’s job properties to clear out any previously sent value for this ID.

After the S2F15 message is sent, the cassette job is initiated over SECS/GEM via a START_CASSETTE S2F41 command.

CODE
S2F41 W
  <L [2]
    <A "START_CASSETTE" >
    <L [0]
    >
  >.

Once this command is received and acknowledged by nSpec, the Host will receive a S2F69 message containing a comma-separated list of all slots that will be scanned. Depending on the state of program option Verify Cassette Mapping Before Job in the SECS/GEM category, nSpec will either automatically start the scan after the S2F69 message is acknowledged, or will wait for the Host to send a S2F70 message to scan. The S2F70 message contains a boolean indicating whether or not the scan should start.

Note that to be in this list, a wafer must be available in the slot and requested by the S2F15 message. The example below would be sent to the Host if slots 1, 5 and 15 were available and requested to be scanned.

CODE
S2F69 W
  <L [2]
    <A "1,5,15" >
    <L [0]
  >
>.

Depending on the state of the program option “Verify Cassette Mapping Before Job” in the SECS/GEM category, nSpec will either send the list and automatically continue or wait for a response from the Host. If set for verification, then the Host will need to reply with an S2F70 message indicating whether the cassette scan should continue or be cancelled. The reply to continue with the cassette scan is:

CODE
S2F70
  <L [2]
    <B 0x01 >
    <L [0]
  >
>.

The reply to cancel the cassette scan:

CODE
S2F70
  <L [2]
    <B 0x00 >
    <L [0]
  >
>. 

If confirmed to continue the cassette scan, the autoloader will grab the wafer from the first slot listed in the previously sent S2F15 message and begin the alignment process with the OCR. Once alignment completes and the OCR ID has been read, nSpec will send a S2F67 message to the host that contains the OCR ID.

CODE
S2F67
  <L [2]
    <A "OCRID_READ_FROM_WAFER" >
    <U4 1 >
    <L [0]
  >
>.

The host should send a reply to the S2F67 message indicating whether the wafer should be scanned or skipped. The reply message to scan the wafer is:

CODE
S2F68
  <L [2]
    <B 0x01 >
    <L [0]
  >
>.

To skip the wafer, reply with:

CODE
S2F68
  <L [2]
    <B 0x00 >
    <L [0]
  >
>.

The reply to the S2F67 message must be received within the T3 timeout period which is currently set to 45 seconds. If the T3 timeout is reached before the reply is received the wafer will be automatically skipped.

Once the wafer is moved to the stage to be scanned, an ACEID_WaferScanStart (5003) will notify the Host of a new scan. The data variable DVVAL_CurrentWaferSampleID (9151) will be updated to identify the sample ID of the current wafer (will be updated with reading from OCR where applicable). This update is signaled to the Host by the ACEID_ScanProgress (5001) event.

As the scan progresses, ACEID_ScanProgress events will continue to trigger for every tile scanned. Scan progress can be viewed by requesting the DVVAL_CurTileNo (9102) and DVVAL_MaxTileNo (9103) to see how many tiles of the total have been scanned so far. While this wafer is being scanned, the next slot listed in the previously sent S2F15 message will be retrieved and aligned with the OCR.

When the wafer on the stage is done being scanned, the Host will be notified via an ACEID_WaferScanEnd (5004) event at which point the Host should poll the DVVAL_ScannedImagePath (9110) variable. The autoloader will start to return it to the slot where it was originally from and then move the wafer waiting at the OCR to the stage to repeat the process.

While this autoloader motion is taking place, the analysis for the recently finished scan will start and notify the host via an ACEID_AnalysisComplete (5002) event.

When the analysis complete event is triggered, the DVVAL_AnalysisAnalysisType (9109), DVVAL_AnalysisAnalysisID (9107), and DVVAL_AnalysisOutputPath (9105), DVVAL_AnalysisScanID (9106) can all be polled.

When the entire cassette has finished being scanned, the Host will be notified with a ACEID_ScanJobEnd (5023) event.

After completion of the scan, there is some additional follow up on the system to officially complete the job and return the system to a state where it can accept new jobs from a Host again. When the system is ready to signal the entire scanning portion of the job is complete (not including analyses), it will trigger event ACEID_ScanJobEnd (5023). This event can be used as a trigger on a Host system to request another job to start on the nSpec.

*Note: Instead of running the job with an ECV_ScanCassetteWafer##_ID, a Host can leave this blank so that it will be automatically filled in by the Wafer ID read back from the OCR.

In order to do this over SECS/GEM, there is an additional parameter that must be enabled. Open the Options->Program Options dialog in nSpec, then change the “Allow Empty Sample Id” value in the “SECS/GEM” category from a 0 to a 1.

The ability to skip/scan a wafer based on the reading from the OCR is also only available if turned on from the program options. In the “SECS/GEM” category, change “Verify wafer OCR IDs” from a 0 to a 1.

Running A Single Wafer Scan via SECS/GEM

A single wafer job is run in two steps. Step one is to set up the wafer job via an S2F15 message. The message should include a wafer scan ID (ECV_ScanSingleWaferID, 1101) and a job name (ECV_ScanSingleJobName, 1102) pair. If so desired, a Host could also send temporary job properties (ECV_JobProperties, 1103). A message containing all three would look like the following:

CODE
S2F15 W
  <L [3]
    <L [2]
      <U4 1101 >
      <A “ExampleScanID_01" >
  >
  <L [2]
    <U4 1102 >
    <A "ExampleJobName" >
  >
  <L [2]
    <U4 1103 >
    <A "ShutdownLights,1;ManualLoadWafer,100,200,300,2" >
  >
>.

Once the above variables are updated, a Host can choose to save the job properties to the job (using the “SET_JOB_PROPERTIES” command) before starting a job, or the Host can start the job immediately. In the latter case, the job properties sent over SECS/GEM will be used for that job and then discarded afterwards. The two commands can be used as formatted here:

CODE
S2F41 W
  <L [2]
    <A "SET_JOB_PROPERTIES" >
    <L [0]
    >
  >.

S2F41 W
  <L [2]
    <A "START_SCAN" >
    <L [0]
  >
>.

After completion of the scan, there is some additional follow up on the system to officially complete the job and return the system to a state where it can accept new jobs from a Host again. When the system is ready to signal the entire scanning portion of the job is complete (not including analyses), it will trigger event ACEID_ScanJobEnd (5023). This event can be used as a trigger on a Host system to request another job to start on the nSpec.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.