TAKEARM
(Statement)
Gets an arm group. Upon execution of this statement, the programmed speed, acceleration and deceleration will be set to 100. If the gotten arm group includes any robot joint, this statement restores the tool coordinates and work coordinates to the origin.
TAKEARM[<ArmGroupNumber>][<KEEP=DefaultValue>]
This statement continues the process as it is, if a TAKEARM command in a task which already has control priority, or in a subroutine called by the task is executed.
<ArmGroupNumber> [Version 1.5 or later]
If <ArmGroupNumber> is omitted, the TAKEARM gets the semaphore of Arm Group 0 in which only robot joints are enabled.
<KEEP = Set value for initializing> [Version 1.4 or later]
Set value for initializing
0:
|
The tool coordinate and the work coordinate are returned to the origin, and the internal speed, the internal acceleration, and the internal deceleration are set to 100.
|
1:
|
The tool coordinate, the work coordinate, the internal speed, the internal acceleration, and the internal deceleration are maintained to their current setting.
|
If <KEEP = Set value for initializing> is omitted, KEEP=0 (the tool coordinate and the work coordinate are returned to the origin, and the internal speed, the internal acceleration, and the internal deceleration is set to 100) is assumed.
-
Arm group includes any robot jointAn error will occur if a task without robot control priority attempts to execute a robot motion instruction in the following table. Be sure to obtain a control priority with a TAKEARM command for programs that are used to execute these motion instructions.Robot motion instructions requiring control priorityTypeCommandsDeclaration statementHOME, TOOL, WORKRobot control statementAPPROACH, DEPART, DRAW, DRIVE, DRIVEA, GOHOME, MOVE, ROTATEH, ROTATE, SPEED, JSPEED, ACCEL, JACCEL, DECEL, JDECEL, CHANGETOOL, CHANGEWORK, LETENVProper portable mass setting library, Arm motion library
-
Robot control priority is automatically released in the following cases.
-
If an END command is executed (Except for an END command at the end of a called program)
-
If a KILL command is executed
-
If a HALT command is executed
-
If a STOP command is executed
-
If the robot controller is initialized with the teach pendant or I/O.
-
If a TAKEARM command is executed, the system automatically executes the following process.
-
The TOOL definition is initialized to TOOL 0. The work coordinates are set to the base coordinates of the robot.
-
The internal speed, internal acceleration and internal deceleration are set to 100.
-
The system does not release during program suspension.
-
-
extended-jointsIf a task holding no arm group attempts to execute any of the following motion commands, an error will occur. Before executing those commands, get the arm semaphore (Arm Group) by using the TAKEARM command.Commands Requiring Arm GroupCommandsRequires:HOME, TOOL, WORK, APPROACH, DEPART, DRAW, GOHOME, MOVE, ROTATEH, ROTATE, CHANGETOOL, CHANGEWORK, DRIVE, DRIVEA, SPEED, JSPEED, ACCEL, JACCEL, DECEL, JDECEL, INTERRUPT, LETENV, Motion optimization library, and Arm motion libraryArm group involving robot jointsDRIVE, DRIVEA, SPEED. JSPEED. ACCEL, JACCEL, DECEL, JDECEL, INTERRUPT, LETENV, and POSCLRArm group that may or may not involve robot joints
-
The DRIVE and DRIVEA commands require an arm group involving a joint(s) to move.Example: DRIVE (7,10)To move the 7th joint, the task should hold the arm group involving the 7th joint.
-
The MOVE command with EX (EXA) option requires the arm group involving robot joints and extended-joints which are invoked by the EX (EXA) option.Example: MOVE P, P0 EX ((7,10))The arm group should involve robot joints as well as the 7th joint.
-
The speed setting commands will only change the speed of joints involved in an active arm group currently held in the task.
-
The LETENV command requires an arm group involving joints associated with parameters to be changed.
-
-
One program cannot hold more than one different arm group. However, it can get the same arm group again in one program.Example:MOVE P, P0TAKEARM 0'Can get Arm Group 0 again, even if this'program has got it.TAKEARM 1'Error occurs since TAKEARM attempts to'get Arm Group 1 while Arm Group 0 has been'held.
-
If TAKEARM with KEEP option being set to "1" gets an arm group, the arm speed will not be initialized and remain as that of the old arm group.Example: If arm groups are arranged as listed below and the three programs exist:PROGRAM PRO1PROGRAM PRO2PROGRAM PRO3TAKEARM 1TAKEARM 2TAKEARM 1 keep=1SPEED 10SPEED 20DRIVE(7,10)DRIVE(7,10)DRIVE(7,10)ENDENDEND
First run PRO1. The 7th-joint will move at speed 10.Next run PRO2. The 7th-joint will move at speed 20.Then run PRO3. Since the KEEP option is "1", the 7th-joint will move at speed 10 keeping the speed defined by SPEED command for Arm Group 1 in PRO1.
Example 1:
PROGRAM PRO1
|
'
|
TAKEARM
|
'Executes TAKEARM on the first line of the program
'which instructs the robot motion.
|
MOVE P, P1
|
'
|
MOVE P, P2
|
'
|
GIVEARM 1
|
'Releases robot control priority with GIVEARM
'when this is finished.
'This is not always required since the priority is
'automatically released with END just
'after this statement.
|
END
|
'
|
Example 2:
PROGRAM PRO2
|
'
|
MOVE P, P3
|
'×: If a MOVE instruction is executed without
'execution of TAKEARM, an error occurs.
|
END
|
'
|
Example 3:
PROGRAM PRO3
|
'
|
TAKEARM
|
'
|
MOVE P, P4
|
'
|
CALL SUB1
|
'
|
END
|
'
|
PROGRAM SUB1
|
'
|
MOVE P, P5
|
'An error does not occur since TAKEARM has already
'been executed by PRO3.
|
END
|
'
|
Example 4:
PROGRAM PRO4
|
'
|
TAKEARM
|
'
|
SPEED 50
|
'
|
CHANGEWORK 3
|
'
|
CHANGETOOL 1
|
'
|
MOVE P, P5
|
'
|
CALL PRO5
|
'
|
END
|
'
|
|
|
PROGRAM PRO5
|
'
|
TAKEARM
|
'An error does not occur even if TAKEARM
'is instructed twice by PRO4 since this is called
'as a subroutine of PRO4.
|
MOVE P, P6
|
'However, the tool coordinates and the work
'coordinates are 0 and the internal
'speed is 100.
|
END
|
'
|
Example 5:
PROGRAM PRO6
|
'
|
TAKEARM
|
'
|
RUN PRO7
|
'
|
MOVE P, P7
|
'
|
END
|
'
|
|
|
PROGRAM PRO7
|
'
|
TAKEARM
|
'×: An error occurs when an attempt is made to
'obtain the robot execution priority with PRO7
'which is run as another task of
'PRO6, since PRO6 already has robot control priority.
|
MOVE P, P7
|
'
|
END
|
'
|
Example 6:
Shown below are program samples for the TAKEARM command when arm groups are arranged as listed below (for 4-axis robots).
PROGRAM PRO1
|
'
|
TAKEARM 1
|
'Get Arm Group 1 (7th extended-joint involved).
|
DRIVEA (7,100)
|
'Move the 7th extended-joint to an angle of 100
'degrees.
|
END
|
'
|
|
|
PROGRAM PRO2
|
'
|
TAKEARM 2
|
'Get Arm Group 2 (all robot joints and 7th
'extended-joint involved).
|
MOVE P,P0 EX ((7,10))
|
'Simultaneously move robot joints and 7th
'extended-joint.
|
DRIVEA (7,100)
|
'Move the 7th extended-joint to an angle of
'100 degrees.
|
END
|
'
|