Local Statement
Defines and displays local coordinate systems.
Syntax
(1) Local localNumber, ( pLocal1 : pBase1 ), ( pLocal2 : pBase2 )
[, { L | R }] [, BaseU]
(2) Local localNumber, pCoordinateData
(3) Local localNumber, pOrigin, [pXaxis], [pYaxis], [ { X | Y } ]
(4) Local localNumber
Parameters
- localNumber
- Specify the local coordinate system number. A total of 15 local coordinate systems (of the integer value from 1 to 15) may be defined.
- pLocal1 : pLocal2
- Specify point data in the local coordinate system with a point variable.
- pBase1 : pBase2
- Specify point data in the base coordinate system with a point variable.
- L | R
- Optional. Align local origin to left (first) or right (second) base points.
- BaseU
- When supplied, U axis coordinates are in the base coordinate system. When omitted, U axis coordinates are in the local coordinate system.
- pCoordinateData
- Specify the origin and orientation of the local coordinate system directly as point data. When it’s SCARA Robots (include RS series), specify V coordinate and W coordinate to “0”.
- pOrigin
- Specify the position in the robot coordinate system that defines the local coordinate system origin, as P#(integer) or P(expression).
- pXaxis
- Optional. Integer expression representing a point along the X axis using robot coordinate system if X alignment is specified.
- pYaxis
- Optional. Integer expression representing a point along the Y axis using robot coordinate system if Y alignment is specified.
- X
- The line connecting the origin and the pXaxis is defined as the X axis of the local coordinate system. The Y axis and Z axis are calculated to be orthogonal to X in the plane that is created by the 3 local points. (Default)
- Y
- The line connecting the origin and the pYaxis is defined as the Y axis of the local coordinate system. The X axis and Z axis are calculated to be orthogonal to Y in the plane that is created by the 3 local points.
Description
(1) Local defines a local coordinate system by specifying 2 points, pLocal1 and pLocal2, contained in it that coincide with two points, pBase1 and pBase2, contained in the base coordinate system.
Example:
Local 1, (P1:P11), (P2:P12)
P1 and P2 are local coordinate system points. P11 and P12 are base coordinate system points.
If the distance between the two specified points in the local coordinate system is not equal to that between the two specified points in the base coordinate system, the XY plane of the local coordinate system is defined in the position where the midpoint between the two specified points in the local coordinate system coincides with that between the two specified points in the base coordinate system.
Similarly, the Z axis of the local coordinate system is defined in the position where the midpoints coincide with each other.
(2) Defines a local coordinate system by specifying the origin and axis rotation angles with respect to the base coordinate system.
Example:
Local 1, XY(x, y, z, u)
Local 1, XY(x, y, z, u, v, w)
Local 1, P1
(3) Defines a 3D local coordinate system by specifying the origin point, x axis point, and y axis point. Only the X, Y, and Z coordinates of each point are used. The U, V, and W coordinates are ignored. When the X alignment parameter is used, then pXaxis is on the X axis of the local and only the Z coordinate of pYaxis is used. When the Y alignment parameter is used, then pYaxis is on the Y axis of the local and only the Z coordinate of pXaxis is used.
Example:
Local 1, P1, P2, P3
Local 1, P1, P2, P3, X
Local 1, P1, P2, P3, Y
(4) Displays the specified local settings.
Using L and R parameters: While Local basically uses midpoints for positioning the axes of your local coordinate system as described above, you can optionally specify left or right local by using the L and R parameters.
- The Left local parameter defines the local coordinates at the position where the point number 1 in the local coordinate system corresponds to the point number 2 in the base coordinate system. (Z axis direction is included.)
- Right Local: Right local defines a local coordinate system by specifying point pLocal2 corresponding to point pBase2 in the base coordinate system. (Z axis direction is included.)
Using the BaseU parameter: If the BaseU parameter is omitted, then the U axis of the local coordinate system is automatically corrected in accordance with the X and Y coordinate values of the specified 4 points. Therefore, the 2 points in the base coordinate system may initially have any U coordinate values.
It may be desired to correct the U axis of the local coordinate system based on the U coordinate values of the two points in the base coordinate system, rather than having it automatically corrected (e.g. correct the rotation axis through teaching). To do so, supply the BaseU parameter.
Note
When it’s SCARA Robots, do not set for V and W.
When you use SCARA Robot, not to set value to V and W coordinate in base coordinate or input “0”. If you set them, an error may occur out of the J4.
See Also
ArmSet, Base, ECPSet, LocalClr, TLSet, Where
Local Statement Examples
Here are some examples from the command window:
Left aligned local:
> p1 = 0, 0, 0, 0/1
> p2 = 100, 0, 0, 0/1
> p11 = 150, 150, 0, 0
> p12 = 300, 150, 0, 0
> local 1, (P1:P11), (P2:P12), L
> p21 = 50, 0, 0, 0/1
> go p21
Local defined with only the origin point:
> local 1, 100, 200, -20, 0
Local defined with only the origin point rotated 45 degrees about the X axis:
> local 2, 50, 200, 0, 0, 45, 0
3D Local with p2 aligned with the X axis of the local:
> local 3, p1, p2, p3, x
3D Local with p3 aligned with the Y axis of the local:
> local 4, p1, p2, p3, y