# Result String Structure

Result string is a string that the vision system sends to an external device after the task requested by the command from that external device finishes execution. One command will have one and only one result string in return. Result string is composed of three parts: Command Key, Status and Parameters, and in addition is followed by CR/LF at the end.

These three parts and all individual parameters within Parameters are joined with comma without space.

## Command Key

CommandKey of result string is always the same with the Commandkey in its corresponding command string.

## Status

In most cases, Status only indicates whether the requested task runs successfully. In a few other cases, Status is also used to indicate whether a process is finished or not (such as used in ACB/AC commands).

Value | Description
--- | ---
ErrorCode | The requested vision task fails
1 | The requested vision task runs successfully and that is the end of the current procedure
2 | The requested vision task runs successfully and the current procedure is to be continued

## Parameters

Some commands require the vision system to return additional results besides status. For example, GP commands require the target pose of stage be returned by the vision system to guide the stage's move. These additional results are encoded in the result string in the form of individual parameters.

Here is the summary of all possible parameters in result strings; different commands request different combinations of these parameters.

Parameters | Description | When to use
--- | --- | ---
Token | The Token identifying the corresponding command. | Feature Finding Run Time and Pose Computer
PartID | The string showing ID of each multi-step sequence, i.e., all commands in the same alignment task must have the same PartID.
X | The X-coordinate of the destination position of the motion system (x in 2D plane) | Hand-eye Calibration, Feature Finding train time and run time, Pose Computing
Y | The Y-coordinate of the destination position of the motion system (y in 2D plane)
Z | The Z-coordinate of the destination position of the motion system
A | The Z-rotation of the destination position of the motion system (theta in 2D plane)
B | The Y-rotation of the destination position of the motion system
C | The X-rotation of the destination position of the motion system
ResultStatus | Whether Measurement results are within specifications | Measurement and gauging
DataCount | The count of measurement results
Data[N] | The N-th measurement result data.
ResultCount | The count of alignment results | Multi-Part Pickup
Status[N] | Whether the N-th sub-region's pose computer runs successfully