Detailed explanation of Robot Status Variable
4-395
P_WkCord
[Function]
This function permits you to make reference to the work coordinate data being currently specified or to make
a setting for a new work coordinate.
Parameters to be worked with are WK1CORD through WK8CORD.
(For the outline of the function, refer to
.)
[Format]
[Terminology]
<Position variable>
A position variable to which a value is to be assigned is designated.
<Work coordinate number> A work coordinate number which is chosen from 1 through 8.
Constants, variables, logic/arithmetic expressions, and functions are usable.
When a real number or a double-precision real number is specified, the frac-
tional portion of 0.5 or over of the number is counted as one and the rest is
cut away.
<Work coordinate data>
Work coordinate data is specified with a position constant or a position vari-
able.
Values to be specified (coordinate values) represent the position of the origin
point of a work coordinate system viewed from the base coordinate system.
[Reference Program]
(1) Example when a new work coordinate 2 based on the existing work coordinate 1 is used as a new world
coordinates system
1 PW=P_WkCord(1)
' Read work coordinate 1 (set value for parameter: WK1CORD) and assign it to
PW.
2 PW.X=PW.X+100
’Add 100 to X coordinate value that has been read.
3 PW.Y=PW.Y+100
’Add 100 to Y coordinate value that has been read.
4 P_WkCord(2)=PW
’Set the results of the above operations for work coordinate 2.
(Set them to parameter: WK2CORD).
5 Base 2
’Let work coordinate 2 be a new world coordinate system.
6 Mov P1
(2) Specification of PA as a work coordinate 4 and Ex-T control linear interpolation movement along the
work coordinate 4
1 P_WkCord(4)=PA
’ Specify PA as a work coordinate 4. (Set it to parameter: WK4CORD.)
2 EMvs 4,P1
’ Moves to P1 along the work coordinate 4 by Ex-T control linear interpolation.
[Explanation]
(1) By designating a work coordinate number, work coordinate values concerned are read, or work coordi-
nate values are specified. The "1 to 8" specified as work coordinate number correspond to parameter:
WK1CORD-WK8CORD.
(2) Elements X, Y and Z of work coordinate data indicate the amount of translation from the origin point of
the base coordinate system to that of the work coordinate system.
Elements A, B, and C indicate how much the work coordinates system is tilted relative to the robot's
coordinates system.
X .........Distance the robot hand translates in the direction of the X axis
Y..........Distance the robot hand translates in the direction of the Y axis
Z..........Distance the robot hand translates in the direction of the Z axis
A..........Angle the robot hand rotates on the X axis
B..........Angle the robot hand rotates on the Y axis
C .........Angle the robot hand rotates on the Z axis
Elements A, B, and C are set to take a clockwise move as a forward rotation looking at the plus side
from the origin point of the work coordinate system.
(3) There is nothing significant about the structure flag.
Example)<Position variable>=P_WkCord(<work coordinate number>)
’Reference
P_WkCord(<work coordinate number>)=<work coordinate data> ’Setting