### Execute Alignment with backup pattern (Multi-Pattern mode)

Multi-Pattern mode allows to specify backup patterns (PartIDs). If the primary part has not been found, the system will automatically try to locate the backup parts instead in order to produce a valid alignment result. When EncodedPartID is provided on a command argument, all PartID settings on the HMI are ignored. If EncodedPartID = 0 is used with no PartID setting on the HMI, error code: -4001 (invalid part ID) is returned.

### XAMP

Locate the part and get the corrected robot pick (or place) pose.

Version 3.1 and higher

#### TCP/IP:

Command String:

XAMP,<EncodedPartID>,<resultMode>,<X>,<Y>,<Z>,<A>,<B>,<C>

Field | Arguments
--- | ---
XAMP | The command
<EncodedPartID> | The PartID of the primary and backup part(s) to locate. PartIDs depend on the recipe configuration. The PartIDs are encodes as follows: Bit 1…4: Primary PartID Bit 5…8: 1st backup PartID Bit 9…12: 2nd backup PartID Bit 13…16: 3rd backup PartID EncodedPartID = 0: PartIDs set on the HMI are used
<resultMode> | Specifies how the result will be returned: “Abs”: Return the absolute motion position to get the target to the trained golden pose. “Off”: Return the Offset from the current motion position to get the target to the trained golden pose.
<X> | The X-coordinate of the current position of the motion system
<Y> | The Y-coordinate of the current position of the motion system
<Z> | The Z-coordinate of the current position of the motion system
<A> | The Z-rotation of the current position of the motion system
<B> | The Y-rotation of the current position of the motion system
<C> | The X-rotation of the current position of the motion system

Result String:

XAMP,<Status>,<FoundPartID>,<X>,<Y>,<Z>,<A>,<B>,<C>

Field | Description
--- | ---
XAMP | The command
<Status> | The result status 1: Success <=0: Fail
<FoundPartID> | The PartID of the part that was successfully located. This can be the primary PartID or any backup PartID.
<X> | The X-coordinate (absolute or offset) of the motion system’s destination pose.
<Y> | The Y-coordinate (absolute or offset) of the motion system’s destination pose.
<Z> | The Z-coordinate (absolute or offset) of the motion system’s destination pose.
<A> | The Z-rotation (absolute or offset) of the motion system’s destination pose.
<B> | The Y-rotation (absolute or offset) of the motion system’s destination pose.
<C> | The X-rotation (absolute or offset) of the motion system’s destination pose.

#### SLMP

Send command (Input Block)

Offset | Value | Description
--- | --- | ---
VIB_Offset + 2 | 3014 | Command: XAMP command ID
VIB_Offset + 3 | <EncodedPartID> | Argument0: The PartID of the primary and backup part(s) to locate. PartIDs depend on the recipe configuration. The PartIDs are encodes as follows: Bit 1…4: Primary PartID Bit 5…8: 1st backup PartID Bit 9…12: 2nd backup PartID Bit 13…16: 3rd backup PartID EncodedPartID = 0: PartIDs set on the HMI are used
VIB_Offset + 5 | <resultMode> | Argument1: The requested result mode: 1: Absolute 2: Offset
VIB_Offset + 7 | <X> | The X-coordinate of the current position of the motion system
VIB_Offset + 9 | <Y> | The Y-coordinate of the current position of the motion system
VIB_Offset + 11 | <Z> | The Z-coordinate of the current position of the motion system
VIB_Offset + 13 | <A> | The Z-rotation of the current position of the motion system
VIB_Offset + 15 | <B> | The Y-rotation of the current position of the motion system
VIB_Offset + 17 | <C> | The X-rotation of the current position of the motion system

Receive Result (Output Block)

Offset | Value | Description
--- | --- | ---
VOB_Offset + 5 | 3014 | Command: XAMP command ID
VOB_Offset + 6 | <Status> | The result Status: 1: Success <=0: Fail
VOB_Offset + 7 | <FoundPartID> | The PartID of the part that was successfully located. This can be the primary PartID or any backup PartID.
VOB_Offset + 9 | <X> | The X-coordinate of the result pose (absolute or offset)
VOB_Offset + 11 | <Y> | The Y-coordinate of the result pose (absolute or offset)
VOB_Offset + 13 | <Z> | The Z-coordinate of the result pose (absolute or offset)
VOB_Offset + 15 | <A> | The Z-rotation of the result pose (absolute or offset)
VOB_Offset + 17 | <B> | The Y-rotation of the result pose (absolute or offset)
VOB_Offset + 19 | <C> | The X-rotation of the result pose (absolute or offset)