API
Client-sent communication
Commands
Command |
TCP Message |
Description |
---|---|---|
Remote |
~Cmd,Remote@ |
Establish remote connection and start sending instrument-control commands and queries.
Disable local instrument control via xrm companion.
|
Local |
~Cmd,Local@ |
Re-enable local instrument control via xrm companion. Disable remote control and block
all further TCP commands and queries.
|
Set Recipe |
~Cmd,SetRecipe,RecipeName@ |
Select particular recipe to use for scanning process. All next “ProcessStart” commands
will utilize the selected recipe.
|
Initial |
~Cmd,Initial,<load_option>@ |
Moves the system and stage to the load position. The load option can be specified either
by “-a” (auto mode), where the stage will be moved to the back of the system, and the wafer
door opened, or “-m”, (manual mode) where the stage is moved to the front where the main doors
are, so an operator can load/unload manually.
|
Tool Stop |
~Cmd,ToolStop@ |
Unload selected recipe. While stopping, reject any further process and tool instructions.
|
Process Start |
~Cmd,ProcessStart@ OR ~Cmd,ProcessStart,CarrierID,LotID,WaferID,WaferMap,WaferSize,DieJumpPara@ |
Start X-Ray scan processes as per the recipe:
- Move stage and all other relevant motors to scanning position.
- Move Dage source into place and set voltage and power to recipe-defined values.
- Move detector into place for scan.
- Perform scan-point as per recipe.
Repeats the above process for every scan point in the recipe queue (see “Recipes” section)
If parameters ARE specified, they will be used to construct the h5 acquisition and analysis file names.
If parameters ARE NOT specified, the h5 and analysis name will be taken from the recipe’s “base_filename”
field (see Recipes).
|
Process Abort |
~Cmd,ProcessAbort@ |
Quit current process (canceling current recipe) and move stage back to load position.
|
Confirm Wafer removed |
~Cmd,ConfirmWaferRemoved@ |
Only done during flat/dark process. After the scan point is finished, the sample will be unloaded.
The user needs to confirm that the wafer has been fully removed from the system.
Once this command is sent, the Wafer door will close, and the flat and dark process will start.
|
Confirm Arm Removed |
~Cmd,ConfirmArmRemoved@ |
After a flat/dark acquisition has been complete, the sample will need to be loaded.
The user needs to confirm that the wafer has been loaded, and that the placing arm has been fully
removed from the system to proceed with the next scan point. Once this commmand is sent, the Wafer
door will close, and the next scan point in the recipe will start.
|
Queries
Query |
TCP Message |
Description |
---|---|---|
Process list |
~Qry,PPList@ |
Gives list of currently available recipes.
|
Process body |
~Qry,PPBody,RecipeName@ |
Prints body of selected recipe, in JSON format.
|
Current Recipe |
~Qry,Recipe@ |
Prints name of currently loaded recipe (loaded via ToolStart command)
|
Status |
~Qry,Status@ |
Returns status of a few variables, including:
- Current control state (local or remote).
- Tool State (Stable or in Alarm).
- Whether the wafer is ready to load, unload, or blocked from transfer.
- Wafer boat present or absent on stage.
- Server control Software version.
|
In addition, we also support State Variables, used to query specific live and changing information from the auto tool. The format for a State Variable query is as follows:
“~Qry,SV,2000001,2000002,…@”
An answer follows this format:
“~Ans,SV,2000001:CollectFlatDark,2000002:True,…@”
Query |
Code |
Description |
---|---|---|
Current Executing Action |
2000001 |
Gives currently executing command, either:
- Scanning
- CollectFlatDark
- MovingToLoadPosition
|
Safety Interlocks Satisfied |
2000002 |
Returns a boolean indicating whether the safety interlocks are satisfied.
|
Current Process Parameters |
2000003 |
If a scan is executing, returns the process parameters of the current scan point.
Similar to PPBody, except only for one point, starting with NickName->”Current Config”…
|
Source Y Motor Position |
2100000 |
Returns current Source Y motor position |
Source Z Motor Position |
2100001 |
Returns current Source Z motor position |
Sample X Motor Position |
2100010 |
Returns current Sample X motor position |
Sample Y Motor Position |
2100011 |
Returns current Sample Y motor position |
Sample Z Motor Position |
2100012 |
Returns current Sample Z motor position |
Sample Theta Motor Position |
2100013 |
Returns current Sample Theta motor position |
Wafer Present/Absent |
2200000 |
Returns a string indicating whether a Wafer is Present or Absent (WaferPresent, WaferAbsent) |
Load Status |
2200001 |
Returns a string indicating whether the system is ReadyToLoad, ReadyToUnload, or inside the system (TranferBlock) |
Scan Points process |
2300000 |
If a scan is executing, returns how many scan points have been completed out of the total number in the recipe (e.g. 35/52) |
Scan or Base Image image acquisition progress |
2300001 |
If a scan is executing, returns how many images have been taken in the current point (355/721) |
Source Power Status |
2400001 |
Returns whether the Source is “Off”/”On” |
Source Voltage |
2400002 |
Returns Source Voltage in kV (e.g. 100) |
Source Power |
2400003 |
Returns Source Voltage in Watts (e.g. 5.5) |
Shadobox Detector Power Status |
2500000 |
Returns whether the Shadobox detector is “Off”/”On” |
Maintenance Mode Status |
2600000 |
Returns whether Maintenance mode is “Off”/”On” |
Automatic or Manual control Mode |
2600001 |
Returns control mode, Automatic or Manual (See ToolStart command). |
Current Reconstruction/Analysis Parameters |
2700000 |
Returns current Reconstruction/Analysis Parameters used by XRM_Insight program called through SigrayConnect API |
Last Analysis Results |
2700001 |
Returns analysis results of the last executed scan point |
We also support Equipment Constants, which are values that are tied to the hardware, and will only change with the hardware The format for an Equipment Constant query is as follows:
“~Qry,EC,3000001,3000002,…@”
An answer follows this format:
“~Ans,EC,3000001:Z:Recipes,3000002:115000.12,…@”
Query |
Code |
Description |
---|---|---|
Recipe file path |
3100000 |
Indicates where on the Windows drive the Recipe files are read from.
There is where the PPBody query will look for Recipes.
|
Sample X Load Position |
3100000 |
Returns the load position (in dial) of the Sample X Motor. |
Sample Y Load Position |
3100001 |
Returns the load position (in dial) of the Sample Y Motor. |
Sample Z Load Position |
3100002 |
Returns the load position (in dial) of the Sample Z Motor. |
Source Y Safety Position |
3100010 |
Returns the safety (also load position) of the Source Y motor |
Source Z Safety Position |
3100011 |
Returns the safety (also load position) of the Source Z motor |
Available Flat Positions |
3100100 |
Available Flat Positions for the Apex system. |
Dage Focus current table |
3100200 |
Returns Contents of Dage focus current table. |
SigrayConnect API Software Version |
3200000 |
Current version of SigrayConnect software |
XRM Insight Software Version |
3200001 |
Current version of XRM Insight wafer bump analysis program |
Shadobox Version |
3200002 |
Current version of Shadobox Detector driver |
Shadobox Driver Version |
3200002 |
Current version of Shadobox Detector driver |
Dage Driver Version |
3200003 |
Current version of Dage driver |
ACS Buffer Version |
3200004 |
Current version of ACS Buffer Software |
Server Responses
Acknowledgements
Acknowledgements are sent back to the client immediately for ONLY Commands on arrival to the server. The acknowledgement only returns whether the Command was valid, and prints back the Command itself. It does NOT confirm that Command executed successfully.
The acknowledgment is structured as follows:
“~Ack,CommandName,[arguments],0/1@”, where:
CommandName is the command string itself, [arguments] are the arguments if existing, and 0/1 represents success or failure (0 for success, 1 for failure).
If a command is nonsense, e.g. “~Cmd,alskjdfwoie@” or just “~lkjasdflkjasdf@”, then the acknowledgement will return a failure (1), along with just the nonsense sent string: “~Ack,lkjasdflkjasdf,1”
For invalid commands, the system will also raise an alarm with the “Bad command” message following the acknowledgement (see Alarms section for details).
For invalid queries, the system will not respond with any acknowledgement, and will only raise the “Bad query” message.
Events
Events represent updates regarding the system or process. Each event also has its own unique integer code.
Event |
Code |
TCP Message |
Description |
---|---|---|---|
Remote |
1 |
~Evt,1,Remote@ |
Instrument has switched to remote state, and can now accept network commands.
The XRM Companion’s UI will now be disabled.
|
Local |
2 |
~Evt,2,Local@ |
Instrument has switched to local state, and can no longer accept local commands.
XRM Companion’s UI will now be enabled again.
|
Scan Start |
3 |
~Evt,3,ScanStart,<x>,<y>@ |
An X-Ray scan has started. <x> and <y> specify the 2-d points on the wafer being inspected.
|
Scan End |
4 |
~Evt,4,ScanEnd,<x>,<y>@ |
Indicates that an X-Ray scan (started with Scan Start) has completed. <x> and <y>
specify the 2-D points which were scanned. The system will now move to the next
scan point.
|
Process End |
5 |
~Evt,5,ProcessEnd,<bump summary details contents>@ |
Scan and all Microbump Analyses have ended for this sample, and attached are the results. |
Wafer Present |
6 |
~Evt,6,WaferPresent@ |
Indicates that the sample stage sensor has detected an object being placed on the stage.
In this context, this will likely be a Wafer.
|
Wafer Absent |
7 |
~Evt,7,WaferAbsent@ |
Indicates that the sample stage sensor has detected an object being removed from the stage.
In this context, this will likely be a Wafer.
|
Ready To Load |
8 |
~Evt,8,ReadyToLoad@ |
Indicates that the sample stage has been moved to the load position and is ready to accept a
Wafer.
|
Ready To Unload |
9 |
~Evt,9,ReadyToUnload@ |
Indicates that an X-Ray scan has been completed and the sample stage is now moved to the
load position, ready for the wafer to be removed.
|
Transfer Block |
10 |
~Evt,10,TransferBlock@ |
Indicates that the wafer stage can neither accept nor give a sample (wafer boat). This is
usually only the case when a scan is in process, or when the tool is in an alarm state.
|
Safety PLC Satisfied |
11 |
~Evt,11,SafetyPLCSatisfied,<Event_description>@ |
All the conditions to satisfy the Safety PLC have been met. The system is now ready to use,
X-rays can be turned on and scans can be started. The event description will specify what
exactly has occurred to make the Safety PLC Satisfied (door closed, EMO released, etc).
|
Starting Flat/Dark collection process. |
12 |
~Evt,12,FlatDarkCollectionStart@ |
Will throw after a scan point is completed, and the collect_flat or collect_dark parameters
has been set “true” in the scan point.
This is to disambiguate the stage moving to door, indicating that it is not from the Process
ending, but so that the EFEM may remove the wafer for a flat collection as part of the same
recipe.
|
Finished with Flat/Dark collection process. |
13 |
~Evt,13,FlatDarkCollectionEnd@ |
Flat/Dark image collection process complete. |
System stopped. |
14 |
~Evt,14,SystemStopped@ |
System processes stopped. This is typically following a violation of a PLC safety condition. |
System locked. |
15 |
~Evt,15,SystemLocked@ |
System devices and processes locked. This is after the system has been stopped due to a Safety
violation. The system and software will unlock when the safety conditions are met.
|
System unlocked. |
16 |
~Evt,16,SystemUnlocked@ |
System devices and processes unlocked. This occurs after the Safety PLC conditions have been
met.
|
Analysis started |
17 |
~Evt,17,AnalysisStart,<x>,<y>@ |
Microbump analysis has started for this acquisition. <x> and <y> indicate the scan coordinates of
this particular acquisition.
|
Analysis ended |
18 |
~Evt,18,AnalysisEnd,<bump details contents>@ |
Microbump analysis has ended for this acquisition, and attachd are the results. |
Process Start |
19 |
~Evt,19,ProcessStart@ |
Scan and Microbump Analyses have started for this sample. |
ToolRecipeStart |
20 |
~Evt,20,ToolRecipeStart,PPID@ |
The selected recipe has been loaded. Sent in response to the SetRecipe command. |
Answers (for Queries)
Query Answered |
TCP Message |
Description |
---|---|---|
PPList |
~Ans,PPList,Recipe1,Recipe2,Recipe3…@ |
Lists out all the recipes available on the Y:\data1\recipes directory.
Consult the Recipes section for more information.
|
PPBody |
~Ans,PPBody,RecipeName,paraName1:ParaValue1,paraName2:ParaValue2…@ |
Lists every parameter and value in the selected recipe.
Since the message format already matches JSON format, and the
file is in JSON, the recipe file contents are simply printed in the
message.
|
Recipe |
~Ans,Recipe,RecipeName@ |
Gives the currently loaded recipe, loaded with the “ToolStart” command. |
Status |
~Ans,Status,Local/Remote,Running/Alarm,ReadyToLoad/ReadyToUnload/TransferBlock,WaferPresent/WaferAbsent,<SWVersion>@ |
Returns status of a few variables, including:
- Current control state (local or remote).
- Tool State (Stable or in Alarm).
- Whether the wafer is ready to load, unload, or blocked from transfer.
- Wafer boat present or absent on stage.
- Server control Software version.
|
Alarms
Alarms are indications that anything at all has gone wrong with the system. They can be sent to the client at any time, and fall under one of four categories: Hardware, software, network, and safety.
Each alarm has a unique code, and the alarm’s category is denoted by the first digit of the alarm code, as described below:
Category |
Code |
---|---|
Hardware |
1xxxxx |
Software |
2xxxxx |
Network |
3xxxxx |
Safety |
4xxxxx |
The full list of all possible alarms, codes, messages and descriptions (if applicable/required) are as follows:
Note: As of 07/12/2024, list is incomplete.
Alarm |
Code |
TCP Message |
Description |
---|---|---|---|
Failed to register PV monitor |
100000 |
~Alm,100000,Failed to register monitor for PV: <PV>@ |
Failed to establish initial connection with and monitor
EPICS PV. Typically happens during the “device staging”
process during ToolStart.
|
Failed to move motor |
100001 |
~Alm,100001,Failed to move Motor <name>: <error>@ |
Failed to move motor (exception raised while writing to
motor PV). Exception string attached to error.
|
Failed to stop motor |
100002 |
~Alm,100002,Failed to stop Motor <name>: <error>@ |
Failed to stop motor (exception raised while writing to
motor PV). Exception string attached to error.
|
Sample stage motor not connected |
100003 |
~Alm,100003,Sample stage motor <name> not connected.@ |
Sample stage motor is not connected
|
X-Ray source failed to turn on |
100004 |
~Alm,100004,X-Ray source failed to turn on: <error>.@ |
Failed to turn X-Ray source on.
|
Failed to set X-Ray source voltage to recipe value |
100005 |
~Alm,100005,failed to set X-Ray source voltage to recipe value: <error>.@ |
|
Timeout while setting source power. |
100006 |
~Alm,100006,Timeout while setting source power.@ |
Hardware error: Timeout while setting source power.
|
Unable to set source power. |
100006 |
~Alm,100006,Unable to set source power.@ |
Miscellaneous source power error catch-all: Unable to set
source power.
|
Unable to set source focus current. |
100007 |
~Alm,100007,Unable to set Dage source focus current value.@ |
|
Safety PLC Error. |
100008 |
~Alm,100008,Safety PLC Error,<description>.@ |
An error has occurred relating to the safety PLC. This may include:
- Door interlock not satisfied
- EMO pressed
- Water leak detected
- Selector switch disabled
- PDU Contactor off
- Dage X-Ray not ready
|
Bad Command |
200000 |
~Alm,200000,Bad Command@ |
Badly formatted TCP command or query, which could
include nonsense commands or missing/bad arguments.
|
Recipe Already Loaded |
200001 |
~Alm,200001,Recipe already loaded@ |
If the ToolStart command is run, and a recipe has already
been loaded (with a previous call to ToolStart), then
the command will fail. Unload the existing recipe with
ToolStop first.
|
Recipe directory not specified |
200002 |
~Alm,200002,Recipe directory not specified@ |
(Rare/unlikely) If the device configuration (inaccessible
to regular users) does not contain a default value for
the Recipe directory. This should always be
“Y:\data1\Recipes”. If this error occurs, contact service
to help add this default value to the configuration.
|
Recipe name empty |
200003 |
~Alm,200003,Recipe name empty@ |
Empty string passed into ToolStart command |
Recipe File Not Found |
200004 |
~Alm,200004,Recipe file not found@ |
Specified recipe (through ToolStart command) not found in
Y:\data1\recipes. Thrown on ToolStart command.
|
Failed to Load JSON Recipe |
200005 |
~Alm,200005,Failed to JSON recipe@ |
The JSON recipe failed to load due to missing fields or bad
formatting.
|
Recipe not loaded |
200012 |
~Alm,200012,Recipe not loaded@ |
Recipe not loaded with the ToolStart command. Load a recipe
with the ToolStart command.
|
Recipe directory not found |
200013 |
~Alm,200013,Recipe directory not found@ |
Recipe directory (specified in the devices configuration)
has not been found.
|
Failed to set dynamic device parameter |
200014 |
~Alm,200014,Failed to set dynamic device value <param>@ |
Purely internal software error, please contact service
if this error is raised.
|
Failed to get dynamic device value |
200015 |
~Alm,200015,Failed to get dynamic device parameter <param>@ |
Purely internal software error, please contact service
if this error is raised.
|
Source name empty |
200016 |
~Alm,200016,X-Ray source name empty@ |
Internal software error: X-Ray source PV name is empty.
|
Attempting to set source voltage before turning on |
200017 |
~Alm,200017,Turn source on before setting voltage@ |
Software error, source was not turned on before voltage was
set.
|
Attempting to set source voltage to negative value |
200018 |
~Alm,200018,Setting source voltage to negative value@ |
Attempting to set source voltage (defined in recipe) to
negative value.
|
Attempting to set source power out of range |
200019 |
~Alm,200019,source power setting out of range. Max value: <value>@ |
Attempting to set source power (defined in recipe) out of range.
|
Error checking dage focus current |
200020 |
~Alm,200020,Dage focus current table not found.@ |
will likely be further split in to a few separate software and hardware alarms.
Catch-all error while checking focus current. Could be file-related
(dage focus current table configuration not found, not formatted), or hardware-
related while setting the focus or AutoCenter to the proper value.
|
Scan device not connected |
200021 |
~Alm,200021,Scan device not connected.@ |
Purely software error preventing scan from starting - contact service. |
Scan data parent directory empty |
200022 |
~Alm,200022,Scan directory empty.@ |
Purely software error. Scan data directory should be hard-coded to
Y:\data1\SigrayConnectFiles. Contact service if occurs.
|
Base filename is empty string |
200023 |
~Alm,200023,Base filename is an empty string.@ |
Likely the “base_filename” field in the recipe is empty or unspecified.
Stop the tool and check that the “base_filename” field has a value.
|
Failed to set up scan will be split into multiple errors. |
200024 |
~Alm,200024,Failed to set up scan.@ |
Miscellaneous catch-all error relating to the scan setup.
|
Failed execute scan will be split into multiple errors. |
200025 |
~Alm,200025,Failed to execute scan.@ |
Miscellaneous catch-all error relating to scan execution.
|
Motor name empty |
200026 |
~Alm,200026,Motor PV name empty@ |
Software error - contact service. |
Sample stage device not configured |
200027 |
~Alm,200027,No stage device config@ |
Software error - no configuration exists for
sample stage device. Contact service.
|
“Unhandled sample stage trigger” |
200028 |
~Alm,200028,Unhandled sample stage trigger@ |
Software error: may occur if the sample falls off
the stage while inside the system (as opposed to the load position)
|
Remote Control disabled |
200029 |
~Alm,200029,Cannot execute command in local mode@ |
Occurs when client attempts to execute command in local mode |
Unhandled exception |
200030 |
~Alm,200030,Unhandled exception: <details>@ |
Miscellaneous catch-all for any issue that occurs. |
Source virtual device not configured |
200031 |
~Alm,200031,Source virtual device not configured@ |
Software issue: Source device not configured. Contact service. |
Motor Manager virtual device not configured |
200032 |
~Alm,200032,Motor manager virtual device not configured@ |
Software issue: Motor manager device not configured. Contact service. |
Theta motor not configured |
200033 |
~Alm,200033,Sample stage theta motor not configured@ |
Software issue: stage theta motor not configured. Contact service. |
Source Y Motor not configured |
200034 |
~Alm,200034,Source Y motor not configured@ |
Software issue: Source Y motor not configured. Contact service. |
Source Z Motor not configured |
200035 |
~Alm,200035,Source Z motor not configured@ |
Software issue: Source Z motor not configured. Contact service. |
Miscellaneous motor is not configured |
200036 |
~Alm,200036,Miscellaneous motor is not configured@ |
Software issue: Miscellaneous motor (not sample stage or Dage Source) not connected. Contact service. |
Failed to abort scan |
200037 |
~Alm,200037,Failed to abort x-ray scan@ |
Failed to stop and abort x-ray scan process, either from the ProcessAbort command or any other acquisition
(PLC throwing issue, theta motor failing, etc).
|
Air cleaning unit not configured |
200038 |
~Alm,200038,Air cleaning unit not configured@ |
Safety PLC air cleaning unit configuration not present. Contact service. |
PLC not configured |
200039 |
~Alm,200039,PLC not configured@ |
PLC configuration not present. Contact service. |
System busy |
200040 |
~Alm,200040,System busy for command@ |
Trying to execute an instrument control command while the system is busy.
THIS DOES NOT INCLUDE ProcessAbort, which can be executed at any time, or
TakeFlatDark and ContinueAfterFlatDark, which are executed during the ProcessStart command.
(note: queries can be executed at anytime regardless of state).
|
CommandLocked |
200041 |
~Alm,200041,Command <command_name> locked.@ |
Attempting to execute command when command is locked. Commands are only locked when the PLC
indicates that the system is “not safe”. Commands will be unlocked when the PLC is satisfied
again.
|
DeviceLocked |
200042 |
~Alm,200042,Device <device_name> locked.@ |
Attempting to execute commands on a device when the device is locked. Devices are only locked when the
PLC indicates that the system is “not safe”. Devices will be unlocked when the PLC is satisfied
again.
|
AnalysisFailure |
200043 |
~Alm,200043,Analysis Failure,<.h5>.@ |
Microbump analysis failed for the <.h5 file>.
|
To be finished..
Sample Workflows
Successful Load and Scan
Client-sent message |
Direction |
Server Response |
---|---|---|
~Cmd,Remote@ |
-> |
|
<- |
~Ack,Remote,0@ |
|
~Cmd,Initial@ |
-> |
|
<- |
~Ack,Initial@ |
|
<- |
~Evt,8,ReadyToLoad@ |
|
~Cmd,SetRecipe,Recipe1 |
-> |
|
<- |
~Ack,SetRecipe,Recipe1,0@ |
|
<- |
~Evt,21,ToolRecipeStart,Recipe1@ |
|
Sample is placed on stage |
||
<- |
~Evt,6,WaferPresent@ |
|
~Cmd,ProcessStart, Carrier1,Lot1,Wafer1, map1,55@ |
-> |
|
<- |
~Ack,ProcessStart,0@ |
|
<- |
~Evt,19,ProcessStart,0@ |
|
<- |
~Evt,10,TransferBlock@ |
|
<- |
~Evt,3,ScanStart,105,50@ |
|
~Qry,Recipe@ |
-> |
|
<- |
~Ans,Recipe,Recipe1@ |
|
~Qry,Status@ |
-> |
|
<- |
~Ans,Status,Remote,Running,TransferBlock,WaferPresent,1.0@ |
|
<- |
~Evt,4,ScanEnd,105,50@ |
|
<- |
~Evt,17,AnalysisStart,105,50@ |
|
<- |
|
|
<- |
|
|
<- |
~Evt,9,ReadyToUnload@ |
|
Sample is removed from the stage |
||
<- |
~Evt,7,WaferAbsent@ |
|
~Cmd,ToolStop@ |
-> |
|
<- |
~Ack,ToolStop,0@ |
Scan started and aborted, then flat is taken, then scan is started and completed successfully
In this sequence, a Flat base image is taken along with the first scan point executed successfully. A flat is triggered after a scan by setting the “Collect Flat” switch in the Scan Settings within the XRM Companion (see the photo in Recipes, right side under Scan Point). Alternatively, if the client wants to apply a previously collected flat instead of collecting a new one, they may select “Apply From File” instead of “Collect Flat” and select a collected .h5 file to apply.
Client-sent message |
Direction |
Server Response |
---|---|---|
~Cmd,Remote@ |
-> |
|
<- |
~Ack,Remote,0@ |
|
~Cmd,Initial@ |
-> |
|
<- |
~Ack,Initial@ |
|
<- |
~Evt,8,ReadyToLoad@ |
|
~Cmd,SetRecipe,Recipe1 |
-> |
|
<- |
~Ack,SetRecipe,Recipe1,0@ |
|
<- |
~Evt,21,ToolRecipeStart,Recipe1@ |
|
Sample is placed on stage |
||
<- |
~Evt,6,WaferPresent@ |
|
~Cmd,ProcessStart, Carrier1,Lot1,Wafer1, map1,55@ |
-> |
|
<- |
~Ack,ProcessStart,0@ |
|
<- |
~Evt,19,ProcessStart,0@ |
|
<- |
~Evt,10,TransferBlock@ |
|
<- |
~Evt,3,ScanStart,100,100@ |
|
~Cmd,ProcessAbort@ |
-> |
|
<- |
~Ack,ProcessAbort@ |
|
<- |
~Evt,9,ReadyToUnload@ |
|
~Cmd,ProcessStart, Carrier1,Lot1,Wafer1, map1,55@ |
-> |
|
<- |
~Ack,ProcessStart,0@ |
|
<- |
~Evt,19,ProcessStart,0@ |
|
<- |
~Evt,10,TransferBlock@ |
|
<- |
~Evt,3,100,100@ |
|
<- |
~Evt,4,ScanEnd,100,100@ |
|
<- |
~Evt,9,ReadyToUnload@ |
|
<- |
|
|
Sample is removed from stage |
||
<- |
~Evt,7,WaferAbsent@ |
|
Sample has fully exited the system |
||
~Cmd,ConfirmWaferRemoved@ |
-> |
|
<- |
~Ack,ConfirmWaferRemoved@ |
|
<- |
~Evt,10,TransferBlock@ |
|
<- |
~Evt,13,FlatDarkCollectionStart@ |
|
<- |
~Evt,8,ReadyToLoad@ |
|
<- |
~Evt,14,FlatDarkCollectionEnd, please place the sample back onto the stage, and confirm the placing arm has been removed from the system to continue with the next scan point with the ConfirmArmRemoved command@ |
|
Sample is placed on stage |
||
<- |
~Evt,6,WaferPresent@ |
|
Placing arm has fully exited the system |
||
~Cmd,ConfirmArmRemoved@ |
-> |
|
<- |
~Ack,ConfirmArmRemoved@ |
|
<- |
~Evt,17,AnalysisStart,100,100@ |
|
<- |
~Evt,10,TransferBlock@ |
|
<- |
~Evt,3,ScanStart,-120,80@ |
|
<- |
|
|
<- |
~Evt,4,ScanEnd,-120,80@ |
|
<- |
~Evt,17,AnalysisStart,-120,80@ |
|
<- |
|
|
<- |
|
|
<- |
~Evt,9,ReadyToUnload@ |
|
Sample is removed from the stage |
||
<- |
~Evt,7,WaferAbsent@ |
|
~Cmd,ToolStop@ |
-> |
|
<- |
~Ack,ToolStop,0@ |
Scan with PLC Error, and Recovery
Client-sent message |
Direction |
Server Response |
---|---|---|
~Cmd,Remote@ |
-> |
|
<- |
~Ack,Remote,0@ |
|
~Cmd,Initial@ |
-> |
|
<- |
~Ack,Initial@ |
|
<- |
~Evt,8,ReadyToLoad@ |
|
~Cmd,SetRecipe,Recipe1 |
-> |
|
<- |
~Ack,SetRecipe,Recipe1,0@ |
|
<- |
~Evt,21,ToolRecipeStart,Recipe1@ |
|
Sample is placed on stage |
||
<- |
~Evt,6,WaferPresent@ |
|
~Cmd,ProcessStart, Carrier1,Lot1,Wafer1, map1,55@ |
-> |
|
<- |
~Ack,ProcessStart,0@ |
|
<- |
~Evt,10,TransferBlock@ |
|
Main door of system is opened |
||
<- |
~Alm,100008,SafetyPLCError,Door Interlock broken@ |
|
<- |
~Evt,14,SystemStopped@ |
|
<- |
~Evt,15,SystemLocked@ |
|
Main door of system is closed |
||
<- |
~Evt,11,SafetyPLCSatisfied,Door Interlock satisfied@ |
|
<- |
~Evt,16,SystemUnlocked@ |
|
~Cmd,Initial@ |
-> |
|
<- |
~Ack,Initial@ |
|
<- |
~Evt,9,ReadyToUnload@ |
|
~Cmd,ProcessStart, Carrier1,Lot1,Wafer1, map1,55@ |
-> |
|
<- |
~Ack,ProcessStart,0@ |
|
<- |
~Evt,10,TransferBlock@ |
|
<- |
~Evt,3,ScanStart,50,50@ |
|
<- |
~Evt,4,ScanEnd,50,50@ |
|
<- |
~Evt,17,AnalysisStart,50,50@ |
|
<- |
|
|
<- |
|
|
<- |
~Evt,9,ReadyToUnload@ |
|
Sample is removed from stage |
||
<- |
~Evt,7,WaferAbsent@ |
|
~Cmd,ToolStop@ |
-> |
|
<- |
~Ack,Toolstop@ |
Sample Client Script
Here is a sample client script to perform a simple ToolStart and ProcessStart command. It ignores some events, but should give a basic understanding of how a client may communicate with the server.
import socket
import sys
required_args = ['HOST', 'PORT', 'PW', 'RECIPE']
# Check if the number of arguments provided is less than expected
if len(sys.argv) - 1 < len(required_args):
sys.stderr.write("Not enough arguments provided")
exit(-1)
# Assign arguments to variables
for i, arg in enumerate(required_args):
locals()[arg] = sys.argv[i+1]
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect((HOST, int(PORT)))
def send_command_and_await_ack(command, arguments = None):
to_send = "~Cmd,"+command
if arguments is not None:
for arg in arguments:
to_send+= (","+arg)
to_send+="@"
client_socket.send(to_send.encode())
response = client_socket.recv(1024)
print(response)
correct_response = "~Ack,"+command
if arguments is not None:
for arg in arguments:
correct_response+= (","+arg)
correct_response+=",0@"
if response != correct_response.encode():
sys.stderr.write("Command not acknowledged")
exit(-1)
send_command_and_await_ack("Remote")
send_command_and_await_ack("Initial")
response = client_socket.recv(1024)
print(response)
if response != "~Evt,10,ReadyToLoad@".encode():
sys.stderr.write("Error: expected ReadyToLoad Event")
exit(-1)
send_command_and_await_ack("SetRecipe", [RECIPE])
input("Press enter once a sample is loaded...")
send_command_and_await_ack("ProcessStart", ["1", "1", "1", "1"])
while True:
response = client_socket.recv(1024)
print(response)
if "Alm" in response.decode():
sys.stderr.write("Error from server")
exit(-1)
if response == "~Evt,7,ProcessEnd@":
print("Success, recipe performed")
exit(0)