STE 80722 
– 26 – 
4.2.2  Correcting the Position of the Robot 
 
Data received from the host computer can be used to correct the position of the 
robot. 
 
Directly specifying position (COJM1) 
 
PROGRAM DIRECT 
X=0.0 
Y=0.0 
Z=0.0 
C=0.0 
T=0.0 
PRINT COM1,"REQ" 
INPUT X,Y,Z,C,T,SUM 
IF SUM==X+Y+Z+C+T+1   
THEN GOTO ACTION 
PRINT COM1,"NG" 
GOTO FIN 
ACTION: 
PRINT COM1,"OK" 
P1=POINT(X,Y,Z,C,T) 
MOVE P1 
FIN: 
END 
In this program, the controller moves the 
robot to a position specified by the 
external device. 
The controller sends the character string 
REQ to the external device.    The external 
device will respond by sending back the 
values for positional data X, Y, Z, C, and 
T, and also the sum of these values plus 1 
(as check-sum data).    The controller will 
then see if the received data is correct by 
adding all the positional data, adding 1 to 
the result, and determining if check-sum 
value agrees with the value.    If it does 
agree, the controller will send the 
character string OK.   
If the received data is wrong, the controller 
will send the character string NG back to 
the external device and quit the program. 
The controller will create positional data 
P1 using that data and then tell the robot