YASKAWA Inline Measurement Example Program
Program Introduction
Description |
You trigger Mech-Metrics from the robot side to perform measurement using Mech-MSR and return the measurement results to Mech-Metrics. |
File path |
You can navigate to the installation directory of Mech-MSR and Mech-Metrics by using the |
Resource requirements |
Mech-MSR solution and Mech-Metrics project |
Prerequisites |
|
| This example program is provided for reference only. Before using the program, please modify the program according to the actual scenario. |
Program Description
The following is the code of the MSR_Metrics_Sample1 example program and the related explanation.
/JOB
//NAME MSR_Metrics_Sample1
//POS
///NPOS 0,0,0,3,0,0
///TOOL 1
///POSTYPE ROBOT
///RECTAN
///RCONF 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
P00000=354.297,-0.839,29.373,179.7929,0.0507,-0.0083
P00001=354.297,-0.839,29.373,179.7929,0.0507,-0.0083
P00002=354.297,-0.839,29.373,179.7929,0.0507,-0.0083
//INST
///DATE 2024/05/29 14:15
///ATTR SC,RW
///GROUP1 RB1
NOP
CALL JOB:MSR_INIT_SOCKET ARGF"192.168.10.40;50000;5"
CALL JOB:MSR_OPEN_SOCKET
CALL JOB:MSR_START_MEASURE ARGF"1;2;2;3;1;1;1;1;1;1;10" ARGF"Piece01" ARGF"STRING;80"
CALL JOB:MSR_SET_PIECE_INFO ARGF"1;80" ARGF"STRINGU"
MOVJ P000 VJ=50.00
CALL JOB:MSR_MEASURE_FEASURE ARGF"1;2;80"
MOVJ P001 VJ=50.00
CALL JOB:MSR_MEASURE_FEASURE ARGF"1;2;80"
MOVJ P002 VJ=50.00
CALL JOB:MSR_MEASURE_FEASURE ARGF"1;2;80"
CALL JOB:MSR_END_MEASURE ARGF"1;11;31;32;33;80"
CALL JOB:MSR_VIEW_PIECE_DATA ARGF"1;80" ARGF"STRINGU"
CALL JOB:MSR_CLOSE_SOCKET
END
The table below explains the above example program.
| Workflow | Code and description | ||
|---|---|---|---|
Set position Information |
|
||
Set program attributes |
|
||
Initialize communication |
|
||
Establish the communication |
|
||
Start measurement task |
|
||
Input part to Mech-Metrics |
|
||
Move the robot to a specified position and perform feature measurement |
|
||
End measurement |
|
||
Query history data |
|
||
Close the communication |
|