F_OffsetPos Function

Description
Returns the position of relative movement from the reference point at a specified distance and angle.

Usage
F_OffsetPos(Point1, Point2, iValue, iValueL)
F_OffsetPos(Point1, Point2, iValue)
F_OffsetPos(Point1, iValue, iValueL)
F_OffsetPos(Point1, iValue)

  • Point1
    Point data/point designation to show amount of relative movement

  • Point2
    Point data/point designation to show reference position. Can be omitted.

  • iValue
    Integer or expression representing coordinate system to perform relative movement

  • iValueL
    Integer or expression representing local coordinate system to perform relative movement. Specified only when local coordinate system is specified for iValue.

Return Values
Returns the position of relative movement from the reference point at a specified distance and angle.

Values iValue

Name of constants Values Description
FG_BASE 0 Causes relative movement in the base coordinate system.
FG_LOCAL 1

Causes relative movement in the local coordinate system.

Must also specify iValueL.

FG_TOOL 2 Causes relative movement in the tool coordinate system.

iValueL

Values
Minimum 0
Maximum 15

Detailed Explanation
Returns the position of relative movement from the reference point at a specified distance and angle. Since this command is not a movement command, the robot will not move

When FG_BASE is specified for iValue, return a position that is moved the amount of relative movement specified in Point1 based on the direction of base coordinate system. When FG_LOCAL is specified, return a relative position based on direction of local coordinate system specified in iValueL. When FG_TOOL is specified, return a relative position based on direction of currently selected tool coordinate system.

Point 1 indicates the amount of relative movement. Only X, Y, Z, U, V, W, S, and T values are referenced, and other flag information such as Hand is not used.

Point 2 indicates the reference position for finding a relative movement position. If Point 2 is omitted, the position control’s final virtual destination position which is acquirable with F_DestPos will be returned as the reference position.

An error will occur if the amount of movement is specified for Point 1 with respect to a value not defined for Point 2. For example, if Point 1 is specified as “XY(10,0,0,0,0,0) :ST(10, 10)” and Point 2 as “XY(10,0,0,0,0,0)”, S and T values will not be defined for Point 2, but will be defined for Point 1, resulting in an error.

Usage Example
The following is an example to display relative movement positions.

Function F_RefPosTest
  Print F_OffsetPos (P0, P1, FG_BASE)
  Print F_OffsetPos (XY(10,0,0,0,0,0), P1, FG_BASE)  'Position after moving 10 mm from P1 to X direction of base coordinate system
  Print F_OffsetPos (XY(0,10,0,0,0,0), FG_LOCAL, 1)  'Position after moving 10 mm from P1 to X direction of base coordinate system
  Print F_OffsetPos (P0, P1, FG_BASE)
Fend

See Also
F_DestPos Function