Detailed explanation of command words
4-237
GetM (Get Mechanism)
[Function]
This instruction is used to control the robot by a program other than the slot 1 program when a multi-task is
used, or to control a multi-mechanism by setting an additional axis as a user-defined mechanism.
Control right is acquired by specifying the mechanism number of the robot to be controlled. To release con-
trol right, use the RelM instruction.
[Format]
[Terminology]
<Mechanism No.> 1 to 3, Specify this argument using a numerical or a variable.
The standard system's robot arm is assigned to mechanism 1.
[Reference Program]
(1) Start the task slot 2 from the task slot 1, and control the mechanism 1 in the task slot 2.
Task slot 1.
1 RelM
' Releases the mechanism in order to control mechanism 1 using slot 2.
2 XRun 2,"10"
' Start the program 10 in slot 2.
3 Wait M_Run(2)=1
' Wait for the starting confirmation of the slot 2.
:
Task slot 2. (Program "10")
1 GetM 1
' Get the control of mechanism 1.
2 Servo On
' Turn on the servo of mechanism 1.
3 Mov P1
4 Mvs P2
5 P3=P_Curr
' Substitute P3 in mechanism 1 current position.
6 Servo Off
' Turn mechanism 1 servo OFF.
7 RelM
' Releases the control right of mechanism 1.
8 End
[Explanation]
(1) Normally (in single task operation), mechanism 1 is obtained in the initial status; it is not necessary to
use the GetM instruction.
(2) Because the control right of the same mechanism cannot be acquired simultaneously by multiple tasks,
the following procedure is required in order to operate the robot by other than slot 1:
First, release control right using the RelM instruction by the slot 1 program. Next, acquire control right
using the GetM instruction by the slot program that operates the robot. An error will be generated if the
GetM instruction is executed again using a slot that has already acquired control right.
(3) The instructions requiring control right include the motor power ON/OFF instruction, the interpolation
instruction, the speed acceleration deceleration specification instruction, and the Tool/Base instruction.
GetM[]<Mechanism No.>
Commands
Accel, Base, CavChk, Cmp Jnt, Cmp Pos, Cmp Tool, Cmp Off, CmpG, Cnt, ColChk, ColLvl, Def Plt, Plt,
Fine, Fsc, FsGChg, HOpen, HClose, JRC, LoadSet, Mov, Mva, Mvc, Mvr, Mvr2, Mvr3, Mvs, MvSpl,
MvTune, Mxt, Oadl, P_Base, Prec, Servo, SetCalFrm, Spd, SpdOpt, Tool, Torq, Trk, EMvc, EMvr, EMvr2,
EMvr3, EMvs
Functions
,
* The following commands do not require GetM for Mechanism 1 if the controller software version is the
one mentioned below or later. In this case, the commands can be executed without generating an error.
,
............Ver.N8/P8 or later
........................Ver.R3a/S3a(Special ES Ver.R3dZ)
....................Ver.R3a/S3a(Special ES Ver.R3dZ)
Robot status vari-
ables
J_Curr, J/Fbc, J_Origin, P_Curr, P_CurrR, P_Fbc, P_Safe, P_Tool, M_Rspd, M_SetAdl