Mitsubishi MELFA CR1D Instruction Manual page 215

Table of Contents

Advertisement

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]
GetM[]<Mechanism No.>
[Terminology]
<Mechanism No.> 1 to 3, Specify this argument using a numerical or a variable.
[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
2 XRun 2,"10"
3 Wait M_Run(2)=1
:
Task slot 2. (Program "10")
1 GetM 1
2 Servo On
3 Mov P1
4 Mvs P2
5 P3=P_Curr
6 Servo Off
7 RelM
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.
(4) If the argument is omitted from the system status variable requiring the mechanism designation, the cur-
rently acquired mechanism will be designated.
(5) If the program is stopped, RelM will be executed automatically by the system. When the program is
restarted, GetM will be executed automatically.
(6) This instruction cannot be used in a constantly executed program.
[Related instructions]
RelM (Release Mechanism)
The standard system's robot arm is assigned to mechanism 1.
' Releases the mechanism in order to control mechanism 1 using slot 2.
' Start the program 10 in slot 2.
' Wait for the starting confirmation of the slot 2.
' Get the control of mechanism 1.
' Turn on the servo of mechanism 1.
' Substitute P3 in mechanism 1 current position.
' Turn mechanism 1 servo OFF.
' Releases the control right of mechanism 1.
Detailed explanation of command words 4-202
4MELFA-BASIC IV

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melfa cr2dMelfa cr3d

Table of Contents