LJM Function

Returns the point data with the orientation flags converted to enable least joint motion when moving to a specified point based on the reference point.

Syntax
LJM (Point [, refPoint [, orientationFlag] ])

Parameters

Point
Specify the target point data.
refPoint
Specify the reference point data. When this is omitted, the reference point is the current position (Here).
orientationFlag
6-axis robots

  • 1: Converts the wrist orientation (Wrist Flag), J4Flag, J6Flag or J1Flag so that Joint #4 will be the shortest movement. This is the default setting when “orientationFlag” is omitted.
  • 2: Converts the J4Flag or J6Flag.
  • 3: Converts the wrist orientation (Wrist Flag), J4Flag, J6Flag or J1Flag so that Joint #5 will be the shortest movement.
  • 4: Converts the wrist orientation (Wrist Flag), J4Flag, J6Flag or J1Flag so that Joint #6 will be the shortest movement.
"orientationFlag" Hand orientation Elbow orientation Wrist orientation J1Flag J4Flag J6Flag Priority order of axis with the shortest movement
1 - - J4
2 - - - -
3 - - J5
4 - - J6
Note: Orientation of “-” is the same as the orientation specified by “refPoint”.
RS series
  • 1: Converts the hand orientation (Hand Flag), J1Flag or J2Flag. This is the default setting when “orientationFlag” is omitted.

  • 2: Converts the hand orientation (Hand Flag), J1Flag or J2Flag. Prevents the U axis from moving out of motion range at “orientationFlag” convert.

