OPC UA Commands
In this interface, the Communication Component serves as the OPC UA server, and the robot/PLC serves as the client. All data is exposed as named nodes under the MechMind object, and the client reads and writes the value of a node by its node name.
|
OPC UA addresses data by node names. For the node data types and meanings, see OPC UA Nodes. |
Trigger Handshake
Each command follows the same level-based handshake (consistent with the Siemens PLC Snap7 protocol):
-
Write the input nodes (PROJECT_NUM/POINT_TYPE, etc.).
-
Write COMMAND = command code.
-
Set CMD_TRIGGER to 1.
-
Wait for TRIGGER_ACKNOWLEDGE = 1 (the server has accepted the command).
-
Set CMD_TRIGGER to 0 (reset by the robot itself).
-
Wait for TRIGGER_ACKNOWLEDGE = 0 (command completed), and then read STATUS_CODE and the result nodes.
| Node | Data type | Direction | Meaning |
|---|---|---|---|
COMMAND |
Int32 |
Input |
Command code (cmd_type) |
CMD_TRIGGER |
Boolean |
Input |
Trigger bit: set to 1 to issue a command, and reset to 0 after reading the results |
TRIGGER_ACKNOWLEDGE |
Boolean |
Output |
Trigger acknowledge: set to 1 when the server accepts the command, and reset to 0 when the command is completed (falling edge = completed) |
STATUS_CODE |
Int32 |
Output |
Status code (success/error) |
HEARTBEAT |
Boolean |
Output |
Heartbeat, toggles periodically |
|
It is recommended to use the falling edge of TRIGGER_ACKNOWLEDGE to determine completion: the server executes a command synchronously within the same cycle before resetting the ACK. Therefore, when the ACK returns to 0, the results are guaranteed to be ready. |
Command Overview
|
The input parameters of each command implicitly include the common control nodes COMMAND and CMD_TRIGGER, and the output parameters implicitly include TRIGGER_ACKNOWLEDGE and STATUS_CODE. The tables below only list the additional nodes used by each command. |
Command 101: Trigger Mech-Vision Project
Description
This command triggers the Mech-Vision project to run. This command does not return poses. For the calling sequence, see the six steps in Trigger Handshake.
Input Parameters
| Node | Data type | Description |
|---|---|---|
PROJECT_NUM |
Int32 |
Mech-Vision project ID |
POSE_COUNT_REQ |
Int32 |
Expected number of poses (0 = all) |
POINT_TYPE |
Int32 |
Pose type: 0 = none, 1 = current point, 2 = current flange pose, 3 = predefined joints |
ROBOT_JPS |
Float[6] |
Robot joints (by pose type) |
ROBOT_POSE |
Float[6] |
Robot flange pose (by pose type) |
Command 102: Get Vision Results
Command 105: Get Planned Path from Mech-Vision
Input Parameters
| Node | Data type | Description |
|---|---|---|
PROJECT_NUM |
Int32 |
Mech-Vision project ID |
POINT_TYPE |
Int32 |
Pose type: 1 = joints, 2 = pose |
Output Parameters
SEND_POSE_COUNT/SEND_POSE/SEND_LABEL/SEND_TOOL_INDEX (same as Command 102).
Command 111: Get Vision Move Data from Mech-Vision
Input Parameters
| Node | Data type | Description |
|---|---|---|
PROJECT_NUM |
Int32 |
Mech-Vision project ID |
POINT_TYPE |
Int32 |
Result type: 1 or 2 |
Output Parameters
| Node | Data type | Description |
|---|---|---|
SEND_POSE_COUNT |
Int32 |
Number of poses |
SEND_POSE |
Float[240] |
Pose block |
PLANNING_VISUAL_RESULT |
Float[1600] |
Planning vision results, 40 × 40 |
CUSTOM_DATA |
Float[400] |
Custom vision data, 40 × 10 |
PLANNING_VISUAL_MOVE_INDEX |
Int32[120] |
is_visual / move_type / speed, 40 each |
Command 201: Trigger Mech-Viz Project
Command 205: Get Planned Path from Mech-Viz
Output Parameters
SEND_POSE_COUNT/SEND_POSE/SEND_LABEL/SEND_TOOL_INDEX (same as Command 102).
Command 210: Get Vision Move Data or Custom Data from Mech-Viz
Output Parameters
Same as Command 111 (SEND_POSE_COUNT/SEND_POSE/PLANNING_VISUAL_RESULT/CUSTOM_DATA/PLANNING_VISUAL_MOVE_INDEX).
Command 701: Calibration
Description
This command acquires calibration points for the hand-eye calibration (extrinsic calibration) of the Mech-Eye camera.