N2 series

  • 1: Converts to the posture with minimum joint movement in priority order of Joint #1 and Joint #5. The target postures are hand orientation (Hand Flag), elbow orientation (Elbow Flag), wrist orientation (Wrist Flag), J4Flag, and J6Flag. The elbow orientation (Elbow Flag) is always above elbow orientation. This is the default setting when “orientationFlag” is omitted.

  • 2: Converts to the posture with minimum joint movement in priority order of Joint #1 and Joint #4. The target postures are hand orientation (Hand Flag), elbow orientation (Elbow Flag), wrist orientation (Wrist Flag), J4Flag, and J6Flag. The elbow orientation (Elbow Flag) is always above elbow orientation.

  • 3: Converts the wrist orientation (Wrist Flag), J4Flag, and J6Flag so that Joint #4 will be the shortest movement.

  • 4: Converts the J4Flag and J6Flag.

  • 5: Change the hand orientation specified by “refPoint” to different hand orientation (Hand Flag). Converts the wrist orientation (Wrist Flag), J4Flag, J6Flag or J1Flag so that Joint #5 will be the shortest movement. The target postures are hand orientation (Hand Flag), elbow orientation (Elbow Flag), wrist orientation (Wrist Flag), J4Flag, and J6Flag. The elbow orientation (Elbow Flag) is always above elbow orientation.

  • 6: Change the hand orientation specified by “refPoint” to different hand orientation (Hand Flag). Converts the wrist orientation (Wrist Flag), J4Flag, J6Flag or J1Flag so that Joint #4 will be the shortest movement. The target postures are hand orientation (Hand Flag), elbow orientation (Elbow Flag), wrist orientation (Wrist Flag), J4Flag, and J6Flag. The elbow orientation (Elbow Flag) is always above elbow orientation.

  • 7: Change the elbow orientation to the below elbow orientation (Elbow Flag). To be the shortest movement, converts the wrist orientation (Wrist Flag), J4Flag, and J6Flag in priority order of Joint #1 and Joint #5. The target postures are hand orientation (Hand Flag), elbow orientation (Elbow Flag), wrist orientation (Wrist Flag), J4Flag, and J6Flag.

  • 8: Change the elbow orientation to the below elbow orientation (Elbow Flag). To be the shortest movement, converts the wrist orientation (Wrist Flag), J4Flag, and J6Flag in priority order of Joint #1 and Joint #4. The target postures are hand orientation (Hand Flag), elbow orientation (Elbow Flag), wrist orientation (Wrist Flag), J4Flag, and J6Flag.

  • "orientationFlag" Hand orientation Elbow orientation Wrist orientation J4Flag J6Flag Priority order of axis with the shortest movement
    1 *1 J1>J5
    2 *1 J1>J4
    3 - - J4
    4 - - - -
    5 *2 *1 J5
    6 *2 *1 J4
    7 *3 J1>J5
    8 *3 J1>J4
    Note: Orientation of “-” is the same as the orientation specified by “refPoint”.
    • *1: Above elbow orientation

    • *2: Hand orientation is different from the orientation specified by “refPoint”.

    • *3: Below elbow orientation

    N6 series

  • 1: Converts the wrist orientation (Wrist Flag), J4Flag, and J6Flag so that Joint #4 will be the shortest movement. This is the default setting when “orientationFlag” is omitted.

  • 2: Converts the J4Flag and J6Flag.

  • 3: Converts the wrist orientation (Wrist Flag), J4Flag, J6Flag or J1Flag so that Joint #5 will be the shortest movement.

  • 4: Converts the wrist orientation (Wrist Flag), J4Flag, J6Flag or J1Flag so that Joint #6 will be the shortest movement.

  • "orientationFlag" Hand orientation Elbow orientation Wrist orientation J1Flag J4Flag J6Flag Priority order of axis with the shortest movement
    1 - - J4
    2 - - - -
    3 - - J5
    4 - - J6
    Note: Orientation of “-” is the same as the orientation specified by “refPoint”.

    Description
    When the 6-axis or N series robot moves to a point calculated by such as pallet or relative offsets, the wrist part may rotate to an unintended direction. The point calculation above does not depend on robot models and results in motion without converting the required point flag.

    LJM function can be used to convert the point flag to prevent the unintended wrist rotation.

    For the N series robots, it is also possible to reduce the cycle time and omit teaching of the avoidance point, which is necessary for the 6-axis robots, by changing the Hand Flag and Elbow Flag.

    When the RS series robot moves to a point calculated by such as pallet or relative offsets, Arm #1 may rotate to an unintended direction. LJM function can be used to convert the point flag to prevent the unintended rotation of Arm #1.

    In addition, the U axis of an RS series robot may go out of motion range when the orientation flag is converted, which will cause an error. To prevent this error, the LJM function adjusts the U axis target angle so that it is inside the motion range. This is available when “2” is selected for orientationFlag.

    Returns the specified point for all robots except the 6-axis, N series, and RS series robot.

    Note


    • The reference point omission and Parallel Processing

      You cannot use both of the parallel point omission and parallel processing in one motion command like this:

      Go LJM(P10)  ! D10; MemOn 1 !
      

      Be sure to change the program like this:

      P999 = Here
      Go LJM(P10,P999) ! D10; MemOn 1 !
      
    • orientationFlag for N2 series

      • orientationFlag 1, 2:

        To shorten the cycle time, select orientationFlag 1 or 2.

        Since the posture has minimum Joint #1 movement, the cycle time can be shortest in most motion. To reduce the Joint #5 movement, select orientationFlag 1. To reduce the Joint #4 movement, select orientationFlag 2.

      • orientationFlag 3, 4:

        Use these flags if you want to use them in a same manner as the flags for vertical 6-axis robots.

        orientationFlag 3 is same as orientationFlag 1 of the vertical 6-axis robots.

        orientationFlag 4 is same as orientationFlag 2 of the vertical 6-axis robots.

      • orientationFlag 5, 6:

        If the hand collides with peripheral walls during the operation, select orientationFlag 5 or 6. Since the hand passes the neighborhood of the robot’s origin point, the robot can move with less possibility to collide with the obstacles. To reduce the Joint #5 movement, select orientationFlag 5. To reduce the Joint #4 movement, select orientationFlag 6.

      • orientationFlag 7, 8:

        To have a below elbow orientation, select orientationFlag 7 or 8. Depending on motion, the robot passes the neighborhood of the origin like orientationFlag 5 and orientationFlag 6. Therefore, the robot can move with less possibility to collide with the obstacles, if these are located around the robot. To reduce the Joint #5 movement, select orientationFlag 7. To reduce the Joint #4 movement, select orientationFlag 8.

    • localNumber

      Local numbers of the points returned by LJM function are the same as that of “Point Expression”.


    See Also
    Pallet

    LJM Function Example

    Function main
      Integer i, j
    
      P0 = XY(300, 300, 300, 90, 0, 180)
      P1 = XY(200, 280, 150, 90, 0, 180)
      P2 = XY(200, 330, 150, 90, 0, 180)
      P3 = XY(-200, 280, 150, 90, 0, 180)
    
      Pallet 1, P1, P2, P3, 10, 10
    
      Motor On
      Power High
      Speed 50; Accel 50, 50
      SpeedS 1000; AccelS 5000
    
      Go P0
      P11 = P0 -TLZ(50)
    
      For i = 1 To 10
          For j = 1 To 10
            'Specify points
            P10 = P11    'Depart point
          P12 = Pallet(1, i, j)    'Target point
          P11 = P12 -TLZ(50)    'Start approach point
          'Converting each point to LJM
          P10 = LJM(P10)
          P11 = LJM(P11, P10)
          P12 = LJM(P12, P11)
          'Execute motion
            Jump3 P10, P11, P12 C0
        Next
      Next
    Fend
    
    Function main2
      P0 = XY(300, 300, 300, 90, 0, 180)
      P1 = XY(400, 0, 150, 90, 0, 180)
      P2 = XY(400, 500, 150, 90, 0, 180)
      P3 = XY(-400, 0, 150, 90, 0, 180)
      Pallet 1, P1, P2, P3, 10, 10
    
      Motor On
      Power High
      Speed 50; Accel 50, 50
      SpeedS 1000; AccelS 5000
    
      Go P0
    
      Do
        ' Specify points
        P10 = Here -TLZ(50)    'Depart point
        P12 = Pallet(1, Int(Rnd(9)) + 1, Int(Rnd(9)) + 1)    'Target point
        P11 = P12 -TLZ(50)    'Start approach point
    
        If TargetOK(P11) And TargetOK(P12) Then    'Point check
        'Converting each point to LJM
        P10 = LJM(P10)
        P11 = LJM(P11, P10)
        P12 = LJM(P12, P11)
        'Execute motion
          Jump3 P10, P11, P12 C0
        EndIf
       Loop
    Fend