mitsubishi robot englisch no password

459
MELFA Industrial Robots Instruction Manual (Detailed explanations of functions and operations) CR1/CR2/CR3/CR4/CR7/CR8/CR9 Controller INDUSTRIAL AUTOMATION MITSUBISHI ELECTRIC MITSUB ISHI ELECT RIC Art. no.: 132315 14 07 2005 Version K BFP-A5992

Upload: brightstar-narvaez-vazquez

Post on 07-Aug-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 1/457

MELFA

Industrial Robots

Instruction Manual

(Detailed explanations of functionsand operations)

CR1/CR2/CR3/CR4/CR7/CR8/CR9

Controller

INDUSTRIAL AUTOMATIONMITSUBISHI ELECTRIC

MITSUBISHI ELECTRIC

Art. no.: 13231514 07 2005Version KBFP-A5992

Page 2: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 2/457

Page 3: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 3/457

Caution

Users of the robot given as a "Object Model" in "Table 1: List of origin position jo int angles" must obse rve the detai ls below.

Warning

If the operation is carried out, a wa rning error indicating positional deviation(error No.: L1820) may occur. If it is confirmed that the position has deviatedafter carrying out "1. Ope ration to confirm pos itional deviation of originposition", the origin data has been lost.In this case, reset the origin with the ABS method. Refer to section "ABSmethod" in the separate "Instruction Manual/Robot Arm Setup to

Maintenance" for the operation m ethods.If operation is carried out without resetting the origin, interference withperipheral devices or unforeseen operation could occur due to the loss oforigin data.

1.Operation to confirm positional deviation of origin position(1)Set each axis of the robot to the ABS mark using the teaching box's joint jog

operation.(2)Confirm that the joint angle displayed on the teaching box screen matches the

value corresponding to the object mo del given in Table 1. If the values do n otmatch, reset the origin with the ABS method.

Table 1: List of origin position joint angles (Position aligned with ABS mark arrow)Joint angle

Object ModelJ1 J2 J3 J4 J5 J6

RH-1000GHD C-SA 0degree 0degree 150mm 0degreeRH-1000GJD C-SA 0degree 0degree 150mm 0degree 0degreeRH-1000GHL C-SA 0degree 0degree 0degree 0degreeRH-1000GHL LC-SA 0degree 0degree 0degree 0degreeRH-1000GJLC -SA 0degree 0degree 0degree 0degree 0degreeRH-1500GJC-SA/SB 138.7

degree140

degree 0degree180

degree 0degree

RH-1500GC-SA**/SA5*-SB**/SB5*

138.7degree

140degree

0degree180

degree0degree 0degree

RC-1000GHW DC-SA 0degree 0degree 0degree 180degree

RC-1000GHW LC-SA 0degree 0degree 0degree 180degree

RC-1300G* 0mm 0mm 0mm 0degree 0mm

Do not release the brakes from an external source andforcibly move the robot arm at a high speed.

Page 4: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 4/457

 All teaching work must be carried out by an operator who has received specialtraining. (This also applies to maintenance work with the power source turned ON.)

 

Enforcement of safety training

For teaching work, prepare a work plan related to the methods and procedures ofoperating the robot, and to the measures to be taken when an error occurs or whenrestarting. Carry out work following this plan. (This also applies to maintenancework with the power source turned ON.) Preparation of work plan

Prepare a device that allows operation to be stopped immediately during teachingwork. (This also applies to maintenance work with the power source turned ON.) Setting of emergency stop switch

During teaching work, place a sign indicating that teaching work is in progress onthe start switch, etc. (This also applies to maintenance work with the power source

turned ON.) 

Indication of teaching work in progress

Provide a fence or enclosure during operation to prevent contact of the operatorand robot. Installation of safety fence

Establish a set signaling method to the related operators for starting work, and fol-low this method. Signaling of operation start

 As a principle turn the power OFF during maintenance work. Place a sign indicat-

ing that maintenance work is in progress on the start switch, etc. 

Indication of maintenance work in progress

Before starting work, inspect the robot, emergency stop switch and other relateddevices, etc., and confirm that there are no errors. Inspection before starting work

  CAUTION

  CAUTION

  WARNING

  CAUTION

  WARNING

  CAUTION

  CAUTION

  CAUTION

 Always read the following precautions and the separate

"Safety Manual" before starting use of the robot to learn therequired measures to be taken.

Safety Precautions

Page 5: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 5/457

The points of the precautions given in the separate "Safety Manual" are given below. 

Refer to the actual "Safety Manual" for details.

Use the robot within the environment given in the specifications. Failure to do socould lead to a drop or reliability or faults. (Temperature, humidity, atmosphere,

noise environment, etc.)

Transport the robot with the designated transportation posture. Transporting therobot in a non-designated posture could lead to personal injuries or faults fromdropping.

 Always use the robot installed on a secure table. Use in an instable posture couldlead to positional deviation and vibration.

Wire the cable as far away from noise sources as possible. If placed near a noisesource, positional deviation or malfunction could occur.

Do not apply excessive force on the connector or excessively bend the cable. Fail-ure to observe this could lead to contact defects or wire breakage.

Make sure that the workpiece weight, including the hand, does not exceed therated load or tolerable torque. Exceeding these values could lead to alarms orfaults.

Securely install the hand and tool, and securely grasp the workpiece. Failure toobserve this could lead to personal injuries or damage if the object comes off orflies off during operation.

Securely ground the robot and controller. Failure to observe this could lead to mal-

functioning by noise or to electric shock accidents.

Indicate the operation state during robot operation. Failure to indicate the statecould lead to operators approaching the robot or to incorrect operation.

When carrying out teaching work in the robot's movement range, always secure thepriority right for the robot control. Failure to observe this could lead to personal inju-ries or damage if the robot is started with external commands.

Keep the jog speed as low as possible, and always watch the robot. Failure to doso could lead to interference with the workpiece or peripheral devices.

 After editing the program, always confirm the operation with step operation beforestarting automatic operation. Failure to do so could lead to interference with periph-eral devices because of programming mistakes, etc.

Make sure that if the safety fence entrance door is opened during automatic opera-tion, the door is locked or that the robot will automatically stop. Failure to do socould lead to personal injuries.

Never carry out modifications based on personal judgments, or use non-designatedmaintenance parts.Failure to observe this could lead to faults or failures.

When the robot arm has to be moved by hand from an external area, do not placehands or fingers in the openings. Failure to observe this could lead to hands or fin-gers catching depending on the posture.

  CAUTION

  CAUTION

  CAUTION

  CAUTION

  CAUTION

  CAUTION

  WARNING

  WARNING

  CAUTION

  WARNING

  CAUTION

  CAUTION

  CAUTION

  CAUTION

  WARNING

Page 6: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 6/457

Do not stop the robot or apply emergency stop by turning the robot control-ler's main power OFF. If the robot controller main power is turned OFF dur-ing automatic operation, the robot accuracy could be adverselyaffected.Moreover, it may interfere with the peripheral device by drop ormove by inertia of the arm.

Do not turn off the main power to the robot controller while rewriting theinternal information of the robot controller such as the program or parame-ters.If the main power to the robot controller is turned off while in automaticoperation or rewriting the program or parameters, the internal information ofthe robot controller may be damaged.

Precautions for the basic configuration are shown below.(When CR1-571/CR1B-571 is used for thecontroller.)

Provide an earth leakage breaker that packed together on the primarypower supply of the controller as protection against electric leakage. Con-firm the setting connector of the input power supply voltage of the controller,if the type which more than one power supply voltage can be used. Thenconnect the power supply. Failure to do so could lead to electric shock accidents.

For using RH-5AH/10AH/15AH series or RH-6SH/12SH/18SH series. 

While pressing the brake releasing switch on the robot arm, beware of thearm which may drop with its own weight.Dropping of the hand could lead to a collision with the peripheral equipmentor catch the hands or fingers.

  CAUTION

  CAUTION

  CAUTION

Cover

Terminal cover

Rear side of controller

Earth leakagebreaker(NV)

Protective earthterminal(PE)

Cover

Terminal

Power supply *RV-1A/2AJ series and RP-1AH/3AH/5AH series: Single phase 90-132VAC, 180-253VAC.*Except the above: Single phase 180-253VAC.

  WARNING

Page 7: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 7/457

Revision history

Date Specifications No. Details of revisions

1999-06 BFP-A5992Z-* First print

1999-09-20 BFP-A5992Z-A Error in writing correction.The function of RH-1000 was considered.

1999-11-09 BFP-A5992 Error in writing correction.

2000-04-06 BFP-A5992-A Attention in the power supply connection was added.(CR1 Controller)

2000-06-09 BFP-A5992-B Parameter CNT was added.Emergency stop input of CR1 controller was added.JRC command was added.The power supply voltage of CR1 controller was corrected.

2000-07-12 BFP-A5992-C Change title.Error in writing correction.

2001-06-05 BFP-A5992-Da Major revision. Function list, publication of Q & A, description of system variables, aswell as language and similar notation of system functions, and supplementation of vari-ous parameter functions.

2001-11-30 BFP-A5992-D Formal style.

2001-12-12 BFP-A5992-E Error in writing correction.

2002-11-15 BFP-A5992-F The explanation and supplementary explanation of the new function corresponding tosoftware version H7 edition were added.The notation of the input-and-output circuit terminal was corrected.Explanation of optimum acceleration/deceleration setting was added.Error in writing correction.

2003-10-14 BFP-A5992-G The explanation and supplementary explanation of the new function corresponding tosoftware version J1 edition were added.Change title.Error in writing correction.

2003-12-01 BFP-A5992-H The explanation and supplementary explanation of the new function corresponding tosoftware version J4 edition were added.

Error in writing correction.

2005-02-28 BFP-A5992-J The explanation and supplementary explanation of the new function corresponding tosoftware version K1 edition were added.Error in writing correction.

2005-07-14 BFP-A5992-K The explanation and supplementary explanation of the new function corresponding tosoftware version K4 edition were added.Error in writing correction.

Page 8: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 8/457

*Introduction

Thank you for purchasing the Mitsubishi industrial robot.This instruction manual explains the functions and operation methods of the controller (CR1/CR2/CR3/CR4/CR7/CR8/CR9) and teaching pendant (R28TB), and the functions and specifications of the MELFA-BASICIV programming language.

 Always read through this manual before starting use to ensure correct usage of the robot.Note that this document is prepared for the following software versions.

Controller : Version K4 or later T/B : Version B2 or later  

• No part of this manual may be reproduced by any means or in any form, without prior consentfrom Mitsubishi.

• The details of this manual are subject to change without notice.• An effort has been made to make full descriptions in this manual. However, if any discrepancies

or unclear points are found, please contact your dealer.• The information contained in this document has been written to be accurate as much as possi-

ble. Please interpret that items not described in this document "cannot be performed.". Please contact your nearest dealer if you find any doubtful, wrong or skipped point.

 Copyright(C) 1999 MITSUBISHI ELECTRIC CORPORATION

Page 9: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 9/457

Page 10: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 10/457

Contents

i

Page

1 Before starting use .......................................................................................................................... 1-1

1.1 Using the instruction manuals ................................................................................................... 1-11.1.1 The details of each instruction manuals ............................................................................. 1-11.1.2 Symbols used in instruction manual ................................................................................... 1-2

1.2 Safety Precautions .................................................................................................................... 1-31.2.1 Precautions given in the separate Safety Manual .............................................................. 1-4

2 Explanation of functions .................................................................................................................. 2-5

2.1 Operation panel (O/P) functions ............................................................................................... 2-5

2.2 Teaching pendant (T/B) functions ............................................................................................. 2-72.2.1 Operation rights ................................................................................................................ 2-10

2.3 Functions Related to Movement and Control .......................................................................... 2-11

3 Explanation of operation methods ................................................................................................ 3-13

3.1 Operation of the teaching pendant menu screens .................................................................. 3-13(1) Screen tree ..................................................................................................................... 3-13(2) Selecting a menu ............................................................................................................ 3-14

3.2 Jog Feed (Overview) ............................................................................................................... 3-153.2.1 Types of jog feed .............................................................................................................. 3-153.2.2 Speed of jog feed .............................................................................................................. 3-163.2.3 JOINT jog .......................................................................................................................... 3-163.2.4 TOOL jog .......................................................................................................................... 3-173.2.5 XYZ jog ............................................................................................................................. 3-173.2.6 3-axis XYZ jog .................................................................................................................. 3-183.2.7 CYLNDER jog ................................................................................................................... 3-183.2.8 Switching Tool Data .......................................................................................................... 3-193.2.9 Impact Detection during Jog Operation ............................................................................ 3-21

(1) Impact Detection Level Adjustment during Jog Operation ............................................. 3-21

3.3 Opening/Closing the Hands .................................................................................................... 3-22

3.4 Aligning the Hand .................................................................................................................... 3-233.5 Programming .......................................................................................................................... 3-243.5.1 Creating a program ........................................................................................................... 3-24

(1) Opening the program edit screen ................................................................................... 3-24(2) Creating a program ........................................................................................................ 3-25(3) Completion of program creation and saving programs .................................................. 3-26(4) Correcting a program ..................................................................................................... 3-27(5) Registering the current position data .............................................................................. 3-29(6) Confirming the position data (Position jump ) ................................................................. 3-30(7) Correcting the current position data ............................................................................... 3-31(8) Correcting the MDI (Manual Data Input) ........................................................................ 3-32(9) Deleting position data ..................................................................................................... 3-33(10) Display on the position edit screen ............................................................................... 3-34(11) Saving the program ...................................................................................................... 3-34

3.6 Debugging ............................................................................................................................... 3-35(1) Step feed ........................................................................................................................ 3-35(2) Step return ...................................................................................................................... 3-36(3) Step feed in another slot ................................................................................................ 3-36(4) Step jump ....................................................................................................................... 3-37

3.7 Automatic operation ................................................................................................................ 3-38(1) Setting the operation speed ........................................................................................... 3-38(2) Selecting the program No. .............................................................................................. 3-38(3) Starting automatic operation .......................................................................................... 3-39(4) Stopping ......................................................................................................................... 3-39(5) Resuming automatic operation from stopped state ........................................................ 3-40

(6) Resetting the program .................................................................................................... 3-413.8 Turning the servo ON/OFF ..................................................................................................... 3-42

Page 11: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 11/457

ii

Page

3.9 Error reset operation ............................................................................................................... 3-44

3.10 Operation to Temporarily Reset an Error that Cannot Be Canceled ..................................... 3-44

3.11 Operating the program control screen .................................................................................. 3-45(1) Program list display ........................................................................................................ 3-45(2) Program protection function ........................................................................................... 3-46(3) Copying programs .......................................................................................................... 3-47

(4) Changing the program name (Renaming) ...................................................................... 3-48(5) Deleting a program ......................................................................................................... 3-49

3.12 Operating the monitor screen ............................................................................................... 3-50(1) Input signal monitor ........................................................................................................ 3-50(2) Output signal monitor ..................................................................................................... 3-51(3) Variable monitor ............................................................................................................. 3-52(4) Error history .................................................................................................................... 3-53

3.13 Operation of maintenance screen ......................................................................................... 3-54(1) Setting the parameters ................................................................................................... 3-54(2) Initializing the program ................................................................................................... 3-55(3) Initializing the battery consumption time ........................................................................ 3-56(4) Releasing the brakes ...................................................................................................... 3-57

(5) Setting the origin ............................................................................................................ 3-58(6) Displaying the clock data for maintenance ..................................................................... 3-58

3.14 Operation of the setting screen ............................................................................................. 3-59(1) Setting the time .............................................................................................................. 3-59

4 MELFA-BASIC IV .......................................................................................................................... 4-60

4.1 MELFA-BASIC IV functions .................................................................................................... 4-604.1.1 Robot operation control .................................................................................................... 4-61

(1) Joint interpolation movement ......................................................................................... 4-61(2) Linear interpolation movement ....................................................................................... 4-62(3) Circular interpolation movement ..................................................................................... 4-63(4) Continuous movement ................................................................................................... 4-65

(5) Acceleration/deceleration time and speed control .......................................................... 4-66(6) Confirming that the target position is reached ................................................................ 4-68(7) High path accuracy control ............................................................................................. 4-69(8) Hand and tool control ..................................................................................................... 4-70

4.1.2 Pallet operation ................................................................................................................. 4-714.1.3 Program control ................................................................................................................ 4-73

(1) Unconditional branching, conditional branching, waiting ................................................ 4-73(2) Repetition ....................................................................................................................... 4-75(3) Interrupt .......................................................................................................................... 4-76(4) Subroutine ...................................................................................................................... 4-77(5) Timer .............................................................................................................................. 4-78(6) Stopping ......................................................................................................................... 4-79

4.1.4 Inputting and outputting external signals .......................................................................... 4-80(1) Input signals ................................................................................................................... 4-80(2) Output signals ................................................................................................................ 4-80

4.1.5 Communication ................................................................................................................. 4-814.1.6 Expressions and operations ............................................................................................. 4-82

(1) List of operator ............................................................................................................... 4-82(2) Relative calculation of position data (multiplication) ....................................................... 4-84(3) Relative calculation of position data (Addition) ............................................................... 4-84

4.1.7 Appended statement ......................................................................................................... 4-85

4.2 Multitask function .................................................................................................................... 4-864.2.1 What is multitasking? ........................................................................................................ 4-864.2.2 Executing a multitask ........................................................................................................ 4-874.2.3 Operation state of each slot .............................................................................................. 4-874.2.4 Precautions for creating multitask program ...................................................................... 4-89

(1) Relationship between number of tasks and processing time ......................................... 4-89

Page 12: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 12/457

Contents

iii

Page

(2) Specification of the maximum number of programs executed concurrently ................... 4-89(3) How to pass data between programs via external variables .......................................... 4-89(4) Confirmation of operating status of programs via robot status variables ...................... 4-89(5) The program that operates the robot is basically executed in slot 1. ............................. 4-89(6) How to perform the initialization processing via constantly executed programs ............ 4-89

4.2.5 Precautions for using a multitask program ....................................................................... 4-90

(1) Starting the multitask ...................................................................................................... 4-90(2) Display of operation status ............................................................................................. 4-904.2.6 Example of using multitask ............................................................................................... 4-91

(1) Robot work details. ......................................................................................................... 4-91(2) Procedures to multitask execution ................................................................................. 4-92

4.3 Detailed specifications of MELFA-BASIC IV ........................................................................... 4-93(1) Program name ................................................................................................................ 4-93(2) Command statement ...................................................................................................... 4-93(3) Variable .......................................................................................................................... 4-94

4.3.1 Statement ......................................................................................................................... 4-954.3.2 Appended statement ......................................................................................................... 4-954.3.3 Line ................................................................................................................................... 4-95

4.3.4 Line No. ............................................................................................................................ 4-954.3.5 Label ................................................................................................................................. 4-954.3.6 Types of characters that can be used in program ............................................................ 4-964.3.7 Characters having special meanings ................................................................................ 4-97

(1) Uppercase and lowercase identification ......................................................................... 4-97(2) Underscore ( _ ) ............................................................................................................. 4-97(3) Apostrophe ( ' ) ............................................................................................................... 4-97(4) Asterisk ( * ) .................................................................................................................... 4-97(5) Comma ( , ) .................................................................................................................... 4-97(6) Period ( . ) ....................................................................................................................... 4-97(7) Space ............................................................................................................................. 4-97

4.3.8 Data type .......................................................................................................................... 4-984.3.9 Constants .......................................................................................................................... 4-98

4.3.10 Numeric value constants ................................................................................................ 4-98(1) Decimal number ............................................................................................................. 4-98(2) Hexadecimal number ..................................................................................................... 4-98(3) Binary number ................................................................................................................ 4-98(4) Types of constant ........................................................................................................... 4-98

4.3.11 Character string constants .............................................................................................. 4-984.3.12 Position constants ........................................................................................................... 4-99

(1) Coordinate, posture and additional axis data types and meanings ................................ 4-99(2) Meaning of structure flag data type and meanings ........................................................ 4-99

4.3.13 Joint constants .............................................................................................................. 4-100(1) Axis data format and meanings .................................................................................... 4-100

4.3.14 Angle value ................................................................................................................... 4-100

4.3.15 Variables ....................................................................................................................... 4-1014.3.16 Numeric value variables ............................................................................................... 4-1024.3.17 Character string variables ............................................................................................. 4-1024.3.18 Position variables .......................................................................................................... 4-1024.3.19 Joint variables ............................................................................................................... 4-1034.3.20 Input/output variables ................................................................................................... 4-1034.3.21 Array variables .............................................................................................................. 4-1034.3.22 External variables ......................................................................................................... 4-1044.3.23 Program external variables ........................................................................................... 4-1044.3.24 User-defined external variables .................................................................................... 4-1054.3.25 Creating User Base Programs ...................................................................................... 4-1054.3.26 Robot status variables .................................................................................................. 4-106

4.4 Logic numbers ...................................................................................................................... 4-1104.5 Functions .............................................................................................................................. 4-110(1) User-defined functions ................................................................................................. 4-110

Page 13: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 13/457

iv

Page

(2) Built-in functions ........................................................................................................... 4-110

4.6 List of Instructions ................................................................................................................. 4-113(1) Instructions related to movement control ..................................................................... 4-113(2) Instructions related to program control ......................................................................... 4-113(3) Definition instructions ................................................................................................... 4-114(4) Multi-task related ......................................................................................................... 4-114

(5) Others .......................................................................................................................... 4-1154.7 Operators .............................................................................................................................. 4-116

4.8 Priority level of operations ..................................................................................................... 4-117

4.9 Depth of program's control structure ..................................................................................... 4-117

4.10 Reserved words .................................................................................................................. 4-117

4.11 Detailed explanation of command words ............................................................................ 4-1184.11.1 How to read the described items .................................................................................. 4-1184.11.2 Explanation of each command word ............................................................................. 4-118

 ACCEL (Accelerate) .............................................................................................................. 4-119 ACT (Act) ............................................................................................................................... 4-121BASE (Base).......................................................................................................................... 4-123CALLP (Call P) ...................................................................................................................... 4-125CHRSRCH (Character search).............................................................................................. 4-127CLOSE (Close) ...................................................................................................................... 4-128CLR (Clear)............................................................................................................................ 4-129CMP JNT (Comp Joint).......................................................................................................... 4-130CMP POS (Composition Posture) ......................................................................................... 4-132CMP TOOL (Composition Tool)............................................................................................. 4-134CMP OFF (Composition OFF) ............................................................................................... 4-136CMPG (Composition Gain) .................................................................................................... 4-137CNT (Continuous).................................................................................................................. 4-138COLCHK (Col Check)............................................................................................................ 4-141COLLVL (Col Level)............................................................................................................... 4-144COM ON/COM OFF/COM STOP (Communication ON/OFF/STOP) .................................... 4-145

DEF ACT (Define act)............................................................................................................ 4-146DEF ARCH (Define arch)....................................................................................................... 4-149DEF CHAR (Define Character) .............................................................................................. 4-151DEF FN (Define function) ...................................................................................................... 4-152DEF INTE/DEF FLOAT/DEF DOUBLE (Define Integer/Float/Double) .................................. 4-153DEF IO (Define IO) ................................................................................................................ 4-154DEF JNT (Define Joint).......................................................................................................... 4-156DEF PLT (Define pallet)......................................................................................................... 4-157DEF POS (Define Position) ................................................................................................... 4-158DIM (Dim) .............................................................................................................................. 4-159DLY (Delay) ........................................................................................................................... 4-160ERROR (error)....................................................................................................................... 4-162

END (End) ............................................................................................................................. 4-163FINE (Fine) ............................................................................................................................ 4-164FOR - NEXT (For-next).......................................................................................................... 4-165FPRM (FPRM) ....................................................................................................................... 4-166GETM (Get Mechanism)........................................................................................................ 4-167GOSUB (RETURN)(Go Subroutine) ...................................................................................... 4-168GOTO (Go To)....................................................................................................................... 4-169HLT (Halt) .............................................................................................................................. 4-170HOPEN / HCLOSE (Hand Open/Hand Close)....................................................................... 4-171IF...THEN...ELSE...ENDIF (If Then Else) .............................................................................. 4-173INPUT (Input)......................................................................................................................... 4-175JOVRD (J Override)............................................................................................................... 4-176JRC (Joint Roll Change) ........................................................................................................ 4-177

LOADSET (Load Set) ............................................................................................................ 4-179MOV (Move) .......................................................................................................................... 4-180

Page 14: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 14/457

Contents

v

Page

MVA (Move Arch) .................................................................................................................. 4-181MVC (Move C) ....................................................................................................................... 4-183MVR (Move R) ....................................................................................................................... 4-184MVR2 (Move R2) ................................................................................................................... 4-186MVR3 (Move R 3) .............................................................................................................................................................. 4-188MVS (Move S) ....................................................................................................................... 4-190

OADL (Optimal Acceleration) ................................................................................................ 4-193ON COM GOSUB (ON Communication Go Subroutine) ....................................................... 4-195ON ... GOSUB (ON Go Subroutine) ...................................................................................... 4-196ON ... GOTO (On Go To)....................................................................................................... 4-197OPEN (Open) ........................................................................................................................ 4-198OVRD (Override) ................................................................................................................... 4-199PLT (Pallet)............................................................................................................................ 4-200PREC (Precision)................................................................................................................... 4-201PRINT (Print) ......................................................................................................................... 4-202PRIORITY (Priority) ............................................................................................................... 4-203RELM (Release Mechanism)................................................................................................. 4-204REM (Remarks) ..................................................................................................................... 4-205RESET ERR (Reset Error) .................................................................................................... 4-206RETURN (Return).................................................................................................................. 4-207SELECT CASE (Select Case) ............................................................................................... 4-209SERVO (Servo) ..................................................................................................................... 4-211SKIP (Skip) ............................................................................................................................ 4-212SPD (Speed).......................................................................................................................... 4-213SPDOPT (Speed Optimize) ................................................................................................... 4-214TITLE (Title)........................................................................................................................... 4-216TOOL (Tool)........................................................................................................................... 4-217TORQ (Torque)...................................................................................................................... 4-218WAIT (Wait) ........................................................................................................................... 4-219WHILE-WEND (While End) ................................................................................................... 4-220WTH (With) ............................................................................................................................ 4-221

WTHIF (With If) ...................................................................................................................... 4-222XCLR (X Clear)...................................................................................................................... 4-223XLOAD (X Load).................................................................................................................... 4-224XRST (X Reset) ..................................................................................................................... 4-225XRUN (X Run) ....................................................................................................................... 4-226XSTP (X Stop) ....................................................................................................................... 4-227Substitute............................................................................................................................... 4-228(Label).................................................................................................................................... 4-229

4.12 Detailed explanation of Robot Status Variable ................................................................... 4-2304.12.1 How to Read Described items ...................................................................................... 4-2304.12.2 Explanation of Each Robot Status Variable .................................................................. 4-230

C_DATE................................................................................................................................. 4-231

C_MAKER ............................................................................................................................. 4-231C_MECHA ............................................................................................................................. 4-232C_PRG .................................................................................................................................. 4-232C_TIME.................................................................................................................................. 4-233C_USER ................................................................................................................................ 4-233J_CURR................................................................................................................................. 4-234J_COLMXL ............................................................................................................................ 4-235J_ECURR .............................................................................................................................. 4-236J_FBC/J_AMPFBC................................................................................................................ 4-237J_ORIGIN .............................................................................................................................. 4-237M_ACL/M_DACL/M_NACL/M_NDACL/M_ACLSTS ............................................................. 4-238M_BRKCQ............................................................................................................................. 4-239M_BTIME............................................................................................................................... 4-239M_CMPDST........................................................................................................................... 4-240M_CMPLMT........................................................................................................................... 4-241

Page 15: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 15/457

vi

Page

M_COLSTS ........................................................................................................................... 4-242M_CSTP ................................................................................................................................ 4-243M_CYS .................................................................................................................................. 4-243M_DIN/M_DOUT ................................................................................................................... 4-244M_ERR/M_ERRLVL/M_ERRNO ........................................................................................... 4-245M_EXP................................................................................................................................... 4-245

M_FBD................................................................................................................................... 4-246M_G ....................................................................................................................................... 4-247M_HNDCQ............................................................................................................................. 4-247M_IN/M_INB/M_INW ............................................................................................................. 4-248M_JOVRD/M_NJOVRD/M_OPOVRD/M_OVRD/M_NOVRD................................................ 4-249M_LDFACT............................................................................................................................ 4-250M_LINE.................................................................................................................................. 4-251M_MODE............................................................................................................................... 4-251M_ON/M_OFF ....................................................................................................................... 4-252M_OPEN................................................................................................................................ 4-253M_OUT/M_OUTB/M_OUTW ................................................................................................. 4-254M_PI ...................................................................................................................................... 4-254M_PSA................................................................................................................................... 4-255M_RATIO............................................................................................................................... 4-255M_RDST................................................................................................................................ 4-256M_RUN.................................................................................................................................. 4-256M_SETADL............................................................................................................................ 4-257M_SKIPCQ ............................................................................................................................ 4-258M_SPD/M_NSPD/M_RSPD .................................................................................................. 4-259M_SVO .................................................................................................................................. 4-259M_TIMER............................................................................................................................... 4-260M_TOOL ................................................................................................................................ 4-261M_UAR .................................................................................................................................. 4-262M_WAI ................................................................................................................................... 4-262M_WUPOV ............................................................................................................................ 4-263

M_WUPRT............................................................................................................................. 4-264M_WUPST............................................................................................................................. 4-265P_BASE/P_NBASE ............................................................................................................... 4-266P_COLDIR............................................................................................................................. 4-267P_CURR................................................................................................................................ 4-268P_FBC ................................................................................................................................... 4-269P_SAFE................................................................................................................................. 4-269P_TOOL/P_NTOOL............................................................................................................... 4-270P_ZERO ................................................................................................................................ 4-270

4.13 Detailed Explanation of Functions ...................................................................................... 4-2714.13.1 How to Read Described items ...................................................................................... 4-2714.13.2 Explanation of Each Function ....................................................................................... 4-271

 ABS........................................................................................................................................ 4-272 ALIGN .................................................................................................................................... 4-273 ASC ....................................................................................................................................... 4-274 ATN/ATN2 ............................................................................................................................. 4-274BIN$....................................................................................................................................... 4-275CALARC ................................................................................................................................ 4-276CHR$..................................................................................................................................... 4-277CINT ...................................................................................................................................... 4-277CKSUM.................................................................................................................................. 4-278COS....................................................................................................................................... 4-278CVI......................................................................................................................................... 4-279CVS ....................................................................................................................................... 4-279CVD ....................................................................................................................................... 4-280DEG....................................................................................................................................... 4-280DIST....................................................................................................................................... 4-281

Page 16: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 16/457

Contents

vii

Page

EXP........................................................................................................................................ 4-281FIX ......................................................................................................................................... 4-282FRAM..................................................................................................................................... 4-283HEX$ ..................................................................................................................................... 4-284INT ......................................................................................................................................... 4-284INV......................................................................................................................................... 4-285

JTOP...................................................................................................................................... 4-285LEFT$ .................................................................................................................................... 4-286LEN........................................................................................................................................ 4-286LN .......................................................................................................................................... 4-287LOG ....................................................................................................................................... 4-287MAX....................................................................................................................................... 4-288MID$ ...................................................................................................................................... 4-288MIN ........................................................................................................................................ 4-289MIRROR$ .............................................................................................................................. 4-289MKI$ ...................................................................................................................................... 4-290MKS$ ..................................................................................................................................... 4-290MKD$..................................................................................................................................... 4-291POSCQ.................................................................................................................................. 4-291POSMID................................................................................................................................. 4-292PTOJ...................................................................................................................................... 4-292RAD ....................................................................................................................................... 4-293RDFL 1 .................................................................................................................................. 4-293RDFL 2 .................................................................................................................................. 4-294RND....................................................................................................................................... 4-295RIGHT$.................................................................................................................................. 4-295SETFL 1................................................................................................................................. 4-296SETFL 2................................................................................................................................. 4-297SETJNT ................................................................................................................................. 4-298SETPOS ................................................................................................................................ 4-299SGN....................................................................................................................................... 4-300

SIN......................................................................................................................................... 4-300SQR....................................................................................................................................... 4-301STRPOS................................................................................................................................ 4-301STR$...................................................................................................................................... 4-302TAN........................................................................................................................................ 4-302VAL........................................................................................................................................ 4-303ZONE..................................................................................................................................... 4-304ZONE 2.................................................................................................................................. 4-305

5 Functions set with parameters .................................................................................................... 5-306

5.1 Movement parameter ............................................................................................................ 5-306

5.2 Signal parameter ................................................................................................................... 5-314

5.3 Operation parameter ............................................................................................................. 5-3155.4 Command parameter ............................................................................................................ 5-318

5.5 Communication parameter .................................................................................................... 5-322

5.6 Standard Tool Coordinates ................................................................................................... 5-324

5.7 About Standard Base Coordinates ....................................................................................... 5-327

5.8 About user-defined area ....................................................................................................... 5-328

5.9 Free plane limit ..................................................................................................................... 5-329

5.10 Automatic return setting after jog feed at pause ................................................................. 5-330

5.11 Automatic execution of program at power up ..................................................................... 5-332

5.12 About the hand type ............................................................................................................ 5-333

5.13 About default hand status ................................................................................................... 5-334

5.14 About the output signal reset pattern .................................................................................. 5-335

5.15 About the communication setting ........................................................................................ 5-337

Page 17: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 17/457

viii

Page

5.16 Hand and Workpiece Conditions (optimum acceleration/deceleration settings) ................. 5-340

5.17 About the singular point adjacent alarm .............................................................................. 5-344

5.18 About ROM operation/high-speed RAM operation function ................................................ 5-345

5.19 Warm-Up Operation Mode .................................................................................................. 5-355

5.20 About singular point passage function ................................................................................ 5-362

TYPE (Type) ..........................................................................................................................5-365

6 External input/output functions .................................................................................................... 6-367

6.1 Types .................................................................................................................................... 6-367

6.2 Connection method ............................................................................................................... 6-368

6.3 Dedicated input/output .......................................................................................................... 6-371

6.4 Enable/disable status of signals ............................................................................................ 6-377

6.5 External signal timing chart ................................................................................................... 6-3786.5.1 Individual timing chart of each signal .............................................................................. 6-3786.5.2 Timing chart example ..................................................................................................... 6-385

(1) External signal operation timing chart (Part 1) ............................................................. 6-385(2) External signal operation timing chart (Part 2) ............................................................. 6-386

(3) Example of external operation timing chart (Part 3) ..................................................... 6-387(4) Example of external operation timing chart (Part 4) ..................................................... 6-388

6.6 Emergency stop input ........................................................................................................... 6-3896.6.1 Robot Behavior upon Emergency Stop Input ................................................................. 6-389

7 Q & A .......................................................................................................................................... 7-390

7.1 Movement ............................................................................................................................. 7-390

7.2 Program ................................................................................................................................ 7-393

7.3 Operation .............................................................................................................................. 7-394

7.4 External input/output signal ................................................................................................... 7-396

7.5 Parameter ............................................................................................................................. 7-397

8 Collection of Techniques ............................................................................................................. 8-398

8.1 Entry-Level Edition ................................................................................................................ 8-3998.1.1 Describing comprehensive programs ............................................................................. 8-3998.1.2 Managing program versions ........................................................................................... 8-4058.1.3 Changing the operating speed in a program .................................................................. 8-4058.1.4 Detecting fallen works while transporting ........................................................................ 8-4068.1.5 Positioning works accurately .......................................................................................... 8-4078.1.6 Awaiting signal ON/OFF during the specified number of seconds .................................. 8-4088.1.7 Interlocking by using external input signals .................................................................... 8-4108.1.8 Sharing data among programs ....................................................................................... 8-4128.1.9 Checking whether the current position and the commanded position are the same ...... 8-4138.1.10 Shortening the cycle time (entry-level edition) .............................................................. 8-414

8.2 Intermediate Edition .............................................................................................................. 8-4168.2.1 How to quickly support for the addition of types ............................................................. 8-4168.2.2 Convenient ways to use the pallet instruction ................................................................. 8-4178.2.3 How to write communication programs ........................................................................... 8-4188.2.4 How to reduce teaching points ....................................................................................... 8-4218.2.5 Using a P variable in a counter, etc. ............................................................................... 8-4238.2.6 Getting position information when the sensor is on ........................................................ 8-424

8.3 Advance Edition .................................................................................................................... 8-4268.3.1 Using the robot as a simplified PLC (sequencer) ............................................................ 8-4268.3.2 Implementing a mapping function ................................................................................... 8-4298.3.3 Finding out executed lines .............................................................................................. 8-4318.3.4 Saving the status when an error has occurred ............................................................... 8-432

9 Appendix ..................................................................................................................................... 9-433

Page 18: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 18/457

Contents

ix

Page

9.1 Reference Material ................................................................................................................ 9-4339.1.1 About sink/source type of the standard external input and output .................................. 9-433

(1) Electrical specifications of input/output circuit .............................................................. 9-433(2) Connection example ..................................................................................................... 9-434(3) Connector pin assignment ............................................................................................ 9-435

Page 19: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 19/457

x

Page

Page 20: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 20/457

  1Before starting use

  Using the instruction manuals  1-1

1 Before starting use

This chapter explains the details and usage methods of the instruction manuals, the basic terminology andthe safety precautions.

1.1 Using the instruction manuals1.1.1 The details of each instruction manuals

The contents and purposes of the documents enclosed with this product are shown below. Use these doc-uments according to the application.For special specifications, a separate instruction manual describing the special section may be enclosed.

Explains the common precautions and safety measures to be taken for robot han-dling, system design and manufacture to ensure safety of the operators involvedwith the robot.

Explains the product's standard specifications, factory-set special specifications,option configuration and maintenance parts, etc. Precautions for safety and technol-ogy, when incorporating the robot, are also explained.

Explains the procedures required to operate the robot arm (unpacking, transporta-tion, installation, confirmation of operation), and the maintenance and inspectionprocedures.

Explains the procedures required to operate the controller (unpacking, transporta-tion, installation, confirmation of operation), basic operation from creating the pro-gram to automatic operation, and the maintenance and inspection procedures.

Explains details on the functions and operations such as each function and opera-tion, commands used in the program, connection with the external input/outputdevice, and parameters, etc.

Explains details on the MOVEMASTER commands used in the program.(For RV-1A/2AJ, RV-2A/3AJ and RV-3S/3SJ/3SB/3SJB series)

Explains the causes and remedies to be taken when an error occurs. Explanationsare given for each error No.

Safety Manual

StandardSpecifications

Robot ArmSetup &Maintenance

Controller Setup, BasicOperation andMaintenance

DetailedExplanation of Functions and

Operations

Explanationsof MOVEMAS-TERCOMMANDS

Troubleshoot-

ing

Page 21: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 21/457

1-2 Using the instruction manuals

1Before starting use

1.1.2 Symbols used in instruction manualThe symbols and expressions shown in Table 1-1 are used throughout this instruction manual. Learn themeaning of these symbols before reading this instruction manual.

Table 1-1:Symbols in instruction manual

Symbol Meaning

Precaution indicating cases where there is a risk of operator fatality orserious injury if handling is mistaken. Always observe these precautionsto safely use the robot.

Precaution indicating cases where the operator could be subject to fatali-ties or serious injuries if handling is mistaken. Always observe these pre-cautions to safely use the robot.

Precaution indicating cases where operator could be subject to injury orphysical damage could occur if handling is mistaken. Always observethese precautions to safely use the robot.

[JOINT]

If a word is enclosed in brackets or a box in the text, this refers to a key on

the teaching pendant.

[+/FORWD]+[+X]  (A) (B)

This indicates to press the (B) key while holding down the (A) key.In this example, the [+/Forward] key is pressed while holding down the[+X/+Y] key.

[STEP/MOVE]+([COND]-[RPL])  (A) (B) (C)

This indicates to hold down the (A) key, press and release the (B) key, andthen press the (C) key. In this example, the [Step/Move] key is held down,the [Condition] key is pressed and released, and the [Replace] key ispressed.

T/B This indicates the teaching pendant.

DANGER

  WARNING

CAUTION

Page 22: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 22/457

  1Before starting use

  Safety Precautions  1-3

1.2 Safety Precautions Always read the following precautions and the separate "Safety Manual" before starting use of the robot tolearn the required measures to be taken.

 All teaching work must be carried out by an operator who has received specialtraining. (This also applies to maintenance work with the power source turned ON.)

 

Enforcement of safety training

For teaching work, prepare a work plan related to the methods and procedures ofoperating the robot, and to the measures to be taken when an error occurs or whenrestarting. Carry out work following this plan. (This also applies to maintenancework with the power source turned ON.) Preparation of work plan

Prepare a device that allows operation to be stopped immediately during teaching

work. (This also applies to maintenance work with the power source turned ON.) 

Setting of emergency stop switch

During teaching work, place a sign indicating that teaching work is in progress onthe start switch, etc. (This also applies to maintenance work with the power sourceturned ON.) Indication of teaching work in progress

Provide a fence or enclosure during operation to prevent contact of the operatorand robot.

 

Installation of safety fence

Establish a set signaling method to the related operators for starting work, and fol-low this method. Signaling of operation start

 As a principle turn the power OFF during maintenance work. Place a sign indicat-ing that maintenance work is in progress on the start switch, etc. Indication of maintenance work in progress

Before starting work, inspect the robot, emergency stop switch and other relateddevices, etc., and confirm that there are no errors. Inspection before starting work

  CAUTION

  CAUTION

  WARNING

  CAUTION

  DANGER

  CAUTION

  CAUTION

  CAUTION

Page 23: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 23/457

1-4 Safety Precautions

1Before starting use

1.2.1 Precautions given in the separate Safety ManualThe points of the precautions given in the separate "Safety Manual" are given below.

 

Refer to the actual "Safety Manual" for details.

Use the robot within the environment given in the specifications. Failure to do socould lead to a drop or reliability or faults. (Temperature, humidity, atmosphere,noise environment, etc.)

Transport the robot with the designated transportation posture. Transporting therobot in a non-designated posture could lead to personal injuries or faults fromdropping.

 Always use the robot installed on a secure table. Use in an instable posture couldlead to positional deviation and vibration.

Wire the cable as far away from noise sources as possible. If placed near a noisesource, positional deviation or malfunction could occur.

Do not apply excessive force on the connector or excessively bend the cable.Failure to observe this could lead to contact defects or wire breakage.

Make sure that the workpiece weight, including the hand, does not exceed therated load or tolerable torque. Exceeding these values could lead to alarms orfaults.

Securely install the hand and tool, and securely grasp the workpiece. Failure toobserve this could lead to personal injuries or damage if the object comes off orflies off during operation.

Securely ground the robot and controller. Failure to observe this could lead tomalfunctioning by noise or to electric shock accidents.

Indicate the operation state during robot operation. Failure to indicate the statecould lead to operators approaching the robot or to incorrect operation.

When carrying out teaching work in the robot's movement range, always securethe priority right for the robot control. Failure to observe this could lead to personalinjuries or damage if the robot is started with external commands.

Keep the jog speed as low as possible, and always watch the robot. Failure to doso could lead to interference with the workpiece or peripheral devices.

 After editing the program, always confirm the operation with step operation beforestarting automatic operation. Failure to do so could lead to interference withperipheral devices because of programming mistakes, etc.

Make sure that if the safety fence entrance door is opened during automatic oper-ation, the door is locked or that the robot will automatically stop. Failure to do so

could lead to personal injuries.Never carry out modifications based on personal judgments, or use non-desig-nated maintenance parts.Failure to observe this could lead to faults or failures.

When the robot arm has to be moved by hand from an external area, do not placehands or fingers in the openings. Failure to observe this could lead to hands or fin-gers catching depending on the posture.

Do not stop the robot or apply emergency stop by turning the robot controller'smain power OFF.If the robot controller main power is turned OFF during automatic operation, therobot accuracy could be adversely affected.

Do not turn off the main power to the robot controller while rewriting the internalinformation of the robot controller such as the program or parameters. If the mainpower to the robot controller is turned off while in automatic operation or rewritingthe program or parameters , the internal information of the robot controller may bedamaged.

  CAUTION

  CAUTION

  CAUTION

  CAUTION

  CAUTION

  CAUTION

  WARNING

  WARNING

  CAUTION

  WARNING

  CAUTION

  CAUTION

  CAUTION

  CAUTION

  WARNING

  CAUTION

  CAUTION

Page 24: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 24/457

  2Explanation of functions

  Operation panel (O/P) functions  2-5

2 Explanation of functions

2.1 Operation panel (O/P) functions

(1) Explanation of buttons on the operation panelTable 2-1:Names of each part on operation panel (Controller)

Button name Function

1) Start button This executes the program and operates the robot. The program is run continuously. 

The LED (green) lights during operation. When only executing the program to which "ALWAYS" wasset as start conditions, the LED not lights.

2) Stop button This stops the robot immediately. The servo does not turn OFF. 

The LED (red) lights while stopped. (Turns on when the program is interrupted.) However, the program to which "ALWAYS" was set as start conditions does not stop.

3) Reset button This resets the error. The LED (red) lights while an error is occurring. This also resets the program'sinterrupted state and resets the program. (Only when program numbers are displayed.)

4) Emergency stop button This stops the robot in an emergency state. The servo turns OFF. Turn to the right to cancel.

5) T/B connection switch This is used to connect/disconnect the T/B without turning OFF the controller's control power. TheT/B should be removed within five seconds after pressing the switch. An error occurs if more thanfive seconds elapses after pressing the switch. Similarly, when the T/B should be remounted, itshould be connected and the switch returned to the original position within five seconds.

6) Display changeoverswitch

This changes the details displayed on the display panel in the order of "Program No." - "Line No." -"Override". When an error is occurring, "Program No."- "Line No." - "Override" appear only whenthe key is pressed. The error No. will appear when the key is released.

7) End button This stops the program being executed at the last l ine or END statement. (Cycle operation) The

LED (red) winks during cycle operation. (Cancels continuous operation.)When it is pressed again while flushing in software version J1 or later, the operation returns to con-tinuous operation.

8) SVO.ON button This turns ON the servo power. The LED (green) lights during servo ON.

9) SVO.OFF button This turns OFF the servo power. The LED (red) lights during servo OFF.

10) STATUS.NUMBER The error No., program No., override value (%), etc., are displayed. 

The program name is shown with simplified symbols if alphabetic characters are used.

11) MODE changeover

switch Note1)

This changes the robot's operation rights. Note2)

 AUTO(Op.) : Only operations from the controller are valid. Operations for which the operationrights must be at the external device or T/B are not possible.

TEACH : When the T/B is valid, only operations from the T/B are valid. Operations forwhich the operation rights must be at the external device or controller are notpossible.

 AUTO(Ext.): Only operations from the external device are valid. Operations for which the operationrights must be at the T/B or controller are not possible.

12) UP/DOWN button This scrolls up or down the details displayed on the display panel(Valid for program numbers, override, and error numbers)

SVO OFF STOP END

SVO ONMODE

TEACH

AUTO(Ext.)

AUTO(Op.)

START RESET

DOWN

UPSTATUS NUMBER

REMOVE T/B

EMG.STOPCHANG DISP

  11) 9) 2) 7) 5)

10) 8) 1) 6) 12) 3) 4)

Page 25: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 25/457

2-6Operation panel (O/P) functions

2Explanation of functions

Note1) The servo will turn OFF when the controller's [MODE] switch is changed. Note that axes not provided with brakes could drop with their own weight. 

Carry out the following operations to prevent the servo from turning OFFwhenthe [MODE] switch is changed.

The servo on status can be maintained by changing the mode with keepingpressinglightly the deadman switch of T/B. The operating method is shown below.

*When the mode is changed from TEACH to AUTO.1) While holding down the deadman switch on the T/B, set the [ENABLE/DISABLE]

switch to "DISABLE".2) While holding down the deadman switch on the T/B, set the controller [MODE]

switch to "AUTO".3) Release the T/B deadman switch.

 

*When the mode is changed from AUTO to TEACH.1) While the [ENABLE/DISABLE] switch on the T/B is "DISABLE", hold down the

deadman switch.2) While holding down the deadman switch on the T/B, set the controller [MODE]

switch to "TEACH".3) While holding down the deadman switch on the T/B, set the [ENABLE/DISABLE]

switch to "ENABLE", then do the operation of T/B that you wish.

Note2) If you want to retain the LED display when switching the mode changeoverswitch, change the following parameter.

(2) About the status number displayThe following is a description of the simplified symbols shown on the 7-segment LED display when display-ing a program name specified with alphabetic characters.

The character "P" is fixed at the beginning of the program name display, which means that the number ofcharacters that can be displayed are four or less. Make sure to use no more than four characters whenentering the program name.It is not possible to select a program name consisting of more than four characters from the operation panel. However, it is allowed to create a program name consisting of more than four characters in the case of aprogram to be executed as a sub-program by the CALLP instruction of the robot language.

Parameter name Meaning of the value Explanation

OPDISP 0:Display the override.(default)1:Keep display mode.

Specify the action of the LED display whenchanging the mode changeover switch.

 A B C D E F G H I

J K L M N O P Q R

S T U V W X Y Z

  CAUTION

Page 26: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 26/457

  2Explanation of functions

  Teaching pendant (T/B) functions  2-7

2.2 Teaching pendant (T/B) functionsThis chapter explains the functions of R28TB (optional).

(1) Display screens and functionsTable 2-2 shows the functions corresponding to the screens displayed on the T/B, and the pages on whichexpla-nations of the operation methods are given. 

The screen tree is shown in the Page 13, "(1) Screen tree".Table 2-2:Display screens and functions

Screen display Function Explanation page  Title screen Type and software version display Page 13, "3.1 Operation of the teaching pendant menu

screens"

  Menu screen Selection of following screens

Teach screen Selection and editing of program No. Page 24, "3.5.1 Creating a program"

Operation menu screen Servo ON/OFFStep operation

Page 42, "3.8 Turning the servo ON/OFF"

Control menu screen Program list display Page 45, "(1) Program list display"

Program protection Page 46, "(2) Program protection function"

Program copy Page 47, "(3) Copying programs"

Program name change Page 48, "(4) Changing the program name (Renam-ing)"

Program deletion Page 49, "(5) Deleting a program"

  Monitor menu screen Input signal status display Page 50, "(1) Input signal monitor"

Output signal status change and display Page 51, "(2) Output signal monitor"

Variable details display Page 52, "(3) Variable monitor"

Error history display Page 53, "(4) Error history"

Register display Use when CC-Link option is used.Separate manual "CC-Link Interface".

Maintenance screen Parameter setting value display andchange

Page 54, "(1) Setting the parameters"

Program initialization Page 55, "(2) Initializing the program"

Battery timer initialization Page 56, "(3) Initializing the battery consumption time"

Brake release Page 57, "(4) Releasing the brakes"

Origin setting Page 58, "(5) Setting the origin"

Operation time display Page 58, "(6) Displaying the clock data for mainte-nance"

Setting menu screen Date and time display and change Page 59, "(1) Setting the time"

CRn-5xx Ver.A1RP-1AH 

Copyright(C)1999 ANY KEY DOWN

<MENU>1.TEACH 2.RUN

3.FILE 4.MONI5.MAINT 6.SET

<TEACH>(1 ) 

SELECT

<RUN>1.SERVO2.CHECK

<FILE>1.DIR 2.COPY3.RENAME 4.DELETE

<MONI>1.INPUT2.OUTPUT3.VAR 4.ERROR5.REGISTER

<MAINT>1.PARAM 2.INIT3.BRAKE 4.ORIGIN5.POWER

<SET>

1.CLOCK

Page 27: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 27/457

2-8Teaching pendant (T/B) functions

2Explanation of functions

(2) Function of each key

Fig.2-1:T/B keys

Key Explanation

1) [EMG. STOP] switch This is a push-button switch with lock function for emergency stop. When this switch is pressed,the servo will turn OFF and the robot will stop immediately regardless of the T/B enable/disablestate. To cancel this state, turn the switch clockwise.

2) [ENABLE/DISABLE]switch

This changeover switch is used to enable or disable the T/B key operations. To carry out opera-tions using the T/B, always set this switch to "ENABLE" (valid). Operations with the T/B will beenabled, and operations from the controller and external sources will be disabled. The T/B willhave the operation rights. To operate with the controller or external source, set this switch to"DISABLE" (invalid). It is possible to change modes of operation related to the monitor and theoverride even in the disabled status. Set this switch to "DISABLE" position while editing in orderto save the current program.

3) Display LCD The program contents and robot state are displayed with the T/B key operations.

4) [TOOL] key This selects the TOOL jog mode

4) [JOINT] key This selects the JOINT jog mode. Press twice to select the additional axis jog mode.

4) [XYZ] key The XYZ jog mode is selected if the key is pressed while in the TOOL and/or JOINT jog condi-tion, the 3-axis XYZ jog mode is selected if pressed twice, and the cylinder jog mode is selectedif pressed three times.

5) [MENU] key This returns the display screen to the menu screen. If the key is pressed while editing, the cur-rent program is saved.

6) [STOP] key This stops the program and decelerates the robot to a stop. This is the same function as the[STOP] switch on the front of the controller, and can be used even when the T/B [ENABLE/DIS-

 ABLE] switch is set to DISABLE.

7) [STEP/MOVE] key Jog operations are possible when this key is pressed simultaneously with the 12) jog operationkey. Step jump is carried out when pressed simultaneously with the [INP/EXE] key.Press it when the servo is off to turn the servo on (while the deadman switch is pressed).

8) [+/FORWD] key Step feed is carried out when this key is pressed simultaneously with the [INP/EXE] key. On theedit screen, the next program line is displayed.Press it at the same time as the [STEP/MOVE] key during program operation to increase theoverride (speed). It is possible to perform this operation even when the T/B is disabled.

 

 A "+" is input when characters are entered.

R28TB

1)  

6)  

5)  

13) 

2)  

14)  

15) 

16) 

17) 

10)

3)  

4)  

12)  

11) 

18)  

7)  

8)  

9)  

DISABLE

 

EMG.STOP

 TOOL

 =

/

STEP

MOVE

 ORWD

 ACKWD

ADD

 PL

 EL

 AND

 INP

EXE

COND

ERROR

RESET

POS

HAR

JOINT

  ( )?

 

XYZ  

$" :

MENU

STOP

X

(J1)

X

(J1)

Y

(J2)

Y

(J2)

Z

(J3)

Z

(J3)

A

(J4)

A

(J4)

B

(J5)

B

(J5)

C

(J6)

C

(J6)

SVO ON

ENABLE

  # %

19)Back

19)

20)

Front Back Side

Page 28: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 28/457

  2Explanation of functions

  Teaching pendant (T/B) functions  2-9

9) [-/BACKWD] key On the edit screen, the previous line is displayed. When pressed simultaneously with the [INP/EXE] key, the axis will return along the robot's operation path. When pressed simultaneouslywith the [STEP/MOVE] key, the override (speed) will decrease.It is possible to perform this oper-ation even when the T/B is disabled.

 

 A "+" is input when characters are entered.

10) [COND] key Use this key to display the program instruction screen.

11) [ERROR RESET] key This key resets an error state that has occurred. When pressed simultaneously with the [INP/EXE] key, the program will be reset.

12) [Jog operation] key (12keys from [-X (J1) to +C(J6)]

In this manual, these keys are generically called the "jog operation" keys. When JOINT jog isselected, each axis will rotate, and when XYZ jog is selected, the robot will move along eachcoordinate system. These keys are also used to input numeric values such as when selecting amenu or inputting a step No.

13) [ADD ] key Moves the cursor upward. It also, you can add or correct position data by pressing it s imulta-neously with the [STEP] key on the position data edit screen. (T/B version B1 or later.)

14) [RPL] key Moves the cursor to the downward. I t also, you can display the next screen after the current posi-tion display by pressing it simultaneously with the [STEP] key on the position data edit screen.(T/B version B1 or later.)

15) [DEL] This deletes the position data. It also moves the cursor to the left.16) [HAND] key The following hand operations

 When pushed simultaneously with [+C (J6)] or [-C (J6)] key, operate the hand 1. 

When pushed simultaneously with [+B (J5)] or [-B (J5)] key, operate the hand 2. When pushed simultaneously with [+A (J4)] or [-A (J4)] key, operate the hand 3.

 

When pushed simultaneously with [+Z (J3)] or [-Z (J3)] key, operate the hand 4. 

This key also moves the cursor to the right.

17) [INP/EXE] key This inputs the program, and carries out step feed/return

18) [POS CHAR] key Use this key to display the posit ion edit screen and to enter characters and symbols.

19) Deadman switch When the [ENABLE/DISABLE] switch 2 is enabled, and this switch is released or pressed withforce, the servo will turn OFF. Press this switch lightly when carrying out functions with the servoON, such as jog operations. If emergency stop or servo OFF have been applied, and the servo isOFF, the servo will not turn ON even when this switch is pressed. In this case, carry out theservo ON operation again.

20) Contrast setting switch(Top: Shade, bottom: light)

This sets the display LCD brightness.

Key Explanation

Page 29: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 29/457

2-10Teaching pendant (T/B) functions

2Explanation of functions

2.2.1 Operation rightsOnly one device is allowed to operate the controller (i.e., send commands for operation and servo on, etc.)at the same time, even if several devices, such as T/Bs or PCs, are connected to the controller.This limiteddevice "has the operation rights".Operations that start the robot, such as program start and error reset, and operations that can cause startingrequire the operation rights. Conversely, operation that stop the robot, such as stopping and servo OFF, canbe used without the operation rights for safety purposes.

Table 2-3:Relation of setting switches and operation rights O:Has operation rights, X:Does not have operation rights

Note 1) When the "operation right input signal (IOENA)" is input from an external device, the external signalhas the operation rights, and the personal computer's operation rights are disabled.

Note 2) If the [MODE] switch is set to "AUTO" when the T/B is set to "ENABLE", the error 5000 will occur.

Table 2-4:Operations requiring operation rights   Operation item: O=Requires operation rights, X= Does not require operation rights

 

Setting switch

T/B [ENABLE/DISBLE] DISABLE ENABLE

Controller [MODE] AUTO(Op.) AUTO(Ext.) TEACH AUTO(Op.) AUTO(Ext.) TEACH

Operation 

rightsT / B X X X XNote 2) XNote 2) O

Controller operation panel O X X XNote 2) XNote 2) X

Personal computer X ONote 1) X XNote 2) XNote 2) X

External signal X ONote 1) X XNote 2) XNote 2) X

ClassOperation

rightsOperation

Operation O Servo ON

X Servo OFF

O Program stop/cycle stop

X Slot initialization (program reset)

O Error resetX Override change. Note this is always possible from the T/B.

O Override read

X Program No. change

O Program No./line No. read

X Program stop/cycle stop

Input/outputsignal

X Input/output signal read

X Output signal write

O Dedicated input start/reset/servo ON/brake ON/OFF/manual mode changeover/general-pur-pose output reset/program No. designation/line No. designation/override designation

X Dedicated input stop/servo OFF/continuous cycle/ operation rights input signal/ programNo.output request/line No. output request/override output request/error No. request, numericinput

X Hand input/output signal readO Hand output signal write

Program edit-ingNote1)

Note1) When one device is being used for editing on-line, editing from other devices is not possible.

X Line registration/read/call; Position addition/correction/read; Variable write/read

O Step feed/return, execution

X Step up/down

O Step jump, direct execution, jog

File operation X Program list read/protection setting/copy/delete/rename/ initialization

Maintenanceoperation

X Parameter read, clock setting/read, operation hour meter read, alarm history read

O Origin setting, parameter change

Page 30: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 30/457

  2Explanation of functions

  Functions Related to Movement and Control   2-11

2.3 Functions Related to Movement and ControlThis controller has the following characteristic functions.

Function Explanation Explanation page

Optimum speed control This function prevents over-speed errors as much as possible by limitingthe speed while the robot is tracking a path, if there are postures of the

robot that require the speed to be limited while moving between twopoints. However, the speed of the hand tip of the robot will not be con-stant if this function is enabled.

Page 213, "SPD (Speed)"

Optimum acceleration/deceleration control

This function automatically determines the optimum acceleration/deceler-ation time when the robot starts to move or stops, according to the weightand center of gravity settings of the hand, and the presence of a work-piece. The cycle time improves normally, although the cycle timedecreases by the condition..

Page 193, "OADL (Optimal Acceler-ation)",Page 179, "LOADSET (Load Set)"

XYZ compliance With this function, it is possible to control the robot in a pliable mannerbased on feedback data from the servo. This function is particularly effec-tive for fitting or placing workpieces. Teaching along the robot's orthogo-nal coordinate system is possible. However, depending on the workpiececonditions, there are cases where this function may not be used.

Page 134, "CMP TOOL (Composi-tion Tool)"

Impact Detection The robot stops immediately if the robot's tool or arm interferes with aperipheral device, minimizing damage.This function can be activated during automatic operation as well as dur-ing jog operation. (Limited to the RV-S/ RH-S series.)Note) Please note that this function cannot be used together with the

multi-mechanism control function.

Page 141, "COLCHK (Col Check)"Refer to "COL" parameter in Page306, "5 Functions set with parame-ters".

Maintenance Forecast The maintenance forecast function forecasts the robot's battery, belt andgrease maintenance information based on the robot's operating status.This function makes it possible to check maintenance information usingthe optional Personal Computer Support software. (Limited to the RV-S/RH-S series.)Note) Please note that this function cannot be used together with the

multi-mechanism control function.

Use optional Personal ComputerSupport software. This function canbe used in Version E1 or later.

Position RestorationSupport

The position restoration support function calculates the correction valuesof OP data, tools and the robot base by only correcting a maximum ofseveral 10 points if a deviation in the joint axis, motor replacement, hand

deformation or a deviation in the robot base occurs, and corrects positiondeviation. This function is implemented by optional Personal ComputerSupport software. This function can be used with the vertical multi-jointrobot and the RH-S series.

Use optional Personal ComputerSupport software.Vertical multi-joint robot:

This function can be used in VersionE1 or later.RH-S series:This function can be used in VersionF2 or later.

Continuous path con-trol

This function is used to operate the robot between multiple positions con-tinuously without acceleration or deceleration. This function is effective toimprovement of the cycle time.

Page 65, "(4) Continuous move-ment",Page 138, "CNT (Continuous)"

Multitask programoperation

With this function, it is possible to execute programs concurrently bygrouping between programs for the robot movement, programs for com-munication with external devices, etc. It is effective to shorten input/out-put processing. In addition, it is possible to construct a PLC-less systemby creating a program for controlling peripheral jigs.

Refer to X*** instructions such asPage 86, "4.2.1 What is multitask-ing?", Page 226, "XRUN (X Run)".

Program constant exe-

cution function

With this function, it is possible to execute a program all the time after the

controller's power is turned on. This function is effective when using themultitask functions to make the robot program serve as a PLC.

Refer to "SLTn" parameter start

attribute (ALWAYS) in Page 306, "5Functions set with parameters".

Continuity function With this function, it is possible to store the status at power off andresume from the same status when the power is turned on again.

Refer to "CTN" parameter in Page306, "5 Functions set with parame-ters".

 Additional axis control With this function, it is possible to control up to two axes as additionalaxes of the robot. Since the positions of these additional axes are storedin the robot's teaching data as well, it is possible to perform completelysynchronous control. In addition, arc interpolation while moving additionalaxes (travelling axes) is also possible. The additional axis interface cardoptional is required of CR1/CR2 series controller.

Separate manual "ADDITIONAL AXIS INTERFACE".

Multi-mechanism con-trol

With this function, it is possible to control up to two (excluding the stan-dard robots) robots (user mechanism) driven by servo motors, besidesthe standard robots.

Separate manual "ADDITIONAL AXIS INTERFACE".

Page 31: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 31/457

2-12Functions Related to Movement and Control 

2Explanation of functions

External device com-munication function

The following methods are available for communicating with the externaldevices

 

For controlling the controller and for interlock within a program  1) Via input/output signals

(32 points each for standard input/output in the CR2, CR3, CR4, CR7,

CR8 and CR9)  2) Via CC-Link (optional)

 As a data link with an external device  3) Communication via RS-232C  (1 standard port, and up to four optional ports)  4) Communication via EthernetThe data link refers to a given function in order to exchange data, forinstance amount of compensation, with external devices (e.g., v ision sen-sors).

Refer to Page 248, "M_IN/M_INB/M_INW",Page 254, "M_OUT/M_OUTB/M_OUTW".

Page 337, "5.15 About the commu-nication setting"Separate manual "Ethernet Inter-face".

Interrupt monitoringfunction

With this function, it is possible to monitor signals, etc. during programoperation, and pause the current processing in order to execute an inter-rupt routine if certain conditions are met. It is effective for monitoring thatworkpieces are not dropped during transport.

Page 146, " DEF ACT (Define act)",Page 121, " ACT (Act)"

Inter-program jumpfunction

With this function, it is possible to call a program from within another pro-gram using the CALLP instruction.

Page 125, " CALLP (Call P)"

Pallet calculation func-tion

This function calculates the positions of workpieces arranged in the gridand glass circuit boards in the cassette. It helps to reduce the requiredteaching amount. The positions can be given in row-by-column format,single row format, or arc format.

Page 71, "4.1.2 Pallet operation",Page 157, "DEF PLT (Define pal-let)",Page 200, "PLT (Pallet)"

User-defined area func-tion

With this function, it is possible to specify an arbitrary space consisting ofup to eight areas, monitor whether the robot's hand tip is within theseareas in real time, output the status to an external device, and check thestatus with a program, or use it to generate an error. Moreover, two func-tions (ZONE and ZONE2) that have a similar function are available foruse in a robot program.

Page 328, "5.8 About user-definedarea",Page 262, "M_UAR".

Page 304, "ZONE",Page 305, "ZONE 2"

JOINT movement

rangeXYZ operation rangeFree plane limit

It is possible to restrict the robot movement range in the following three

waysJOINT movement range:

 

It is possible to restrict the movement range of each axis.XYZ operation range:

 

It is possible to restrict the movement range using the robot's XYZ coordi-nate system.Free plane limit: It is possible to define an arbitrary plane and restrict the movement rangeof the robot to be only in front of or only behind the plane.

Refer to "MEJAR" and "MEPAR"

parameter in Page 306, "5 Functionsset with parameters"

Refer to Page 329, "5.9 Free planelimit"

Function Explanation Explanation page

Page 32: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 32/457

  3Explanation of operation methods

  Operation of the teaching pendant menu screens  3-13

3 Explanation of operation methods

This chapter describes how to operate R28TB (optional)

3.1 Operation of the teaching pendant menu screens

(1) Screen tree

Command editing screenTeach screen Position editing screen

<MENU>

1.TEACH 2.RUN

3.FILE 4.MONI

5.MAINT 6.SET

Menu screen Tittle screen

CRx-5xx Ver A1

  RV-1A

Copyright(C)1999  ANY KEY DOWN

[COND]

+ [RPL]

[POS]

[INP]

[1][2]

[1]

Press one ofthe keys

<TEACH>

(1 )

 SELECT PROGRAM

PR:1 ST:255

  LN:10

10 MOV P1

 CODE EDIT

MO.POS(P1 )

  X: +200.00

  Y: +200.00

  Z: +500.00

<RUN>

1.SERVO

Run menu screen

<SERVO>

SERVO OFF( )

 0:OFF 1:ON

Servo screen

<FILE>

1.DIR 2.COPY

3.RENAME 4.DELETE

File menu screen

<DIR> 10

1 99-12-20

2 01-01-10

3 01-01-20

Directory screen(protect)

<COPY>

FROM( )

TO( )

 INPUT SOURCE

Copy screen

<RENAME>

FROM( )

TO( )

 INPUT DEST.

Rename screen

<DELETE>

DELETE( )

INPUT DEL.FILE

Delete screen

<MONI>

1.INPUT 2.OUTPUT

3.VAR 4.ERROR

5.REGISTER

Monitor menu screen

<INPUT>

NUMBER (0 )

BIT :76543210

DATA:00000000

Input monitor screen

<OUTPUT>

NUMBER (0 )

BIT :76543210

DATA:00000000

Output monitor screen

<VAR>

( )

 SELECT PROGRAM

Variable monitor screen

<ERROR> -1

00-12-20 15:30

Error history screen

<MAINT>

1.PARAM 2.INIT

3. BRAKE 4.ORIGIN5.POWER

Maintenance menu screen

<PARAM>

( )( )

( )

 SET PARAM.NAME

Parameter screen

<INIT>

INIT ( )

1.PROGRAM 2.BATT.

 Initialize screen

<BRAKE>12345678

BRAKE (00000000)

 0:LOCK 1:FREE

Brake screen

<ORIGIN>

1. DATA 2.MECH

2. TOOL 4.ABS

5.USER

Origin setting screen

<HOUR DATA> Hr

POWER ON: 5000

BATTERY: 400

Operating time screen

<MAINT>1.CLOCK

Setting menu screen

<CLOCK>DATE(00-12-20)

TIME(15:30:00)

 INPUT DATA

Parameter screen

[1][3]

[3]

[1][4]

[2]

[4]

[2]

[3] [4]

[1][5] [2]

[3] [5][4]

[1][6]

2.CHECK

Step operation screen

<CHECK> ST:3LN:10

10 MOVE P100[2]

[5]5000 ***********

<REG.>

Register screen

1.INPUT  2.OUTPUT

Page 33: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 33/457

3-14 Operation of the teaching pendant menu screens

3Explanation of operation methods

(2) Selecting a menu A menu can be selected with either of the following two methods.

*Press the number key for the item to be selected.*Move the cursor to the item to be selected, and press the [INP] key.

How to select the TEACH screen ("1. TEACH") from the menu screen with each method is shown below.

1) Set the controller [MODE] switch to "TEACH".

2) Set the T/B to "ENABLE".

3) Press one of the keys (example, [MENU] key)while the <TITLE> screen is displayed.

 

The <MENU> screen will appear.

*Press the number key method

1) Press the [1] key. The <TEACH> screen willappear.

*Use the arrow key method

1) Press the arrow keys and move the cursor to"1. TEACH", and then press the [INP] key.The <TEACH> screen will appear. The same operations can be carried out onthe other menu screens.

The same operations can be used on the other menu screens.

TEACH

AUTO

(Ext.)

AUTO

(Op.)

MODEDISABLE ENABLE

O/P T/B

Display the MENU screen from the TEACH screen.

CRn-5xx Ver.A1RP-1AH 

COPYRIGHT(C)1999 

 ANY KEY DOWN

<MENU> 

1.TEACH 2.RUN 

3.FILE 4.MONI 

5.MAINT 6.SET

MENU

#%!

<MENU> 

1.TEACH 2.RUN 

3.FILE 4.MONI 5.MAINT 6.SET

<TEACH> 

(1 ) 

SELECT PROGRAM

-B(J5)

1 DEF

Move the cursor - set-

 ADD RPL DEL HAND INP

EXE

<MENU> 

1.TEACH 2.RUN 

3.FILE 4.MONI 5.MAINT 6.SET

<TEACH> 

(1 ) 

SELECT PROGRAM

Using the T/BUnless the controller [MODE] switch is set to "TEACH", operations other than specific operations (currentposition display on JOG screen, changing of override, monitoring of input/output, error history) cannot becarried out from the T/B.

Inputting numbers and spacesTo input a number, press the key having a number on the lower left.To input a space, press the key having "SPACE" on the lower left.

Inputting numbers and spacesTo input a number, press the key having a number on the lower left.To input a space, press the key having "SPACE" on the lower left.

Correcting incorrect numbersPress the [DEL] key while holding down the [CHAR] key to delete the character, and then input it again.

If the cursor is returned by pressing the [<-] key, and a character is input, it will be inserted.

Page 34: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 34/457

  3Explanation of operation methods

  Jog Feed (Overview)  3-15

3.2 Jog Feed (Overview)Jog feed refers to a mode of operation in which the position of the robot is adjusted manually. Here, an over-view of this operation is given, using the vertical multi-joint type robot "RV-1A" as an example. The axes areconfigured differently depending on the type of robot. For each individual type of robot, please refer to sepa-rate manual: "ROBOT ARM SETUP & MAINTENANCE," which provides more detailed explanations.

3.2.1 Types of jog feedThe following five types of jog feed are availableTable 3-1:Types of jog feed

Type Operation Explanation

JOINT jog 1) Set the key switch to the [ENABLE] posi-tion.

2) Hold the deadman lightly.3) Press the [STEP/MOVE] key. (The servo is

turned on.)4) Press the [JOINT] key to change to the

JOINT jog mode.5) Press the key corresponding to each of the

axes from J1 to J6.6) Press the [JOINT] key twice to shift to the

additional axis mode.

In this mode, each of the axes can be adjusted independently.It is possible to adjust the coordinates of the axes J1 to J6 aswell as the additional axes J7 and J8 independently. Note thatthe exact number of axes may be different depending on thetype of robot, however.

The additional axis keys [J1] and [J2] correspond to axes J7and J8, respectively.

TOOL jog Perform steps 1) to 3) above.4) Press the [TOOL] key to change to the

TOOL jog mode.5) Press the key corresponding to each of the

axes from X,Y,Z,A,B,C.

The position can be adjusted forward/backward, left/right, orupward/downward relative to the direction of the hand tip of therobot (the TOOL coordinate system).The tip moves l inearly. The posture can be rotated around theX, Y, and Z axes of the TOOL coordinate system of the hand tipby pressing the A, B, and C keys, without changing the actualposition of the hand tip. It is necessary to specify the tool lengthin advance using the MEXTL parameter.The TOOL coordinate system, in which the hand tip position isdefined, depends on the type of robot. In the case of a verticalmulti-joint type robot, the direction from the mechanical inter-

face plane to the hand tip is +Z.In the case of a horizontal multi-joint type robot, the upwarddirection from the mechanical interface plane is +Z.

XYZ jog Perform steps 1) to 3) above.4) Press the [XYZ] key to change to the XYZ

 jog mode.

The axes are adjusted linearly with respect to the robot coordi-nate system.The posture rotates around the X, Y, and Z axes of the robotcoordinate system by pressing the A, B, and C keys, withoutchanging the actual position of the hand tip. It is necessary tospecify the tool length in advance using the MEXTL parameter.

3-axis XYZ jog Perform steps 1) to 3) above.4) Press the [XYZ] key twice to switch to

the 3-axis XYZ jog mode.

The axes are adjusted linearly with respect to the robot coordi-nate system.Unlike in the case of XYZ jog, the posture will be the same as

in the case of the J4, J5, and J6 axes JOINT jog feed. Whilethe position of the hand tip remains fixed, the posture is inter-polated by X, Y, Z, J4, J5, and J6; i.e., a constant posture is notmaintained. It is necessary to specify the tool length in advanceusing the MEXTL parameter.

CYLNDER jog Perform steps 1) to 3) above.4) Press the [XYZ] key twice to switch to

the CYLNDER jog mode.

Use the cylindrical jog when moving the hand in the cylindricaldirection with respect to the robot's origin. Adjusting the X-axiscoordinate moves the hand in the radial direction from the cen-ter of the robot. Adjusting the Y-axis coordinate moves thehand in the same way as in JOINT jog feed around the J1 axis.

 Adjusting the Z-axis coordinate moves the hand in the Z direc-tion in the same way as in XYZ jog feed.

 Adjusting the coordinates of the A, B, and C axes rotates the

hand in the same way as in XYZ jog feed. They may be valid inhorizontal 4-axis (or 5-axis) RH type robots.

+J1

ーJ1

+J2 -J2

+J4

-J3

-J4

+J5

-J5

+J3

+J6

-J6

+Z 

+Y +X 

+A

+C

+B

ーC

-B-A

+Z

+Y+X +A

-A

+B

-B

+C -C

+Z

+Y+X

+J4

+J5

-J5

+J6

-J6

+Z

+Y+X +A

-A +B

-B

+C -C

-Y

Page 35: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 35/457

3-16 Jog Feed (Overview)

3Explanation of operation methods

If the robot's control point comes near a singular point during the operation of TOOL jog, XYZ jog or CYLIN-DER jog mode among the types of jog feed listed in Table 3-1, a warning mark is displayed on the T/Bscreen together with the sound of buzzer to warn the operator. It is possible to set this function valid orinvalid by parameter MESNGLSW. (Refer to Page 306, "5 Functions set with parameters".) Please refer toPage 344, "5.17 About the singular point adjacent alarm" for details of this function.

3.2.2 Speed of jog feedPress the [STEP/MOVE] key to display the current position and speed (%) on the screen. To change thesevalues, hold the [STEP/MOVE] key down and press either the [+] key or the [-] key. The following types of jog feed speed are available.

  [-] key -------------------------------------------------------------------------------- [+] key

LOW and HIGH are fixed-dimension feed. In fixed-dimension feed, the robot moves a fixed amount everytime the key is pressed. The amount of movement depends on the individual robot.

Table 3-2:Fixed-dimension of RV-1A

3.2.3 JOINT jog Adjusts the coordinates of each axis independently in angle units.

LOW HIGH 3% 5% 10% 30% 50% 70% 100%

JOINT jog TOOL, XYZ jog

LOW 0.01 deg. 0.01 mm

HIGH 0.10 deg. 0.10 mm

+J1

ーJ1

+J2 -J2

+J4

-J3

-J4

+J5

-J5

+J3

+J6

-J6

Page 36: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 36/457

  3Explanation of operation methods

  Jog Feed (Overview)  3-17

3.2.4 TOOL jog Adjusts the coordinates of each axes along the direction of the hand tip.The X, Y, and Z axis coordinates are adjusted in mm units. The A, B, and C axis coordinates are adjusted inangle units.

3.2.5 XYZ jog Adjusts the axis coordinates along the direction of the robot coordinate system.

The X, Y, and Z axis coordinates are adjusted in mm units. The A, B, and C axis coordinates are adjusted inangle units.

 

+Z 

+Y +X 

+A

+C

+B

-C

-B-A

+Z

+Y+X +A

-A

+B

-B

+C -C

Page 37: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 37/457

3-18 Jog Feed (Overview)

3Explanation of operation methods

3.2.6 3-axis XYZ jog Adjusts the X, Y, and Z axis coordinates along the direction of the robot coordinate system in the same wayas in XYZ jog feed. The J4, J5 and J6 axes perform the same operation as in JOINT jog feed, but the pos-ture changes in order to maintain the position of the control point (X, Y and Z values).The X, Y, and Z axis coordinates are adjusted in mm units. The J4, J5, and J6 axis coordinates are adjustedin angle units.

3.2.7 CYLNDER jog

 Adjusting the X-axis coordinate moves the hand in the radial direction away from the robot's origin. Adjust-ing the Y-axis coordinate rotates the arm around the J1 axis. Adjusting the Z-axis coordinate moves thehand in the Z direction of the robot coordinate system. Adjusting coordinates of the A, B, and C axes movesthe hand in the same way as in XYZ jog feed.The X and Z axis coordinates are adjusted in mm units. The Y, A, B, and C axis coordinates are adjusted inangle units.

 

+Z

+Y+X

+J4

+J5

-J5

+J6

-J6

+Z

+Y+X +A

-A+B

-B

+C -C

-Y

Page 38: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 38/457

  3Explanation of operation methods

  Jog Feed (Overview)  3-19

3.2.8 Switching Tool DataWith the combination of the controller's software version J1 or later and the teaching pendant's version A2or later, tool data can be switched easily via the teaching pendant.

Set the tool data you want to use in the MEXTL1 to 4parameters, and select the number of the tool youwant to use according to the following operation.

1) Set the controller's [MODE] switch to"TEACH."

2) Set the teaching pendant to "ENABLE."

3) While holding down the tool key, switch tool

data by pressing from the [1] key to the [4] key.

4) A tool number appears on the jog screen. A tool number is displayed after T in the upperright of the T/B screen.

To move the robot to the position where teaching was performed while switchingtool data (MEXTL1 to 4 parameters) during the automatic operation of the program,substitute the M_TOOL variable by a tool number when needed, and operate therobot by switching tool data. Exercise caution as the robot moves to an unexpecteddirection if the tool data during teaching does not match the tool number duringoperation.

To move the robot while switching tool data during the step operation of the

program, exercise caution as the robot moves to an unexpected direction if the tooldata at the time of teaching does not match the tool number during step operation.

R28TB DISABLE 

EMG.STOP 

TOOL =*/ 

STEP

MOVE + 

ORWD 

- BACKWD 

ADD

↑ 

RPL

↓ 

DEL

← 

HAND

→ 

INP

XE 

COND 

ERROR

RESET 

POS

HAR 

JOINT ( ) ? 

XYZ " : 

MENU STOP 

- (J1) 

+ X(J1 ) 

- (J2) 

+ Y(J2 ) 

- (J3) 

+ Z( J3 ) 

- (J4) 

+ A(J4 ) 

- (J5) 

+ B(J5 ) 

- (J6) 

+ C(J6 ) 

SVO ON 

ENABLE 

# %

switch to tool 1. 

While pressing

the tool key,

switch to tool 2. 

switch to tool 3. 

switch to tool 4. 

TEACH

AUTO

(Ext.)

AUTO

(Op.)

MODEDISABLE ENABLE

O/P T/B

<TOOL SETTING>

TOOL NUMBER:0

PUSH 1 TO 4

<TOOL SETTING>

TOOL NUMBER:0

PUSH 1 TO 4

TOOL-B

(J5)1 DEF

+

Selecting Tool Data 1

JOINT T2 100%J1 +34.50J2 +20.00J3 +80.00

  CAUTIO

  CAUTIO

Page 39: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 39/457

3-20 Jog Feed (Overview)

3Explanation of operation methods

Verifying the Tool Number The current tool number can be checked on the <TOOL SETTING> screen or with the M_TOOL variable.

Related Information

MEXTL, MEXTL1, MEXTL2, MEXTL3 and MEXTL4 parametersTOOL instruction, M_TOOL variableThe MEXTL parameter holds tool data at that point. When using the MEXTL1 to 4 parameters, be carefulas the MEXTL parameter is overwritten once a tool number is selected.Execute the TOOL instruction to return the tool number to 0.

Page 40: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 40/457

  3Explanation of operation methods

  Jog Feed (Overview)  3-21

3.2.9 Impact Detection during Jog OperationThe RV-S/RH-S series is installed with the impact detection function. Impact detection can be enabled evenduring jog operation. (The initial value is set as disabled.) If the controller detects interference with a periph-eral device during jog operation, an error numbered in 1010's will be issued (the first digit is the axis num-ber).Other models do not function even if the parameter is enabled.

(1) Impact Detection Level Adjustment during Jog Operation

The sensitivity of impact detection during jog operation is set to a lower value. If higher impact sensitivity isrequired, adjust the COLLVLJG parameter before use. Also, be sure to set the HNDDAT0 and WRKDAT0parameters correctly before use. If a jog operation is carried out without setting these parameters correctly,erroneous detection may occur depending on the posture of the robot.

Parameter NameNo. of

elementsDescription Initial value

Impact Detection* This function canbe used in thecontroller's soft-ware version J2 orlater.

COL Integer 3 Define whether the impact detection function can/cannot be used, andwhether it is enabled/disabled immediately after power ON.Element 1: The impact detection function can (1)/cannot (0) be used.Element 2: It is enabled (1)/disabled (0) as the initial state during opera-tion.Element 3: Enable (1)/disable (0)/NOERR mode (2) during jog opera-tion

The NOERR mode does not issue an error even if impact is detected. Itonly turns off the servo. Use the NOERR mode if it is difficult to operatebecause of frequently occurring errors when an impact is detected.

RV-S series0,0,1

RH-S series1,0,1

Other models0,0,0

Detection levelduring jog opera-tion

COL-LVLJG

Integer 8 Set the detection sensitivity during jog operation for each joint axis. Unit(%)To increase detection sensitivity, reduce the numeric value.If an impact error occurs even when no impact occurs during jog opera-tion, increase a numeric value.

Setting range: 1 to 500 (%)

The standardis200,200,200,200,200,200,200,200, but itvaries withmodels.

Hand condition HNDD AT0

Real value7

Set the initial condition of the hand. (Specify with the tool coordinatesystem.)Immediately after power ON, this set value is used during jog operation.To use the impact detection function during jog operation, set the actualhand condition before using. If it is not set, erroneous detection may

occur.(Weight, size X, size Y, size Z, center of gravity X, center of gravity Y,center of gravity Z)Unit: Kg, mm

It is releasedonly with theRV-S/RH-Sseries.The value may

vary with mod-els. The maxi-mum load isset as the load.

Workpiece condi-tion

WRKD AT0

Real value7

Set the initial condition of the workpiece. (Specify with the tool coordi-nate system.)Immediately after power ON, this setting value is used during jog oper-ation.(Weight, size X, size Y, size Z, center of gravity X, center of gravity Y,center of gravity Z)Unit: Kg, mm

It is releasedonly with theRV-S/RH-Sseries.0.0,0.0,0.0,0.0,0.0,0.0,0.0

Precaution for the Impact Detection FunctionEnabling the impact detection function does not completely prevent the robot, hand, workpiece and othersfrom being damaged, which may be caused by interference with peripheral devices. In principle, operatethe robot by paying attention not to interfere with peripheral devices.

Operation after ImpactIf the servo is turned ON while the hand and/or arm is interfering with peripheral devices, the impact

detection state occurs again, preventing the servo from being turned ON. If an error persists even afterrepeatedly turning ON the servo, release the arm by a brake release operation once and then turn ON theservo again. Or, release the arm by turning ON the servo according to the Page 44, "Operation toTemporarily Reset an Error that Cannot Be Canceled".

Page 41: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 41/457

3-22 Opening/Closing the Hands

3Explanation of operation methods

3.3 Opening/Closing the HandsThe open/close operation of the hands attached to on the robot is explained below.

1) Set the key switch to the [ENABLE] posi-tion.

2) Hold the [HAND] key down and presseach axis key. For example, hold downthe [HAND] key and press the [+C] keyto open hand 1.

It is possible to mount various tools on the robot's hand area. In the case of pneumatic control, where thesolenoid valve (at double solenoid) is used, two bits of the hand signal is controlled by the open/close oper-ation of the hand. For more information about the hand signal, please refer to Page 333, "5.12 About the

hand type" and Page 334, "5.13 About default hand status".

 R28TB

DISABLE

EMG.STOP

 TOOL

 =

/

STEP

MOVE

 ORWD

 ACKWD

ADD

 PL

 EL

 AND

 INP

EXE

COND

ERROR

RESET

POS

CHAR

JOINT

  (

)?

 

XYZ  

$" :

MENU

STOP

X

(J1)

X

(J1)

Y

(J2)

Y

(J2)

Z

(J3)

Z

(J3)

A

(J4)

A

(J4)

B

(J5)

B

(J5)

C

(J6)

C

(J6)

SVO ON

ENABLE

  # %

Hold down the [HAND]key and press the axis key.

Opening/closing hand 4

Opening/closing hand 3

Opening/closing hand 2

Opening/closing hand 1

OpeningClosing

Page 42: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 42/457

  3Explanation of operation methods

   Aligning the Hand   3-23

3.4 Aligning the HandThe posture of the hand attached to the robot can be aligned in units of 90 degrees.This feature moves the robot to the position where the A, B and C components of the current position are setat the closest values in units of 90 degrees.

If the tool coordinates are specified by the TOOL instruction or parameters, the hand is aligned at the speci-fied tool coordinates. If the tool coordinates are not specified, the hand is aligned at the center of themechanical interface. The above illustration shows an example of a small vertical robot. [With Tool Coordi-nate Specification] indicates when the tool coordinates are specified at the tip of the hand. For more infor-mation about the tool coordinates, refer to Page 324, "5.6 Standard Tool Coordinates".

However, in the case of the RH-15UHC robot, the hand alignsradially from the center position of the robot, as shown in the right

figure.

The hand alignment procedure is as follows:

1) Set the key switch to the [ENABLE]position.

2) Hold the deadman switch lightly. 

3) Press the [STEP/MOVE] key and turnon the servo.

4) Hold down the [HAND] key and pressthe "-X" or "+X" key.

The robot stops when any of the above keys is released while aligning the hand.

Without tool coordinatespecification.

With tool coordinatespecification.

Without tool coordinatespecification.

With tool coordinatespecification.

Controlpoint

Controlpoint

R28TB DISABLE 

EMG.STOP 

TOOL

 =* / 

STEP

MOVE 

 ORWD 

- BACKWD

 

ADD

 

RPL

↓ 

DEL

 

HAND

→ 

INP

XE

 

COND

 

ERROR

RESET

 

POS

HAR

 

JOINT ( ) ? 

XYZ " : 

MENU

 STOP

 

 (J1) 

 X

(J1) 

 (J2) 

 Y(J2) 

 (J3)

 +

 Z

(J3)

 

 A

(J4)

 +

 A

(J4)

 

 B

(J5)

 +

 B

(J5)

 

 C

(J6)

 +

 C

(J6)

 

SVO ON

 

ENABLE 

# %

 Aligning the Hand 

Hold down the [HAND]key and press the “-X”or ”+X” key. 

Page 43: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 43/457

3-24 Programming 

3Explanation of operation methods

3.5 ProgrammingMELFA-BASIC IV used with this controller allows advanced work to be described with ample operation func-tions. The programming methods using the T/B are explained in this section. The functions shown in Table3-3 are used to input one line. (Refer to Page 118, "4.11 Detailed explanation of command words" in thismanual for details on the MELFA-BASIC IV commands and description methods.)

Table 3-3:Process for inputting one line

3.5.1 Creating a program(1) Opening the program edit screen

Open the screen for editing the program to be created.

1) Press the [1] key. The PROGRAM SELECTION screen willappear.

2) Press the [1] key. The program name 1 edit screen will appear,

and the head line will appear.

Input details Function

Line No. and command statement (Example: 10 MOV P1) Input as one line of the program

Only line No. (Example; 10) Deletes designated line from program

Only command statement (Example: MOV P1) Immediately executes that command (Direct execution)

Select the menu 1

Set the program number-

Delete an input character

DELPOS

CHAR+

-B(J5)

1 DEF

-B(J5)

1 DEF

INP

EXE

<MENU> 

1.TEACH 2.RUN 

3.FILE 4.MONI 5.MAINT 6.SET

<TEACH> 

( ) 

SELECT PROGRAM

<TEACH> 

(1 ) 

SELECT PROGRAM

PR:1 ST:1 

LN:0 

--NO DATA--

Editing a program in constant execution mode (ALWAYS attribute)In order to edit a program set to be in constant execution mode (the ALWAYS attribute in the SLTn param-

eter is set), the constant execution attribute must be canceled first. Since programs in constant executionmode are executed continually, they cannot be edited. Change ALWAYS to START in the SLTn parameter,turn the controller's power on again, and stop the constant execution.

Selection from the program listWhen the [INP] key is pressed in a blank field on the program selection screen, the program list appears,making it possible for you to edit a program by selecting it with the cursor and then pressing the [INP] key.

Page 44: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 44/457

  3Explanation of operation methods

  Programming   3-25

(2) Creating a program

1) Press the [RPL] key three times. The cursor will move to the command edit-ing line.

2) Press the [1], [0] and [SPACE] keys. Theline No. "10" will be input.

3) Press the [-Y/MNO] key once while hold-ing down the [CHAR] key. "M" will appear.

4) Release the [CHAR] key once, and thenhold it down. The four commandsassigned to "M" will appear.

5) Press the [1] key while holding down the[CHAR] key.

 

The "MOV" command will be input.

Move the cursor

Input "1","0"-

Input "M"+

Input "M"

Input "MOV"+

RPL

-C(J6)

0  ABC

-B(J5)

1 DEF

-X(J1)

SPACEPQ-

-Y(J2)

4 MNO

POSCHAR

POSCHAR

POSCHAR

-B(J5)

1 DEF

PR:1 ST:1 

LN:0 

--NO DATA-- 

PR:1 ST:1 

LN:0 

CODE EDIT

PR:1 ST:1 

LN:0 

CODE EDIT

PR:1 ST:1 

LN:0 

10CODE EDIT

PR:1 ST:1 LN:0 

10CODE EDIT

PR:1 ST:1 LN:0 

10 M 

CODE EDIT

PR:1 ST:1 

LN:0 

10 M 

CODE EDIT

1.MOV 2.MVS 

3.MVC 4.MVR 

10 M 

CODE EDIT

1.MOV 2.MVS 

3.MVC 4.MVR 

10 M 

CODE EDIT

PR:1 ST:1 

LN:0 

10 MOVCODE EDIT

Inputting charactersThe characters that can be input are indicated, three in a group, on the lower right of each key. To input a character, hold down the [CHAR] key and press the key having the character to be input. Eachtime the corresponding character key is pressed while the [CHAR] key is pressed, the three characters willappear alternately. Release the [CHAR] key when the target character appears, and set the character.

Inputting commandsThe commands can be input one character at a time (ex., for "M" "O" "V" for the MOV command), but ifthe head character of the command is input, the command can be selected as a number from the list ofcommands that appears.

 

 After inputting the head character of the command, press the [CHAR] key. The list of commands willappear. While holding down the [CHAR] key, press the numeral key for the target command No., andselect the command. If the target command is not found in the list, press the [CHAR] key again to updatethe list.

Page 45: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 45/457

3-26 Programming 

3Explanation of operation methods

6) Press the [-X/PQR] key once while holdingdown the [CHAR] key, and then releasethe [CHAR] key. "P" will be input.

7) Press the [1] key. "1" will be input.

8) Press the [INP] key. "10 MOV P1" will be set.

9) Input the remaining program in the samemanner.

This completes the inputting of the program.

(3) Completion of program creation and saving programsPress the [MENU] key, or Set the [ENABLE/DISABLE] switch of the T/B to the "DISABLE" position.

The program is saved when either of these operations is performed.

Input "P"

Input "1"

Set

+-X

(J1)SPACEPQ

POSCHAR

INP

EXE

-B(J5)

1 DEF

PR:1 ST:1 

LN:0 

10 MOVCODE EDIT

PR:1 ST:1 

LN:0 

10 MOV P 

CODE EDIT

PR:1 ST:1 

LN:0 

10 MOV P 

CODE EDIT

PR:1 ST:1 

LN:0 

10 MOV P1 

CODE EDIT

PR:1 ST:1 LN:0 

10 MOV P1 

CODE EDIT

PR:1 ST:2 LN:0 

CODE EDIT

PR:1 ST:2 

LN:0 

20 MOV P2,-50 

CODE EDIT

PR:1 ST:13 

LN:0 

130 END 

CODE EDIT

Precautions when saving programsMake sure to perform the operation above. The edited data will not be updated if the power is turned offwithout doing so after modifying a program on the program edit screen. Moreover, as much as possible, try

to save programs not only on the controller but also on a PC in order to make backup copies of your work.It is recommended to manage programs using PC support software (optional).

Displaying the previous and next command lineTo display the previous line, press the [BACKWD] key, and to display the next line, press the [FORWD]key.

Displaying a specific linePress the [ADD] key and move the cursor to LN:. Input the No. of the line to be displayed in the parenthe-ses, and then press the [INP] key. The designated line will appear.

Page 46: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 46/457

  3Explanation of operation methods

  Programming   3-27

(4) Correcting a programBefore correcting a program, refer to Page 24, "3.5.1 Creating a program" in "(1)Opening the program editscreen", and open the program edit screen.

1) Press the [RPL] key, and move the cursorto LN:( ).

2) Press the [2], [0], [INP] key to display line20.

Move the cursor

Call the line No.

Input the line number

-C(J6)

0  ABC

INP

EXE

-A(J4)

2 GHI

RPL

- -

PR:1 S(1 ) 

LN:10 

10 MOV P1 

CODE EDIT

PR:1 ST:1 

L(10 ) 10 MOV P1 

CODE EDIT

PR:1 ST:1 

L(10 ) 10 MOV P1 

CODE EDIT

PR:1 ST:2 

L(20 ) 20 MOV P2,-50 

CODE EDIT

Cursor movementWhen the cursor is at a command line display, the command can be edited. When at a line No. display(LN:), the line No. is designated.The cursor is moved with the [ADD], [RPL], [DEL] and [HAND] keys.

Calling out a line No.When designating and calling out a line No., move the cursor to the line No. display (LN:), input the lineNo., and then press the [INP] key.

 

The displayed line can be scrolled up or down by pressing the [FORWD] or [BACKWD] key.

Caution for Editing Array VariablesThe number of elements in the array variable definition (DIM) can be changed in the software version K3or later. If the number of elements is reduced, exercise caution as the data of the reduced elements willbe deleted. Also, the number of dimensions cannot be changed (for example, changing from one dimen-sion to two dimensions is not possible).

Page 47: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 47/457

3-28 Programming 

3Explanation of operation methods

3) Press the [RPL] key and move the cursorto the command line.

 

Press the [HAND] key six times, and movethe cursor to the right of "V".

4) Press the [DEL] key two times while hold-ing down the [CHAR] key, and delete"OV". "M" will remain displayed.

5) Hold down the [CHAR] key.The four commands assigned to "M" willappear.

6) Press the [2] key while holding down the[CHAR] key, and select "MVS". MVS willappear on the screen.

7) Press the [INP] key, and set line No. 70.The next line will appear on the screen.

8) After finishing modifying an instruction,press the [MENU] key to save it.

Line No. 20 has been changed to linear movement with the above operation.

PR:1 ST:2 

LN:20 

20 MOV P2,-50 

CODE EDIT

Move the cursor

PR:1 ST:2 

LN:20 

20 MOV P2,-50 

CODE EDIT

Change the command

PR:1 ST:2 

LN:20 

20 MOV P2,-50 

CODE EDIT

Deleting a character

PR:1 ST:2 

LN:20 

20 M P2,-50 

CODE EDIT

PR:1 ST:2 

LN:20 

20 M P2,-50 

CODE EDIT

Display the command list

1.MOV 2.MVS 

3.MVC 4.MVR 

20 M P2,-50 

CODE EDIT

1.MOV 2.MVS 

3.MVC 4.MVR 

20 M P2,-50 

CODE EDIT

Select the "MVS" command

1.MOV 2.MVS 

3.MVC 4.MVR 

20 MVS P2,-50 

CODE EDIT

+

PR:1 ST:2 

LN:20 

20 MVS P2,-50 

CODE EDIT

Set line 30

PR:1 ST:3 

LN:30 

30 MVS P3 

CODE EDIT

RPL HAND

DEL

POSCHAR

INP

EXE

-A

(J4)2 GHI

POSCHAR

POSCHAR

+

 -

Correcting a character Move the cursor to the right of the incorrect character, and press the [DEL] key to delete in the left direc-tion. Then, input the correct character.

 After correcting a program After modifying a program, make sure to perform the save operation (pressing the [MENU] key) and per-form a step operation to check that the content of the program is properly changed.

Page 48: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 48/457

  3Explanation of operation methods

  Programming   3-29

(5) Registering the current position data

1) On the command editing screen, pressthe [ADD] key or [RPL] while holding downthe [POS] key. The position editing screen will appear.

2) Input "P1" in the parentheses at MO.POS,and then press the [INP] key. The position variable name P1 will becalled, and the currently registered coordi-nate value will appear. 

Refer to Page 25, "Inputting characters" for details on inputting characters.

3) ÅmPress the [ADD] key or [RPL] key whileholding down the [STEP] key, and releaseonly the [ADD] key or [RPL] key. The buzzer will sound a "beep", and aconfirmation message will appear. While holding down the [STEP] key, pressthe [ADD] key or [RPL] key again. The buzzer will sound a "beep", and themessage "ADDING" will appear. Then, thecurrent position will be registered.

4) After finishing modifying an instruction,press the [MENU] key to save it.

The robot's operation position can be taught with the above operations.

Entering position data(Teaching P1)

PR:1 ST:13 

LN:130 

130 END 

CODE EDIT

MO.POS( ) X: +0.00 

Y: +0.00 Z: +0.00

Change to the position screen+

MO.POS(P1 ) X: +0.00 

Y: +0.00 

Z: +0.00

MO.POS(P1 ) X: +0.00 

Y: +0.00 

Z: +0.00

+

.

Input "P","1"MO.POS(P1 ) 

X: +0.00 

Y: +0.00 

Z: +0.00

MO.POS(P1 ) X: +0.00 

Y: +0.00 

 ADDITION ?

MO.POS(P1 ) X: +0.00 

Y: +0.00 

 ADDITION ?

MO.POS(P1 ) X: +132.30 

Y: +254.10 

Z: +32.00

 ADDPOS

CHAR

-X(J1)

SPACE PQR

POSCHAR

INP

EXE--B

(J5)

1 DEF

 -

+Entering position data

 ADDSTEP

MOVE

 ADD

Changing between the command editing screen and position editing screen.The commands are edited on the command editing screen, and the positions are edited on the positionediting screen. To change from the command editing screen to the position editing screen, press [POS] +([ADD] or [RPL] key). If the cursor is not displayed, press the [COND] key and then the [POS] key to dis-play the cursor.

Page 49: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 49/457

3-30 Programming 

3Explanation of operation methods

(6) Confirming the position data (Position jump )Move the robot to the registered position data place.The robot can be moved with the "MO position movement" or "MS position movement" method.Perform a servo ON operation while lightly holding the deadman switch before moving positions.

Table 3-4:Moving to designated position data

1) MO position movement is only possible in

the CYLNDER jog mode. Thus, changethe mode if the jog mode is other thanJOINT jog.

2) When the [EXE] key is pressed while hold-ing down the [MOVE] key, the robot willmove with joint interpolation to the cur-rently displayed position data place onlywhile the [EXE] key is held down.

3) MS position movement is possible in jogmodes other than the XYZ jog, 3-axis XYZ jog, CYLNDER jog and TOOL jog. Thus,change the mode if these modes areentered.

4) When the [EXE] key is pressed while hold-ing down the [MOVE] key, the robot willmove with linear interpolation to the cur-rently displayed position data place onlywhile the [EXE] key is held down. If linear movement from the current posi-tion to the designated position is not possi-ble, the robot will not move.

Name Movement method

MO position movement The robot moves with joint interpolation to the designated position data place.This moving method is used when the jog mode is JOINT jog.The axes are adjusted in the same way as with the MOV instruction.

MS position movement The robot moves with linear interpolation to the designated position data place. Thus, the robot willnot move if the structure flag for the current position and designated position differ.This moving method is used when the jog mode is XYZ, 3-axis XYZ, CYLNDER or TOOL jog.The axes are adjusted in the same way as with the MVS instruction.

Move the MO position+

INP

EXESTEP

MOVE

MO.POS(P2 ) X: +132.30 

Y: +254.10 

Z: +32.00

Move the MO position

JOINT LOW  J1 +34.50  J2 +20.00  J3 +80.00

X,Y,Z LOW  X +80.09  Y -21.78  Z +137.36

Change to the jog mode+

STEP

MOVE

MO.POS(P2 ) X: +132.30 

Y: +254.10 

Z: +32.00

Move the MS position+

INP

EXESTEP

MOVE

MS.POS(P2 ) X: +132.30 

Y: +254.10 

Z: +32.00

Move the MS position

JOINT LOW  J1 +34.50  J2 +20.00  J3 +80.00

X,Y,Z LOW  X +80.09  Y -21.78  Z +137.36

Change to the jog mode

+STEP

MOVE

MS.POS(P2 ) X: +132.30 

Y: +254.10 

Z: +32.00

TOOL 

JOINT 

()?

Page 50: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 50/457

  3Explanation of operation methods

  Programming   3-31

(7) Correcting the current position data

1) On the command editing screen, pressthe [ADD] key or [RPL] key while holdingdown the [POS] key. The position editing screen will appear.

2) Input "P3" in the parentheses at MO.POS,and then press the [INP] key. The position variable name P3 will becalled, and the currently registered coordi-nate value will appear.

3) After finishing modifying an instruction,press the [MENU] key to save it.

4) Move the robot to the new wait positionwith jog operation.

5) Press the [RPL] key while holding downthe [STEP] key, and release only the[RPL] key. The buzzer will sound a "beep", and aconfirmation message will appear.While holding down the [STEP] key, pressthe [RPL] key again. The buzzer will sound a "beep", and themessage "Replacing" will appear. Then,the current position will be corrected.

*) If the software version of T/B is B1 or later,change the [RPL] key to [ADD], and

operate.(like the left figure)

This completes correction of the wait position.

Change the movement position

PR:1 ST:8 

LN:80 

80 MVS P3 

CODE EDIT

MO.POS( ) X: +0.00 

Y: +0.00 

Z: +0.00

Change to the position screen+

MO.POS(P3 ) X: +0.00 

Y: +0.00 

Z: +0.00

MO.POS(P3 ) X: +132.30 

Y: +354.10 

Z: +132.00

 ADDPOS

CHAR

+Input "P","3"

-X(J1)

SPACEPQR

POSCHAR

INP

EXE--Z

(J3)3 JKL

-

Calling out a position variablecInput the name of the variable to be called out in the parentheses at MO. POS on the position editingscreen. Then, press the [INP] key.The position variable can be scrolled up or down by pressing the [FORWD] or [BACKWD] key.

JOINT LOW  J1 +34.50  J2 +20.00  J3 +80.00

Position variable compensation

MO.POS(P3 ) X: +132.30 

Y: +354.10 

Z: +132.00

MO.POS(P3 ) X: +132.30 

Y: -284.10 

Z: +132.00

+ .RPLSTEP

MOVE

RPL

.+ ADD ADDSTEP

MOVE

*) If the software versionof T/B is B1 or later,operate with lowerstage specified keys.

fter correcting a program After modifying a program, make sure to perform the save operation (pressing the [MENU] key) and per-form a step operation to check that the content of the program is properly changed.

he check of the software version of T/B After turning on the controller power, it can check by the T/B screen before title screen is displayed.

Page 51: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 51/457

3-32 Programming 

3Explanation of operation methods

(8) Correcting the MDI (Manual Data Input)

1) On the command editing screen, press the[ADD] key or [RPL] key while holdingdown the [POS] key. The position editingscreen will appear.

2) Input "P3" in the parentheses at MO.POS,and then press the [INP] key. The position variable name P3 will becalled, and the currently registered coordi-nate value will appear.

3) Using the [RPL]key, move the cursor tothe Y: line, and then using the [HAND]key, move the cursor to above 4.

4) Press the [5] key, and then press the [INP]key. 5 will be written over 4, and the Ycoordinate value will be changed.

5) After finishing modifying an instruction,press the [MENU] key to save it.

 compensat on met o

PR:1 ST:8 

LN:80 

80 MVS P3 

CODE EDIT

MO.POS( ) X: +0.00 

Y: +0.00 

Z: +0.00

Change to the position screen+

MO.POS( ) X: +0.00 

Y: +0.00 

Z: +0.00

MO.POS(P3 ) X: +132.30 

Y: +354.10 

Z: +132.00

 ADDPOSCHAR

MO.POS(P3 ) X: +132.30 

Y: +354.10 

Z: +132.00

MO.POS(P3 ) X: +132.30 

Y: +354.10 

Z: +132.00

MO.POS(P3 ) X: +132.30 

Y: +354.10 

Z: +132.00

MO.POS(P3 ) X: +132.30 

Y: +355.10 

Z: +132.00

Move the cursor

RPL HAND

Change a setting value

+C(J6)

5 STU

INP

EXE

+Input "P","3"

-X(J1)

SPACE PQR

POSCHAR

INP

EXE--Z

(J3)3 JKL

-

-

-

Page 52: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 52/457

  3Explanation of operation methods

  Programming   3-33

(9) Deleting position dataOnly position data that is not currently being used by the program can be deleted. If position data beingused in the program is deleted, an error will occur.

1) On the command editing screen, press the[ADD] key or [RPL] key while holdingdown the [POS] key.

 

The position editing screen will appear.

2) Input "P4" in the parentheses at MO.POS,and then press the [INP] key. The position variable name P4 will becalled, and the currently registered coordi-nate value will appear.

3) Press the [DEL] key while holding downthe [STEP] key, and release only the [DEL]key. The buzzer will sound a "beep", and aconfirmation message will appear.

4) While holding down the [STEP] key, pressthe [DEL] key again. The buzzer will sound a "beep", and the

message indicating the deletion willappear at the bottom line of the screen.The position data will be deleted.

5) After finishing modifying an instruction,press the [MENU] key to save it.

os t on ata e et on met o

PR:1 ST:8 

LN:80 80 MVS P3 

CODE EDIT

MO.POS( ) 

X: +0.00 Y: +0.00 

Z: +0.00

Change to the position screen+

MO.POS( ) X: +0.00 

Y: +0.00 

Z: +0.00

MO.POS(P4 ) X: +2.98 

Y: +354.10 

Z: +132.00

 ADDPOSCHAR

MO.POS(P4 ) X: +2.98 

Y: +354.10 

Z: +132.00

MO.POS(P4 ) X: +2.98 

Y: +354.10 

DELETE ?

MO.POS(P4 ) X:--------- 

Y:--------- 

Z:---------

Delete position data

STEP

MOVE+DEL

MO.POS(P4 ) X: +2.98 

Y: +354.10 

DELETE ?

Confirm the position data deletion

STEP

MOVE

DEL+

+Input "P","4"

-X(J1)

SPACEPQR

POS

CHAR

INP

EXE-

-Y(J2)

4 MNO -

Page 53: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 53/457

3-34 Programming 

3Explanation of operation methods

(10) Display on the position edit screenThe XYZ coordinate values of the X, Y, and Z axes, the posture data of the A, B, and C axes, the posturestructure flags, and the multiple rotation information of each axis, are saved as the robot's position data.Perform the following operations to display each screen.

1) When the position edit screen is dis-played, the coordinate values of the X, Y,and Z axes are displayed first. Press the[RPL] key to display the data of the A, B,and C axes.

2) Press the [RPL] key again to display theinformation of structure flag 1.

3) Press the [RPL] key once again to returnto the X, Y, and Z axes display.

(11) Saving the programWhen completed creating or revising a program, save the edited details with one of the following operations.

* Press the [MENU] key and display the Menu screen.* Set the T/B [ENABLE/DISABLE] switch to "DISABLE"

os t on e t screen

MO.POS:P4 

X: +2.98 

Y: +354.10 

Z: (+132.00)

MO.POS:P4 

 A: (-180.000) B: 0.000 

C: -180.000

Change to the position screen (A,B,C axis)

MO.POS:P4 

 A: -180.000 

B: 0.000 

C: (-180.000)

MO.POS:P4STRUC.FLAG(001)  SET 1:RAN  FLAG 0:LBF

RPL

MO.POS:P4STRUC.FLAG(001)  SET 1:RAN  FLAG 0:LBF

Return to the position screen (XYZ)

Change to the position screen (Flg 1)

RPL

RPL

MO.POS:P4 

X: +2.98 

Y: +354.10 

Z: (+132.00)

Precaution when saving the edited program/dataPlease be aware that any updates to the program or data, including teaching data, will be lost if thepower is shut down while in the program edit screen. Please be aware that any updates to the programor data, including teaching data, will be lost if the power is shut down while in the program edit screen.Please be aware that any updates to the program or data, including teaching data, will be lost if thepower is shut down while in the program edit screen.

Page 54: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 54/457

  3Explanation of operation methods

  Debugging   3-35

3.6 DebuggingDebugging refers to testing that the created program operates correctly, and to correcting an errors if anabnormality is found. These can be carried out by using the T/B's debugging function. The debugging func-tions that can be used are shown below. Always carry out debugging after creating a program, and confirmthat the program runs without error.

(1) Step feedThe program is run one line at a time in the feed direction. The program is run in line order from the head orthe designated line. Confirm that the program runs correctly with this process.

Using the T/B execute the program line by line (step operation), and confirm the operation. Perform the following operations while pressing lightly on the deadman switch of the T/B after the servo hasbeen turned on.

1) Press the [COND] key, and display thecommand editing screen.

2) While holding down the [FORWD] key or[STEP] key, hold down the [EXE] key. The robot will start moving. 

When the execution of one line is com-pleted, the robot will stop, and the next linewill appear on the screen. If [EXE] is

released during this step, the robot willstop. 

Take special care to the robot movements during operation. If any abnormalityoccurs, such as interference with the peripheral devices, release the [EXE] key ordeadman switch, or press the deadman switch with force and stop the robot.

MO.POS(P1 ) X: +132.30 

Y: +354.10 

Z: +132.00

PR:1 ST:1 

LN:10 

10 MOV P1 

CODE EDIT

Change to the command screen

PR:1 ST:1 

LN:10 

10 MOV P1 

CODE EDIT

Execute step feed

+

PR:1 ST:2 

LN:20 

20 MOV P2 

CODE EDIT

COND

INP

EXE+

FORWD

STEP

MOVE.

  CAUTION

Step operation"Step operation" executes the program line by line. The operation speed is slow, and the robot stops after

each line, so the program and operation position can be confirmed.During execution, the lamp on the controller's [START] switch will light.

Immediately stopping the robot during operation*Press the [EMG. STOP] (emergency stop) switch.

The servo will turn OFF, and the moving robot will immediately stop.To resume operation, reset the error, turn the servo ON, and start step operation.

*Release or forcibly press the "deadman" switch.The servo will turn OFF, and the moving robot will immediately stop. Error 2000 will occur. To resume operation, reset the error, lightly press the [Deadman] switch, press the [SVO ON] key toturn ON the servo, and then start step operation.

*Release the [EXE] key.

The step execution will be stopped. The servo will not turn OFF. 

To resume operation, press the [EXE] key.

Page 55: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 55/457

3-36 Debugging 

3Explanation of operation methods

3) Carry out step operation of the entire pro-gram, and confirm the operation in thesame manner.

 

If the robot operation or position is incor-rect, refer to the following operations andmake corrections.

(2) Step returnThe line of a program that has been stopped with step feed or normal operation is returned one line at atime and executed. This can be used only for the interpolation commands. Note that only up to four linescan be returned.

1) Press the [COND] key, and display thecommand editing screen. After this, carryout step feed referring to the previouspage.

2) While holding down the [BACKWD] key,hold down the [EXE] key. The robot willstart step return.

 

When the execution of one line is com-pleted, the robot will stop, and the previ-

ous line will appear on the screen. If [EXE]is released during this step, the robot willstop. 

(3) Step feed in another slotWhen checking a multitask program, it is possible to perform step feed in the confirmation screen of theoperation menu, not in the edit screen.

1) Press the "2" key to display the operationmenu screen.

2) Press the "2" key to display the confirma-tion screen.

3) Change the slot number to display andallow step feed for another task slot.

4) The operations for step feed are the sameas in the edit screen. Hold down "+" (or "-") and press the [INP/EXE] key.

Specify 0 for the slot number in order to per-form step feed for all the task slots at thesame time.

PR:1 ST:2 

LN:20 

20 MOV P2 

CODE EDIT

PR:1 ST:13 

LN:130 

130 END 

CODE EDIT

Execute step feed+ INP

EXE+

FORWDSTEPMOVE

MO.POS(P1 ) X: +132.30 

Y: +354.10 

Z: +132.00

PR:1 ST:2 

LN:20 

20 MOV P2 

CODE EDIT

Change to the command position

PR:1 ST:1 

LN:10 

10 MOV P1 

CODE EDIT

Execute step return

+

PR:1 ST:1 

LN:10 

10 MOV P1 

CODE EDIT

COND

INP

EXE-

BACKWD

-A(J4)

2 GHI

<CHECK> ST:2 

LN:100 

100 M_OUT=1

-B(J5)

2 DEF

<MENU> 

1.TEACH 2.RUN 

3.FILE 4.MONI 5.MAINT 6.SET

<RUN>1.SERVO 2.CHECK

<RUN>1.SERVO 2.CHECK

Page 56: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 56/457

  3Explanation of operation methods

  Debugging   3-37

(4) Step jumpIt is possible to change the currently displayed step or line.

1) Use the arrow keys to move to the ST col-umn or LN column and enter the stepnumber or line number you want to dis-play, and then press the [INP] key.

 

2) It is possible to perform step feed from thestep after the change. However, an unde-fined error or similar will occur if lines forinitialization of variables, etc. are skipped.

PR:1 ST:2LN:(20 ) 

20 MOV P2 

CODE EDIT

PR:1 ST:13 

LN:130 

130 END 

CODE EDIT

Step jump+130+

INP

EXERPL RPL

Page 57: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 57/457

3-38  Automatic operation

3Explanation of operation methods

3.7 Automatic operation(1) Setting the operation speed

The operation speed is set with the controller or T/B. 

The actual speed during automatic operation will be the operation speed = (controller (T/B) setting value) x(program setting value).

*Operating with the controller 

1) Press the controller [CHNG DISP] switchtwice, and display the "OVERRIDE" on theSTATUS NUMBER display panel.

2) Each time the [UP] key is pressed, theoverride will increase in the order of (10 -20 - 30 - 40 - 50 - 60 - 70 - 80 - 90 - 100%). The speed will decrease in reverse eachtime the [DOWN] key is pressed.

*Operating with the T/B

1) Each time the [MOVE] + [+] keys arepressed, the override will increase in theorder of (LOW - HIGH - 3 - 5 - 10 - 30 - 50 -70 -100%). The speed will decrease inreverse each time the [MOVE] + [%] keysare pressed. The currently set speed will appear on theupper right of the screen. 

(2) Selecting the program No.

1) Set the T/B [ENABLE/DISABLE] switch to"DISABLE".

2) Set the controller [MODE] switch to"AUTO (Op.)".

3) Press the [CHNG DISP] switch and dis-play "PROGRAM NO." on the STATUSNUMBER display. 

4) When the [UP] switch is pressed, the reg-istered program Nos. will scroll up, andthen the [DOWN] switch is pressed, theprogram Nos. will scroll down. Display the program No. to be used forautomatic operation. *They are not displayed if a programname consisting of five or more characters

is specified. If these are selected from anexternal device, "P - - - - " is displayed. 

CHNG DISP STATUS NUMBER

Display the override

UP

DOWN

Set the override

JOINT LOW  W +34.50  S +20.00  E +80.00 Set the speed

+STEP

MOVE

+

FORWD

-

BACKWD

UP

DOWN

CHNG DISP

DISABLE ENABLE

STATUS NUMBER

Display the program No.

Selecting the program No.

TEACH

AUTO

(Ext.)

AUTO

(Op.)

MODE

repare t e contro

T/B disable

Controller enable

Selecting the program No.

Page 58: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 58/457

  3Explanation of operation methods

   Automatic operation  3-39

(3) Starting automatic operation

Before starting automatic operation, always confirm the following items. Startingautomatic operation without confirming these items could lead to property damageor physical injury.*Make sure that there are no operators near the robot.

*Make sure that the safety fence is locked, and operators cannot enter unintention-ally.*Make sure that there are no unnecessary items, such as tools, inside the robot

operation range.*Make sure that the workpiece is correctly placed at the designated position.*Confirm that the program operates correctly with step operation.

1) Set the T/B [ENABLE/DISABLE] switch to "DIS- ABLE". 

2) Set the controller [MODE] switch to "AUTO(Op.)". 

3) Automatic operation will start when the control-ler [START] switch is pressed. (Continuousoperation) If the [END] switch is pressed during the contin-uous operation, the program will stop after onecycle. The LED blinks during the cycle stop.When the [END] key is pressed again during acycle stop in software version H8 or later, theoperation returns to continuous operation.

Before starting automatic operation, always confirm that the target program No. isselected.

Take special care to the robot movements during automatic operation. If anyabnormality occurs, press the [EMG. STOP] switch and immediately stop therobot.

(4) Stopping

The running program is immediately stopped, and the moving robot is decelerated to a stop.*Operating with the controller 

1) Press the [STOP] switch.

*Operating with the T/B

1) Press the [STOP] key.

  CAUTION

START END

DISABLE ENABLE

Start

(Continuous operation)

End with one cycle

TEACH

AUTO

(Ext.)

AUTO

(Op.)

MODE

T/B disable

Controller enable

Start automatic operation

Prepare the control

  CAUTION

  CAUTION

STOP

Stop

Stop STOP

Operation rights not requiredThe stopping operation is always valid regardless of the operation rights.

Page 59: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 59/457

3-40  Automatic operation

3Explanation of operation methods

(5) Resuming automatic operation from stopped state

Before starting automatic operation, always confirm the following items. Startingautomatic operation without confirming these items could lead to property dam-age or physical injury.*Make sure that there are no operators near the robot.

*Make sure that the safety fence is locked, and operators cannot enter uninten-tionally.*Make sure that there are no unnecessary items, such as tools, inside the robotoperation range.*Make sure that the workpiece is correctly placed at the designated position.*Confirm that the program operates correctly with step operation.

1) Set the T/B [ENABLE/DISABLE] switch to "DIS- ABLE". 

2) Set the controller [MODE] switch to "AUTO(Op.)". 

3) Automatic operation will start when the control-ler [START] switch is pressed. (Continuousoperation)

 

The continuous operation/one cycle operationstate will be the same as before the operationwas stopped.

Before starting automatic operation, always confirm that the target program No. isselected.

Take special care to the robot movements during automatic operation. If anyabnormality occurs, press the [EMG. STOP] switch and immediately stop therobot.

Do not turn the controller's power off during the automatic operation. The memoryin the controller may be malfunctioned and programs may be destroyed. Use theemergency stop to stop the robot immediately.

  CAUTION

START

DISABLE ENABLE

Start (Continuous operation)

TEACH

AUTO

(Ext.)

AUTO

(Op.)

MODE

T/B disable

Controller enable

Start automatic operation

  CAUTION

  CAUTION

  CAUTION

Page 60: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 60/457

  3Explanation of operation methods

   Automatic operation  3-41

(6) Resetting the programThe program's stopped state is canceled, and the execution line is returned to the head.

*Operating with the controller 

1) Set the T/B [ENABLE/DISABLE] switch to "DIS- ABLE". 

2) Set the controller [MODE] switch to "AUTO(Op.)". 

3) Press the controller [CHG DISP] switch, anddisplay the program No. 

4) Press the controller [RESET] switch. The STOP lamp will turn OFF, and the pro-gram's stopped state will be canceled. 

*Operating with the T/B

1) Set the [Mode selection switch] on the front ofthe controller to "TEACH".

 

2) Set the T/B [ENABLE/DISABLE] switch to"ENABLE". 

3) Press the [EXE] key while holding down the[ERROR RESET] key. The execution line willreturn to the head, and the program will bereset.

DISABLE ENABLE

RESET

CHNG DISP

Reset

TEACH

AUTO

(Ext.)

AUTO

(Op.)

MODE

T/B disable

Controller enable

Execute of program reset

Display the program No.

STATUS NUMBER

TEACH

AUTO

(Ext.)

AUTO

(Op.)

MODE

DISABLE ENABLE

Program reset+

INP

EXE

ERROR 

RESET

Execute of program reset

T/B enable

Controller disable

a on y w e program s s oppeThe program cannot be reset while the program is running. Always carry out this step while the program isstopped.When resetting the program from the controller operation panel, display the "program No." on the STA-TUS NUMBER display, and then reset.

 amp turnsThe STOP lamp will turn OFF when the program is reset.

Page 61: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 61/457

3-42 Turning the servo ON/OFF 

3Explanation of operation methods

3.8 Turning the servo ON/OFFFor safety purposes, the servo power can be turned ON during the teaching mode only while the deadmanswitch on the back of the T/B is lightly pressed. Carry out this operation with the T/B while lightly pressingthe deadman switch.

*Turning servo ON with T/B [SVO ON] key

1) Set the [Mode selection switch] on the front ofthe controller to "TEACH".

 

2) Set the T/B [ENABLE/DISABLE] switch to"ENABLE". 

3) The servo will turn ON when the [SVO ON] key([STEP/MOVE] key) is pressed.

*Turning servo ON/OFF with T/B Servo screen

1) Set the [Mode selection switch] on the front ofthe controller to "TEACH". 

2) Set the T/B [ENABLE/DISABLE] switch to"ENABLE".

 

3) Press the [2] key, and select the operationscreen.

4) Press the [1] key, and select the servo screen.

TEACH

AUTO

(Ext.)

AUTO

(Op.)

MODE

DISABLE ENABLE

Execute servo ON

T/B enable

Controller disable

Prepare the T/B

Servo ON operation

STEP

MOVE

SVO ON

TEACH

AUTO

(Ext.)

AUTO

(Op.)

MODE

DISABLE ENABLE

T/B enable

Controller disable

Prepare the T/B

<MENU> 

1.TEACH 2.RUN 

3.FILE 4.MONI 5.MAINT 6.SET

<RUN> 

1.SERVO 2.CHECK

-A(J4)

2 GHISelect the RUN screen

<RUN> 

1.SERVO 2.CHECK<SERVO> 

SERVO ON( ) 

0:OFF 1:ON

Select the SERVO screen

-B(J5)

1 DEF

Page 62: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 62/457

  3Explanation of operation methods

  Turning the servo ON/OFF   3-43

5) To turn ON/OFF the servo, press the [0] keywhen the servo is OFF or the [1] key whenthe servo is ON while lightly holding the dead-man switch, and then press the [INP] key.

 

(It is also possible to turn the servo on bypressing the [STEP/MOVE] key.)

*Operating with the controller 

1) Set the T/B [ENABLE/DISABLE] switch to "DIS- ABLE".

 

2) Set the controller [MODE] switch to "AUTO(Op.)". 

3) When the [SVO ON] switch is pressed, theservo will turn ON, and the SVO ON lamp willlight.

4) When the [SVO OFF] switch is pressed, theservo will turn OFF, and the SVO OFF lamp willlight.

-C(J6)0 ABC

Select the SERVO screen

-B(J5)1 DEF

<SERVO> 

SERVO ON( ) 

0:OFF 1:ON

<SERVO> 

SERVO ON( ) 

0:OFF 1:ON

INPEXE-

DISABLE ENABLE

TEACH

AUTO

(Ext.)

AUTO

(Op.)

MODE

SVO ON

SVO OFF

Prepare the controller 

T/B disable

Controller enable

Servo ON

Execute servo ON

Servo OFF

Execute servo OFF

Brakes will activateThe brakes will automatically activate when the servo is turned OFF. Depending on the type of robot,

some axes may not have brakes.

Page 63: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 63/457

3-44 Error reset operation

3Explanation of operation methods

3.9 Error reset operation

*Error reset operation from the operation panelSet the key switch to the AUTO (OP) position, and then press the reset key on the operation panel.

*Error reset operation from the T/B

1) Set the [Mode selection switch] on the front ofthe controller to "TEACH". 

2) Set the T/B [ENABLE/DISABLE] switch to"ENABLE". 

3) Press the [ERROR RESET] key.

3.10 Operation to Temporarily Reset an Error that Cannot Be CanceledDepending on the type of robot, errors that cannot be cancelled may occur when axis coordinates are out-side the movement range, etc. In this case, it is not possible to turn the servo on and perform jog operations

with the normal operations. The following procedure can be used to cancel such errors temporarily. Forinstance, if the axes are outside the movement range, perform a jog operation to adjust the axes while theerror is canceled temporarily.

*Operation to cancel errors temporarily from the T/B

1) Set the [Mode selection switch] on the front ofthe controller to "TEACH". 

2) Set the T/B [ENABLE/DISABLE] switch to

"ENABLE". 

3) Hold the deadman switch l ightly, hold down the[SVO] key and keep on pressing the [ERRORRESET] key.

The operation above will reset errors temporarily. Do not release the key; if it is released the error occursagain. Perform a jog operation as well while keeping the [ERROR RESET] key pressed.

TEACH

AUTO

(Ext.)

AUTO

(Op.)

MODE

DISABLE ENABLE

Cancel errors

T/B enable

Controller disable

Error reset

ERROR 

RESET

STEP

MOVE

SVO ON

TEACH

AUTO

(Ext.)

AUTO

(Op.)

MODE

DISABLE ENABLE

Cancel errors temporarily

T/B enable

Controller disable

Error reset

Keep on pressingthe key.+ ERROR

 

RESET

Page 64: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 64/457

  3Explanation of operation methods

  Operating the program control screen  3-45

3.11 Operating the program control screen(1) Program list display

This functions allows the status of the programs registered in the controller to be confirmed.

1) Press the [3] key, and select the program con-

trol screen.

2) When the [1] key is pressed, the program list(date of creation) will appear. The No. of reg-istered programs will appear at the upperright of the screen.

3) The other registered programs can be dis-played by pressing the [ADD] and [RPL] keys.

4) If the [HAND] key is pressed when the date ofcreation is displayed, the time that the pro-gram was created will appear. When the [DEL]

key is pressed, the display will return to thedate of creation.

5) If the [HAND] is pressed when the time of cre-ation is displayed, the program size (unit:byte) will appear. The currently usable mem-ory size will appear at the upper right of thescreen. When the [DEL] key is pressed, thedisplay will return to the date of creation.

6) If the [HAND] key is pressed when the pro-

gram size is displayed, the program protectionstate will appear. Refer to the section Page 46,"* Program protection function" for details.

7) If the [HAND] key is pressed when the pro-gram protection state is displayed, the variableprotection state will appear. Refer to the sec-tion Page 46, "* Position variable protectionfunction" for details.

<MENU> 

1.TEACH 2.RUN 

3.FILE 4.MONI 5.MAINT 6.SET

<FILE> 

1.DIR 2.COPY 

3.RENAME 4.DELETE

-Z(J3)

3 JKLSelect a program management screen<DIR> 71 99-10-10 

2 99-11-29 

5 99-12-08

Select the list screen

-B(J5)

1 DEF

Display other registered programs

<FILE> 

1.DIR 2.COPY 

3.RENAME 4.DELETE

<DIR> 7 

1 99-10-10 

2 99-11-29 

5 99-12-08

<DIR> 7 

10 99-12-10 

13 99-08-29 

17 99-09-10

 ADD RPL

HAND®

<DIR> 7 

10 99-12-10 

13 99-08-29 

17 99-09-10

<DIR> 7 

10 03:58:02 

13 23:05:32 

17 15:48:39

Display the time of creation

<DIR> 7 

10 03:58:02 

13 23:05:32 

17 15:48:39

<DIR> 25639 

10 348 

13 1978 

17 3873

HAND

Display the program size

<DIR> 7 

10 348 

13 1978 

17 3873

<DIR> PROTECT 

10 OFF(0) 

13 ON(1) 0:OFF 1:ON

HAND

Display the program protection state

<DIR> PROTECT 

10 OFF(0) 13 ON(1) 0:OFF 1:ON

<DIR>POS.PROTECT 

10 ON(1) 13 ON(1) 0:OFF 1:ON

HAND

Display the position data protection state

Page 65: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 65/457

3-46 Operating the program control screen

3Explanation of operation methods

(2) Program protection function*Program protection function

This function protects the program from being deleted or changed inadvertently.

1) Display the "program list display" explainedon the previous page, and then display theprogram protection state. Move the cursor tothe program targeted for protection with the[RPL] and [ADD] keys.

2) The program protection function for that pro-gram will turn ON or OFF when the [INP] keyis pressed after the following key: Program protection function ON ... [1] key 

Program protection function OFF ... [0] key

*Position variable protection functionThis function protects the program from inadvertent variable deletion and changing.

1) Display the "program list display" explained

on the previous page, and then display thevariable protection state. Move the cursor tothe program targeted for protection with the[RPL] and [ADD] keys.

2) The variable protection function for that pro-gram will turn ON or OFF when the [INP] keyis pressed after the following key: Variable protection function ON ... [1] key 

Variable protection function OFF ... [0] key

<DIR> PROTECT 

1 OFF( ) 2 OFF(0) 0:OFF 1:ON

Turn program protection function ON

<DIR> PROTECT1 OFF(0) 2 OFF(0) 0:OFF 1:ON

Turn program protection function ON

<DIR> PROTECT 

1 OFF(0) 

2 OFF( ) 

0:OFF 1:ON

RPL

-B(J5)

1 DEF

INP

EXE

<DIR> PROTECT 

1 OFF(0) 2 ON(1) 0:OFF 1:ON

-

Program protectionThis function protects the program from inadvertent program deletion, renaming and command changing.*The protection function is not copied with the copy operation.*The protected information is ignored during the initialization process.

<DIR>POS.PROTECT 

1 OFF( ) 

2 OFF(0) 

0:OFF 1:ON

Turn program protection function ON<DIR>POS.PROTECT 

1 OFF(0) 2 OFF(0) 0:OFF 1:ON

Turn position data protection function ON

<DIR>POS.PROTECT 

1 OFF(0) 

2 OFF( ) 

0:OFF 1:ON

RPL

-B(J5)

1 DEF

INP

EXE

<DIR>POS.PROTECT 

1 OFF(0) 2 ON(1) 0:OFF 1:ON

-

Variable protection û ü ûThis function protects the variable from inadvertent position data registration or changing, and from sub-stitution to each variable during incorrect program execution. ÅEThe protection function is not copied with the copy operation. ÅEThe protected information is ignored during the initialization process.

Variable protectionThis function protects the variable from inadvertent position data registration or changing, and from sub-stitution to each variable during incorrect program execution.*The protection function is not copied with the copy operation.*The protected information is ignored during the initialization process.

Page 66: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 66/457

  3Explanation of operation methods

  Operating the program control screen  3-47

(3) Copying programsThis function copies a registered program to another program. If an existing program name is designated as the copy destination program, an error will occur.

 An example for copying program 1 to program 5 is shown below.

1) Press the [3] key, and select the program con-trol screen.

2) Press the [2] key, and select the programcopy screen.

3) Press the [1] key and then the [(] key to movethe cursor to the copy destination programname input line.

4) When the [INP] key is pressed after pressing

[5], the program will be copied. The programcontrol screen will appear after execution.

<MENU> 

1.TEACH 2.RUN 

3.FILE 4.MONI 5.MAINT 6.SET

<FILE> 

1.DIR 2.COPY 

3.RENAME 4.DELETE

-Z(J3)

3 JKLSelect a program management screen

<COPY> 

FROM( ) TO( ) INPUT SOURCE

Select copy screen

-A(J4)

2 GHI

Designate copy source

<MENU> 

1.TEACH 2.RUN 

3.FILE 4.MONI 5.MAINT 6.SET

RPL

Designate copy destination, and execute

<COPY> 

FROM( ) TO( ) INPUT SOURCE

<COPY> 

FROM(1 ) TO( ) INPUT DEST.

-B(J5)

1 DEF

<COPY> 

FROM(1 ) 

TO COPY( ) 

INPUT DEST.

<COPY> 

FROM(1 ) 

TO(5 ) 

INPUT DEST.

-B(J5)

1 DEF

INP

EXE

-

-

Protected information is not copiedThe program protection information and variable protection information is not copied with the copy opera-tion. Reset this information as necessary.

Page 67: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 67/457

3-48 Operating the program control screen

3Explanation of operation methods

(4) Changing the program name (Renaming)This function renames a registered program's name. If an existing program name is designated as the rename destination program, an error will occur.

 An example for renaming program 1 to program 5 is shown below.

1) Press the [3] key, and select the program con-trol screen.

2) Press the [3] key, and select the programrename screen.

3) Press the [1] key and then the [RPL] key tomove the cursor to the rename destinationprogram name input line.

4) When the [INP] key is pressed after pressing

[5], the program will be renamed. The programcontrol screen will appear after execution.

<MENU> 

1.TEACH 2.RUN 

3.FILE 4.MONI 5.MAINT 6.SET

<FILE> 

1.DIR 2.COPY 

3.RENAME 4.DELETE

-Z(J3)

3 JKLSelect a program management screen

<RENAME> 

FROM( ) TO( ) INPUT DEST.

Select rename screen

Designate rename source program

<FILE> 

1.DIR 2.COPY 

3.RENAME 4.DELETE

RPL

Designate rename destination program,and execute

<RENAME> 

FROM( ) TO( ) INPUT DEST.

<RENAME> 

FROM(1 ) TO( ) INPUT DEST.

+C(J6)

5 STU

<RENAME> 

FROM(1 ) 

TO( ) 

INPUT DEST.

<RENAME> 

FROM(1 ) 

TO(5 ) 

INPUT DEST.

-B(J5)

1 DEF

INP

EXE

-Z(J3)

3 JKL

-

-

Renaming is not possible when protectedIf either the program protection or variable protection is ON, the program cannot be renamed.In this case, turn the protection OFF before renaming.

Page 68: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 68/457

  3Explanation of operation methods

  Operating the program control screen  3-49

(5) Deleting a programThis function deletes a registered program.

The case for deleting program 1 is shown below.

1) Press the [3] key, and select the program con-trol screen.

2) Press the [4] key, and select the programrename screen.

3) When the [INP] key is pressed after pressing[1], a deletion confirmation message willappear.

4) When the [INP] key is pressed after pressing

[1], the program will be deleted. The programcontrol screen will appear after execution.

<MENU> 

1.TEACH 2.RUN 

3.FILE 4.MONI 5.MAINT 6.SET

<FILE> 

1.DIR 2.COPY 

3.RENAME 4.DELETE

-Z(J3)

3 JKLSelect a program management screen

<DELETE> 

DELETE( ) 

INPUT DEL.FILE

Select the delete screen

Designate delete program

<FILE> 

1.DIR 2.COPY 

3.RENAME 4.DELETE

Execute a program delete

<DELETE> 

DELETE(1 ) 

INPUT DEL.FILE

<DELETE> 

DELETE 1OK ? ( ) 1:EXECUTE

<DELETE> 

DELETE 1OK ? (1) 

1:EXECUTE

<FILE> 

1.DIR 2.COPY 

3.RENAME 4.DELETE

-B(J5)

1 DEF

INP

EXE

-Y(J2)

4 MNO

INP

EXE

-B(J5)

1 DEF

-

-

Deletion not possible when protectedIf either the program protection or variable protection is ON, the program cannot be deleted.  In this case, turn the protection OFF before deleted.

Page 69: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 69/457

3-50 Operating the monitor screen

3Explanation of operation methods

3.12 Operating the monitor screen(1) Input signal monitor 

This function allows the state of the input signals from an external source to be confirmed at real-time.

 An example for confirming the states of the input signal bits 8 to 15 is shown below.

1) Press the [4] key, and select the monitorscreen.

2) Press the [1] key, and select the input signalscreen.

3) When the [INP] key is pressed after pressingthe [8] key, the states of the input signal bits 8to 15 will appear.

<MENU> 

1.TEACH 2.RUN 

3.FILE 4.MONI 5.MAINT 6.SET

<MONI> 

1.INPUT 2.OUTPUT 

3.VAR 4.ERROR

Select the monitor screen

<INPUT> 

NUMBER (0 ) BIT: 76543210 

DATA(00000000)

Select the input signal monitor

<MONI> 

1.INPUT 2.OUTPUT 

3.VAR 4.ERROR

-Y(J2)

4 MNO

INP

EXE

-B(J5)

1 DEF

<INPUT> 

NUMBER (0 ) BIT: 76543210 

DATA(00000000)

<INPUT> 

NUMBER (8 ) BIT: 54321098 

DATA(01001011)

Display the input signal state

+Z(J3)

8 ,@\-

Operation rights not requiredThis operation can be carried out even if the T/B does not have the operation rights.

Page 70: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 70/457

  3Explanation of operation methods

  Operating the monitor screen  3-51

(2) Output signal monitor This function allows the state of the signals output to an external source to be confirmed and set.

 An example for turning the input signal bit 8 ON is shown below.

1) Press the [4] key, and select the monitorscreen.

2) Press the [2] key, and select the output signalscreen.

3) When the [INP] key is pressed after pressingthe [8] key, the states of the output signal bits8 to 15 will appear.

4) Press the [RPL] key and then the [DEL] key to

move the cursor below bit 8.

5) When the [INP] key is pressed after pressingthe [1] key, the output signal bit 8 will be set toON.

<MENU> 

1.TEACH 2.RUN 

3.FILE 4.MONI 5.MAINT 6.SET

<MONI> 

1.INPUT 2.OUTPUT 

3.VAR 4.ERROR

Select the monitor screen

<OUTPUT> 

NUMBER (0 ) BIT: 76543210 

DATA(00000000)

Select the output signal monitor

<MONI> 

1.INPUT 2.OUTPUT 

3.VAR 4.ERROR

-Y(J2)

4

INP

EXE

-A(J4)

2 GHI

<OUTPUT> 

NUMBER (0 ) BIT: 76543210 

DATA(00000000)

<OUTPUT> 

NUMBER (8 ) BIT: 54321098 

DATA(01101000)

Display the output signal state

<OUTPUT> 

NUMBER ( ) BIT: 54321098 

DATA(01101000)

<OUTPUT> 

NUMBER (8 ) BIT: 54321098 

DATA(0110100 )

Move the cursor to theoutput signal setting position

+Z(J3)

8 ,@\

INP

EXE

<OUTPUT> 

NUMBER (8 ) BIT: 76543210 

DATA(01101001)

<OUTPUT> 

NUMBER (8 ) BIT: 54321098 

DATA(01101001)

Display the output signal state

RPL´

DEL

-B(J5)

1 DEF

-

-

-

Page 71: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 71/457

3-52 Operating the monitor screen

3Explanation of operation methods

(3) Variable monitor This function allows the details of the numeric variables used in the program to be displayed and changed.

 An example for changing the program 1 numeric variable M8 value from 2 to 5 is shown below.

1) Press the [4] key, and select the monitorscreen.

2) When the [3] key is pressed, the programselection screen for displaying the variableswill appear. Input the name of the program formonitoring the variables.

3) When the [INP] key is pressed after pressing[1], the variable display and setting screen willappear.

4) When the [-Y/MNO] key, [8] key and then[INP] key are pressed, the current value +2 of

the program 1 numeric variable M8 willappear.

5) When the [HAND] key, [5] key and then [INP]key are pressed, the current value +2 of theprogram 1 numeric variable M8 will change to+5.

<MENU> 

1.TEACH 2.RUN 

3.FILE 4.MONI 5.MAINT 6.SET

<MONI> 

1.INPUT 2.OUTPUT 

3.VAR 4.ERROR

Select the monitor screen

<VAR> 

( ) 

SELECT PROGRAM

Select the variable monitor

<MONI> 

1.INPUT 2.OUTPUT 

3.VAR 4.ERROR

-Y(J2)

4 MNO

INP

EXE

-Z(J3)

3 JKL

<VAR> 

(1 ) 

SELECT PROGRAM

<VAR> 

V.NAME( ) DATA( ) SET V.NAME

Set the target program

<VAR> 

V.NAME(M8 ) DATA( ) SET V.NAME

<VAR> 

V.NAME(M8 ) DATA(+2 ) 

SET V.NAME

Display the current valueof the numeric variable

INP

EXE

<VAR> 

V.NAME(M8 ) DATA(+2 ) SET V.NAME

<VAR> 

V.NAME(M8 ) DATA(+5 ) SET V.NAME

Set the numeric variable value

+C(J6)

5 STU

-B(J5)

1 DEF

-Y(J2)

4 MNO

+Z(J3)

8 ,@\

INP

EXE

HAND

-

- -

- -

Operation rights not required for only displayIf this function is used to only display the values, the T/B does not require the operation rights.The robot status variables cannot be directly monitored. In this case, the variable must be substituted inthe program variables once, and then monitored with the program variable.

Page 72: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 72/457

  3Explanation of operation methods

  Operating the monitor screen  3-53

(4) Error historyThis function displays the history of the errors that have occurred in the robot. Use this as reference whentrouble occurs.

1) Press the [4] key, and select the monitorscreen.

2) When the [4] key is pressed, the error historywill appear.

3) The error history can be viewed by pressingthe following keys: [ADD] key ... Previous errors 

[RPL] key ... Following errors

<MENU> 

1.TEACH 2.RUN 

3.FILE 4.MONI 

5.MAINT 6.SET

<MONI> 

1.INPUT 2.OUTPUT 

3.VAR 4.ERROR

Select the monitor screen

<ERROR> -1 

99-08-10 10:20 

2000 SERVO OFF

Select the error history screen

<MONI> 

1.INPUT 2.OUTPUT 

3.VAR 4.ERROR

-Y(J2)

4 MNO

Display the error history

-Y(J2)

4 MNO

<ERROR> -1 

99-08-10 10:20 

2000 SERVO OFF

<ERROR> -2 

99-08-10 10:12 

3110 Argument valuerange over 

RPL ADD

Operation rights not required

This operation can be carried out even if the T/B does not have the operation rights.

Page 73: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 73/457

3-54 Operation of maintenance screen

3Explanation of operation methods

3.13 Operation of maintenance screen(1) Setting the parameters

The parallel I/O designated input/output settings and settings for the tool length, etc., are registered asparameters. The robot moves based on the values set in each parameter. This function allows each param-eter setting value to be displayed and registered.

 An example of changing the parameter "MEXTL (tool data)" Z axis (3rd element) setting value from 0 to100mm is shown below.

1) Press the [5] key, and select the maintenancescreen.

2) Press the [1] key, and select the parametersetting screen.

3) Input "MEXTL" and press the [RPL] key tomove the cursor to the element No. input line.

4) Press the [3] key to designate the 3rd element(Z axis), and press the [INP] key. The param-eter MEXTL Z axis current value will appearas +0.00.

5) Input "+100.00" here, and then press the[INP] key. The parameter MEXTL Z axis set-ting value will be changed from 0 to 100.

6) Turn the controller's power off and on again;otherwise the changed parameters will notbecome valid.

<MENU> 

1.TEACH 2.RUN 

3.FILE 4.MONI 5.MAINT 6.SET

<MAINT> 

1.PARAM 2.INIT 

3.BRAKE 4.ORIGIN 

5.POWER

Select the maintenance screen

Select the parameter setting screen

+C(J6)

5 STU

Designate

the parameter RPL

<MAINT> 

1.PARAM 2.INIT 

3.BRAKE 4.ORIGIN 

5.POWER

<PARAM> 

( )( ) ( ) 

SET PARAM.NAME

-B(J5)

1 DEF

<PARAM> 

( )( ) ( ) SET PARAM.NAME

<PARAM> 

(MEXTL )( ) ( ) SET ELEMENT NO.

+B(J5)

6 VWX

-Z(J3)

3 JKL

+C(J6)

5 STU

Designate the element number

<PARAM> 

(MEXTL )( ) ( ) SET ELEMENT NO.

<PARAM> 

(MEXTL )(3 ) (+0.00 ) SET DATA

-Z(J3)

3 JKL

-B(J5)

1 DEF

-Y(J2)

4 MNO

POSCHAR

INP

EXE

Change 

the setting value

<PARAM> 

(MEXTL )( ) (+0.00 ) 

SET DATA

<PARAM> 

(MEXTL )(3 ) (+100.00 ) 

SET PARAM.NAME

INP

EXE

HAND -B(J5)

1 DEF

-C(J6)

0 ABC

+X(J1). ’;^

+ . . . .

-

-

- - -

-

-C(J6)

0 ABC-

Power must be turned ON againThe changed parameter will be validated only after the controller power has been turned OFF and ONonce.

Page 74: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 74/457

  3Explanation of operation methods

  Operation of maintenance screen  3-55

(2) Initializing the programThis function erases all programs.

1) Press the [5] key, and select the maintenancescreen.

2) Press the [2] key, and select the initializationscreen.

3) Press [1] and then [INP] to select the programinitialization screen.

4) When the [INP] key is pressed after pressing[1], the program initialization will start. The ini-tialization screen will appear after the execu-

tion.

<MENU> 

1.TEACH 2.RUN 

3.FILE 4.MONI 

5.MAINT 6.SET

<MAINT> 

1.PARAM2.INIT 

3.BRAKE 4.ORIGIN 

5.POWER

Select the maintenance

Select the program initialization screen

+C(J6)

5 STU

Execute program initialization

<INIT> 

PROGRAM 

OK ? ( ) 1.EXECUTE

-B(J5)

1 DEF

<INIT> 

PROGRAM 

OK ? (1) 1.EXECUTE

<INIT> 

INIT ( ) 1.PROGRAM 2.BATT.

Select the initialization screen

<MAINT> 

1.PARAM2.INIT 

3.BRAKE 4.ORIGIN 

5.POWER

<INIT> 

INIT ( ) 1.PROGRAM 2.BATT.

-A(J4)

2 GHI

<INIT> 

INIT (1) 1.PROGRAM 2.BATT.

-B(J5)

1 DEF

INP

EXE

INPEXE

-

-

Executed even when protectedThe program will be initialized even if the program protection or variable protection is set to ON.

Page 75: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 75/457

3-56 Operation of maintenance screen

3Explanation of operation methods

(3) Initializing the battery consumption timeThe usage time of the battery built into the controller and robot arm is calculated to indicate battery replace-ment on the caution message screen when the battery is spent. Thus, always initialize this setting afterreplacing the battery.

1) Press the [5] key, and select the maintenancescreen.

2) Press the [1] key, and select the initializationscreen.

3) Press [2] and then [INP] to select the batteryconsumption time initialization screen.

4) When the [INP] key is pressed after pressing

[1], the battery consumption time initializationwill start. The initialization screen will appearafter the execution.

<MENU> 

1.TEACH 2.RUN 

3.FILE 4.MONI 5.MAINT 6.SET

<MAINT> 

1.PARAM 2.INIT 

3.BRAKE 4.ORIGIN 

5.POWER

Select the maintenance screen

Select the battery consumptiontime initialization screen.

+C(J6)

5 STU

Execute the battery consumptiontime initialization

<INIT> 

BATT. OK ? ( ) 1.EXECUTE

-B(J5)

1 DEF

<INIT> 

BATT. OK ? (1) 1.EXECUTE

<INIT> 

INIT ( ) 1.PROGRAM 2.BATT.

Select the initialization screen

<MAINT> 

1.PARAM 2.INIT 

3.BRAKE 4.ORIGIN 

5.POWER

<INIT> 

INIT ( ) 1.PROGRAM 2.BATT.

-A(J4)

2 GHI

<INIT> 

INIT (2) 1.PROGRAM 2.BATT.

INP

EXE

-A(J4)

2 GHI

INP

EXE

-

-

 Always initialize after battery replacementThe battery usage time is calculated in the controller, and a caution message is displayed when the bat-tery is spent. Always initialize the battery consumption time after replacing the battery to ensure that thecaution message is displayed correctly. 

If this initialization is carried out when the battery has not been replaced, the display timing of the cautionmessage will deviate. Thus, carry this step out only when the battery has been replaced.

Page 76: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 76/457

  3Explanation of operation methods

  Operation of maintenance screen  3-57

(4) Releasing the brakesThis function releases the servomotor brakes when the servo is OFF. Refer to Page 42, "3.8 Turning theservo ON/OFF" for details on turning the servo OFF. This function is used to directly move the robot arm by hand, etc.

Due to the robot configuration, when the brakes are released, the robot arm willdrop with its own weight depending on the released axis.  Always assign an operator other than the T/B operator to prevent the arm fromdropping. This operation must be carried out with the T/B operator giving signals.Refer to Table 3-5 and accurately designate the axis for which the brakes are to bereleased.

Note that the minimum axis unit for which the brakes can be released at once will differ according to themodel of the robot in use. Table 3-5 shows the minimum axis unit for which the brake release operation canbe performed at once for each model.The minimum axis units can be combined to release the brakes form multiple axes at the same time.

Table 3-5:Brake release axis unit per mode

Note) The symbol [*=*] means that it is necessary to set two axes at the same time to release the brake. The symbol [*] means that it is possible to release the brake for an independent axis.

Model AXIS

Remarks1 2 3 4 5 6 7 8

RP-1AH/3AH/5AHRH-5AH/10AH/15AHRH-6SH/12SH/18SHRH-15UHCRV-100THL

* * * * The three axes (Z axes) of the RH-10AH/15AH and RH-12SH/18SH are in the intermittent brake mode.The brake release operation repeatedly applies and releasesthe brake in order to prevent the arm from dropping sud-denly.

RV-1A/2A/4A/3AL 

RV-3S/3SB/6S/6SL/12S/12SL/18S* * * * * *

RV-2AJ/3AJ/5AJ/4AJL/3SJ/3SJB * * * * *

RH-1000GHLC 

RC-1000GHWLC/1000GHWDC* = * * * Axes 1 and 2 are paired.

 

It is not possible to release the brake if both axes are not set

to 1 simultaneously.RH-1000GHLC-RL * = * * * *

RH-1000GJLCRH-1500GJC

* = * * * = *

 Axes 1 and 2, and 4 and 5 are paired.It is not possible to release the brake if both axes are not setto 1 simultaneously.

RH-1000GJLC-RLRH-1500GJC-RL

* = * * * = * *

RH-1500GC * = * * * = * *

RH-1500GC-RLRH1500GVC-RL

* = * * * = * * = = * Axes 1 and 2, and 4 and 5, and 6 and 8 are paired. 

It is not possible to release the brake if both axes are not setto 1 simultaneously.

RC-1000GHWLC-RLRC-1000GHWDC-RL

* = * * * = = = = * Axes 1 and 2, and 4 and 8 are paired. 

It is not possible to release the brake if both axes are not setto 1 simultaneously.

RV-100TH/150TH/150THLRH-1000GHDCRS-30AG/30FG

* = * * = *

 Axes 1 and 2, and 3 and 4 are paired. It is not possible to release the brake if both axes are not setto 1 simultaneously.

RH-1000GHDC-RL * = * * = * *

RH-1000GJDC * = * * = * *

RH-1000GJDC-RL * = * * = * * *

RV-20A * = * * = * * = * Axes 1 and 2, and 3 and 4, and 5 and 6 are paired. 

It is not possible to release the brake if both axes are not setto 1 simultaneously.

RC-1300G * ** ========== *  * ========*

 Axes 1 and 5, and 3 and 6 are paired. It is not possible to release the brake if both axes are not setto 1 simultaneously.

CAUTION

Page 77: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 77/457

3-58 Operation of maintenance screen

3Explanation of operation methods

The operation method is shown below. The following operations are carried out while lightly pressing thedeadman switch on the T/B.

1) Press the [5] key, and select the maintenancescreen.

2) Press the [3] key, and select the brakerelease screen.

3) Press the [1] key to change the number corre-sponding to the axis for which the brakes areto be released to 1. Refer to Table 3-5 and setthe axis designation. In the example on the left, the J1 axis brakerelease is designated for the RP-1AH.

4) Hold the deadman switch (on the back of theT/B). Then hold down the [MOVE] key andpress the [+X] key continuously to release thebrake of the specified axis only while the keysare pressed.

 

The brakes will activate when the [MOVE] keyor [+X] key is released.

(5) Setting the originIf the origin position has been lost or deviated when the parameters are lost or due to robot interference,etc., the robot origin must be set again using this function.Refer to the separate manual: "Robot arm setup & maintenance" for details on the operation.

(6) Displaying the clock data for maintenance

The controller's cumulative power ON time and remaining battery time are displayed.(Unit:hour)

1) Press the [5] key, and select the maintenancescreen.

2) When the [5] key is pressed, the clock data formaintenance will appear.

<MENU> 

1.TEACH 2.RUN 

3.FILE 4.MONI 

5.MAINT 6.SET

<MAINT> 

1.PARAM 2.INIT 

3.BRAKE 4.ORIGIN 

5.POWER

Select the maintenance screen

Select the brake release axis

+C(J6)

5 STU

<BRAKE>12345678 

BRAKE (10000000) 

0:LOCK 1:FREE

Select the brake release screen

<MAINT> 

1.PARAM 2.INIT 

3.BRAKE 4.ORIGIN 

5.POWER

<BRAKE>12345678 

BRAKE (00000000) 

0:LOCK 1:FREE

-Z(J3)

3 JKL

<BRAKE>12345678 

BRAKE (00000000) 

0:LOCK 1:FREE

-B(J5)

1 DEF

Execute the brake release

STEP

MOVE

+X(J1)

. ';^+

deadmanswitch +

<BRAKE>12345678 

BRAKE (10000000) 

0:LOCK 1:FREE

<BRAKE>12345678 

BRAKE (10000000) 

0:LOCK 1:FREE

<MENU> 

1.TEACH  2.RUN 

3.FILE 4.MONI 5.MAINT 6.SET

<MAINT> 

1.PARAM 2.INIT 

3.BRAKE 4.ORIGIN 

5.POWER

Select the maintenance screen

+C(J6)

5 STU

Select the clock data screen

<MAINT> 

1.PARAM 2.INIT 

3.BRAKE 4.ORIGIN 

5.POWER

<HOUR DATA> Hr  POWER ON: 1258 

BATTERY: 4649

+C(J6)

5 STU

Page 78: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 78/457

  3Explanation of operation methods

  Operation of the setting screen  3-59

3.14 Operation of the setting screen(1) Setting the time

 A clock function, used when registering the program, and displaying the change time or error time, etc., isprovided in the controller. If the times are deviated from the current date and time, change the date and timeto the correct values.

1) Press the [6] key, and select the settingscreen.

2) Press the [1] key, and select the clock screen.

3) Set the correct date and press the [INP] key.The date will be changed. If the date does notneed to be changed, press the [RPL] key. Thecursor will move to the time setting section.

4) Set the time with the same operations as forsetting the date.

<MENU> 

1.TEACH  2.RUN 

3.FILE 4.MONI 5.MAINT 6.SET

<SET> 

1.CLOCK

Select the setting screen

+B(J5)

6 VWX

Select the clock screen

<SET> 

1.CLOCK

<CLOCK> 

DATE(99-12-07) TIME(23:58:17) INPUT DATE

-B(J5)

1 DEF

Set the clock. All number keys

<CLOCK> 

DATE(99-12-07) TIME (23:58:17) INPUT DATE

<CLOCK> 

DATE(99-10-25) TIME (23:58:17) INPUT DATE

<CLOCK> 

DATE(99-12-07) TIME (23:58:17) 

INPUT DATE

<CLOCK> 

DATE(99-10-25) TIME (23:58:17) 

INPUT DATE

RPL INP

EXE

Set the time. All number keys.

RPL INP

EXE

-

-

Page 79: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 79/457

4-60 MELFA-BASIC IV functions

4MELFA-BASIC IV 

4 MELFA-BASIC IV

In this chapter, the functions and the detailed language specification of the programming language "MELFA-BASIC IV" are explained.

4.1 MELFA-BASIC IV functionsThe outline of the programming language "MELFA-BASIC IV" is explained in this section. The basic move-ment of the robot, signal input/output, and conditional branching methods are described.

Table 4-1:List of items described

For the detailed description of each instruction, please refer to Page 118, "4.11 Detailed explanation of com-mand words". 

Item Details Related instructions, etc.

1 4.1.1Robot operation control (1)Joint interpolation movement MOV

2 (2)Linear interpolation movement MVS

3 (3)Circular interpolation movement MVR, MVR2, MVR3, MVC

4 (4)Continuous movement CNT

5 (5)Acceleration/deceleration time and speed control  ACCEL, OADL

6 (6)Confirming that the target position is reached FINE, MOV and DLY

7 (7)High path accuracy control PREC

8 (8)Hand and tool control HOPEN, HCLOSE, TOOL

9 4.1.2Pallet operation -------------- DEF PLT, PLT

10 4.1.3Program control (1)Unconditional branching, condit ional branching,waiting

GOTO, IF THEN ELSE, WAIT, etc

11 (2)Repetition FOR NEXT, WHILE WEND

12 (3)Interrupt DEF ACT, ACT

13 (4)Subroutine GOSUB, CALLP, ON GOSUB, etc14 (5)Timer  DLY

15 (6)Stopping END(Pause for one cycle), HLT

16 4.1.4Inputting and outputtingexternal signals

(1)Input signals M_IN, M_INB, M_INW, etc

17 (2)Output signals M_OUT, M_OUTB, M_OUTW, etc

18 4.1.5Communication -------------- OPEN, CLOSE, PRINT, INPUT, etc

19 4.1.6Expressions and operations (1)List of operator  +, -, *, / , <>, <, >, etc

20 (2)Relative calculation of position data (multiplication) P1 * P2

21 (3)Relative calculation of position data (Addition) P1 + P2

22 4.1.7Appended statement -------------- WTH, WTHIF

Page 80: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 80/457

4MELFA-BASIC IV 

  MELFA-BASIC IV functions  4-61

4.1.1 Robot operation control(1) Joint interpolation movement

The robot moves with joint axis unit interpolation to the designated position. (The robot interpolates with a joint axis unit, so the end path is irrelevant.)

*Command word

*Statement example

*Program example

•Program example

*Related functions

Command word ExplanationMOV The robot moves to the designated position with joint interpolation. It is possible to specify the

interpolation form using the TYPE instruction. An appended statement WTH or WTHIF can bedesignated

Statement example Explanation

MOV P1 ' Moves to P1.

MOV P1+P2 ' Moves to the position obtained by adding the P1 and P2 coordinate elements. Refer to Page 84.

MOV P1*P2 ' Moves to the position relatively converted from P1 to P2. Refer to Page 84.

MOV P1,-50 *1) ' Moves from P1 to a position retracted 50mm in the hand direction.

MOV P1 WTH M_OUT(17)=1 ' Starts movement toward P1, and simultaneously turns output signal bit 17 ON.

MOV P1 WTHIF M_IN(20)=1, SKIP ' If the input signal bit 20 turns ON during movement to P1, the movement to P1 is stopped, and theprogram proceeds to the next stop.

MOV P1 TYPE 1, 0(Default value: Long way around)

' Specify either roundabout (or shortcut) when the operation angle of each axis exceeds 180 deg..

Program Explanation

10 MOV P1 ’(1) Moves to P1.

20 MOV P2, -50 *1) ’(2) Moves from P2 to a position retracted 50mm in the hand direction.

30 MOV P2 ’(3) Moves to P2

40 MOV P3, -100 WTH M_OUT (17) = 1 ’(4) Starts movement from P3 to a position retracted 100mm in the hand direction, and turns ON output

signal bit 17.50 MOV P3 ’(5) Moves to P3

60 MOV P3, -100 *1) ’(6) Returns from P3 to a position retracted 100mm in the hand direction.

70 END ’Ends the program.

Function Explanation page

Designate the movement speed........................................................ Page 66, "(5) Acceleration/deceleration time and speed control"

Designate the acceleration/deceleration time. ................................. Page 66, "(5) Acceleration/deceleration time and speed control"

Confirm that the target position is reached. ...................................... Page 68, "(6) Confirming that the target position is reached"

Continuously move to next position without stopping at target posi-tion..................................................................................................... Page 65, "(4) Continuous movement"

Move linearly. ................................................................................... Page 62, "(2) Linear interpolation movement"

Move while drawing a circle or arc. ................................................... Page 63, "(3) Circular interpolation movement"

 Add a movement command to the process....................................... Page 221, " WTH (With)"

Specification of forward/backward movement of thehand

*1) The statement examples and program exam-ples are for a vertical 6-axis robot (e.g., RV-20A).The hand advance/retrace directionrelies on the Z axis direction (+/- direction) of

the tool coordinate set for each model.Refer to the tool coordinate system shown in"Confirmation of movement" in the separate"From Robot unit setup to maintenance", anddesignate the correct direction.

CAUTION

(1)

(2)

P1

(3)

(4) Turn output

  signal bit 17 ON.

(5)

(6)

 

m

m

P2

P3

Hand

:Movement position

:Robot movement

Robot movement

Page 81: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 81/457

4-62 MELFA-BASIC IV functions

4MELFA-BASIC IV 

(2) Linear interpolation movementThe end of the hand is moved with linear interpolation to the designated position.

*Command word

*Statement example

*Program example

•Program example

*Related functions

Commandword

Explanation

MVS The robot moves to the designated position with linear interpolation. It is possible to specify theinterpolation form using the TYPE instruction. An appended statement WTH or WTHIF can bedesignated.

Statement example Explanation

MVS P1 ' Moves to P1

MVS P1+P2 ' Moves to the position obtained by adding the P1 and P2 coordinate elements. Refer to Page 84.

MVS P1*P2 ' Moves to the position relatively converted from P1 to P2.

MVS P1, -50 *1) ' Moves from P1 to a position retracted 50mm in the hand direction.

MVS ,-50 *1) ' Moves from the current position to a position retracted 50mm in the hand direction.

MVS P1 WTH M_OUT(17)=1 ' Starts movement toward P1, and simultaneously turns output signal bit 17 ON.

MVS P1 WTHIF M_IN(20)=1, SKIP ' If the input signal bit 20 turns ON during movement to P1, the movement to P1 is stopped, andthe program proceeds to the next stop.

MVS P1 TYPE 0, 0 ' Moves to P1 with equivalent rotation

MVS P1 TYPE 9, 1 ' Moves to P1 with 3-axis orthogonal interpolation.

Program Explanation

10 MVS P1, -50 *1) ' (1) Moves with linear interpolation from P1 to a position retracted 50mm in the handdirection.

20 MVS P1 ' (2) Moves to P1 with linear interpolation.

30 MVS ,-50 *1) ' (3) Moves with linear interpolation from the current position (P1) to a position retracted50mm in the hand direction.

40 MVS P2, -100 WTH M_OUT(17)=1 *1)  (4) Output signal bit 17 is turned on at the same time as the robot starts moving.

50 MVS P2  (5) Moves with linear interpolation to P2.

60 MVS , -100 *1)  (6) Moves with linear interpolation from the current position (P2) to a position retracted50mm in the hand direction.

70 END ’Ends the program.

Function Explanation page

Designate the movement speed. .................................................................... Page 66, "(5) Acceleration/deceleration time andspeed control"

Designate the acceleration/deceleration time. ............................................... Page 66, "(5) Acceleration/deceleration time and speedcontrol"

Confirm that the target position is reached. ................................................... Page 68, "(6) Confirming that the target position is reached"

Continuously move to next position without stopping at target position. ......... Page 65, "(4) Continuous movement"

Move with joint interpolation. ........................................................................... Page 61, "(1) Joint interpolation movement"

Move while drawing a circle or arc. ................................................................. Page 63, "(3) Circular interpolation movement"

 Add a movement command to the process..................................................... Page 221, " WTH (With)"

Specification of forward/backward movement of thehand

*1) The statement examples and program exam-ples are for a vertical 6-axis robot (e.g., RV-20A).The hand advance/retrace directionrelies on the Z axis direction (+/- direction) ofthe tool coordinate set for each model.Refer to the tool coordinate system shown in"Confirmation of movement" in the separate"From Robot unit setup to maintenance", anddesignate the correct direction.

CAUTION

(1)

(2)

(3)

(4)Turn output

  signal bit 17 ON.

(5)

(6)

 

m

m

P1

P2

Hand

:Movement position

:Robot movement

Robot movement

Page 82: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 82/457

4MELFA-BASIC IV 

  MELFA-BASIC IV functions  4-63

(3) Circular interpolation movementThe robot moves along an arc designated with three points using three-dimensional circular interpolation.If the current position is separated from the start point when starting circular movement, the robot will moveto the start point with linear operation and then begin circular interpolation.

*Command word

*Statement example

*Program example

Commandword Explanation

MVR Designates the start point, transit point and end point, and moves the robot with circular interpolation inorder of the start point - transit point - end point. It is possible to specify the interpolation form using theTYPE instruction. An appended statement WTH or WTHIF can be designated.

MVR2 Designates the start point, end point and reference point, and moves the robot with circular interpolationfrom the start point - end point without passing through the reference point. It is possible to specify theinterpolation form using the TYPE instruction. An appended statement WTH or WTHIF can bedesignated.

MVR3 Designates the start point, end point and center point, and moves the robot with circular interpolation fromthe start point to the end point. The fan angle from the start point to the end point is 0 deg. < fan angle <180 deg. It is possible to specify the interpolation form using the TYPE instruction. An appended

statement WTH or WTHIF can be designated.MVC Designates the start point (end point), transit point 1 and transit point 2, and moves the robot with circular

interpolation in order of the start point - transit point 1 - transit point 2 - end point. An appended statementWTH or WTHIF can be designated.

Statement example Explanation

MVR P1, P2, P3................................. .............................. ' Moves with circular interpolation between P1 - P2 - P3.

MVR P1, P2, P3 WTH M_OUT (17) = 1.......................... ' Circular interpolation between P1 - P2 - P3 starts, and the output signal bit 17 turns ON.

MVR P1, P2, P3 WTHIF M_IN (20) = 1, SKIP................. ' If the input signal bit 20 turns ON during circular interpolation between P1 - P2 - P3,circular interpolation to P1 is stopped, and the program proceeds to the next step.

MVR P1, P2, P3 TYPE 0, 1.............................................. ' Moves with circular interpolation between P1 - P2 - P3.MVR2 P1, P3, P11 ..................................... ...................... ' Circular interpolation is carried out from P1 to P3 in the direction that P11 is not passed.

P11 is the reference point.

MVR3 P1, P3, P10..................................... ...................... ' Moves with circular interpolation from P1 to P3 in the direction with the smallest fanangle. P10 is the center point.

MVC P1, P2, P3................................. .............................. ' Moves with circular movement from P1 - P2 - P3 - P1.

(1)

(2)

(3)

(4)

(5)

P1

P2

P3

P4

P5

P7

P6

(Reference

 point)

P10

P9

P11

P8

(Center point)

Hand

:Movement position

:Robot movement

Turn output

signal bit 18

ON.

Robot movement

Page 83: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 83/457

4-64 MELFA-BASIC IV functions

4MELFA-BASIC IV 

•Program example

*Related functions

Program Explanation10 MVR P1, P2, P3 WTH M_OUT(18)

= 1' (1) Moves between P1 - P2 - P3 as an arc. The robot current position before movement is separated fromthe start point, so first the robot will move with linear operation to the start point. (P1) output signal bit 18turns ON simultaneously with the start of circular movement.

20 MVR P3, P4, P5 ' (2) Moves between P3 - P4 - P5 as an arc.

30 MVR2 P5, P7, P6 ' (3) Moves as an arc over the circumference on which the start point (P5), reference point (P6) and endpoint (P7) in the direction that the reference point is not passed between the start point and end point.

40 MVR3 P7, P9, P8 ' (4) Moves as an arc from the start point to the end point along the circumference on which the center point(P8), start point (P7) and end point (P9) are designated.

50 MVC P9, P10, P11 ' (5) Moves between P9 - P10 - P11 - P9 as an arc. The robot current position before movement isseparated from the start point, so first the robot will move with linear operation to the start point.(1 cycleoperation)

60 END ' Ends the program.

Function Explanation page

Designate the movement speed. .................................................................... Page 66, "(5) Acceleration/deceleration time and speedcontrol"

Designate the acceleration/deceleration time. ............................................... Page 66, "(5) Acceleration/deceleration time and speedcontrol"

Confirm that the target position is reached. ................................................... Page 68, "(6) Confirming that the target position is reached"

Continuously move to next position without stopping at target position. ......... Page 65, "(4) Continuous movement"

Move with joint interpolation. ........................................................................... Page 61, "(1) Joint interpolation movement"

Move linearly. .................................................................................................. Page 62, "(2) Linear interpolation movement"

 Add a movement command to the process..................................................... Page 221, " WTH (With)"

Page 84: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 84/457

4MELFA-BASIC IV 

  MELFA-BASIC IV functions  4-65

(4) Continuous movementThe robot continuously moves to multiple movement positions without stopping at each movement position.The start and end of the continuous movement are designated with the command statement. The speed canbe changed even during continuous movement.

*Command word

*Statement example

*Program example

•Program example

*Related functions

Command word ExplanationCNT Designates the start and end of the continuous movement.

Statement example Explanation

CNT 1............................................................................... Designates the start of the continuous movement.

CNT 1, 100, 200............................................................... Designates the start of the continuous movement, and designates that the start pointneighborhood distance is 100mm, and the end point neighborhood distance is 200mm.

CNT 0............................................................................... Designates the end of the continuous movement.

Program Explanation

10 MOV P1 ' (1) Moves with joint interpolation to P1.

20 CNT 1 ' Validates continuous movement. (Following movement is continuous movement.)

30 MVR P2, P3, P4 ' (2) Moves linearly to P2, and continuously moves to P4 with arc movement.

40 MVS P5 ' After arc movement, moves linearly to P5.50 CNT 1, 200, 100 ' (3) Sets the continuous movement's start point neighborhood distance to 200mm,

and the end point neighborhood distance to 100mm.

60 MVS P6 ' (4) After moving to previous P5, moves in succession linearly to P6.

70 MVS P1 ' (5) Continuously moves to P1 with linear movement.

80 CNT 0 ' Invalidates the continuous movement.

90 END ' Ends the program.

Function Explanation page

Designate the movement speed. ........................................................ Page 66, "(5) Acceleration/deceleration time and speed control"

Designate the acceleration/deceleration time. ................................... Page 66, "(5) Acceleration/deceleration time and speed control"

Confirm that the target position is reached. ....................................... Page 68, "(6) Confirming that the target position is reached"Move with joint interpolation................................................................ Page 61, "(1) Joint interpolation movement"

Move linearly. ...................................................................................... Page 62, "(2) Linear interpolation movement"

Move while drawing a circle or arc...................................................... Page 63, "(3) Circular interpolation movement"

Specification of forward/backward move-ment of the hand

*1) The statement examples and pro-gram examples are for a vertical 6-axisrobot (e.g., RV-20A).The handadvance/retrace direction relies onthe Z axis direction (+/- direction) ofthe tool coordinate set for eachmodel.Refer to the tool coordinate systemshown in "Confirmation of move-

ment" in the separate "From Robotunit setup to maintenance", anddesignate the correct direction.

CAUTION

(1)

(2)

(3)

(4)

(5)

Hand

:Movement position

:Robot movement

P1

P2

P3

P4 P5

The robot moves continuouslyfor less than the smaller distanceof either the proximity distancewhen moving toward P6 (200 mm)or the proximity distance to thestarting point of the path to P1(100 mm).

The robot moves continuously for less than the smaller distance of eitherthe proximity distance when moving toward P5 (default value) or the proximitydistance to the starting point of the path to P6 (200 mm).

Robot movement

Page 85: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 85/457

4-66 MELFA-BASIC IV functions

4MELFA-BASIC IV 

(5) Acceleration/deceleration time and speed controlThe percentage of the acceleration/deceleration in respect to the maximum acceleration/deceleration, andthe movement speed can be designated.

*Command word

*Statement example

*Movement speed during joint interpolationController (T/B) setting value x OVRD command setting value xJOVRD command setting value.

*Movement speed during linear and circular interpolationController (T/B) setting value x OVRD commandsetting value x SPD command setting value.

*Program example

Command word Explanation

 ACCEL Designates the acceleration during movement and the deceleration as a percentage (%) inrespect to the maximum acceleration/deceleration speed.

OVRD Designates the movement speed applied on the entire program as a percentage (%) in respectto the maximum speed.

JOVRD Designates the joint interpolation speed as a percentage (%) in respect to the maximum speed.

SPD Designate the linear and circular interpolation speed with the hand end speed (mm/s).

OADL This instruction specifies whether the optimum acceleration/deceleration function should beenabled or disabled.

Statement example Explanation

 ACCEL.......................................... .................................... Sets both the acceleration and deceleration to 100%.

 ACCEL 60, 80......................................................... .......... Sets the acceleration to 60% and the deceleration to 80%.(For maximum acceleration/deceleration is 0.2 sec. acceleration 0.2/0.6=0.33 sec.  deceleration 0.2/0.8=0.25 sec. )

OVRD 50 ...................................... .................................... Sets the joint interpolation, linear interpolation and circular interpolation to 50% of themaximum speed.

JOVRD 70 .................................... .................................... Set the joint interpolation operation to 70% of the maximum speed.

SPD 30 ................................... ..................................... ..... Sets the linear interpolation and circular interpolation speed to 30mm/s.

OADL ON .................................... ..................................... This instruction enables the optimum acceleration/deceleration function.

Specification of forward/backward movement of thehand

*1) The statement examples and program exam-ples are for a vertical 6-axis robot (e.g., RV-20A).The hand advance/retrace directionrelies on the Z axis direction (+/- direction) ofthe tool coordinate set for each model.Refer to the tool coordinate system shown in"Confirmation of movement" in the separate

"From Robot unit setup to maintenance", anddesignate the correct direction.

CAUTION

(1)・・・Maximum speed

(2)・・・・・Maximum speed

P1

(3)・・・50%

(4)・・・120mm/s

(5)・・・Maximum speed

(6)・・・70%

P3

Hand

:Movement position

:Robot movement

Robot movement

Page 86: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 86/457

4MELFA-BASIC IV 

  MELFA-BASIC IV functions  4-67

•Program example

*Related functions

Program Explanation10 OVRD 100 ' Sets the movement speed applied on the entire program to the maximum speed.

20 MVS P1 ' (1) Moves at maximum speed to P1.

30 MVS P2, -50 *1) ' (2) Moves at maximum speed from P2 to position retracted 50mm in hand direction.

40 OVRD 50 ' Sets the movement speed applied on the entire program to half of the maximum speed.

50 MVS P2 ' (3) Moves linearly to P2 with a speed half of the default speed.

60 SPD 120 ' Sets the end speed to 120mm/s. (Since the override is 50%, it actually moves at 60 mm/s.)

70 OVRD 100 ' Sets the movement speed percentage to 100% to obtain the actual end speed of 120mm/s.

80 ACCEL 70, 70 ' Sets the acceleration and deceleration to 70% of the maximum speed.

90 MVS P3 ' (4) Moves linearly to P3 with the end speed 120mm/s.

100 SPD M_NSPD ' Returns the end speed to the default value.

110 JOVRD 70 ' Sets the speed for joint interpolation to 70%.

120 ACCEL ' Returns both the acceleration and deceleration to the maximum speed.

130 MVS , -50 *1) ' (5) Moves linearly with the default speed for linear movement from the current position (P3) to a positionretracted 50mm in the hand direction.

140 MVS P1 ' (6) Moves to P1 at 70% of the maximum speed.

150 END ' Ends the program.

Function Explanation page

Move with joint interpolation............................................................................ Page 61, "(1) Joint interpolation movement"

Move linearly. .................................................................................................. Page 62, "(2) Linear interpolation movement"

Move while drawing a circle or arc.................................................................. Page 63, "(3) Circular interpolation movement"

Continuously move to next position without stopping at target position.......... Page 65, "(4) Continuous movement"

Page 87: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 87/457

4-68 MELFA-BASIC IV functions

4MELFA-BASIC IV 

(6) Confirming that the target position is reachedThe positioning finish conditions can be designated with as No. of pulses. (FINE instruction) This designa-tion is invalid when using continuous movement.

*Command word

*Statement example

*Program example

•Program example

*Related functions

Command word Explanation

FINE Designates the positioning finish conditions with a No. of pulses. Specify a small number ofpulses to allow more accurate positioning.

MOV and DLY After the MOV movement command, command the DLY instruction (timer) to completepositioning . (this is effective for belt-driven robots, e.g., RP-1AH, 3AH, and 5AH).

Statement example Explanation

FINE100 ................................. ........................................ .. Sets the positioning finish conditions to 100 pulses.

MOV P1............................................................................ Moves with joint interpolation to P1. (The movement completes at the command valuelevel.)

DLY 0.1............................................................................. Positioning after the movement instruction is performed by the timer.(this is effective for belt-driven robots, e.g., RP-1AH, 3AH, and 5AH).

Program Explanation

10 CNT 0 ' The FINE instruction is valid only when the CNT instruction is OFF.

20 MVS P1 ' (1) Moves with joint interpolation to P1.

30 MVS P2, -50 *1) ' (2) Moves with joint interpolation from P2 to position retracted 50mm in hand direction.

40 FINE 50 ' Sets positioning finish pulse to 50.

50 MVS P2 ' (3) Moves with linear interpolation to P2 

(MVS completes if the positioning complete pulse count is 50 or less.)

60 M_OUT(17)=1 ' (4) Turns output signal 17 ON when positioning finish pulse reaches 50 pulses.

70 FINE 1000 ' Sets positioning finish pulse to 1000.

80 MVS P3, -100 *1) ' (5) Moves linearly from P3 to position retracted 100mm in hand direction.90 MVS P3 ' (6) Moves with linear interpolation to P3.

100 DLY 0.1 ' Performs the positioning by the timer.

110 M_OUT(17)=0 ' (7) Turns output signal 17 off.

120 MVS , -100 *1) ' (8) Moves linearly from current position (P3) to position retracted 100mm in hand direction.

130 END ' Ends the program.

Function Explanation page

Move with joint interpolation. ........................................................................... Page 63, "(3) Circular interpolation movement"

Move linearly. .................................................................................................. Page 62, "(2) Linear interpolation movement"

Continuously move to next position without stopping at target position. ......... Page 65, "(4) Continuous movement"

(1)

(2)

(5)

P1

(3)

(6)

(8)

 

m

m

P2

Hand

:Movement position

:Robot movement

P3

(7) Turns output signal bit 17

OFF at finish of positioning to

P3.

(4) Turns output signal bit 17

ON at finish of positioning to

P2.

Specification of forward/backward movement of thehand

*1) The statement examples and program exam-ples are for a vertical 6-axis robot (e.g., RV-20A).The hand advance/retrace directionrelies on the Z axis direction (+/- direction) ofthe tool coordinate set for each model.Refer to the tool coordinate system shown in"Confirmation of movement" in the separate"From Robot unit setup to maintenance", anddesignate the correct direction.

Robot movement

Page 88: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 88/457

4MELFA-BASIC IV 

  MELFA-BASIC IV functions  4-69

(7) High path accuracy controlIt is possible to improve the motion path tracking when moving the robot. This function is limited to certaintypes of robot. Currently, the PREC instruction is available for vertical multi-joint type 5-axis and 6-axisrobots, RV-1A/ 2AJ, RV-2A/ 3AJ, RV-4A/ 5AJ/ 3AL/ 4AJL, RV-20A, RV-3S/ 3SJ/3SB/3SJB, RV-6S/ 6SL/12S/12SL and RV-18S series.

*Command word

*Statement example

*Program example

•Program example

The PREC instruction improves the tracking accuracy of the robot's hand tip, but low-ers the acceleration/deceleration of the robot movement, which means that the cycletime may become longer. The tracking accuracy will be further improved if the CNTinstruction is not included. However, the hand tip speed cannot be guaranteed in thiscase.

Command word Explanation

PREC This instruction specifies whether the high path accuracy mode should be enabled or disabled.

Statement example Explanation

PRECON Enables the high path accuracy mode.

PRECOFF Disables the high path accuracy mode.

Program Explanation

10 MOV P1, -50 *1) ' (1) Moves with joint interpolation from P1 to position retracted 50mm in hand direction.

20 OVRD 50 ' Sets the movement speed to half of the maximum speed.

30 MVS P1 ' (2) Moves with linear interpolation to P1.

40 PREC ON ' The high path accuracy mode is enabled.

50 MVS P2 ' (3) Moves the robot from P1 to P2 with high path accuracy.

60 MVS P3 ' (4) Moves the robot from P2 to P3 with high path accuracy.

70 MVS P4 ' (5) Moves the robot from P3 to P4 with high path accuracy.

80 MVS P1 ' (6) Moves the robot from P4 to P1 with high path accuracy.

90 PREC OFF ' The high path accuracy mode is ÇÑisableÇÑ.

100 MVS P1, -50 ' (7) Returns the robot to the position 50 mm behind P1 in the hand direction using linearinterpolation.

110 END ' Ends the program.

P1 P2

P3P4(1 )

(2 )

(3 )

(4 )

(5 )

(6 )(7 )

:Robot m ovem ent

Specification of forward/backward movement of thehand

*1) The statement examples and program exam-ples are for a vertical 6-axis robot (e.g., RV-20A).The hand advance/retrace directionrelies on the Z axis direction (+/- direction) ofthe tool coordinate set for each model.Refer to the tool coordinate system shown in"Confirmation of movement" in the separate"From Robot unit setup to maintenance", anddesignate the correct direction.

CAUTIONRobot movement

CAUTION

Page 89: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 89/457

4-70 MELFA-BASIC IV functions

4MELFA-BASIC IV 

(8) Hand and tool controlThe hand open/close state and tool shape can be designated.

*Command word

*Statement example

*Program example

•Program example

*Related functions

Command word Explanation

HOPEN Opens the designated hand.

HCLOSE Closes the designated hand.

TOOL Sets the shape of the tool being used, and sets the control point.

Statement example Explanation

HOPEN 1.......................................................................... Opens hand 1.

HOPEN 2.......................................................................... Opens hand 2.

HCLOSE 1........................................................................ Closes hand 1.

HCLOSE 2........................................................................ Closes hand 2.

TOOL (0, 0, 95, 0, 0, 0) Sets the robot control point to the position 95 mm from the flange plane in theextension direction.

Program Explanation10 TOOL(0, 0, 95, 0, 0, 0) ’Sets the hand length to 95 mm.

20 MVS P1, -50 *1) ’(1) Moves with joint interpolation from P1 to position retracted 50mm in hand direction.

30 OVRD 50 ’Sets the movement speed to half of the maximum speed.

40 MVS P1 ’(2) Moves with linear interpolation to P1. (Goes to grasp workpiece.)

50 DLY 0.5 ’ Wait for the 0.5 seconds for the completion of arrival to the target position.

60 HCLOSE 1 ’(3) Closes hand 1. (Grasps workpiece.)

70 DLY 0.5 ’Waits 0.5 seconds.

80 OVRD 100 ’Sets movement speed to maximum speed.

90 MVS , -50 *1) ’(4) Moves linearly from current position (P1) to position retracted 50mm in hand direction. (Lifts upworkpiece.)

100 MVS P2, -50 *1) ’(5) Moves with joint interpolation from P2 to position retracted 50mm in hand direction.

110 OVRD 50 ’Sets movement speed to half of the maximum speed.

120 MVS P2 ’(6) Moves with linear interpolation to P2. (Goes to place workpiece.)

130 DLY 0.5 ’ Wait for the 0.5 seconds for the completion of arrival to the target position.

140 HOPEN 1 ’(7) Opens hand 1. (Releases workpiece.)

150 DLY 0.5 ’Waits 0.5 seconds.

160 OVRD 100 ’ Sets movement speed to maximum speed.

170 MVS , -50 *1) ’(8) Moves linearly from current position (P2) to position retracted 50mm in hand direction.(Separates from workpiece.)

180 END ’Ends the program.

Function Explanation page

 Appended statement....................................................................................... Page 221, " WTH (With)"

(1)

(2)

(4)

(3) Grasps

  workpiece

(5)

(6)

(8)

(7) Releases

  workpiece

P2

Hand

 Workpiece

P1

:Movement position

:Robot movement

Specification of forward/backward movement of thehand

*1) The statement examples and program exam-ples are for a vertical 6-axis robot (e.g., RV-20A).The hand advance/retrace directionrelies on the Z axis direction (+/- direction) ofthe tool coordinate set for each model.Refer to the tool coordinate system shown in"Confirmation of movement" in the separate

"From Robot unit setup to maintenance", anddesignate the correct direction.

CAUTIONRobot movement

Page 90: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 90/457

4MELFA-BASIC IV 

  MELFA-BASIC IV functions  4-71

4.1.2 Pallet operationWhen carrying out operations with the workpieces neatly arranged (palletizing), or when removing work-pieces that are neatly arranged (depalletizing), the pallet function can be used to teach only the position ofthe reference workpiece, and obtain the other positions with operations.

*Command word

*Statement example

Note 1) The relation of the position designation and assignment direction is shown below

   Assignment direction = 1 (zigzag) Assignment direction = 2 (same direction) Assignment direction = 3 (arc pallet)

<About the posture of position data defining a pallet>The signs of the posture data (A, B, and C) at four points, the starting point, endpoint A, endpoint B, and thediagonal point, must match. In the case of a vertical multi-joint robot, if the mechanical interface plane(flange plane) is facing downward, the A, B, and C axis coordinates (especially the A and C axes) mayreach 180 degrees. In this case, the sign can be either + or -. Each position of the pallet is calculated fromthe position data of the starting point and endpoints; if the signs do not match, the hand rotates as a result.+180 and -180 result in the same position. Use + or - consistently when the signs are different, and performthis correction only when the values are exactly 180 degrees.

Command word ExplanationDEF PLT Defines the pallet to be used.

PLT Obtains the designated position on the pallet with operations.

Statement example Explanation

DEF PLT 1, P1, P2, P3, P4, 4, 3, 1 .................................. Defines to operate pallet No. 1 with a start point = P1, end point A = P2, end point B =P3 and diagonal point = P4, a total of 12 work positions (quantity A = 4, quantity B = 3),and an assignment direction = 1(Zigzag).

DEF PLT 2, P1, P2, P3, , 8, 5, 2... .................................... Defines to operate pallet No. 2 with a start point = P1, end point A = P2, and end pointB = P3, a total of 40 work positions (quantity A = 8, quantity B = 5), and an assignmentdirection = 2 (Same direction).

DEF PLT 3, P1, P2, P3, , 5, 1, 3... .................................... Define that pallet No. 3 is an arc pallet having give five work positions on an arcdesignated with start point = P1, transit point = P2, end point = P3 (total three points).

(PLT1, 5)........................................................................... Operate the 5th position on pallet No. 1.

(PLT1, M1)........................................................................ Operate position in pallet No. 1 indicated with the numeric variable M1.

12

 

7

 

6

 

1

11

8

5

2

10

 

9

 

4

 

3

End point B

Start point End point A

Diagonal point

Start point10

7

4

1

11

8

5

2

12

9

6

3

23

End point

Transit pointEnd point B Diagonal point

Start point End point A

Zigzag Same direction Arc pallet

Page 91: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 91/457

4-72 MELFA-BASIC IV functions

4MELFA-BASIC IV 

*Program example

•Program example

*Related functions

Program Explanation

10 DEF PLT 1, P2, P3, P4, P5, 3, 5, 2 ’GDefines the pallet. Pallet No. = 1, start point = P2, end point A = P3, end point B = P4,diagonal point = P5, quantity A = 3, quantity B = 5, assignment direction = 2 (Samedirection).

20 M1=1 ’GSubstitutes value 1 in numeric variable M1. (M1 is used as a counter.

30 *LOOP ’GDesignates label LOOP at the jump destination.

40 MOV P1, -50 *1) ’GMoves with joint interpolation from P1 to a position retracted 50mm in hand direction.

50 OVRD 50 ’GSets movement speed to half of the maximum speed.60 MVS P1 ’GMoves linearly to P1. (Goes to grasp workpiece.)

70 HCLOSE 1 ’GCloses hand 1. (Grasps workpiece.)

80 DLY 0.5 ’GWaits 0.5 seconds.

90 OVRD 100 ’GSets movement speed to maximum speed.

100 MVS , -50 *1) ’GMoves linearly from current position (P1) to a position retracted 50mm in handdirection. (Lifts up workpiece.)

110 P10=(PLT1,M1) ’GOperates the position in pallet No. 1 indicated by the numeric variable M1, andsubstitutes the results in P10.

120 MOV P10, -50 *1) ’GMoves with joint interpolation from P10 to a position retracted 50mm in hand direction.

130 OVRD 50 ’GSets movement speed to half of the maximum speed.

140 MVS P10 ’GMoves linearly to P10. (Goes to place workpiece.)

150 HOPEN 1 ’GOpens hand 1. (Places workpiece.)

160 DLY 0.5 ’GWaits 0.5 seconds.

170 OVRD 100 ’GSets movement speed to maximum speed.

180 MVS , -50 ’GMoves linearly from current position (P10) to a position retracted 50mm in handdirection. (Separates from workpiece.)

190 M1=M1+1 ’GIncrements numeric variable M1 by 1. (Advances the pallet counter.)

200 IF M1<=15 THEN *LOOP ’GIf numeric variable M1 value is less than 15, jumps to label LOOP and repeat process.If more than 15, goes to next step.

210 END ’GEnds the program.

Function Explanation pageSubstitute, operation .................................................................... Page 82, "4.1.6 Expressions and operations"

Condition branching ..................................................................... Page 73, "(1) Unconditional branching, conditional branching, waiting"

13

10

7

4

1

14

11

8

5

2

15

12

9

6

3

P1

(workpiece supply position)

Palletize

3 pcs.

P4

(End point B)

P2

(Start point)

P3

(End point A)

P5

(Diagonal point)

Assignment direction

  = 2(same direction)

Robot movement

Page 92: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 92/457

4MELFA-BASIC IV 

  MELFA-BASIC IV functions  4-73

4.1.3 Program controlThe program flow can be controlled with branching, interrupting, subroutine call, and stopping, etc.

(1) Unconditional branching, conditional branching, waitingThe flow of the program to a specified line can be set as unconditional or conditional branching.

*Command word

*Statement example

Command word Explanation

GOTO Jumps unconditionally to the designated line.

ON GOTO Jumps according to the value of the designated variable. The value conditions follow theinteger value order.

IF THEN ELSE(Instructions written in one

line)

Executes the command corresponding to the designated conditions.. The value conditionscan be designated randomly. There is only one type of condition per command statement.If the conditions are met, the instruction after THEN is executed. If the conditions are notmet, the instruction after ELSE is executed. They are written in one line.

IF THENELSE

END IF(Instructions written in

several lines)

Several lines can be processed according to the specified variables and specifiedconditions of the values. It is possible to specify any conditions for values. Only one typeof condition is allowed for one instruction. If the conditions are met, the lines following

THEN until the ELSE line are executed. If the conditions are not met, the lines after ELSEuntil END IF are executed.

Note) This function is available for controller version G1 or later.

SELECTCASE

END SELECT

Jumps according to the designated variable and the designated conditions of that value.The value conditions can be designated randomly. Multiple types of conditions can be designated per command statement.

WAIT Waits for the variable to reach the designated value.

Statement example Explanation

GOTO 200 Jumps unconditionally to line 200.

GOTO *FN Jumps unconditionally to the label FIN line.

ON M1 GOTO 100, 200, 300 If the numeric variable M1 value is 1, jumps to line 100, if 2 jumps to line 200, and if 3 jumps to line 300.If the value does not correspond, proceeds to next step.

IF M1=1 THEN 100 If the numeric variable M1 value is 1, branches to line 100. If not, proceeds to the next step.

IF M1=1 THEN 100 ELSE 200 If the numeric variable M1 value is 1, branches to line 100. If not, branches to line 200.

IF M1=1 THEN M2=1 M3=2ELSE M2=-1 M3=-2ENDIF

If the numerical variable of M1 is 1, the instructions M2 = 1 and M3 = 2 are executed. If the value of M1is different from 1, the instructions M2 = -1 and M3 = -2 are executed.

SELECT M1

 CASE 10  :  BRAKE CASE IS 11  :  BRAKE CASE IS <5  :  BRAKE CASE 6 TO 9  :  BRAKEDEFAULT

  :  BRAKEEND SELECT

Branches to the CASE statement corresponding to the value of numeric variable M1.

  If the value is 10, executes only between CASE 10 and the next CASE 11.

  If the value is 11, executes only between CASE 11 and the next CASE IS <5.

  If the value is smaller than 5, executes only between CASE IS <5 and next CASE 6 TO 9.

  If value is between 6 and 9, executes only between CASE 6 TO 9 and next DEFAULT.

  If value does not correspond to any of the above, executes only between DEFAULT and next ENDSELECT.Ends the SELECT CASE statement.

WAIT M_IN(1)=1 Waits for the input signal bit 1 to turn ON.

Page 93: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 93/457

4-74 MELFA-BASIC IV functions

4MELFA-BASIC IV 

*Related functions

Function Explanation page

Repetition........................................................................................... Page 75, "(2) Repetition"

Interrupt.............................................................................................. Page 76, "(3) Interrupt"

Subroutine.......................................................................................... Page 77, "(4) Subroutine"

External signal input........................................................................... Page 80, "(1) Input signals"

Page 94: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 94/457

4MELFA-BASIC IV 

  MELFA-BASIC IV functions  4-75

(2) RepetitionMultiple command statements can be repeatedly executed according to the designated conditions.

*Command word

*Statement example

*Related functions

Command word Explanation

FOR NEXT Repeat between FOR statement and NEXT statement until designated conditions are satisfied.

  WHILE WEND Repeat between WHILE statement and WEND statement while designated conditions aresatisfied.

Statement example Explanation

FOR M1=1 TO 10  :NEXT

Repeat between FOR statement and NEXT statement 10 times.The initial numeric variable M1 value is 1, and is incremented by one with eachrepetition.

FOR M1=0 TO 10 STEP 2  :NEXT

Repeat between FOR statement and NEXT statement 6 times.The initial numeric variable M1 value is 0, and is incremented by two with eachrepetition.

WHILE (M1 >= 1) AND (M1 <= 10)  :WEND

Repeat between WHILE statement and WEND statement while the value of the numericvariable M1 is 1 or more and less than 10.

Function Explanation page

Unconditional branching, branching................................................... Page 73, "(1) Unconditional branching, conditional branching,waiting"

Interrupt.............................................................................................. Page 76, "(3) Interrupt"

Input signal wait ................................................................................. Page 80, "(1) Input signals"

Page 95: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 95/457

4-76 MELFA-BASIC IV functions

4MELFA-BASIC IV 

(3) InterruptOnce the designated conditions are established, the command statement being executed can be interruptedand a designated line branched to.

*Command word

*Statement example

*Related functions

Command word Explanation

DEF ACT Defines the interrupt conditions and process for generating interrupt.

 ACT Designates the validity of the interrupt.

RETURN If a subroutine is called for the interrupt process, returns to the interrupt source line.

Statement example Explanation

DEF ACT 1, M_IN(10)=1 GOSUB 100 If input signal bit 10 is turned on for interrupt number 1, the subroutine on line 100 isdefined to be called after the robot decelerates and stops. The deceleration timedepends on the ACCEL and OVRD instructions.

DEF ACT 2, M_IN(11)=1 GOSUB 200, L If input signal bit 11 is turned on for interrupt number 2, the subroutine on line 200 isdefined to be called after the statement currently being executed is completed.

DEF ACT 3, M_IN(12)=1 GOSUB 300, S If input signal bit 12 is turned on for interrupt number 3, the subroutine on line 300 isdefined to be called after the robot decelerates and stops in the shortest time anddistance possible.

 ACT 1=1 Enables the priority No. 1 interrupt.

 ACT 2=0 Disables the priority No. 1 interrupt.

RETURN 0 Returns to the line where the interrupt occurred.

RETURN 1 Returns to the line following the line where the interrupt occurred.

Function Explanation page

Unconditional branching, branching ................................................... Page 73, "(1) Unconditional branching, conditional branching,waiting"

Subroutine.......................................................................................... Page 77, "(4) Subroutine"Communication .................................................................................. Page 81, "4.1.5 Communication"

Page 96: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 96/457

4MELFA-BASIC IV 

  MELFA-BASIC IV functions  4-77

(4) SubroutineSubroutine and subprograms can be used. By using this function, the program can be shared to reduce the No. of steps, and the program can be cre-ated in a hierarchical structure to make it easy to understand.

*Command word

*Statement example

*Related functions

Command word ExplanationGOSUB Calls the subroutine at the designated line or designated label.

ON GOSUB Calls the subroutine according to the designated variable number. The value conditions followthe integer value order. (1,2,3,4,.......)

RETURN Returns to the line following the line called with the GOSUB command.

CALLP Calls the designated program. The next line in the source program is returned to at the ENDstatement in the called program. Data can be transferred to the called program as an argument.

FPRM An argument is transferred with the program called with the CALLP command.

Statement example Explanation

GOSUB Calls the subroutine from line 100.

ON GOSUB Calls the subroutine from label GET.

ON M1 GOSUB 100, 200, 300 If the numeric variable M1 value is 1, calls the subroutine at line 100, if 2 calls the subroutine at line200, and if 3 calls the subroutine at line 300. If the value does not correspond, proceeds to nextstep.

RETURN Returns to the line following the line called with the GOSUB command.

CALLP "10" Calls the No. 10 program.

CALLP "20", M1, P1 Transfers the numeric variable M1 and position variable P1 to the No. 20 program, and calls theprogram.

FPRM M10, P10 Receives the numeric variable transferred with the CALLP in M10 of the subprogram, and the

position variable in P10.

Function Explanation page

Interrupt......................................................................................... Page 76, "(3) Interrupt"

Communication............................................................................. Page 81, "4.1.5 Communication"

Unconditional branching ............................................................... Page 73, "(1) Unconditional branching, conditional branching, waiting"

Page 97: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 97/457

4-78 MELFA-BASIC IV functions

4MELFA-BASIC IV 

(5) Timer The program can be delayed by the designated time, and the output signal can be output with pulses at adesignated time width.

*Command word

*Statement example

*Related functions

Command word Explanation

DLY Functions as a designated-time timer.

Statement example Explanation

DLY 0.05 Waits for only 0.05 seconds.

M_OUT(10)=1 DLY 0.5 Turns on output signal bit 10 for only 0.5 seconds.

Function Explanation pagePulse signal output............................................................................. Page 80, "(1) Input signals"

Page 98: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 98/457

4MELFA-BASIC IV 

  MELFA-BASIC IV functions  4-79

(6) StoppingThe program execution can be stopped. The moving robot will decelerate to a stop.

*Command word

*Statement example

*Related functions

Command word Explanation

HLT This instruction stops the robot and pauses the execution of the program. When the program is

started, it is executed from the next line.

END This instruction defines the end of one cycle of a program. In continuous operation, the programis executed again from the start line upon the execution of the END instruction. In cycleoperation, the program ends upon the execution of the END instruction when the cycle isstopped.

Statement example Explanation

HLT Interrupt execution of the program.

IF M_IN(20)=1 THEN HLT Pauses the program if input signal bit 20 is turned on.

MOV P1 WTHIF M_IN(18)=1, HLT Pauses the program if input signal bit 18 is turned on while moving toward P1.

END Terminates the program even in the middle of the execution.

Function Explanation page

 Appended statement.......................................................................... Page 221, " WTH (With)"

Page 99: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 99/457

4-80 MELFA-BASIC IV functions

4MELFA-BASIC IV 

4.1.4 Inputting and outputting external signalsThis section explains the general methods for signal control when controlling the robot via an externaldevice (e.g., PLC).

(1) Input signals

Signals can be retrieved from an external device, such as a programmable logic controller. 

The input signal is confirmed with a robot status variable (M_IN(), etc.) Refer to Page 106, "4.3.26 Robotstatus variables" for details on the robot status variables.

*Command word

*System variablesM_IN, M_INB, M_INW, M_DIN

*Statement example

*Related functions

(2) Output signalsSignals can be output to an external device, such as a programmable logic controller.

 

The signal is output with the robot status variable (M_OUT(), etc.). Refer to Page 106, "4.3.26 Robot statusvariables" for details on the robot status variables.

*Command word

*System variables

M_OUT, M_OUTB, M_OUTW, M_DOUT

*Statement example

*Related functions

Command word Explanation

WAIT Waits for the input signal to reach the designated state.

Statement example Explanation

WAIT M_IN(1)=1............................................................... Waits for the input signal bit 1 to turn ON.

M1=M_INB(20) ................................... .............................. Substitutes the input signal bit 20 to 27, as an 8-bit state, in numeric variable M1.

M1=M_INW(5) .................................... .............................. Substitutes the input signal bit 5 to 20, as an 16-bit state, in numeric variable M1.

Function Explanation page

Signal output ................................................................................ Page 80, "(2) Output signals"

Branching with input signal .......................................................... Page 73, "(1) Unconditional branching, conditional branching, waiting"

Interrupting with input signal ........................................................ Page 76, "(3) Interrupt"

Command word Explanation

CLR Clears the general-purpose output signal according to the output signal reset pattern in theparameter.

Statement example Explanation

CLR 1 Clears based on the output reset pattern.

M_OUT(1)=1 Turns the output signal bit 1 ON.

M_OUTB (8)=0 Turns the 8 bits, from output signal bit 8 to 15, OFF.

M_OUTW (20)=0 Turns the 16 bits, from output signal bit 20 to 35, OFF.

M_OUT(1)=1 DLY 0.5 Turns the output signal bit 1 ON for 0.5 seconds. (Pulse output)

M_OUTB (10)=&H0F Turns the 4 bits, from output signal bit 10 to 13 ON, and turns the four bits from 14 to 17 OFF.

Function Explanation page

Signal input ........................................................................................ Page 80, "(1) Input signals"

Timer .................................................................................................. Page 78, "(5) Timer"

Page 100: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 100/457

4MELFA-BASIC IV 

  MELFA-BASIC IV functions  4-81

4.1.5 CommunicationData can be exchanged with an external device, such as a personal computer.

*Command word

*Statement example

*Related functions

Command word Explanation

OPEN Opens the communication line.

CLOSE Closes the communication line.

PRINT# Outputs the data in the ASCII format. CR is output as the end code.

INPUT# Inputs the data in the ASCII format. The end code is CR.

ON COM GOSUBDefines the subroutine to be called when an interrupt is generated from the communication line.The interrupt is generated when data is input from an external device.

COM ON Enables the interrupt process from the communication line.

COM OFF Disables the interrupt process from the communication line. The interrupt will be invalid even if itoccurs.

COM STOP Stops the interrupt process from the communication line. If there is an interrupt, it is saved, andis executed after enabled.

Statement example Explanation

OPEN "COM1:" AS #1 Opens the communication line COM1 as file No. 1.

CLOSE #1 Closes file No. 1.

CLOSE Closes all files that are open.

PRINT#1,"TEST" Outputs the character string "TEST" to file No. 1.

PRINT#2,"M1=";M1 Output the character string "M1=" and then the M1 value to file No. 2.Output data example: "M1 = 1" + CR (When M1 value is 1)

PRINT#3,P1 Outputs the position variable P1 coordinate value to file No. 3.Output data example: "(123.7, 238.9, 33.1, 19.3, 0, 0)(1, 0)" +CR

(When X = 123.7, Y=238.9, Z=33.1, A=19.3, B=0, C=0, FL1=1, FL2=0)PRINT#1,M5,P5 Outputs the numeric variable M5 value and position variable coordinate value to file No. 1.

M5 and P5 are separated with a comma (hexadecimal, 2C).Output data example: "8, (123.7, 238.9, 33.1, 19.3, 0, 0)(1, 0)"+CR(When M5=8, P5 X=123.7, Y=238.9, Z=33.1, A=19.3, B=0, C=0, FL1=1, FL2=0)

INPUT#1,M3 Converts the input data into a value, and substitutes it in numeric variable M3.Input data example: "8" + CR (when value 8 is to be substituted)

INPUT#1,P10 Converts the input data into a value, and substitutes it in position variable P10.Input data example: "8, (123.7, 238.9, 33.1, 19.3, 0, 0)(1, 0)"+CR(P5 will be X= 123.7, Y=238.9, Z=33.1, A=19.3, B=0, C=0, FL1=1, FL2=0)

INPUT#1,M8,P6 Converts the first data input into a value, and substitutes it in numeric variable M8. Converts the datafollowing the command into a coordinate value, and substitutes it in position variable P6. M8 and P6 areseparated with a comma (hexadecimal, 2C)Input data example: "7,(123.7, 238.9, 33.1, 19.3, 0, 0)(1, 0)"+CR

(The data will be M8 = 7, P6 X=123.7, Y=238.9, Z=33.1, A=19.3, B=0, C=0, FL1=1, FL2=0)ON COM(1) GOSUB 300 Defines to call line 300 subroutine when data is input in communication line COM1.

ON COM(2) GOSUB *RECV Defines to call subroutine at label RECV line when data is input in communication line COM2.

COM(1) ON Enables the interrupt from communication line COM1.

COM(2) OFF Disables (prohibits) the interrupt from communication line COM2.

COM(1) STOP Stops (holds) the interrupt from communication line COM1.

Function Explanation page

Subroutine.......................................................................................... Page 77, "(4) Subroutine"

Interrupt.............................................................................................. Page 76, "(3) Interrupt"

Page 101: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 101/457

4-82 MELFA-BASIC IV functions

4MELFA-BASIC IV 

4.1.6 Expressions and operationsThe following table shows the operators that can be used, their meanings, and statement examples.

(1) List of operator 

Class Operator  Meaning Statement example

Substituti

on

= The right side is

substituted in the leftside.

P1=P2

P5=P_CURRP10.Z=100.0M1=1STS$="OK"

’Substitute P2 in position variable P1.

’Substitute the current coordinate value in current position variable P5.’Set the position variable P10 Z coordinate value to 100.0.’Substitute value 1 in numeric variable M1.’Substitute the character string OK in the character string variableSTS$.

Numericvalueoperation

+ Add P10=P1+P2MOV P8+P9M1=M1+1STS$="ERR"+"001"

’GSubstitute the results obtained by adding the P1 and P2 coordinateelements to position variable P10.’Move to the position obtained by adding the position variable P8 andP9 coordinate elements.’Add 1 to the numeric variable M1.’Add the character string 001 to the character string ERR andsubstitute in character string variable STS$.

- Subtract P10=P1-P2MOV P8-P9M1=M1-1

’Substitute the results obtained by subtracting the P2 coordinateelement from P1 in position variable P10.’ Move to the position obtained by subtracting the P9 coordinateelement from the position variable P8.’Subtract 1 from the numeric variable M1.

* Multiply P1=P10*P3M1=M1*5

’Substitute the relative conversion results from P10 to P3 in positionvariable P1.’Multiple the numeric variable M1 value by 5.

/ Divide P1=P10/P3M1=M1/2

’Substitute the reverse relative conversion results from P10 to P3 inposition variable P1.’Divide the numeric variable M1 value by 2.

^ Exponential operation M1=M1^2 ’Square the numeric variable M1 value.

\ Integer division M1=M1\3 ’Divide the numeric variable M1 value by 3 and make an integer(round down).

MOD Remainder operation M1=M1 MOD 3 ’Divide the numeric variable M1 value by 3 and leave redundant.

- Sign reversal P1=-P1M1=-M1

’Reverse the sign for each coordinate element in position variable P1.’Reverse the sign for the numeric variable M1 value.

Comparisonoperation

= Compare whetherequal

IF M1=1 THEN 200IF STS$="OK" THEN 100

’Branch to line 200 if numeric variable M1 value is 1.’Branch to line 100 if character string in character string variable STS$ isOK.

<>or ><

Compare whether notequal

IF M1<>2 THEN 300IF STS$<>"OK" THEN 100

’Branch to line 300 if numeric variable M1 value is 2.’Branch to line 900 if character string in character string variable STS$is not OK.

< Compare whether

smaller 

IF M1< 10 THEN 300

IF LEN(STS$)<3 THEN 100

’Branch to line 300 if numeric variable M1 value is less than 10.

’Branch to line 100 if No. of characters in character string STS$variable is less than 3.

> Compare whetherlarger 

IF M1>9 THEN 200IF LEN(STS$)>2 THEN 300

’Branch to line 200 if numeric variable M1 value is more than 9.’Branch to line 300 if No. of characters in character string variableSTS$ is more than 2.

=<or <=

Compare whetherequal to or less than

IF M1<=10 THEN 200IF LEN(STS$)<=5 THEN 300

’Branch to line 200 if numeric variable M1 value is equal to or less than10.’Branch to line 300 if No. of characters in character string variableSTS$ is equal to or less then 5.

=>or >=

Compare whetherequal to or more than

IF M1=>11 THEN 200IF LEN(STS$)>=6 THEN 300

’Branch to line 200 if numeric variable M1 value is equal to or morethan 11.’Branch to line 300 if No. of characters in character string variableSTS$ is equal to or more than 6.

Page 102: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 102/457

4MELFA-BASIC IV 

  MELFA-BASIC IV functions  4-83

Note1) Please refer to Page 84, "Relative calculation of position data (multiplication)". 

Note2) Please refer to Page 84, "Relative calculation of position data (Addition)".

Logicaloperation

 AND Logical AND operation M1=M_INB(1) AND &H0F ’Convert the input signal bit 1 to 4 status and substitute in numericvariable M1. (Input signal bits 5 to 8 remain OFF.)

OR Logical OR operation M_OUTB(20)=M1 OR &H80 ’Output the numeric variable M1 value to output signal bit 20 to 27.Output bit signal 27 is always ON at this time.

NOT NOT operation M1=NOT M_INW(1) ’Reverse the status of input signal bit 1 to 16 to create a value, andsubstitute in numeric variable M1.

XOR Exclusive ORoperation

N2=M1 XOR M_INW(1) ’Obtain the exclusive OR of the states of M1 and the input signal bits 1to 16, convert into a value and substitute in numeric variable M2.

<< Logical left shiftoperation

M1=M1<<2 ’Shift numeric variable M1 two bits to the left.

>> Logical right shiftoperation.

M1=M1>>1 ’Shift numeric variable M1 bit to the right.

Class Operator  Meaning Statement example

Page 103: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 103/457

4-84 MELFA-BASIC IV functions

4MELFA-BASIC IV 

(2) Relative calculation of position data (multiplication)Numerical variables are calculated by the usual four arithmetic operations. The calculation of position vari-ables involves coordinate conversions, however, not just the four basic arithmetic operations. This isexplained using simple examples.

 An example of relative calculation (multiplication)10 P2=(10,5,0,0,0,0)(0,0)20 P100=P1*P230 MOV P140 MVS P100P1=(200,150,100,0,0,45)(4,0)

In this example, the hand tip is moved relatively within theP1 tool coordinate system at teaching position P1. Thevalues of the X and Y coordinates of P2 become theamount of movement within the tool coordinate system.The relative calculation is given by multiplication of the Pvariables. Be aware that the result becomes different if theorder of multiplication is different. The variable that speci-fies the amount of relative movement (P2) should beentered lastly. If the posture axis parts of P2 (A, B, and C) are 0, the pos-ture of P1 is used as is. If there are non-zero values avail-able, the new posture is determined by rotating the handaround the Z, Y, and X axes (in the order of C, B, and A)relative to the posture of P1. Multiplication corresponds toaddition within the tool coordinate system, while divisioncorresponds to subtraction within the tool coordinate sys-tem.

(3) Relative calculation of position data (Addition) An example of relative calculation(Addition)10 P2=(5,10,0,0,0,0)(0,0)20 P100=P1+P230 MOV P140 MVS P100P1=(200,150,100,0,0,45)(4,0)

In this example, the hand is moved relatively within therobot coordinate system at teaching position P1. The val-ues of the X and Y coordinates of P2 become the amountof movement within the robot coordinate system. The rela-tive calculation is given by addition of the P variables.If a value is entered for the C-axis coordinate of P2, it ispossible to change the C-axis coordinate of P100. Theresulting value will be the sum of the C-axis coordinate ofP1 and the C-axis coordinate of P2.

CAUTION)In the example above, the explanation is made in two dimensions for the sake of simplicity. In actuality, thecalculation is made in three dimensions. In addition, the tool coordinate system changes depending on theposture.

X

X1

Y1P1 

5mm

10mmP100 

Mu ltiplication between P variables(relative calcul ation in the tool coordina te system)

Tool coordin ate system at P1

Robot coord inate system

X

Y

P1

P100

 

10mm

5mm

Addition of P variables(relative calculation in the robot coordina te system )

Robot coordinate system

Page 104: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 104/457

4MELFA-BASIC IV 

  MELFA-BASIC IV functions  4-85

4.1.7 Appended statement A process can be added to a movement command.*Appended statement

*Statement example

*Related functions

 Appended statement Explanation

WTH Unconditionally adds a process to the movement command.

WTHIF Conditionally adds a process to the movement command.

Statement example Explanation

MOV P1 WTH M_OUT(20)=1........................................... Turns output signal bit 20 ON simultaneously with the start of movement to P1.

MOV P1 WITHIF M_IN(20)=1, HLT........................ .......... Stops if the input signal bit 20 turns ON during movement to P1.

MOV P1 WTHIF M_IN(19)=1, SKIP ................................. Stops movement to P1 if the input signal bit 19 turns ON during movement to P1, andthen proceeds to the next step.

Function Explanation page

Joint interpolation movement ............................................................. Page 61, "(1) Joint interpolation movement"

Linear interpolation movement........................................................... Page 62, "(2) Linear interpolation movement"

Circular interpolation movement ........................................................ Page 63, "(3) Circular interpolation movement"

Stopping............................................................................................. Page 79, "(6) Stopping"

Page 105: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 105/457

4-86 Multitask function

4MELFA-BASIC IV 

4.2 Multitask function4.2.1 What is multitasking?

The multitask function is explained in this section. 

Multitasking is a function that runs several programs as parallel, to shorten the tact time and enable controlof peripheral devices with the robot program.

 

Multitasking is executed by placing the programs, to be run in parallel, in the items called "slots" (There is atotal of 32 task slots. The maximum factory default setting is 8.) .

The execution of multitask operation is started by activating it from the operation panel or by a dedicatedinput signal, or by executing an instruction related to multitask operation. 

The execution environment for multitasking is shown in Fig. 4-1.

Fig.4-1:Multitask slot environment

 

User base program

Multitask slot environment

External variables, user-defined external variables

Slot 1

XRUNXLOADXRSTXSTP

:::::   P  r  o  g  r  a  m

Slot 2 Slot n

   P  r  o  g  r  a  m

   P  r  o  g  r  a  m

XCLR

Execution of a program A program is executed by placing it in an item called a "slot" and running it. For example, when runningone program (when normally selecting and running the program with the controller's operation panel), thecontroller system unconditionally places the program selected with the operation panel in slot 1.

Page 106: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 106/457

4MELFA-BASIC IV 

Multitask function  4-87

4.2.2 Executing a multitaskTable 4-2:The multitask can be executed with the following three methods.

4.2.3 Operation state of each slotThe operation state of each slot changes as shown in Fig. 4-2 according to the operations and commands.Each state can be confirmed with the robot status variable or external output signal. 

Fig.4-2:Operation state of each slot

Types of execution Explanation

1 Execution from a program This method starts parallel operation of the programs from a randomposition in the program using a MELFA-BASIC IV command. The pro-grams to be run in parallel can be designated, and a program running inparallel can be stopped.This method is effective when selecting the programs to be run in paral-lel according to the program flow.The related commands include the XLOAD, XRUN, XSTP and XRSTcommands. Refer to "4.11 Detailed explanation of command words" onpage 118 in this manual for details.

2 Execution from controlleroperation panel or externalinput/output signa

In this execution type, depending on the setting of the information of the"SLT*" parameter, the start operation starts concurrent execution or con-stant concurrent execution, or starts concurrent execution at error occur-rence. It is necessary to set the "SLT*" parameter in advance.

This method does not rely on the program flow, and is effective for carry-ing out simultaneous execution with a preset format, or for sequentialexecution.

3 Executing automaticallywhen the power is turnedon

It is possible to start constant execution immediately after turning thecontroller's power on. If ALWAYS is specified for the start condition ofthe SLT* parameter, the program is executed in constant executionmode immediately after the controller's power is turned on.This eliminates the trouble of starting the programs in task slots used formonitoring input/output signals from the PLC side.In addition, it is possible to execute a program from within another pro-gram that controls movement continuously. In this case, set the value ofthe "ALWENA" parameter to 7 in order to execute X** instructions such

as XRUN and XLOAD, the SERVO instruction, and the RESET instruc-tion.

Programselection state

(PSA)

Waiting(WAI)

Start

XRUN

Program reset

XRST

XRUN

Cycle stop

Stop

XSTP

Running(RUN)

Start

Page 107: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 107/457

4-88 Multitask function

4MELFA-BASIC IV 

<About parameters related to task slots>The parameters SLT1 to SLT32 contain information about the name of the program to be executed, operationmode, start condition, and priority for each of the 32 task slots (set to 8 slots at the factory default setting). Please refer to "5 Functions set with parameters" on page 306 for details.

*Designation formatParameter name = 1. program name, 2. operation format, 3. starting conditions, 4. order of priority

*Various setting values and meanings

*Setting example An example of the parameter settings for designating the following items in slot 2 is shown below.Designation details) Program name : 5

Operation format : Continuous operation

Starting conditions : AlwaysOrder of priority : 10SLT2=5, REP, ALWAYS, 10

Item of parameter Default value Setting value Explanation

1. Program name SLT1: Programselected on theoperation panel.SLT2 to 32: Nameof the program tobe specified with aparameter.

Possible to set a registeredprogram

Use the parameter to specify the execution of predeter-mined programs in multitask operation. If the programs tobe executed vary depending on conditions, it is possible tospecify the program using the XLOAD and XRUN instruc-tions in another program. The programs selected on theoperation panel are set if SLT1 is specified.

2. Operat ion format REP REP : Continuous operation If REP is specified, the program is executed again f rom thetop after the program ends when the final line of the pro-

gram is reached, or by execution of the END instruction.CYC : One cycle operation If CYC is specified, the program ends after being executedfor one cycle and the selected status is canceled. Changethe SLOTON setting of the parameter if it is desired to keepthe program in the selected status. Please refer to the sec-tion for SLOTON in "5 Functions set with parameters" onpage 306 for details.

 3. Starting conditions START START : Execution of a pro-gram using the START but-ton on the operation panelor the I/O START signal

Select START when it is desired to start normally. Note1)

Note1) The start operation conducted from the operation panel or by sending the dedicated input signalSTART will start the execution of programs of all the task slots whose start conditions are set to"START" at the same time.

 

To start the program independently, start in slot units with the dedicated input signal (S1 START toS32START). In this case, the line No. is preassigned to the same dedicated input/output parameter.Refer to "6.3 Dedicated input/output" on page 371 in this manual for details on the assignment of thededicated input/output.

 ALWAYS : Execution of aprogram when the control-ler's power is turned on

Use ALWAYS when it is desired to execute the program inconstant execution mode. Note, however, that it is not pos-sible to execute movement instructions such as MOV dur-ing constant execution of a program. Programs in constantexecution mode can be stopped via the XSTP instruction.

They cannot be stopped via the operation panel and exter-nal input signals, or emergency stop. The operation mode(REP/CYC) is ignored.

ERROR : Execution of aprogram when the controlleris in error status

Specify ERROR when it is desired to execute a program incase an error occurs. It is not possible to execute instruc-tions for moving the robot, such as the MOV instruction.The operation mode (REP/CYC) is one-cycle operation(CYC) regardless of the setting value.

4. Order of priority(number of lines exe-cuted in priority)

1 1 to 31: Number of linesexecuted at one time at mul-titask operation

If this number is increased, the number of lines executed atone time for the task slot is increased. For example, if 10 isspecified for SLT1, 5 for SLT2, and 1 for SLT3, then after 10lines of the program specified in SLT1 have been executed,five lines of the program specified in SLT2 are executed,and then one line of the program specified in SLT3 is exe-cuted. Afterward this cycle will be repeated.

Page 108: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 108/457

4MELFA-BASIC IV 

Multitask function  4-89

4.2.4 Precautions for creating multitask program(1) Relationship between number of tasks and processing time

During multitask operation, it appears as if several robot programs are being processed concurrently. How-ever, in reality, only one line is executed at any one time, and the processing switches from program to pro-gram (it is possible to change the number of lines being executed at a time. See the section for the "SLTn"parameter in "Setting Functions by Parameters" on page 247). This means that if the number of tasksincreases, the overall program execution time becomes longer. Therefore, when using multitask operation,the number of tasks should be kept to a minimum. However, programs of other tasks executing movementinstructions (the MOV and MVS instructions) are processed at any time.

(2) Specification of the maximum number of programs executed concurrentlyThe number of programs to be run in parallel is set with parameter TASKMAX. (The default value is 8.) Torun more than 8 programs in parallel, change this parameter.

(3) How to pass data between programs via external variablesData is passed between programs being executed in multitask operation via program external variablessuch as M_00 and P_00 (refer to "4.3.22 External variables" on page 104) and the user-defined externalvariables (refer to "4.3.24 User-defined external variables" on page 105). An example is shown below. Inthis example, the on/off status of input signal 8 is judged by the program specified in task slot 2. Then thisprogram notifies the program specified in task slot 1 that the signal is turned on by means of the external

variable M_00.

(4) Confirmation of operating status of programs via robot status variablesThe status of the program running with multitask can be referred to from any slot using the robot status vari-ables (M_RUN, M_WAI, M-ERR).

 Example) M1 = M_RUN (2) The operation status of slot 2 is obtained.Refer to "4.3.26 Robot status variables" on page 106 for details on the robot status variables.

(5) The program that operates the robot is basically executed in slot 1.The program that describes the robot arm's movement, such as with the MOV commands, is basically setand executed in slot 1. To run the program in a slot other than slot 1, the robot arm acquisition and releasecommand (GETM, RELM) must be used. Refer to "4.11 Detailed explanation of command words" on page118 in this manual for details on the commands.

(6) How to perform the initialization processing via constantly executed programsPrograms specified in task slots whose start condition is set to ALWAYS are executed continuously even ifthe operation mode is set to CYC. Therefore, in order to perform the initialization processing, they should be

programmed in such a way that the initialization processing is not executed more than once by jumpingwithin the program using the GOTO instruction, etc.

<Slot 1>10 M_00=0 ; Substitute 0 in M_0020 IF M_00=0 THEN 20 ; Wait for M_00 value to change from 0.30 M_00=0 ; Substitute 0 in M_0040 MOV P1 ; Proceed with the target work.50 MOV P2  :100 GOTO 20 ; Repeat from line 20.

<Slot 2> (Program of signals and variables)10 IF M_IN(8) <> 1 THEN 30 ; Branch to line 30 if input signal 8 is not ON.20 M_00=1 ; Substitute 1 in M_0030 MOV P1 ; Proceed with the target work.

  :

Page 109: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 109/457

4-90 Multitask function

4MELFA-BASIC IV 

 

4.2.5 Precautions for using a multitask program(1) Starting the multitask

When starting from the operation panel or with the dedicated input signal START, the programs in all slotsfor which the "start request execution" is set in the slot parameter start conditions will start simultaneously.When starting with the dedicated input signals S1START to S32START, the program can be started in eachslot. In this case, the line No. is preassigned to the same dedicated input/output parameter. Refer to "6.3Dedicated input/output" on page 371 for details on the assignment of the dedicated input/output.

(2) Display of operation statusThe LEDs of the [START] and [STOP] switches on the operation panel and the dedicated input/output sig-nals START and STOP display the operation conditions of programs specified in task slots for which thestart conditions are set to "START" in the corresponding "SLT*" parameter. If at least one program is operat-ing, the LED of the [START] switch lights up and the dedicated output signal START turns on. If all the pro-grams stop, the LED of the [STOP] switch is lit and the dedicated output signal STOP turns on.The dedicated output signals S1START to S32START and S1STOP to S32STOP output the operation sta-tus for each of the task slots. If it is necessary to know the individual operation status, signal numbers canbe assigned to the dedicated input/output parameters and their status checked with the status of the exter-nal signals.For a detailed description of assignment of dedicated input/output, please refer to "6.3 Dedicated input/out-put" on page 371 of this manual.The status of programs whose start condition is set to ALWAYS or ERROR does not affect the LEDs of the

[START] and [STOP] switches. The operation status of programs in constant execution mode can bechecked using the monitoring tool of the PC support software (optional).

Mechanism 1 is assigned to slot 1In the default state, mechanism 1 (robot arm of standard system) is automatically assigned to slot 1. Because of this, slot 1 can execute the movement command even without acquiring mechanism 1 (with-out executing GETM command). However, when executing the movement command in a slot other thanslot 1, the slot 1 mechanism acquisition state must be released (RELM command executed), and the

mechanism must be acquired with the slot that is to execute the movement command (execute the GETMcommand).

Page 110: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 110/457

4MELFA-BASIC IV 

Multitask function  4-91

4.2.6 Example of using multitask An example of the multitask execution is given in this section.

(1) Robot work details.The robot programs are the "movement program" and "position data lead-in program".The "movement program" is executed with slot 1, and the "position data lead-in program" is executed with

slot 2. If a start command is output to the sensor while the robot is moving, a request for data will be made tothe personal computer via the position data lead-in program. The personal computer sends the position datato the robot based on the data request. The robot side leads in the compensation data via the position datalead-in program.

<Process flow>

P1: Workpiece pickup position (Vacuum timer DLY 0.05)P2: Workpiece placing position (Release timer DLY 0.05)P3: Vision pre-position (Do not stop at penetration point CNT)P4: Vision shutter position (Do not stop at penetration point CNT)P_01: Vision compensation dataP20: Position obtained by adding P2 to vision compensation data (relative operation) 

Workpiece pickup

Sensor start

Sensor recognition

Workpiece mounting

Operation programPosition data lead

-in program

Data confirmation

Start

Sensor start

Personal computer

Position datasetting

Data reception

Background execution

P1

P4

P2

P20

RS-232C

StartStart

Data reception

Data reception

Position datatransmission

Above mountingposition

<Slot1> <Slot2> <Sensor>

P1

X

Y

0

P2

P3 :No acceleration/deceleration

P4 : No acceleration/decelerationPosition to move vision

Page 111: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 111/457

4-92 Multitask function

4MELFA-BASIC IV 

(2) Procedures to multitask execution

*Procedure 1: Program creation<1> Movement program (Program name: 1)100 CNT 1 'Validate path connected movement110 MOV P2,10 'Move to +10mm above P2120 MOV P1,10 'Move to +10mm above P1130 MOV P1 'Move to P1 workpiece pickup position135 M_OUT(10)=0 'Pickup workpiece140 DLY 0.05 'Timer 0.05 second150 MOV P1,10 'Move to +10mm above P1160 MOV P3 'Move to vision pre-position P3165 SPD 500 'Set linear speed to 500mm/sec.170 MVS P4 'Start vision lead-in with P4 passage180 M_02#=0 'Start data lead-in with background process at interlock variable

(M_01=1/M_02=0)190 M_01#=1 'Start data load-in with background process

200 MVS P2,10 'Move to +10mm above P2210 IF M_02#=0 THEN GOTO 210 'Wait for interlock variable M_02 to reach 1220 P20=P2*P_01 'Add vision compensation P_01 to P20, and move to +10mm above230 MOV P20,10 'Move to +10mm above P20240 MOV P20 'Go to P20 workpiece placing position245 M_OUT(10)=1 'Place workpiece250 DLY 0.05 'Timer 0.05 second260 MOV P20,10 'Move to +10mm above P20270 CNT 0 'Invalidate path connected movement280 END 'End one cycle

<2> Position data lead-in program (Program name: 2)

100 IF M_01#=0 THEN GOTO 100 'Wait for interlock variable M_01 to reach 1105 OPEN "COM1:" AS #1 'Open RS-232-C line110 DLY M_03# 'Hypothetical process timer (0.05 second)115 PRINT #1,"SENS" 'Transmit character string "SENS" to RS-232-C (vision side)117 INPUT #1,M1,M2,M3 'Wait to lead-in vision compensation value (relative data)120 P_01.X=M1 'Substitute delta X coordinate130 P_01.Y=M2 'Substitute delta Y coordinate140 P_01.Z=0.0 '150 P_01.A=0.0 '160 P_01.B=0.0 '170 P_01.C=RAD(M3) 'Substitute delta C coordinate175 CLOSE 'Close RS-232-C line180 M_01#=0 'Interlock variable M_01 = 0190 M_02#=1 'Interlock variable M_02 = 0200 END 'End process

*Procedure 2: Setting the slot parametersSet the slot parameters as shown below.

*Procedure 3: Reflecting the slot parameters

 Turn the power OFF and ON to validate the slot parameters.

*Procedure 4: Starting Start the program 1 and program 2 operation by starting from the operation panel.

Parameters Program name Operation mode Operation format Number of executed lines

SLT1 1 REP START 1

SLT2 2 REP START 1

Page 112: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 112/457

  4MELFA-BASIC IV 

  Detailed specifications of MELFA-BASIC IV   4-93

4.3 Detailed specifications of MELFA-BASIC IVIn this section, detailed explanations of the MELFA-BASIC IV format and syntax such as configuration aregiven, as well as details on the functions of each command word. The following explains the componentsthat constitute a statement.

(1) Program name A program name can be specified using up to 12 characters. However, the operation panel display can dis-play only up to four characters; it is therefore recommended to specify the program name using up to fourcharacters. Moreover, the characters that may be used are as follows.

If a program name is specified using more than four characters, the program cannot be selected from theoperation panel. In addition, if it is desired to use an external output signal to select a program to be exe-cuted, the program name should be specified using the numbers. If a program is executed as a sub-pro-

gram via the CALLP instruction, more than four alphabetic characters may be used. However, suchprograms may not be selected from the operation panel.

(2) Command statementExample of constructing a statement  10 MOV P1 WTH M_OUT(17)=1  1) 2) 3) 4)

1) Line No. : Numbers for determining the order of execution within the program. Lines are exe-cuted in ascending order.

2) Command word : Instructions for specifying the robot's movement and tasks3) Data : Variables and numerical data necessary for each instruction

4) Appended statement: Specify these as necessary when adding robot tasks.

Class Usable characters

 Alphabetic charac-ters

 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z(Use uppercase characters only. If a program name is registered using lowercase characters, the programmay not be executed normally.)

Numerals 0 1 2 3 4 5 6 7 8 9

Page 113: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 113/457

4-94 Detailed specifications of MELFA-BASIC IV 

4MELFA-BASIC IV 

(3) VariableThe following types of variables can be used in a program.

Variable

System variable

System control variable

User control variable

User variable

Position typevariable

・・・・Required data can be saved.

・・・・This is predetermined by the variable name and saved data.

・・・・This is determined by the variable name and usage purpose.

・・・・The robot's orthogonal coordinate value is saved. The variable name starts with "P".

Example) MOV P1: The robot moves to the position saved in variable name P1.

・・・・The robot's joint angle is saved. The variable name starts with "J".

  Example) MOV J1: The robot moves to the position saved in variable name J1.

・・・・A numeric value (integer, real value, etc.) is saved. The variable name starts with "M".

  Example) M1 = 1: The value 1 is substituted in variable name M1.

・・・・A character string is saved. A "$" is added to the end of the variable name.

Example) C1$ = "ERROR": the character string "ERROR" is substituted in variable name C1$.

Note 1) Each variable is categorized into the following classes.

・・・・This can only be referred to with the program.

Example) P_CURR: The robot's current position is  always saved.

・・・・This can be referred to and substituted in the program.

  Note that the input signals can only be referred to.

Example) M_OUT(17) = 1: Turns ON output signal bit 17.  M1=M_IN(20): Substitutes input signal bit 20 in the

arithmetic variable M1.

Note 1)

Note 1)

Note 1)

Joint type variable

Numeric value typevariable

Character typevariable

Page 114: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 114/457

  4MELFA-BASIC IV 

  Detailed specifications of MELFA-BASIC IV   4-95

4.3.1 Statement A statement is the minimum unit that configures a program, and is configured of a command word and dataissued to the word.Example) MOV P1  Command word Data  Command statement

4.3.2 Appended statementCommand words can be connected with an appended statement, but this is limited to movement com-mands. This allows some commands to be executed in parallel with a movement command.Example) MOV P1 WTH M_OUT (17) = 1  Command statement Appended statement Command statementPlease refer to Page 221, " WTH (With)" or Page 222, " WTHIF (With If)", as well as each of the movementinstructions (MOV, MVS, MVR, MVR2, MVR3, MVC, MVA) for detailed descriptions.

4.3.3 Line

 A line is consisted of a line No. and one command statement. Note that if an appended statement is used,there will be two command statements. One line can have up to 127 characters. (This does not include the last character of the line.)

4.3.4 Line No.Line Nos. should be in ascending order, starting from the first line, in order for the program to run properly.When a program is stored in the memory, it is stored in the order of the line Nos.

 

Line Nos. can be any integer from 1 to 32767.

4.3.5 Label A label is a user-defined name used as a marker for branching.  A label can be created by inserting an asterisk (*) followed by uppercase or lowercase alphanumeric char-acters after the line No. The head of the label must be an alphabetic character, and the entire label must be

within eight characters long. If a label starting with the alphabetic character L is described after the asterisk,an underscore (_) can be used immediately after the character. * Characters that cannot be used in labels:•Reserved words (DLY, HOPEN, etc.)•Any name that begins with a symbol or numeral•Any name that is already used for a variable name or function name

Example) 10 GOTO *LBL  100 *LBL 

Only one command statement per lineMultiple command statements cannot be separated with a semicolon and described on one line as donewith the general BASIC.

Direct execution if line No. is not assignedIf an instruction statement is described without a line number on the instruction screen of the T/B, thestatement is executed as soon as it is input. This is called direct execution. In this case, the commandstatement will not be saved in the memory, but the value substitution to the variable will be saved.

Page 115: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 115/457

4-96 Detailed specifications of MELFA-BASIC IV 

4MELFA-BASIC IV 

4.3.6 Types of characters that can be used in programThe character which can be used within the program is shown in Table 4-3. However, there are restrictionson the characters that can be used in the program name, variable name and label name. The charactersthat can be used are indicated by O, those that cannot be used are indicated by X, and those that can beused with restrictions are indicated by @.

Table 4-3:List of characters that can be used

Refer to Page 93, "(1) Program name" for detail of program names, refer to Page 101, "4.3.15 Variables" fordetail of variable names, and refer to Page 95, "4.3.5 Label" for detail of label names.

Class Available characters Program name Variable name Label name

 Alphabeticcharacters

 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z O O O

a b c d e f g h i j k l m n o p q r s t u v w x y z X @Note1)

Note1) Alphanumerics in variable names and label names in the program are automatically converted intouppercase characters.

@Note 1)

Numerals 0 1 2 3 4 5 6 7 8 9 O @Note2)

Note2) Only alphabetical characters can be used as the first character of the variable name. Numerals canbe used as the second and succeeding characters.

O

Symbols " ’ & ( ) * + - . , / : ; = < > ? @ ` [ \ ] ^ { } ~ | X X X

! # $ % X Available fortypespecification

X

 _(Underscore) X @Note3)

Note3) They can be used as the second and succeeding characters. Any variable having an underscore(_) as the second character becomes an external variable.

@Note4)

Note4) If an underscore (_) is used in a label name, start with an asterisk (*) followed by alphabeticcharacter "L."

Spaces Space character X X X

Page 116: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 116/457

  4MELFA-BASIC IV 

  Detailed specifications of MELFA-BASIC IV   4-97

4.3.7 Characters having special meanings(1) Uppercase and lowercase identification

Lowercase characters will be resigned as lowercase characters when they are used in comments or in char-acter string data. In all other cases, they will be converted to uppercase letters when the program is read.

(2) Underscore ( _ )The underscore is used for the second character of an identifier (variable name) to identify the variable asan external variable between programs. Refer to Page 104, "4.3.22 External variables" for details.Example) P_CURR, M_01, M_ABC

(3) Apostrophe ( ' )The apostrophe ( ' ) is used at the head of all comments lines. When assigned at the head of a character itis a substitute for the REM statement.Example) 100 MOV P1 'GET ;GET will be set as the comment.

 

150 'GET PARTS ;This is the same as 150 REM GET PARTS.

(4) Asterisk ( * )

The asterisk is placed in front of label names used as the branch destination.Example) 200 *CHECK

(5) Comma ( , )The comma is used as a delimiter when there are several parameters or suffixes.Example) P1=(200, 150, .......)

(6) Period ( . )The period is used for obtaining certain components out of multiple data such as decimal points, positionvariables and joint variables.Example) M1 = P2.X ; Substitute the position variable P2.X coordinate element in numeric variable M1.

(7) SpaceThe space character, when used as part of a character string constant or within a comments line, is inter-preted as a character. The space character is required as a delimiter immediately after a line No. or a com-mand word, and between data items. In the [Format] given in section Page 118, "4.11 Detailed explanationof command words", the space is indicated with a "[] " where required.

Page 117: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 117/457

4-98 Detailed specifications of MELFA-BASIC IV 

4MELFA-BASIC IV 

4.3.8 Data typeIn MELFA BASIC IV it is possible to use four data types: numerical values, positions, joints, and characterstrings. Each of these is called a "data type." The numerical value data type is further classified into realnumbers and integers. There can be variables and constants of each data type.

Example)Numeric value type M1 [Numeric value variables],1 [Numeric value constants] (Integer),

1.5 [Numeric value constants](Real number)Position type P1 [Position variables], (0,0,0,0,0,0) (0,0) [Position constants]Joint type J1 [Joint variables], (0,0,0,0,0,0) [Joint constants]Character type C1$ [Character string variables], "ABC" [Character string constants]

4.3.9 ConstantsThe constant types include the numeric value constant, character string constant, position constant, jointconstant and angle constant.

4.3.10 Numeric value constantsThe syntax for numeric value constants is as follows. Numerical constants have the following characteris-tics.

(1) Decimal number Example) 1, 1.7, -10.5, +1.2E+5 (Exponential notation)Valid range -1.7976931348623157e+308 to 1.7976931348623157e+308

(2) Hexadecimal number Example) &H0001, &HFFFFValid range &H0000 to &HFFFF

(3) Binary number 

Example) &B0010, &B1111Valid range &B0000000000000000 to &B1111111111111111

(4) Types of constantThe types of constants are specified by putting symbols after constant characters.Example) 10% (Integer), 1.0005! (Single-precision real number), 10.000000003# (Double-precision realnumber)

4.3.11 Character string constantsString constants are strings of characters enclosed by double quotation marks (").Example) "ABCDEFGHIJKLMN" "123"

Data typePosition type

Joint type

Character type

Real number type

Integer typeNumeric value type

Constants

Numeric value constants

Character string constants

Position constants

Joint constants

Angle constants

Up to 127 characters for character stringThe character string can have up to 127 characters, including the line No. and double quotations.Enter two double quotation marks successively in order to include the double quotation mark itself in acharacter string. For the character string AB"CD, input "AB""CD".

Page 118: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 118/457

  4MELFA-BASIC IV 

  Detailed specifications of MELFA-BASIC IV   4-99

4.3.12 Position constantsThe syntax for position constants is as shown below. Variables cannot be described within position con-stants.

Example) P1=( 300, 100, 400, 180, 0, 180, 0, 0 ) ( 7, 0 ) P2=( 0, 0, -5, 0, 0, 0 ) ( 0, 0 ) [A case where there is no traveling axis data] P3=( 100, 200, 300, 0, 0, 90 ) ( 4, 0 ) [A case of a 4-axis horizontal multi-joint robot]

(1) Coordinate, posture and additional axis data types and meanings[Format] X, Y, Z, A, B, C , L1, L2[Meaning] X, Y, Z: coordinate data. The position of the tip of the robot's hand in the XYZ coordinates. 

(The unit is mm.)  A, B, C: posture data. This is the angle of the posture. (The unit is deg.) Note1)

 

L1, L2: additional axis data. These are the coordinates for additional axis 1 and additional axis 2,respectively. (The unit is mm or deg.)Note1) The T/B and Personal computer support software display the unit in deg; however, the unit

of radian is used for substitution and calculation in the program.

(2) Meaning of structure flag data type and meanings

[Format] FL1, FL2[Meaning] FL1: Posture data

FL2: Multi-rotation data information - Default value = 0 (The range is 0 to +4294967295 ... Infor-mation for eight axes is held with a 1-axis 4-bit configuration.)Two types of screens are avail-able for the PC: screens that display the number of rotations for each axis (-8 to 7) indecimal and those that display the number of rotations for each axis in hexadecimal..

( 100, 100, 300, 180, 0, 180, 0, 0 ) ( 7, 0 )

C axisB axis Posture axes of the robot (degree) A axisZ axisY axis Coordinate values of the hand tip (mm)X axis

structure flag 2 (multi-rotation data)

structure flag 1 (posture data)L2 axis (additional axis 2)L1 axis (additional axis 1)

  7 = & B 0 0 0 0 0 1 1 1 (Binary number)  1/0=NonFlip/Flip  1/0=Above/Below  1/0=Right/Left

  0 = & H 0 0 0 0 0 0 0 0 (Hexadecimal number)  1 axis  2 axis  3 axis

  4 axis  5 axis  6 axis (Most frequently used)  7 axis  8 axis

-900 -540 -180 0 180 540 900

・・・-2(E)

-1(F) 0 1 2 ・・・

Value of multiplerotation data

Angle of each axis

Value of multiple rotation data

Page 119: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 119/457

4-100 Detailed specifications of MELFA-BASIC IV 

4MELFA-BASIC IV 

4.3.13 Joint constantsThe syntax for the joint constants is as shown below

Example)6 axis robot J1 = ( 0, 10, 80, 10, 90, 0 )6 axis + Additional axis J1 = ( 0, 10, 80, 10, 90, 0, 10, 10 )5 axis robot J1 = ( 0, 10, 80, 0, 90, 0 )5 axis + Additional axis J1 = ( 0, 10, 80, 0, 90, 0, 10, 10 )4 axis robot J1 = ( 10, 20, 90, 0 )4 axis + Additional axis J1 = ( 10, 20, 90, 0, , , 10, 10 )

(1) Axis data format and meanings[Format] J1,J2,J3,J4,J5,J6,J7,J8[Meaning] J1 to J6: Robot axis data (Unit is mm or deg.)

J7, J8: Additional axis data, and may be omitted (optional).(Unit is mm or deg. Depending on the parameter setting. The unit is mm, not degrees, if the J3 axis of a horizontal multi-joint type robot is a direct-drivenaxis.

4.3.14 Angle valueThe angle value is used to express the angle in "degrees" and not in "radian". 

If written as 100DEG, this value becomes an angle and can be used as an argument of trigonometric func-tions.

Example) SIN(90DEG)----A 90 degree sine is indicated.

Designation of axis No.1. There is no need to describe the coordinate and posture data for all eight axes. However, if omitted, the

following axis data will be processed as undefined. For a 4-axis robot (X,Y,Z,C axis configuration), describe as (X, Y, Z, , , C) or (X,Y,Z,0,0,C).

2. To omit all axes,insert at least one ","(comma), such as (,).

Use of variables in position element dataThe coordinate, position, additional axis data and structure flag data are called the position element data.  A variable cannot be contained in the position element data that configures the position constant.

Omitting the structure flag dataIf the structure flag data is omitted, the default value will be applied.((7,0) Varies depending on themachine model.)

  (10, -20, 90, 0, 90, 0, 0, 0)

J8 axis (additional axis 2)J7 axis (additional axis 1)J6 axisJ5 axis

J3 axisJ2 axisJ1 axis

 

J4 axis

Use of variables in joint element dataThe axis data is called the joint element data.   A variable cannot be contained in the joint constant data that configures the joint constant.

Page 120: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 120/457

  4MELFA-BASIC IV 

  Detailed specifications of MELFA-BASIC IV   4-101

4.3.15 Variables A variable name should be specified using up to eight characters.The variable types include the numeric value type, character string type, position type, joint type and I/Otype. Each is called a "variable type". The variable type is determined by the head character of the identifier(variable name).The numeric value type can be further classified as integer type, single-precision real number type, or dou-ble-precision real number type.The following two types of data valid ranges are used.1. Local variable valid only in one program2. Robot status variable, program external variable and user-defined external variable valid over programs.

(The user-defined external variable has a _ for the second character of the variable name. Refer to Page104, "4.3.22 External variables" for details.)

Note 1)

Numeric value type Integer type

Single-precision real number typeCharacter string type

Double-precision real number typePosition type

I/O type

Joint type

(Start with a charactersother than C, P, or J.)

(Starts with C)

(Starts with P)

(Starts with J)

Variables

External variables

Types of variable

Local variable (valid only within the program)

System status variables

Program External Variables

User-defined External Variables

P_CURR, M_IN , etc.

P_00, M_00 , etc.

P1, M1 , etc.

P_100, M_100 , etc.

Note 1) The identifiers include those determined by the robot status variable(M_IN,M_OUT, etc.), and those declared in the program with the DEFIO command.

Variables are not initializedThe variables will not be cleared to zero when generated, when the program is loaded, or when reset.

Page 121: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 121/457

4-102 Detailed specifications of MELFA-BASIC IV 

4MELFA-BASIC IV 

4.3.16 Numeric value variablesVariables whose names begin with a character other than P, J, or C are considered numeric value variables.In MELFA-BASIC IV, it is often specified that a variable is an numeric value variable by placing an M at thehead. M is the initial letter of mathematics.Example) M1 = 100  M2! = -1.73E+10  M3# = 0.123  ABC = 1

1) It is possible to define the type of variable by attaching an numeric value type indicator at the end ofthe variable name. If it is omitted, the variable type is assumed to be of the single-precision real num-ber type.

2) Once the type of a variable is registered, it can only be converted from integer to single-precision real

number. For example, it is not possible to convert the type of a variable from integer to double-preci-sion real number, or from single-precision real number to double-precision real number.

3) It is not possible to add an numeric value type indicator to an already registered variable. Include thetype indicator at the end of the variable name at the declaration when creating a new program.

4) If the value is exceeded during a single precision = double precision execution, an error will occur.

Table 4-4:Range of numeric value variable data

4.3.17 Character string variables A character string variable should start with C and end with "$." If it is defined by the DEF CHAR instruction,it is possible to specify a name beginning with a character other than C.

Example) C1$ = "ABC" CS$ = C1$ 

DEF CHAR MOJI 

MOJI = "MOJIMOJI"

4.3.18 Position variablesVariables whose names begin with character P are considered position variables. If it is defined by the DEFPOS instruction, it is possible to specify a name beginning with a character other than P. It is possible to ref-erence individual coordinate data of position variables. In this case, add "." and the name of a coordinateaxis, e.g. "X," after the variable name.

P1.X, P1.Y, P1.Z, P1.A, P1.B P1.C, P1.L1, P1.L2

The unit of the angular coordinate axes A, B, and C is radians. Use the DEG function to convert it todegrees.

Example) P1 = PORG 

DIM P3(10) M1 = P1. X (Unit : mm) M2 = DEG(P1. A) (Unit : degree)

 

DEG POS L10 

MOV L10

Numeric value type suffix Meaning

% Integer  

! Single-precsion real number type

# Double-precsion real number type

Type Range

Integer type -32768 to 32767

Single-precision real number type -3.40282347e+38 to 3.40282347e+38 Note)E expresses a power of 10.Double-precision real number

type -1.7976931348623157e+308 to 1.7976931348623157e+308

Page 122: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 122/457

  4MELFA-BASIC IV 

  Detailed specifications of MELFA-BASIC IV   4-103

4.3.19 Joint variables A character string variable should start with J. If it is defined by the DEF JNT instruction, it is possible tospecify a name beginning with a character other than J.It is possible to reference individual coordinate data of joint variables.In this case, add "." and the name of a coordinate axis, e.g. "J1," after the variable name.

JDATA.J1, JDATA.J2, JDATA.J3, JDATA.J4, JDATA.J5, JDATA.J6, JDATA.J7, JDATA.J8

The unit of the angular coordinate axes A, B, and C is radians. Use the DEG function to convert it todegrees.

Example) JSTARAT = ( 0, 0, 90, 0, 90, 0, 0, 0 )  JDATA = JSTART  DIM J3 (10)  M1 = J1.J1 (Unit : radian)  M2 = DEG (J1.J2)  DEF JNT K10

  MOV K 10

4.3.20 Input/output variablesThe following types of input/output variables are available. They are provided beforehand by the robot sta-tus variables.

Please refer to the robot status variables Page 248, " M_IN/M_INB/M_INW", Page 254, " M_OUT/M_OUTB/M_OUTW", and Page 244, " M_DIN/M_DOUT".

4.3.21 Array variablesNumeric value variables, character string variables, position variables, and joint variables can all be used inarrays. Designate the array elements at the subscript section of the variables. Array variables should be

declared with the DIM instruction. It is possible to use arrays of up to three dimensions.

Example) Example of definition of an array variableDIM M1 (10) Single-precision real number typeDIM M2% (10) Integer typeDIM M3 ! (10) Single-precision real number typeDIM M4# (10) Double-precsion real number typeDIM P1 (20)DIM J1 (5)DIM ABC (10, 10, 10)

The subscript of an array starts from 1.However, among the robot status variables, the subscript starts from 0 for individual input/output signal vari-ables (M_IN, M_OUT, etc.) only. Whether it is possible to secure sufficient memory for the variable is determined by the free memory size.

Input/output variables name Explanation

M_IN For referencing input signal bits

M_INB For referencing input signal bytes (8-bit signals)

M_INW For referencing input signal words (16-bit signals)

M_OUT For referencing/assigning output signal bits

M_OUTB For referencing/assigning output signal bytes (8-bit signals)

M_OUTW For referencing/assigning output signal words (16-bit signals)

M_DIN For referencing input registers for CC-Link

M_DOUT For referencing output registers for CC-Link

Page 123: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 123/457

4-104 Detailed specifications of MELFA-BASIC IV 

4MELFA-BASIC IV 

4.3.22 External variablesExternal variables have a "_" (underscore' for the second character of the identifier ( variable name). (It isnecessary to register user-defined external variables in the user base program.) The value is valid over mul-tiple programs. Thus, these can be used effectively to transfer data between programs. There are four types of external variables, numeric value, position, joint and character, in the same manneras the Page 98, "4.3.8 Data type". The following three types of external variables are available.

Table 4-5:Types of external variables

4.3.23 Program external variablesTable 4-6 lists the program external variables that have been prepared for the controller in advance.Asshown in the table, the variable name is determined, but the application can be determined by the user.

Table 4-6:Program external variables

Note) The software version of the controller is J1 or later, the program external variable was extended.When you use the extension, change the following parameter.

External variables Explanation Example

Program external variables Types of external variables P_01,M_01,P_100(1), etc.

User-defined external variables The user can determine the name freely. Declare the vari-ables using the DEF POS, DEF JNT, DEF CHAR, or DEFINTE/FLOAT/DOUBLE instructions in the user base program.

P_GENTEN,M_MACHI

Robot status variables(System status variables)

The robot status variables are controlled by the system, andtheir usage is determined in advance.

M_IN,M_OUT,P_CURR,M_PI,etc.

Data type Variable name Qty. Remarks

Position P_00 to P_19P_20 to P_39 Note)

2020

Position array (No. of elements 10) P_100( ) to P_104( )P_105( ) to P_109( )Note)

55

Use the array element in the first dimensions.

Joint J_00 to J_19J_20 to J_39 Note)

2020

Joint array (No. of elements 10) J_100( ) to J_104( )J_105( ) to J_109( )Note)

55

Use the array element in the first dimensions.

Numeric value M_00 to M_19M_20 to M_39 Note)

2020

The data type of the variables is double-precision realnumbers.

Numeric value array(No. of elements 10)

M_100( ) to M_104( )M_105( ) to M_109( )Note)

55

Use the array element in the first dimensions. The datatype of the variables is double-precision real numbers.

Character string C_00 to C_19C_20 to C_39 Note)

2020

Character string array(No. of elements 10) C_100( ) to C_104( )C_105( ) to C_109( )Note)

55 Use the array element in the first dimensions.

Parameter Value Means

PRGGBL 0:Standard (default)1:Extension

Sets "1" to this parameter, and turns on the controller power again, then the capacityof each program external variable will double.However, if a variable with the same name is being used as a user-defined externalvariable, an error will occur when the power is turned ON, and it is not possible toexpand. It is necessary to correct the user definition external variable.

Page 124: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 124/457

  4MELFA-BASIC IV 

  Detailed specifications of MELFA-BASIC IV   4-105

4.3.24 User-defined external variablesIf the number of program external variables listed above is insufficient or it is desired to define variables withunique names, the user can define program external variables using a user base program.

(1) By defining a variable having an underscore (_) for the second character of the identifier with the DEFstatement in the base program (Note), that variable will be handled as an external variable.

(2) It is not necessary to execute the user base program.(3) Write only the lines necessary for declaring variables in the user base program.(4) If it is desired to define array variables in a user base program and use them as external variables, it

is necessary to declare them using the DIM instruction again in the program in which they will beused. It is not necessary to declare single variables again.

Example) Example of using user-defined external variables

On the main program (program name 1) side

On the user base program (program name UBP) side

4.3.25 Creating User Base Programs

User base programs can be created by using either the teaching box or Personal Computer Support Soft-ware, in the same way as the normal programs. To create user base programs using the Personal ComputerSupport Software, please follow the procedure below:

1) Store a program created as a user base program on your personal computer.2) Start Program Manager from Program Editor of the Personal Computer Support Software.3) Specify the program created in step 1) above as the transfer source and the robot as the transfer des-

tination in Program Manager, and perform a "copy" operation. At this point, uncheck the "PositionVariables" check box so that only the "Instructions" check box is checked.

4) When the copy operation is complete, perform the operation in step 3) above again. Uncheck the"Instructions" check box and check the "Position Variables" check box this time, and then execute.

Procedure before using user-defined external variables

1) First, write a user base program. Use "_" for the second character of the variables.

2) Register the program name in the "PRGUSR" parameter and turn the power off and on again.3) Write a normal program using the user-defined external variables.

10 DIM P_100(10) ' Re-declaration of external variables20 DIM M_200(10) ' Re-declaration of external variables30 MOV P_100(1)40 IF M_200(1) =1 THEN HLT

10 DEF POS P_900, P_901, P_902, P_90320 DIM P_100(10) ' It is necessary to declare this variable again in the program in which they

will be used.30 DEF INTE M_100

40 DIM M_200(10) ' It is necessary to declare this variable again in the program in which they willbe used.

Parameter name Value

PRGUSR UBP

Note) What is a user base program? A user base program is written when user-defined external variables are to be used, but it is not neces-sary to execute the program. Simply create a program containing the necessary declaration lines and reg-

ister it in the "PRGUSR" parameter. After changing the parameter, turn the power off and on again.

How to register a new user base program using the Personal Computer Support SoftwareUsing the Personal Computer Support Software, write only instructions to the robot controller first, andwrite only position data next.

Page 125: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 125/457

4-106 Detailed specifications of MELFA-BASIC IV 

4MELFA-BASIC IV 

4.3.26 Robot status variablesThe available robot status variables are shown in Table 4-7. As shown in the table, the variable name andapplication are predetermined. The robot status can be checked and changed by using these variables. 

Table 4-7:Robot status variables

No Variablename

 Array designationNote1) Details

 AttributeNote2) Data type, Unit Page

1 P_CURR Mechanism No.(1 to 3) Current position (XYZ) R Position type 268

2 J_CURR Mechanism No.(1 to 3) Current position (joint) R Joint type 234

3 J_ECURR Mechanism No.(1 to 3) Current encoder pulse position R Joint type 236

4 J_FBC Mechanism No.(1 to 3) Joint position generated based on the feedbackvalue from the servo

R Joint type 237

5 J_AMPFBC Mechanism No.(1 to 3) Current feedback value R Joint type 237

6 P_FBC Mechanism No.(1 to 3) XYZ position generated based on the feedbackvalue from the servo

R Position type 269

7 M_FBD Mechanism No.(1 to 3) Distance between commanded position and

feedback position

R Position type 246

8 M_CMPDST Mechanism No.(1 to 3)  Amount of difference between a command valueand the actual position when the compliancefunction is being performed

R Single-precisionreal number type,

mm

239

9 M_CMPLMT Mechanism No.(1 to 3) This is used to recover from the error status byusing interrupt processing when an error hasoccurred while the command value in thecompliance mode attempted to exceed the limit.

R Integer type 241

10 P_TOOL Mechanism No.(1 to 3) Currently designated tool conversion data R Position type 270

11 P_BASE Mechanism No.(1 to 3) Currently designated base conversion data R Position type 266

12 P_NTOOL Mechanism No.(1 to 3) System default value (tool conversion data) R Position type 270

13 P_NBASE Mechanism No.(1 to 3) System default value (base conversion data) R Position type 266

14 M_TOOL Mechanism No.(1 to 3) Tool No. (1 to 4) RW Integer type 261

15 J_COLMXL Mechanism No.(1 to 3) Difference between estimated torque and actualtorque

R Joint type, % 235

16 M_COLSTS Mechanism No.(1 to 3) Impact detection status (1: Colliding, 0: Others) R Integer type 242

17 P_COLDIR Mechanism No.(1 to 3) Movement direction at collision R Position type 267

18 M_OPOVRD None Speed override on the operat ion panel (0 to 100%) R Integer type, % 249

19 M_OVRD Slot No.(1to 32) Override in currently designated program (0 to100%)

R Integer type, % 249

20 M_JOVRD Slot No.(1to 32) Currently designated joint override (0 to 100%) R Integer type, % 249

21 M_NOVRD Slot No.(1to 32) System default value (default value of M_OVRD)(%)

R Single-precisionreal number type, %

249

22 M_NJOVRD Slot No.(1to 32) System default value (default value of M_JOVRD)(%) R Single-precisionreal number type, % 249

23 M_WUPOV Mechanism No.(1 to 3) Warm-up operation override (50 to 100%) R Single-precisionreal number type, %

263

24 M_WUPRT Mechanism No.(1 to 3) Time until the warm-up operation status iscanceled (sec.)

R Single-precisionreal number type,

sec

264

25 M_WUPST Mechanism No.(1 to 3) Time until the warm-up operation status is setagain (sec.)

R Single-precisionreal number type,

sec

265

26 M_RATIO Slot No.(1to 32) Fraction of the current movement left beforereaching the target position (%)

R Integer type, % 255

27 M_RDST Slot No.(1to 32) Remaining distance left of the current movement

(only the three dimensions of X, Y, and Z are takeninto consideration: mm)

R Single-precision

real number type,mm

256

Page 126: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 126/457

  4MELFA-BASIC IV 

  Detailed specifications of MELFA-BASIC IV   4-107

28 M_SPD Slot No.(1to 32) Current specified speed (valid only for linear/circular interpolation)

R Single-precisionreal number type,

mm/s

259

29 M_NSPD Slot No.(1to 32) System default value (default value of M_SPD)(mm/s) R Single-precisionreal number type,mm/s

259

30 M_RSPD Slot No.(1to 32) Current directive speed (mm/s) R Single-precisionreal numbertype,mm/s

259

31 M_ACL Slot No.(1to 32) Current specified acceleration rate (%) R Single-precisionreal number type, %

238

32 M_DACL Slot No.(1to 32) Current specified deceleration rate (%) R Single-precisionreal number type, %

238

33 M_NACL Slot No.(1to 32) System default value (defaul t value of M_ACL) (%) R Single-precisionreal number type, %

238

34 M_NDACL Slot No.(1to 32) System default value (default value of M_DACL)

(%)

R Single-precision

real number type, %

238

35 M_ACLSTS Slot No.(1to 32) Current acceleration/deceleration status 

0 = Stopped, 1 = Accelerating, 2 = Constantspeed, 3=Decelerating

R Integer type 238

36 M_SETADL Axis No.(1 to 8) Specify the acceleration/deceleration time ratio(%) of each axis. Software version J1 or later 

RW Single-precisionreal number type, %

257

37 M_LDFACT Axis No.(1 to 8) The load factor of the servo motor of each axis.(%)Software version J1 or later 

R Single-precisionreal number type, %

250

38 M_RUN Slot No.(1to 32) Operation status (1: Operating, 0: Not operating) R Integer type 256

39 M_WAI Slot No.(1to 32) Pause status (1: Pausing, 0: Not pausing) R Integer type 262

40 M_PSA Slot No.(1to 32) Specifies whether or not the program selection ispossible in the specified task slot. (1: Selectionpossible, 0: Selection not possible, in pausestatus)

R Integer type 255

41 M_CYS Slot No.(1to 32) Cycle operation status (1: Cycle operation, 0: Non-cycle operation)

R Integer type 243

42 M_CSTP None Cycle stop operation status (1: Cycle stop, 0: Notcycle stop)

R Integer type 243

43 C_PRG Slot No.(1to 32) Execution program name R Character stringtype

232

44 M_LINE Slot No.(1to 32) Currently executed line No. R Integer type 250

45 M_SKIPCQ Slot No.(1to 32)  A value of 1 is input if execution of an instruction isskipped as a result of executing the line thatincludes the last executed SKIP command,

otherwise a value of 0 is input.

R Integer type 257

46 M_BRKCQ None Result of the BREAK instruction(1: BREAK, 0: None)

R Integer type 239

47 M_ERR None Error occurring (1: An error has occurred, 0: Noerrors have occurred)

R Integer type 245

48 M_ERRLVL None Reads an error level.caution/low/high1/high2ÅÅ1/2/3/4

R Integer type 245

49 M_ERRNO None Reads an error number. R Integer type 245

50 M_SVO Mechanism No.(1 to 3) Servo motor power on (1: Servo power on, 0:Servo power off)

R Integer type 259

51 M_UAR Mechanism No.(1 to 3) Bit data. 

(1: Within user specified area, 0: Outside userspecified area)

(Bit 0:area 1 to Bit 7:area 8)

R Integer type 262

No Variablename

 Array designationNote1) Details

 AttributeNote2) Data type, Unit Page

Page 127: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 127/457

4-108 Detailed specifications of MELFA-BASIC IV 

4MELFA-BASIC IV 

52 M_IN Input No.(0 to 32767) Use this variable when inputting external inputsignals (bit units).General-purpose bit device: bit signal input 0=off1=onThe signal numbers will be 6000s for CC-Link

R Integer type 248

53 M_INB Input No.(0 to 32767) Use this variable when inputting external inputsignals (8-bit units)General-purpose bit device: byte signal inputThe signal numbers will be 6000s for CC-Link

R Integer type 248

54 M_INW Input No.(0 to 32767) Use this variable when inputting external inputsignals (16-bit units)General-purpose bit device: word signal inputThe signal numbers will be 6000s for CC-Link

R Integer type 248

55 M_OUT Output No.(0 to 32767) Use this variable when outputting external outputsignals (bit units).General-purpose bit device: bit signal input 0=off1=on

The signal numbers will be 6000s for CC-Link

RW Integer type 254

56 M_OUTB Output No.(0 to 32767) Use this variable when outputting external outputsignals (8-bit units)General-purpose bit device: byte signal inputThe signal numbers will be 6000s for CC-Link

RW Integer type 254

57 M_OUTW Output No.(0 to 32767) Use this variable when outputting external outputsignals (16-bit units)General-purpose bit device: word signal inputThe signal numbers will be 6000s for CC-Link

RW Integer type 254

58 M_DIN Input No.(from 6000 ) CC-Link's remote register: Input register R Integer type 244

59 M_DOUT Output No.(from 6000) CC-Link's remote register: output register RW Integer type 244

60 M_HNDCQ Input No.(1 to 8) Returns a hand check input signal. R Integer type 247

61 P_SAFE Mechanism No.(1 to 3) Returns an safe point position. R Position type 269

62 J_ORIGIN Mechanism No.(1 to 3) Returns the joint coordinate data when setting theorigin.

R Joint type 237

63 M_OPEN File No.(1 to 8) Returns the open status of the specified fileor the communication line.

R Integer type 253

64 C_MECHA Slot No.(1 to 32) Returns the type name of the robot. R Character stringtype

232

65 C_MAKER None Shows manufacturer information (a string of up to64 characters).

R Character stringtype

231

66 C_USER None Returns the content of the parameter"USERMSG."(a string of up to 64 characters).

R Character stringtype

233

67 C_DATE None Current date expressed as "year/month/date". R Character stringtype

231

68 C_TIME None Current time expressed as "time/minute/second". R Character stringtype

233

69 M_BTIME None Returns the remaining battery capacity time(hours).

R Integer type, Time 239

70 M_TIMER Timer No. (1 to 8) Constantly counting. Value can be set. [ms]It is possible to measure the precise executiontime by using this variable in a program.

RW Single-precisionreal number type

260

71 P_ZERO None  A variable whose position coordinate values (X, Y,Z, A, B, C, FL1, FL2) are all 0

R Position type 270

72 M_PI None Circumference rate (3.1415...) R Double-precisionreal number type

254

73 M_EXP None Base of natural logarithm (2.71828...) R Double-precisionreal number type

245

74 M_G None Specific gravity constant (9.80665) R Double-precisionreal number type

246

75 M_ON None 1 is always set R Integer type 252

No Variablename

 Array designationNote1) Details

 AttributeNote2) Data type, Unit Page

Page 128: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 128/457

  4MELFA-BASIC IV 

  Detailed specifications of MELFA-BASIC IV   4-109

76 M_OFF None 0 is always set R Integer type 252

77 M_MODE None Contains the status of the key switch of theoperation panel TEACH/AUTO(OP)/AUTO(Ext.)(1/

2/3)

R Integer type 251

Note1) Mechanism No. ............1 to 3, Specifies a mechanism number corresponding to the multitask processing function. 

Slot No..........................1 to 32, Specifies a slot number corresponding to the multitask function. 

Input No........................0 to 32767: (theoretical values). Specifies a bit number of an input signal.  

Output No. ....................0 to 32767: (theoretical values). Specifies a bit number of an output signal.Note2) R ..................................Only reading is possible. 

RW................................Both reading and writing are possible.

No Variablename

 Array designationNote1) Details

 AttributeNote2) Data type, Unit Page

Page 129: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 129/457

4-110 Logic numbers

4MELFA-BASIC IV 

4.4 Logic numbersLogic numbers indicate the results of such things as comparison and input/output.If not 0 when evaluated with an Integer, then it is true, and if 0, it is false. When substituted, if true, 1 isassigned. The processes that can use logic numbers are shown in Table 4-8.

Table 4-8:Values corresponding to true or false logic number 

4.5 Functions A function carries out a specific operation for an assigned argument, and returns the result as a numericvalue type or character string type. There are built-in functions, that are preassembled, and user-definedfunctions, defined by the user.

(1) User-defined functionsThe function is defined with the DEF FN statement.

Example) DEF FNMADD(MA, MB)=MA+MB 

...........The function to obtain the total of two values is defined with FNMADD.The function name starts with FN, and the data type identification character (C: character string, M: numericvalue, P: position, J: joint) is described at the third character. The function is designated with up to eightcharacters.

(2) Built-in functions A list of assembled functions is given in Table 4-9.

Table 4-9:List of built-in functions

Items expressed with logic number "1" Items expressed with logic number "0"*Result of cmparison operation (if true)*Result of logic operation (if true)*Switch ON*Input/output signal ON*Hand open (supply current to the hand)*Settings for enable/valid such as for interrupts

*Result of comparison operation (if false)*Result of logic operation (if false)*Switch OFF*Input/output signal OFF*Hand close (do not supply current to the hand)*Settings for disable/invalid such as for interrupts

Class Function name (format) Functions Page Result

Numeric func-tions

 ABS (<Numeric expression>) Produces the absolute value 272 NumericvalueCINT (<Numeric expression>) Rounds off the decimal value and converts into an integer. 277

DEG (<Numeric expression:radian>) Converts the angle unit from radian (rad) to degree (deg). 280EXP (<Numeric expression>) Calculates the value of the expression's exponential function 281FIX (<Numeric expression>) Produces an integer section 282INT (<Numeric expression>) Produces the largest integer that does not exceed the value in the

expression.284

LEN(<Character string expression>) Produces the length of the character string. 286LN (<Numeric expression>) Produces the logarithm. 287LOG (<Numeric expression>) Produces the common logarithm. 287MAX (<Numeric expression>...) Obtains the max. value from a random number of arguments. 288MIN (<Numeric expression>...) Obtains the min. value from a random number of arguments. 289RAD (<Numeric expression: deg.>) Converts the angle unit from radian (rad) to degree (deg). 293SGN (<Numeric expression>) Checks the sign of the number in the expression 300SQR (<Numeric expression>) Calculates the square root 301STRPOS(<Character string expres-sion>, <Character string expres-sion>)

Obtains the 2nd argument character string position in the 1st argu-ment character string.

301

RND (<Numeric expression>) Produces the random numbers. 295 ASC(<Character string expression>) Provides a character code for the first character of the character

string in the expression.274

CVI(<Character string expression>) Converts a 2-byte character string into integers. 279CVS(<Character string expression>) Converts a 4-byte character string into a single-precision real number. 279CVD(<Character string expression>) Converts an 8-byte character string into a double-precision real number. 280VAL(<Character string expression>) Converts a character string into a numeric value. 303

Trigonometricfunctions

 ATN(<Numeric expression>) Calculates the arc tangent. Unit: radianDefinition range: Numeric value, Value range: -PI/2 to +PI/2

274 Numericvalue

 ATN2(<Numeric expres-sion>,<Numeric expression>)

Calculates the arc tangent. Unit: radian  THETA=ATN2(delta y, deltax)  Definition range: Numeric value of delta y or delta x that is not 0

 

Value range: -PI to +PI

274

Page 130: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 130/457

  4MELFA-BASIC IV 

  Functions  4-111

Trigonometricfunctions

COS(<Numeric expression>) Calculates the cosine Unit: radian Definition range: Numeric value range, Value range: -1 to +1

278 Numericvalue

SIN(<Numeric expression>) Calculates the sine Unit: radian  Definition range: Numeric value range, Value range: -1 to +1

300

TAN(<Numeric expression>) Calculates the tangent. Unit: radian

  Definition range: Numeric value range, Value range: Range of numericvalue

302

Characterstring func-tions

BIN$(<Numeric expression>) Converts numeric expression value into binary character string. 275 CharacterstringCHR$(<Numeric expression>) Provides character having numeric expression value character

code.277

HEX$(<Numeric expression>) Converts numeric expression value into hexadecimal characterstring.

284

LEFT$(<Character string expres-sion>,<Numeric expression>)

Obtains character string having length designated with 2nd argu-ment from left side of 1st argument character string.

286

MID$(<Character string expression>,<Numeric expression><Numeric expression>)

Obtains character string having length designated with 3rd argu-ment from the position designated with the 2nd argument in the 1stargument character string.

288

MIRROR$(<Character string expres-sion>)

Mirror reversal of the character string binary bit is carried out. 289

MKI$(<Numeric expression>) Converts numeric expression value into 2-byte character string. 290

MKS$(<Numeric expression>) Converts numeric expression value into 4-byte character string. 290MKD$(<Numeric expression>) Converts numeric expression value into 8-byte character string. 291RIGHT$(<Character string expres-sion>,<Numeric expression>)

Obtains character string having length designated with 2nd argu-ment from right side of 1st argument character string.

295

STR$(<Numeric expression>) Converts the numeric expression value into a decimal character string. 302CKSUM(<Character string expres-sion>,<Numeric expression>,

 

<Numeric expression>)

Creates the checksum of a character string.Returns the value of the lower byte obtained by adding the charactervalue of the second argument position to that of the third argumentposition, in the first argument character string.

278 Numericvalue

Position vari-ables

DIST(<Position>,<Position>) Obtains the distance between two points. 281 PositionFRAM

 

(<Position 1>,<Position 2>, <Position 3>)

Calculates the coordinate system designated with three points. Position1 is the plane origin, position 2 is the point on the +X axis, and position3 is the point on the +Y axis direction plane. The plane origin point andposture are obtained from the XYZ coordinates of the three position,and is returned with a return value (position). This is operated with 6-

axis three dimensions regardless of the mechanism structure.This function cannot be used in 5-axis robots, because the A, B, andC posture data has different meaning.

283

RDFL1(<Position>,<Numeric value>) Returns the structure flag of the designated position as character data. Argument <numeric value> ) 0 = R/L, 1 = A/B , 2 = F/N is returned.

293 Character 

SETFL1(<Position>,<Character >) Changes the structure flag of the designated position. The data tobe changed is designated with characters.(R/L/A/B/F/N)

296

RDFL2(<Position>,<Numeric value>) Returns the multi-rotation data of the designated position as anumeric value (-2 to 1).The argument <numeric expression> returns the axis No. (1 to 8).

294 Numericvalue

SETFL2 

(<Position>>,<Numeric value>, <Numeric value>)

Changes the multi-rotation data of the designated position as anumeric value (-2 to 1). The left side of the expression is the axisNo. to be changed; the right side is the value to be set.

297

 ALIGN(<Position>) Returns the value of the XYZ position (0,+/-90, +/-180) closest to theposition 1 posture axis (A, B, C).

This function cannot be used in 5-axis robots, because the A, B, andC posture data has different meaning.

273

INV(<Position>) Obtains the reverse matrix. 285 PositionPTOJ(<Position>) Converts the position data into joint data. 292 JointJTOP(<Position>) Converts the joint data into position data. 285 PositionZONE 

(<Position 1>,<Position 2>,<Position 3>)Checks whether position 1 is within the space (Cube) created by theposition 2 and position 3 points.  Outside the range=0, Within the range=1For position coordinates that are not checked or non-existent, thefollowing values should be assigned to the corresponding positioncoordinates:If the unit is degrees, assign -360 to position 2 and 360 to posit ion 3If the unit is mm, assign -10000 to position 2 and 10000 to position 3

304 Numericvalue

Class Function name (format) Functions Page Result

Page 131: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 131/457

4-112 Functions

4MELFA-BASIC IV 

Position vari-ables

ZONE2 

(<Position 1>,<Position 2>,<Position 3> 

<Numeric value1>, <Numeric value2>,<Numeric value3>,<Position 4>)

Checks whether position 1 is within the space (cylinder) created bythe position 2 and position 3 points.  Outside the range=0, Within the range=1Only the X, Y, and Z coordinate values are considered; the A, B, andC posture data is ignored.

305 Numericvalue

POSCQ(<Position>) Checks whether <position> is within the movement range. 291 NumericvaluePOSMID 

(<Position1>,<Position2>,<Numeric value1>, <Numeric value2>)

Calculates the middle position between <position 1> and <position2>.

292 Position

CALARC 

(<Position 1>,<Position 2>,<Position 3> 

<Numeric value1>, <Numeric value2>,<Numeric value3>,<Position 4>)

Returns information of an arc created from <position 1>, <position2>, and <position 3>.

276 Numericvalue

SETJNT 

(<J1 axis>,<J2 axis>,<J3 axis>,<J4 axis><J5 axis>,<J6 axis>,<J7 axis>,<J8 axis>)

Sets values in joint variables. 298 Joint

SETPOS 

(<X axis>,<Y axis>,<Z axis>,<A axis><B axis>,<C axis>,<L1 axis>,<L2 axis>)

Sets values in position variables. 299 Position

Class Function name (format) Functions Page Result

Page 132: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 132/457

  4MELFA-BASIC IV 

  List of Instructions  4-113

4.6 List of Instructions A list of pages with description of each instruction is shown below. They are listed in the order of presumedusage frequency.

(1) Instructions related to movement control

(2) Instructions related to program control

Command Explanation Page

Page 180, "MOV (Move)" Joint interpolation 180

Page 190, "MVS (Move S)" Linear interpolation 190

Page 184, "MVR (Move R)" Circular interpolation 184

Page 186, "MVR2 (Move R2)" Circular interpolation 2 186

Page 188, "MVR3 (Move R 3)" Circular interpolation 3 188

Page 183, "MVC (Move C)" Circular interpolation 183

Page 181, "MVA (Move Arch)"  Arch motion interpolation 181

Page 199, "OVRD (Override)" Overall speed specification 199

Page 213, "SPD (Speed)" Speed specification during linear or circular interpolation move-ment

213

Page 176, "JOVRD (J Override)" Speed specification during joint interpolation movement 176

Page 138, "CNT (Continuous)" Continuous path mode specification 138

Page 119, "ACCEL (Accelerate)"  Acceleration/deceleration rate specification 119

Page 130, "CMP JNT (Comp Joint)" Specification of compliance in the JOINT coordinate system 130

Page 132, "CMP POS (Composition Posture)" Specification of compliance in the XYZ coordinate system 132

Page 134, "CMP TOOL (Composition Tool)" Specification of compliance in the TOOL coordinate system 134

Page 136, "CMP OFF (Composition OFF)" Compliance setting invalid 136

Page 137, "CMPG (Composition Gain)" Compliance gain specification 137

Page 193, "OADL (Optimal Acceleration)" Optimum acceleration/deceleration rate specification 193

Page 179, "LOADSET (Load Set)" Hand's optional condition specification 179

Page 201, "PREC (Precision)" High accuracy mode specification 201Page 218, "TORQ (Torque)" Torque specification of each axis 218

Page 177, "JRC (Joint Roll Change)" Enables multiple rotation of the tip axis 177

Page 164, "FINE (Fine)" Robot's positioning range specification 164

Page 211, "SERVO (Servo)" Servo motor power ON/OFF 211

Page 214, "SPDOPT (Speed Optimize)" Optimize the speed during linear interpolation movement. 214

Page 221, "WTH (With)"  Addition instruction of movement instruction 221

Page 222, "WTHIF (With If)"  Additional conditional instruction of movement instruction 222

Command Explanation Page

Page 205, "REM (Remarks)" Comment(') 205

Page 173, "IF...THEN...ELSE...ENDIF (If ThenElse)"

Conditional branching 173

Page 209, "SELECT CASE (Select Case)" Enables multiple branching 209

Page 169, "GOTO (Go To)" Jump 169

Page 168, "GOSUB (RETURN)(Go Subroutine)" Subroutine jump 168

Page 206, "RESET ERR (Reset Error)" Resets an error (use of default is not allowed) 206

Page 125, "CALLP (Call P)" Program call 125

Page 166, "FPRM (FPRM)" Program call argument definition 166

Page 160, "DLY (Delay)" Timer  160

Page 170, "HLT (Halt)" Suspends a program 170Page 163, "END (End)" End a program 163

Page 196, "ON ... GOSUB (ON Go Subroutine)" Subroutine jump according to the value 196

Page 197, "ON ... GOTO (On Go To)" Jump according to the value 197

Page 133: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 133/457

4-114 List of Instructions

4MELFA-BASIC IV 

(3) Definition instructions

(4) Multi-task related

Page 165, "FOR - NEXT (For-next)" Repeat 165

Page 220, "WHILE-WEND (While End)" Conditional repeat 220

Page 198, "OPEN (Open)" Opens a file or communication line 198

Page 202, "PRINT (Print)" Outputs data 202

Page 175, "INPUT (Input)" Inputs data 175

Page 128, "CLOSE (Close)" Closes a file or communication line 128

Page 141, "COLCHK (Col Check)" Enables or disables the impact detection function 141

Page 195, "ON COM GOSUB (ON CommunicationGo Subroutine)"

Communication interrupt subroutine jump 195

Page 145, "COM ON/COM OFF/COM STOP (Com-munication ON/OFF/STOP)"

 Allows/prohibits/stops communication interrupts 145

Page 171, "HOPEN / HCLOSE (Hand Open/HandClose)"

Hand's open/close 171

Page 162, "ERROR (error)" User error  162

Page 212, "SKIP (Skip)" Skip while moving 212

Page 219, "WAIT (Wait)" Waiting for conditions 219

Page 129, "CLR (Clear)" Signal clear  129

Command Explanation Page

Page 159, "DIM (Dim)"  Array variable declaration 159

Page 157, "DEF PLT (Define pallet)" Pallet declaration 157

Page 200, "PLT (Pallet)" Pallet position calculation 200

Page 146, "DEF ACT (Define act)" Interrupt definition 146

Page 121, "ACT (Act)" Starts or ends interrupt monitoring 121

Page 149, "DEF ARCH (Define arch)"Definition of arch shape for arch motion

149

Page 156, "DEF JNT (Define Joint)" Joint type position variable definition 156

Page 158, "DEF POS (Define Position)" XYZ type position variable definition 158

Page 153, "DEF INTE/DEF FLOAT/DEF DOUBLE(Define Integer/Float/Double)"

Integer or real number variable definition 153

Page 151, "DEF CHAR (Define Character)" Character variable definition 151

Page 154, "DEF IO (Define IO)" Signal variable definition 154

Page 152, "DEF FN (Define function)" User function definition 152

Page 217, "TOOL (Tool)" Hand length setting 217

Page 123, "BASE (Base)" Robot base position setting 123

Page 217, "TOOL (Tool)" Tool length setting 217

Command Explanation Page

Page 224, "XLOAD (X Load)" Loads a program to another task slot 224

Page 226, "XRUN (X Run)" Execute the program in another task slot 226

Page 227, "XSTP (X Stop)" Stop the program in another task slot 227

Page 225, "XRST (X Reset)" Resets the program in another task slot being suspended 225

Page 223, "XCLR (X Clear)" Cancels the loading of the program from the specified task slot 223

Page 167, "GETM (Get Mechanism)" Obtains mechanical control right 167

Page 204, "RELM (Release Mechanism)" Releases mechanical control right 204

Page 203, "PRIORITY (Priority)" Changes the task slot priority 203

Page 206, "RESET ERR (Reset Error)" Resets an error (use of default is not allowed) 206

Command Explanation Page

Page 134: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 134/457

  4MELFA-BASIC IV 

  List of Instructions  4-115

(5) Others

Command Explanation Page

Page 127, "CHRSRCH (Character search)" Searches the character string out of the character array. 127

GET POS (Get Position) Reserved. -

Page 135: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 135/457

4-116 Operators

4MELFA-BASIC IV 

4.7 OperatorsThe value's real number or integer type do not need to be declared. Instead, the type may be forcibly con-verted according to the operation type. (Refer to Table 4-10.) The operation result data type is as followsaccording to the combination of the left argument and right argument data types.

Example) Left argument Operation Right argument Operation results  15 AND 256 15(Numeric value type) (Numeric value type) (Numeric value type)  P1 * M1 P2  (Position type) (Numeric value type) (Position type)  M1 * P1(Numeric value type) (Position type) Description error 

Table 4-10:Table of data conversions according to operations

Reversal: Sign reversal, Negate: Logical negate, Substitute: Substitute operation, Remainder: Remainderoperation, Comparison: Comparison operation, Logic: Logical Operation (excluding logical negate).

Left argumenttype

Operation

Left argument type

Character stringNumeric value

Position JointInteger Real number  

Characterstring

Substitution= Addition +Comparison (Compari-son operators)

Character stringCharacter string

Integer 

---

---

---

---

Integer 

 Addition +Substract -Multiplication *Division /Integer division \Remainder MODExponent ^Substitution =Comparison (Compari-son operators)Logic (Logic operators)

-----------

Integer Integer Integer Integer Integer Integer Integer Integer Integer Integer 

Real number Real number Real number Real number 

Integer Integer Integer Integer Integer Integer 

----------

----------

Real number 

 Addition +Substract -Multiplication *Division /Integer division \Remainder MODExponent ^Substitution =Comparison (Compari-son operators)Logic (Logic operators)

----------

Real number Real number Real number Real number 

Integer Integer Integer Integer Integer Integer 

Real number Real number Real number Real number 

Integer Integer 

Real number Real number 

Integer Integer 

----------

----------

Position

 Addition +Substract -Multiplication *Division /Integer division \Remainder MODExponent ^Substitution =Comparison (Compari-son operators)Logic (Logic operators)

----------

--

PositionPosition

------

--

PositionPosition

------

PositionPositionPositionPosition

---

Position--

----------

Joint

 Addition +Substract -Multiplication *Division /Integer division \Remainder MODExponent ^Substitution =Comparison (Compari-son operators)Logic (Logic operators)

----------

--

JointJoint

------

--

JointJoint

------

----------

JointJoint

-Joint

---

Joint--

Right argumentonly (Singlearugument)

eversal -Negate NOT

--

Integer Integer 

Integer Integer 

Position-

Joint-

Page 136: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 136/457

  4MELFA-BASIC IV 

  Priority level of operations  4-117

[Caution]•The operation of the section described with a "-" is not defined.•The results of the integer and the interger multiplication/division is an integer type for multiplication, and a

real number type for division.•If the right argument is a 0 divisor (divide by 0), an operation will not be possible.•During exponential operation, remainder operation or logical operation (including negate), all real numbers

will be forcibly converted into integers (rounded off), and operated.

4.8 Priority level of operationsIn the event there are many operators within an expression being calculated, the order of operations is asshown in Table 4-11.Table 4-11:Priority level of operations

4.9 Depth of program's control structureWhen creating a program, the depth of the control structure must be considered.When using the commands in the table below, the program's level of control structure becomes one leveldeeper. Each command has a limit to the depth of the control structure. Exceeding these limits will cause anerror.Table 4-12:Limit to control structure depth

4.10 Reserved wordsReserved words are those that are already used for the system. A name that is the same as one of the reserved words cannot be used in the program.Instructions, functions, and system status variables, etc. are considered reserved words.

Operations, (operators) Type of operation Priority level

1) Operations inside parentheses ()2) Functions3) Exponents

4) Single argument operator (+, -)5) * /6) \7)MOD8) + -9)<< >>10) Comparison operator   (=,<>,><,<,<=,=<,>=,=>)11)NOT12)AND13)OR14)XOR

FunctionsNumeric value operation

Numeric value operationNumeric value operationNumeric value operationNumeric value operationNumeric value operationLogic operationComparison operation

Logic operationLogic operationLogic operationLogic operation

High::

:::::::::::

Low

No. of levels Applicable commands

User stack in program 16 levels Repeated controls (FOR-NEXT,WHILE-WEND)

8 levels Function calling (CALLP)

800 levels max. Subroutine calling (GOSUB)

The number decreases by usage frequency of FOR-NEXT, WHILE-WEND, andCALLP instructions.

Page 137: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 137/457

4-118 Detailed explanation of command words

4MELFA-BASIC IV 

4.11 Detailed explanation of command words4.11.1 How to read the described items

[Function] : Indicates the command word functions.[Format] : Indicates how to input the command word argument. 

The argument is shown in <>.

[ ] indicates that the argument can be omitted. [] indicates that a space is required.

[Terminology] : Indicates the meaning and range, etc. of the argument.[Reference Program] : Indicates a program example.[Explanation] : Indicates detailed functions and cautions, etc.[The available robot type] : Indicates the available robot type.[Related parameter] : Indicates the related parameter.[Related system variables] : Indicates the related system variables.[Related instructions] : Indicates the related instructions.

4.11.2 Explanation of each command wordEach instruction is explained below in alphabetical order.

Page 138: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 138/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-119

 ACCEL (Accelerate)

[Function]Designate the robot's acceleration and deceleration speeds as a percentage (%).It is valid during optimum acceleration/deceleration.

* The acceleration/deceleration time during optimum acceleration/deceleration refers to the optimum timecalculated when using an OADL instruction, which takes account of the value of the M_SETADL variable.

[Format]

Controller software version G2 or later 

[Terminology]<Acceleration/Deceleration>

1 to 100(%). Designate the acceleration/deceleration to reach the maximum speed fromspeed 0 as a percentage. This can be described as a constant or variable. A default valueof 100 is set if the argument is omitted. A value of 100 corresponds to the maximum rateof acceleration/deceleration. Unit: %

<Acceleration/Deceleration rate when moving upward>Specify the acceleration/deceleration rate when moving upward in an arch motion due

to the MVA instruction. 

 A default value of 100 is set if the argument is omitted. It is possible to specify the argumenteither by a constant or variable.

<Acceleration/Deceleration rate when moving downward>Specify the acceleration/deceleration rate when moving downward in an arch motion dueto the MVA instruction.  A default value of 100 is set if the argument is omitted. It is possible to specify the argumenteither by a constant or variable.

[Reference Program] 10 ACCEL 50,100 ' Heavy load designation (when acceleration/deceleration is 0.2 sec-

onds, the acceleration will be 0.4, and the deceleration will be 0.2 sec-

onds). 20 MOV P1 30 ACCEL 100,100 ' Standard load designation. 40 MOV P250 DEF ARCH 1,10,10,25,25,1,0,0 60 ACCEL 100,100,20,20,20,20 ' Specify the override value to 20 when moving upward or downward due

to the MVA instruction. 70 MVA P3,1

 ACCEL[] [<Acceleration rate>] [, <Deceleration rate>]

 ACCEL[] [<Acceleration rate>] [, <Deceleration rate>] 

,[<Acceleration rate when moving upward>], [<Deceleration rate when moving upward>] 

,[<Acceleration rate when moving downward>], [<Deceleration rate when moving down-ward>]

Page 139: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 139/457

4-120 Detailed explanation of command words

4MELFA-BASIC IV 

[Explanation](1) The maximum acceleration/deceleration is determined according to the robot being used. Set the corre-

sponding percentage(%). The system default value is 100,100.(2) The acceleration percentage changed with this command is reset to the system default value when the

program is reset or the END statement executed.(3) Although it is possible to describe the acceleration/deceleration time to more than 100%, some models

internally set its upper limit to 100%. If the acceleration/deceleration time is set to more than 100%, itmay affect the lifespan of the machine. In addition, speed-over errors and overload errors may tend tooccur. Therefore, be extra careful when you are setting it to more than 100%.

(4) The smooth operation when CNT is valid will have a different locus according to the acceleration speedor operation speed. To move smoothly at a constant speed, set the acceleration and deceleration to thesame value. CNT is invalid in the default state.

(5) It is also valid during optimum acceleration/deceleration control (OADL ON).

[Related instructions]OADL (Optimal Acceleration), LOADSET (Load Set)

[Related system variables]

M_ACL/M_DACL/M_NACL/M_NDACL/M_ACLSTS, M_SETADL

[Related parameter]JADL

Page 140: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 140/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-121

 ACT (Act)

[Function]This instruction specifies whether to allow or prohibit interrupt processing caused by signals, etc. duringoperation.

[Format]

[Terminology]<Priority No.> 0: Either enables or disables the entire interrupt.

1 to 8: Designate the priority No. for the interrupt defined in the DEF ACT statement.When entering the priority No., always leave a space (character) after the ACT command.If described as ACT1, it will be a variable name declaration statement.

<1/0> 1: Allows interrupts, 0:Prohibits interrupts.

[Reference Program](1) When the input signal 1 turns on (set to 1) while moving from P1 to P2, it loops until that signal is set to 0.

 10 DEF ACT 1,M_IN(1)=1 GOSUB *INTR ' Assign input signal 1 to the interrupt 1 condition 20 MOV P1 30 ACT 1=1 ' Enable interrupt 1. 40 MOV P2 50 ACT 1=0 ' Disable interrupt 1.  :100 *INTR '110 IF M_IN(1)=1 GOTO 110 ' Loops until the M_IN(1) signal becomes 0.120 RETURN 0 '

(2) When the input signal 1 turns on (set to 1)while moving from P1 to P2, Operation is interrupted and theoutput signal 10 turns on.10 DEF ACT 1,M_IN(1)=1 GOSUB *INTR 'Assign input signal 1 to the interrupt 1 condition20 MOV P130 ACT 1=1 ' Enable interrupt 1.40 MOV P2 :100 *INTR110 ACT 1=0 ' Disable interrupt 1.120 M_OUT(10)=1 ' Turn on the output signal 10130 RETURN 1 ' Returns to the next line which interrupted

 ACT[]<Priority No.> = <1/0>

Page 141: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 141/457

4-122 Detailed explanation of command words

4MELFA-BASIC IV 

[Explanation](1) When the program starts, the status of <Priority No.> 0 is "enabled." When <Priority No.> 0 is "disabled,"

even if <Priority No.> 1 to 8 are set to "enabled," no interrupt will be enabled.(2) The statuses of <Priority No.> 1 to 8 are all "disabled" when the program starts.(3) An interrupt will occur only when all of the following conditions have been satisfied: 

*<Priority No.> 0 is set to "enabled." 

*The status of the DEF ACT statement has been defined. 

*When the <Priority No.> designated by DEF ACT is made valid by an ACT statement.(4) The return from an interrupt process should be done by describing either RETURN 0 or RETURN 1. How-

ever when returning from interruption processing to the next line by RETURN1, execute the statement todisable the interrupt. When that is not so, if interruption conditions have been satisfied, because interrup-tion processing will be executed again and it will return to the next line, the line may be skipped.

(5) Even if the robot is in the middle of interpolation, an interrupt defined by a DEF ACT statement will be exe-cuted.

(6) During an interrupt process, that <Priority No.> will be executed with the status as "disable."(7) A communications interrupt (COM) has a higher priority than an interrupt defined by a DEF ACT state-

ment.(8) The relationship of priority rankings is as shown below:

 

COM>ACT>WTHIF(WTH)>Pulse substitution

[Related instructions] DEF ACT (Define act), RETURN (Return)

Page 142: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 142/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-123

BASE (Base)

[Function]With this instruction, it is possible to move or rotate the robot coordinate system. Specify the base conver-sion data for this instruction. Pay extra attention when making changes in a program, as it may be mistaken

in jog operations, etc.

[Format]

[Terminology]<Base conversion data> Specify with position constants or position variables.

[Reference Program] 10 BASE (50,100,0,0,0,90) ' Input the conversion data as a constant. 20 MVS P1

 30 BASE P2 ' Input the conversion data as a variable. 40 MVS P1 50 BASE P_NBASE ' Reset the conversion data to the default values.

[Explanation](1) The X, Y, and Z components of the position data represent the amount of parallel movement from the ori-

gin of the world coordinate system to the origin of the base coordinate system. The base conversiondata can be changed only with the BASE command. The components A, B, and C of the position datarepresent the amount that the base coordinate system is tilted in relation to the world coordinate system.

X.............Distance to move parallel to X axisY.............Distance to move parallel to Y axis

Z.............Distance to move parallel to Z axis A............Angle to turn toward the X axisB............Angle to turn toward the Y axisC............Angle to turn toward the Z axisL1..........Movement amount of additional axis 1L2..........Movement amount of additional axis 2

(2) For A, B and C, the clockwise direction looking from the front of the origin of the coordinate, used as thecenter of rotation, is the forward rotation direction.

(3) The contents of the structural flag have no meaning.(4) The system's default value for this data is P_NBASE=(0,0,0,0,0,0) (0,0). This is calculated with the 6-

axis three dimensional regardless of the mechanism structure.(5) The valid axis element of base conversion data is different depending on the type of robot. Set up the

appropriate data referring to the Page 327, "Table 5-7: Valid axis elements of the base conversion datadepending on the robot model".

Fig.4-3:Conceptual diagram of the base coordinate system

BASE[]<Base conversion data>

Z

XYX

Z

Y5 1

9

BASE (50,100,0,0,0,90)

Page 143: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 143/457

4-124 Detailed explanation of command words

4MELFA-BASIC IV 

[Related parameter] After it has been changed by the MEXBS BASE instruction, the base coordinate system is stored in theMEXBS parameter and maintained even after the controller's power is turned off. Refer to Page 327, "AboutStandard Base Coordinates".

[Related system variables]P_BASE/P_NBASE

Page 144: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 144/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-125

CALLP (Call P)

[Function]This instruction executes the specified program (by calling the program in a manner similar to using GOSUBto call a subroutine). The execution returns to the main program when the END instruction or the final line in

the sub program is reached.

[Format]

[Terminology]<Program name> Designate the program name with a character string constant or character string variable.

For the standards for program names, please refer to Page 93, "(1) Program name".<Argument> Designate the variable to be transferred to the program when the program is called. Up

to 16 variables can be transferred.

[Reference Program](1) When passing the argument to the program to call.Main program10 M1=0 20 CALLP "10" ,M1,P1,P2 30 M1=1 40 CALLP "10" ,M1,P1,P2  :100 CALLP "10", M2,P3,P4  :150 END"10" sub program side 10 FPRM M01, P01,P02 20 IF M01<>0 THEN GOTO *LBL1 30 MOV P01 40 *LBL1 50 MVS P02 60 END 'Return to the main program at this point.

* When lines 20 and 40 of the main program are executed, M1, P1 and P2 are set in M01, P01 and P02 ofthe sub program, respectively. When line 100 of the main program is executed, M2, P3 and P4 are set inM01, P01 and P02 of the sub program, respectively. 

(2) When not passing the argument to the program to call.Main program  10 MOV P1  20 CALLP "20"  30 MOV P2  40 CALLP "20" 50 END

"20" sub program side  10 MOV P1 'P1 of the sub program differs from P1 of the main program.  20 MVS P002  30 M_OUT(17)=1

  40 END 'Return to the main program at this point.

CALLP[] "<Program name> " [, <Argument> [, <Argument>

Page 145: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 145/457

4-126 Detailed explanation of command words

4MELFA-BASIC IV 

[Explanation](1) A program (sub program) called by the CALLP instruction will return to the parent program (main pro-

gram) when the END instruction (equivalent to the RETURN instruction of GOSUB) is reached. If thereis no END instruction, the execution is returned to the main program when the final line of the sub pro-gram is reached.

(2) If arguments need to be passed to the sub program, they should be defined using the FPRM instruction

at the beginning of the sub program.(3) If the type or the number of arguments passed to the sub program is different from those defined (by the

FPRM instruction) in the sub program, an error occurs at execution.(4) If a program is reset, the control returns to the beginning of the top main program.(5) Definition statements (DEF ACT, DEF FN, DEF PLT, and DIM instructions) executed in the main

program are invalid in a program called by the CALLP instruction. They become valid when the controlis returned to the main program from the program called by the CALLP instruction again.

(6) Speed and tool data are all valid in a sub program. Values of ACCEL and SPD are invalid. The mode ofOADL is valid.

(7) Another sub program can be executed by calling CALLP in a sub program. However, a main program ora program that is currently being executed in another task slot cannot be called. In addition, ownprogram cannot be called, either.

(8) Eight levels (in a hierarchy) of sub programs can be executed by calling CALLP in the first mainprogram.(9) Variable values may be passed from a main program to a sub program using arguments, however, it is

not possible to pass the processing result of a sub program to a main program by assigning it in an argu-ment. To use the processing result of a sub program in a main program, pass the values using externalvariables.

[Related instructions]FPRM (FPRM)

Page 146: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 146/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-127

CHRSRCH (Character search)

[Function]Searches the character string out of the character array.

[Format]

[Terminology]<Character string array variable> Specify the character string array to be searched.<Character string> Specify the character string to be searched.<Search result storage destination> The number of the element for which the character string to be searched

is found is set.

[Reference Program]10 DIM C1$(10)20 C1$(1)="ABCDEFG"30 C1$(2)="MELFA"40 C1$(3)="BCDF"50 C1$(4)="ABD"60 C1$(5)="XYZ"70 C1$(6)="MELFA"80 C1$(7)="CDF"90 C1$(8)="ROBOT"100 C1$(9)="FFF"110 C1$(10)="BCD"120 CHRSRCH C1$(1), "ROBOT", M1 ' 8 is set in M1.

130 CHRSRCH C1$(1), "MELFA", M2 ' 2 is set in M2.

[Explanation](1) The specified character string is searched from the character string array variables, and the element

number of the completely matched character string array is set in <search result storage destination>.Partially matched character strings are not searched.

 

Even if CHRSRCH C1$(1), "ROBO", M1 are described in the above statement example, the matchedcharacter string is not searched.

(2) If the character string to be searched is not found, 0 is set in <search result storage destination>.(3) Character string search is performed sequentially beginning with element number 1, and the element

number found first is set. Even if CHRSRCH C1$(3), "MELFA", M2 are described in the above statement example, 2 is set in M2.(The same character string is set in C1$(2) and C1$(6).)

(4) The <character string array variable> that can be searched is the one-dimensional array only. If a two-dimensional or higher array is specified as a variable, an error will occur at the time of execution.

CHRSRCH[]<Character string array variable>,<Character string>,<Search result storage destination>

Page 147: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 147/457

4-128 Detailed explanation of command words

4MELFA-BASIC IV 

CLOSE (Close)

[Function]Closes the designated file.(including communication lines)

[Format]

[Terminology]<File No.> Designate the No. of the file to be closed. Only a numerical constant is allowed.

If this argument is omitted, all open files are closed.

[Reference Program] 10 OPEN "COM1:" AS #1 ' "Open "COM1:" as file No. 1. 20 PRINT #1,M1

  :100 INPUT #1,M2110 CLOSE #1 ' Close file No. 1, "COM1:".  :200 CLOSE ' Close all open files.

[Explanation](1) This instruction closes files (including communication lines) opened by the OPEN instruction. Data

remaining in the buffer is flushed.The data left in the buffer will be processed as follows when the file is closed: 

Table 4-13:Processing of each buffer when the file is closed

(2) Executing an END statement will also close a file.(3) If the file number is omitted, all files will be closed.

[Related instructions]OPEN (Open), PRINT (Print), INPUT (Input)

CLOSE[] [[#]<File No.>[, [[#]<File No.> ...]

Buffer types Processing when the file is closedCommunication line reception buffer The contents of the buffer are destroyed

Communication line transmissionbuffer 

(No data remains in the transmission buffer since the data in the transmissionbuffer is sent immediately by executing the PRINT instruction.)

File load buffer The contents of the buffer are destroyed.

File unload buffer The contents of the buffer are written into the file, and then the file is closed.

Page 148: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 148/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-129

CLR (Clear)

[Function]This instruction clears general-purpose output signals, local numerical variables in a program, and numeri-cal external variables.

[Format]

[Terminology]<Type> It is possible to specify either a constant or a variable.

0 : All steps 1 to 3 below are executed.1 : The general-purpose output signal is cleared based on the output reset pattern.

The output reset pattern is designated with parameters ORST0 to ORST224.Refer to Page 335, "5.14 About the output signal reset pattern".( 0: OFF, 1: ON, *: Hold )2 : All local numeric variables and numeric array variables used in the program are cleared

to zero3 : Clears all external numerical variables (External system variables and user-defined

external variables) and external numerical array variables, setting them to 0. Externalposition variables are not cleared.

[Reference Program](1) The general-purpose output signal is output based on the output reset pattern.  10 CLR 1

(2) The local numeric variables and numeric array variables in the program are cleared to 0.  10 DIM MA(10)

  20 DEF INTE IVAL  30 CLR 2 ' Clears MA(1) through MA(10), IVAL and local numeric variables in the program to 0.

(3) All external numeric array variables and external numeric array variables are cleared to 0  10 CLR 3

(4) (1) though (3) above are performed simultaneously.  10 CLR 0

[Related parameter]ORST0 to ORST224

[Related system variables]M_IN/M_INB/M_INW, M_OUT/M_OUTB/M_OUTW

CLR[]<Type>

Page 149: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 149/457

4-130 Detailed explanation of command words

4MELFA-BASIC IV 

CMP JNT (Comp Joint)

[Function]Start the soft control mode (compliance mode) of the specified axis in the JOINT coordinates system.Note) The available robot type is limited such as RH-nAH. Refer to "[Available robot type]".

[Format]

[Terminology]<Axis designation> Specify the axis to be controlled in a pliable manner with the bit pattern.

1 : Enable, 0 : Disable &B00000000  This corresponds to axis 87654321.

[Reference Program]10 MOV P120 CMPG 0.0,0.0,1.0,1.0, , , , ' Set softness.30 CMP JNT,&B11 ' The J1 and J2 axes are put in the state where they are controlled in a

pliable manner.40 MOV P250 HOPEN 160 MOV P170 CMP OFF ' Return to normal state.

[Explanation](1) It is possible to control each of the robot's axes in the joint coordinate system in a pliable manner. For

example, if using a horizontal multi-joint robot to insert pins in a workpiece by moving the robot's handup and down, it is possible to insert the pins more smoothly by employing pliable control of the J1 and J2axes (see the statement example above).

(2) The degree of compliance can be specified by the CMPG instruction, which sets the spring constant. Ifthe robot is of the RH-*AH type, specify 0.0 for the horizontal axes J1 and J2 to make the robot behaveequivalently to a servo free system (the spring constant is zero). (Note that the vertical axes cannot bemade to behave equivalently to a servo free system even if 0.0 is set for them. Also, be careful not to letthese axes reach a position beyond the movement limit or where the amount of diversion becomes toolarge.) Note that 4) and 5) below do not function if this servo-free equivalent behavior is in use.

(3) The soft state is maintained even after the robot program execution is stopped. To cancel the soft status,execute the "CMP OFF" command or turn OFF the power.

(4) When pressing in the soft state, the robot cannot move to positions that exceed the operation limit ofeach joint axis.

(5) If the amount of difference between the original target position and the actual robot position becomes

greater than 200 mm by pushing the hand, etc., the robot will not move any further and the operationshifts to the next line of the program.

(6) It is not possible to use CMP JNT, POS, and TOOL at the same time. In other words, an error occurs ifthe CMP POS or CMP TOOL instruction is executed while the CMP JNT instruction is being performed.Cancel the CMP JNT instruction once using the CMP OFF instruction to execute these instructions.

(7) Be aware that the position of the robot may change if the servo status is switched on while this instruc-tion is active.

(8) It is possible to perform jog operations while the robot is in compliance mode. However, the setting of thecompliance mode cannot be canceled by the T/B; in order to do so, execute this instruction in a programor execute it directly via the program edit screen of the T/B.

(9) To change the axis specification, cancel the compliance mode with the CMP OFF instruction first, andthen execute the CMP JNT instruction again.

The compliance mode is in effect continuously until the CMP OFF instruction is exe-cuted, or the power is turned off.

CMP[]JNT, <Axis designation>

  CAUTION

Page 150: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 150/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-131

To execute a jog operation after setting the compliance mode with the CMP JNTinstruction, use the JOINT jog mode.If any other jog mode is used, the robot may operate in a direction different from theexpected moving direction because the directions of the coordinate systems con-trolled by the jog operation and the compliance mode differ.

When performing the teaching of a position while in the compliance mode, performservo OFF first.Be careful that if teaching operation is performed with Servo ON, the original com-mand position is taught, instead of the actual robot position. As a result, the robotmay move to a location different from what has been taught.

[Available robot type]

[Related system variables]M_BTIME

[Related instructions]CMP OFF (Composition OFF), CMPG (Composition Gain), CMP POS (Composition Posture), CMP TOOL(Composition Tool)

RH-5AH/10AH/15AH series

RH-6SH/12SH/18SH series

  CAUTIO

  CAUTIO

Page 151: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 151/457

4-132 Detailed explanation of command words

4MELFA-BASIC IV 

CMP POS (Composition Posture)

[Function]Start the soft control mode (compliance mode) of the specified axis in the XYZ coordinates system.Note) The available robot type is limited such as RV-4A. Refer to "[Available robot type]".

[Format]

[Terminology]<Axis designation> Designate axis to move softly with a bit pattern.

1 : Enable, 0 : Disable &B00000000  This corresponds to axis L2L1CBAZYX

[Reference Program]10 MOV P1 ' Move in front of the part insertion position.20 CMPG 0.5, 0.5, 1.0, 0.5, 0.5, , , ' Set softness30 CMP POS, &B011011 ' The X, Y, A, and B axes are put in the state where they are con-

trolled in a pliable manner.40 MVS P2 ' Moves to the part insertion position.50 M_OUT(10)=1 ' Instructs to close the chuck for positioning.60 DLY 1.0 ' Waits for the completion of chuck closing.(1 sec.)70 HOPEN 1 ' Open the hand.80 MVS, -100 ' Retreats 100 mm in the Z direction of the TOOL coordinate sys-

tem.90 CMP OFF ' Return to normal state.

[Explanation]

(1) The robot can be moved softly with the XYZ coordinate system. 

For example, when inserting a pin in the vertical direction, if the X, Y, A and B axes are set to soft opera-tion, the pin can be inserted smoothly.

(2) The degree of softness can be designated with the CMPG command.(3) The soft state is maintained even after the robot program execution is stopped. To cancel the soft status,

execute the "CMP OFF" command or turn OFF the power.(4) When pressing in the soft state, the robot cannot move to positions that exceed the operation limit of

each joint axis.(5) The deviation of the command position and actual position can be read with M_CMPDST. The success/

failure of pin insertion can be checked using this variable.(6) If the amount of difference between the original target position and the actual robot position becomes

greater than 200 mm by pushing the hand, etc., the robot will not move any further and the operationshifts to the next line of the program.

(7) It is not possible to use CMP JNT, POS, and TOOL at the same time. In other words, an error occurs ifthe CMP POS or CMP TOOL instruction is executed while the CMP JNT instruction is being performed.Cancel the CMP JNT instruction once using the CMP OFF instruction to execute these instructions.

(8) If the servo turns from OFF to ON while this command is functioning, the robot position could change.(9) It is possible to perform jog operations while the robot is in compliance mode. However, the setting of the

compliance mode cannot be canceled by the T/B; in order to do so, execute this instruction in a programor execute it directly via the program edit screen of the T/B.

(10) To change the axis specification, cancel the compliance mode with the CMP OFF instruction first, andthen execute the CMP POS instruction again.

(11) If the robot is operated near a singular point, an alarm may be generated or control may be disabled.Do not operate the robot near a singular point. If this situation occurs, cancel the compliance mode byexecuting a CMP OFF instruction once with servo OFF (or turning OFF and then ON the power again),

keep the robot away from a singular point, and then make the compliance mode effective again.

CMP[]POS, <Axis designation>

Page 152: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 152/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-133

Fig.4-4:The example of compliance mode use

The compliance mode is in effect continuously until the CMP OFF instruction isexecuted, or the power is turned off. Exercise caution when changing the execut-able program number or operating the jog.

To execute a jog operation after setting the compliance mode with the CMP POSinstruction, use the XYZ jog mode.If any other jog mode is used, the robot may operate in a direction different from theexpected moving direction because the directions of the coordinate systems con-trolled by the jog operation and the compliance mode differ.

When performing the teaching of a position while in the compliance mode, performservo OFF first.Be careful that if teaching operation is performed with Servo ON, the original com-mand position is taught, instead of the actual robot position. As a result, the robotmay move to a location different from what has been taught.

[Available robot type]

[Related system variables]M_BTIME

[Related instructions]CMP OFF (Composition OFF), CMPG (Composition Gain), CMP TOOL (Composition Tool), CMP JNT(Comp Joint)

RV-1A/2AJ series

RV-2A/3AJ series

RV-4A/5AJ series

RV-20A

RV-3S/3SJ/3SB/3SJB series

RV-6S/6SL/12S/12SL series

RH-5AH/10AH/15AH series

RH-6SH/12SH/18SH series

Positioning device

+Y

+X

+Z

P2

Robot hand CMP POS, &B000011  CBAZYX

Soften the control of axis X and Y in theXYZ coordinatessystem.

J2

+Y

+X

J4

J1

OP2

Positioning device

J2

+Y

+X

J4

J1

O

P2

Positioning device

  CAUTIO

  CAUTIO

  CAUTIO

Page 153: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 153/457

4-134 Detailed explanation of command words

4MELFA-BASIC IV 

CMP TOOL (Composition Tool)

[Function]Start the soft control mode (compliance mode) of the specified axis in the TOOL coordinates system.Note) The available robot type is limited such as RV-4A. Refer to "[Available robot type]".

[Format]

[Terminology]<Axis designation> Designate axis to move softly with a bit pattern.

1 : Enable, 0 : Disable &B00000000  This corresponds to axis L2L1CBAZYX

[Reference Program]10 MOV P1 ' Moves to in front of the part insertion position.20 CMPG 0.5, 0.5, 1.0, 0.5, 0.5, , , ' Set softness.30 CMP TOOL, &B011011 ' The X, Y, A, and B axes are put in the state where they are con-

trolled in a pliable manner.40 MVS P2 ' Moves to the part insertion position.50 M_OUT(10)=1 ' Instructs to close the chuck for positioning.60 DLY 1.0 ' Waits for the completion of chuck closing.(1 sec.)70 HOPEN 1 ' Open the hand.80 MVS, -100 ' Retreats 100 mm in the Z direction of the TOOL coordinate sys-

tem.90 CMP OFF ' Return to normal state.

[Explanation](1) The robot can be moved softly with the tool coordinate system. For the tool coordinate system, pleaserefer to Page 324, "5.6 Standard Tool Coordinates".

(2) For example, when inserting a pin in the tool coordinate Z axis direction, if the X, Y, A and B axes are set tosoft operation, the pin can be inserted smoothly.

(3) The degree of softness can be designated with the CMPG command.(4) The soft state is maintained even after the robot program execution is stopped. To cancel the soft status,

execute the "CMP OFF" command or turn OFF the power.(5) When pressing in the soft state, the robot cannot move to positions that exceed the operation limit of each

 joint axis.(6) The deviation of the command position and actual position can be read with M_CMPDST. The success/

failure of pin insertion can be checked using this variable.(7) If the amount of difference between the original target position and the actual robot position becomes

greater than 200 mm by pushing the hand, etc., the robot will not move any further and the operation shiftsto the next line of the program.

(8) It is not possible to use CMP JNT, POS, and TOOL at the same time. In other words, an error occurs if theCMP POS or CMP TOOL instruction is executed while the CMP JNT instruction is being performed. Can-cel the CMP JNT instruction once using the CMP OFF instruction to execute these instructions.

(9) If the servo turns from OFF to ON while this command is functioning, the robot position could change.(10) It is possible to perform jog operations while the robot is in compliance mode. However, the setting of the

compliance mode cannot be canceled by the T/B; in order to do so, execute this instruction in a programor execute it directly via the program edit screen of the T/B.

(11) To change the axis specification, cancel the compliance mode with the CMP OFF instruction first, andthen execute the CMP TOOL instruction again.

(12) For vertical 5-axis robots (such as the RV-5AJ), only the X and Z axes can be used for axis specification.

(13) If the robot is operated near a singular point, an alarm may be generated or control may be disabled. Donot operate the robot near a singular point. If this situation occurs, cancel the compliance mode by exe-cuting a CMP OFF instruction once with servo OFF (or turning OFF and then ON the power again), keepthe robot away from a singular point, and then make the compliance mode effective again.

CMP[]TOOL, <Axis designation>

Page 154: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 154/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-135

Fig.4-5:The example of using the compliance mode

The compliance mode is in effect continuously until the CMP OFF instruction isexecuted, or the power is turned off. Exercise caution when changing the execut-able program number or operating the jog.

To execute a jog operation after setting the compliance mode with the CMP TOOL

instruction, use the TOOL jog mode.If any other jog mode is used, the robot may operate in a direction different from theexpected moving direction because the directions of the coordinate systems con-trolled by the jog operation and the compliance mode differ.

When performing the teaching of a position while in the compliance mode, performservo OFF first.Be careful that if teaching operation is performed with Servo ON, the original com-mand position is taught, instead of the actual robot position. As a result, the robotmay move to a location different from what has been taught.

[Available robot type]

[Related system variables]M_BTIME

[Related instructions]CMP OFF (Composition OFF), CMPG (Composition Gain), CMP POS (Composition Posture), CMP JNT(Comp Joint)

RV-1A/2AJ seriesRV-2A/3AJ series

RV-4A/5AJ series

RV-20A

RV-3S/3SJ/3SB/3SJB series

RV-6S/6SL/12S/12SL series

RH-5AH/10AH/15AH series

RH-6SH/12SH/18SH series

Positioning device

+Y +X

+Z

Robot hand

P2

 Tool coordinate systemCMP TOOL, &B000011  CBAZYX

Softens the Xand Y axis of thetool coordinatesystem.

  CAUTIO

  CAUTIO

  CAUTIO

Page 155: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 155/457

4-136 Detailed explanation of command words

4MELFA-BASIC IV 

CMP OFF (Composition OFF)

[Function]Release the soft control mode (compliance mode).Note) The available robot type is limited such as RV-4A. Refer to "[Available robot type]".

[Format]

[Reference Program]10 MOV P1 ' Moves to in front of the part insertion position.20 CMPG 0.5, 0.5, 1.0, 0.5, 0.5, , , ' Set softness.30 CMP TOOL, &B011011 ' The X, Y, A, and B axes are put in the state where they are con-

trolled in a pliable manner.40 MVS P2 ' Moves to the part insertion position.

50 M_OUT(10)=1 ' Instructs to close the chuck for positioning.60 DLY 1.0 ' Waits for the completion of chuck closing.(1 sec.)70 HOPEN 1 ' Open the hand.80 MVS, -100 ' Retreats 100 mm in the Z direction of the TOOL coordinate sys-

tem.90 CMP OFF ' Return to normal state.

[Explanation](1) This instruction cancels the compliance mode started by the CMP TOOL, CMP POS, or CMP JNT

instruction.(2) In order to cancel jog operations in the compliance mode, either execute this instruction in a program or

execute it directly via the program edit screen of the T/B.

[Available robot type]

[Related instructions]

CMPG (Composition Gain), CMP TOOL (Composition Tool), CMP POS (Composition Posture), CMP JNT(Comp Joint)

CMP[]OFF

RV-1A/2AJ series

RV-2A/3AJ series

RV-4A/5AJ series

RV-20A

RV-3S/3SJ/3SB/3SJB series

RV-6S/6SL/12S/12SL series

RH-5AH/10AH/15AH series

RH-6SH/12SH/18SH series

Page 156: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 156/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-137

CMPG (Composition Gain)

[Function]Specify the softness of robot control.Note) The available robot type is limited such as RV-4A. Refer to "[Available robot type]".

[Format]CMP POS, CMP TOOL

CMP JNT

[Terminology]<X to L2 axis gain><J1 to J8 axis gain> Specify this argument using a constant.

The softness can be set for each axis.Value 1 .0 indicates the normal status, and the 0.2 is the softest.If the value is omitted, the current setting value will be applied.

[Reference Program]10 CMPG , ,0.5, , , , , ' This statement selects only the Z-axis. For axes that are omitted, keep the corre-

sponding entries blank and just enter commas.

[Explanation](1) The softness can be designated in each axis units.(2) The soft state will not be entered unless validated with the CMP POS or CMP TOOL commands.(3) A spring-like force will be generated in proportion to the deviation of the command position and actual

position. CMPG designates that spring constant.(4) The deviation of the command position and actual position can be read with M_CMPDST. The success/

failure of pin insertion can be checked using this variable.(5) If a small gain is set, and the soft state is entered with the CMP POS, CMP TOOL, and CMP JNT com-

mands, the robot position could drop. Set the softness state gradually while checking it.(6) The softness can be changed halfway when this command executed under the soft control status.(7) The gain value of less than 0.2 is invalid. The robot is controlled using the value 0.2. 

(However, up to 0.1 can be set for the RV-1A/2AJ, and up to 0.0 for the RH-[]AH.) 

 Also, two or more decimal positions can be set for gain values.

[Available robot type]

CMPG[] [<X axis gain>], [<Y axis gain>], [<Z axis gain>], [<A axis gain>],

[<B axis gain>], [<C axis gain>], [<L1 axis gain>], [<L2axis gain>],

CMPG[] [<J1 axis gain>], [<J2 axis gain>], [<J3 axis gain>], [<J4 axis gain>],

[<J5 axis gain>], [<J6 axis gain>], [<J7 axis gain>], [<J8 axis gain>],

RV-1A/2AJ series

RV-2A/3AJ series

RV-4A/5AJ series

RV-20A

RV-3S/3SJ/3SB/3SJB series

RV-6S/6SL/12S/12SL series

RH-5AH/10AH/15AH series

RH-6SH/12SH/18SH series

Page 157: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 157/457

4-138 Detailed explanation of command words

4MELFA-BASIC IV 

CNT (Continuous)

[Function]Designates continuous movement control for interpolation. Shortening of the operating time can be per-formed by carrying out continuous movement.

[Format]

[Terminology]<1/0> Designate the continuous operation or acceleration/deceleration operation mode.

1 : Continuous movement.0 : Acceleration/deceleration movement.(default value.)

<Numeric value 1> Specify the maximum proximity distance in mm for starting the next interpolation when

changing to a new path segment.The default value is the position where the acceleration/deceleration is started.

<Numeric value 2> Specify the maximum proximity distance in mm for ending the previous interpolation whenchanging to a new path segment.The default value is the position where the acceleration/deceleration is started.

[Reference Program]When the maximum neighborhood distance is specified when changing a locus.10 CNT 0 ' Invalidate CNT (Continuous movement).20 MVS P1 ' Operate with acceleration/deceleration30 CNT 1 ' Validate CNT (Continuous movement).

 (Operate with continuous movement after this line.)

40 MVS P2 ' The connection with the next interpolation is continuous movement.50 CNT 1,100,200 ' Continuous operation specification at 100 mm on the starting side and at 200

mm on the end side.60 MVS P3 ' Continuous operation at a specified distance before and after an interpolation.70 CNT 1,300 ' Continuous operation specification at 300 mm on the starting side and at 300

mm on the end side.80 MOV P4 ' Continuous operation specification at 300 mm on the starting side.90 CNT 0 ' Invalidate CNT (Continuous movement).100 MOV P5 ' Operate with acceleration/deceleration

Fig.4-6:Example of continuous path operation

CNT[] <Continuous movement mode/acceleration/deceleration movement mode>]

[, <Numeric value 1>] [, <Numeric value 2>]

P1

P2

P3

P4P5

Start position of m ovement

 Al though the ne ighborhooddistance (300 mm) whenmoving to P4 has been set,continuous operation whenmoving to P5 has been

canceled. Therefore, it moves toP4 first, and then moves to P 5.

It moves to P1 first and the n toP2 since continuous operationis not set up.

Continuous operation is performed at

a distance shorter than the smaller of the neighborhood distance (the initialsetting value in the robot controller)when moving to P2 and the fulcrumneighborhood point (100 mm) whenmoving to P3.

Continuous operation is performed at a distanceshorter than the smaller of the neighborhood distance(200 mm) when m oving to P3 and the fulcrumneighborhood point (300 mm) when moving to P4.

Page 158: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 158/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-139

[Explanation](1) The interpolation (40 line to 80 line of the example) surrounded by CNT 1 - CNT 0 is set as the target of

continuous action.(2) The system default value is CNT 0 (Acceleration/deceleration movement).(3) If values 1 and 2 are omitted, the connection with the next path segment is started from the time the

deceleration is started.

(4) As shown in Fig. 4-7, in the acceleration and deceleration operating mode, the speed is reduced in frontof the target position. After moving to the target position, the speed for moving to the next target positionstarts to be accelerated. On the other hand, in the continuous operating mode, the speed is reduced infront of the target position, but it does not stop completely. The speed for moving to the next target posi-tion starts to be accelerated at that point. Therefore, it does not pass through each target position, but itpasses through the neighborhood position.

Fig.4-7:Acceleration/deceleration movement and continuous movement

(5) The neighborhood distance denotes the changing distance to the interpolation operation at the next tar-get position. If this neighborhood distance (numerical value 1, numerical value 2) is omitted, the accel-erate and deceleration starting position will be the changing position to the next interpolation. In thiscase, it passes through a location away from the target position, but the operating time will be the short-est. To pass through a location closer to the target position, set this neighborhood distance (numericalvalue 1, numerical value 2). 

Fig.4-8:Setting Up the Neighborhood Distance

10 MOV P120 MVS P230 MOV P3

It decelerates and accelerates to P1 , P2

and P3. After moving to the target position,it moves to the ne xt target position.

10 CNT 120 MOV P130 MVS P240 MOV P350 CNT 0

It passes through the neighborhood of P1and P2, and then moves to P3.

P1 P2

P3

Start position of movement

 Acce leratio n/d ecelerat ion m ovem en t

P1 P2

P3

Continuous movement

P3P2

t (Time)

P1v (Speed)

P3P2P1

*The above graph shown an example.Depending on the moving distance and/or speed, acceleration and deceleration mayoccur during interpolation connection.

Start position of movement

v (Speed)

t (Time)

P1

P2

P3

If the neighborhooddistance is not specified,dotted line operation willbe performed.10 CNT 120 MOV P130 MVS P240 MOV P3

50 CNT 0

If the neighborhood distanceis specified, solid lineoperation will be performed.10 CNT 1, MA, MB20 MOV P130 CNT 1, MC, MD40 MVS P250 MOV P3

60 CNT 0

Deceleration startposition

 Acce lera tion endposition

MB

MC

MC

MDIf the MB and MC valuesare different, connectionis made using a valuelower than the smaller of these two values.

*If "30 CNT 1, MC, MD" arenot described, the value of MC in the figure will be MA,and the value of M D will be

MB .

 Acce lerat ion endposition

Deceleration startposition

If the MB and MC valuesare different, connectionis made using a valuelower than the smaller of 

these two values.

Page 159: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 159/457

4-140 Detailed explanation of command words

4MELFA-BASIC IV 

(6) If the specifications of numerical value 1 and numerical value 2 are different, continuous operation will beperformed at the position (distance) that is the smaller of these two.

(7) If numeric value 2 is omitted, the same value as numeric value 1 will be applied.(8) When continuous operation is specified, the positioning completion specification by the FINE instruction

will be invalid.(9) If the proximity distance (value 1, value 2) is set small, the movement time may become longer than in

the status where CNT 0.

Page 160: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 160/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-141

COLCHK (Col Check)

[Function]Set to enable/disable the impact detection function.The impact detection function quickly stops the robot when the robot's hand and/or arm interferes with

peripheral devices so as to minimize damage to and deformation of the robot's tool part or peripheraldevices. However, it cannot completely prevent such damage and deformation.The impact detection function can only be used in certain models (Refer to "[Available robot type]".). Thisfunction is available for controller software version J2 or later.

[Format]

[Terminology]ON Enable the impact detection function.

Once an impact is detected, it immediately stops the robot, issues an error numberedin 1010's, and turns OFF the servo.

OFF Disable the impact detection functionNOERR Even if an impact is detected, no error is issued. (If omitted, an error will occur.)

[Reference Program 1]If an error is set in the case of impact10 COLLVL 80,80,80,80,80,80,, 'Specify the allowable level for impact detection.20 COLCHK ON 'Enable the impact detection function.30 MOV P140 MOV P250 DLY 0.2 'Wait until the completion of operation

(FINE instruction can also be used).50 COLCHK OFF 'Disable the impact detection function.60 MOV P3

[Reference Program 2]If interrupt processing is used in the case of impact10 DEF ACT 1,M_COLSTS(1)=1 GOTO *HOME,S'Define the processing to be executed when an impact

is detected using an interrupt.20 ACT 1=130 COLCHK ON,NOERR 'Enable the impact detection function in the error non-occurrence

mode.40 MOV P1

50 MOV P2 'If an impact is detected while executing lines 40 through 70, it jumps to interrupt processing.60 MOV P370 MOV P480 ACT 1=0  :1000 *HOME 'Interrupt processing during impact detection1010 COLCHK OFF 'Disable the impact detection function.1020 SERVO ON 'Turn the servo on.1030 PESC=P_COLDIR(1)*(-2) 'Create the amount of movement for escape operation.1040 PDST=P_FBC(1)+PESC 'Create the escape position.1050 MVS PDST 'Move to the escape position.

1060 ERROR 9100 'Stop operation by generating a user-defined L level error.

COLCHK[]ON [, NOERR] / OFF

Page 161: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 161/457

4-142 Detailed explanation of command words

4MELFA-BASIC IV 

[Explanation](1) The impact detection function estimates the amount of torque that will be applied to the axes during

movement executed by a Move instruction. It determines that there has been an impact if the differencebetween the estimated torque and the actual torque exceeds the tolerance, and immediately stops therobot.

(2) Immediately after power ON, the impact detection function is disabled. Enable the COL parameterbefore using.

(3) The detection level can be adjusted by a COLLVL instruction. The initial value of the detection level is thesetting value of the COLLVL parameter.

(4) After the impact detection function is enabled by this instruction, that state is maintained continuously

until it is disabled by the COLCHK OFF instruction, the program is reset, an END instruction is executedor the power is turned OFF.(5) Even if the impact detection function is disabled by this instruction, the impact tolerance level set by a

COLLVL instruction is retained.(6) When the continuity function is enabled, the previous impact detection setting state is restored at next

power ON even if the power is turned OFF.(7) Error 3950 occurs if an interrupt by the M_COLSTS status variable (an interrupt with the interrupt

condition of M_COLSTS(*)=1 and * denotes a machine number) is not enabled when specifying NOERR(error non-occurrence mode). See [Syntax Example 2]. Error 3960 also occurs if this interrupt processingis disabled while in the error non-occurrence mode.

(8) If an impact is detected while in the error non-occurrence mode, the robot turns OFF the servo andstops. Therefore, no error occurs and operation also continues. However, it is recorded in the error logthat an impact was detected. (The recording into the log is done only if no other errors occursimultaneously.)

(9) If an attempt is made to execute COLCHK ON and COLCHK ON,NOERR on a robot that cannot use theimpact detection function, low level error 3970 occurs. In the case of COLCHK OFF, neither error occursnor processing is performed.

(10) The impact detection function cannot be enabled while compliance is being enabled by a CMPinstruction or the torque limit is being enabled by a TORQ instruction. In this case, error 3940 will occur ifan attempt is made to enable the impact detection function. Conversely, error 3930 will occur if anattempt is made to enable a CMP or TORQ instruction while impact detection is being enabled.

(11) If COLCHK OFF is described immediately after an operation instruction, impact detection may not worknear the last stop position of a given operation. As shown in syntax example 1, execute COLCHK OFFupon completion of positioning by a DLY or FINE instruction between an operation instruction and aCOLCHK OFF instruction.

(12) Erroneous detection may occur if the hand weight (HNDDATn parameter) and workpiece weight(WRKDATn parameter) are not set correctly. Be sure to set these parameters correctly before using.

Estimated torque

60%(COLLVL 60,60,…afterexecution)

100% (manufacturer's initialvalue + side)

Actual torqueDetects an impact (at 100%).

Detects an impact (at 60%).

Torque

Time

Detection level + side100% (manufacturer's initialvalue - side)

60%

Detection level -side

Page 162: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 162/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-143

[Related instructions and variables]COLLVL (Col Level), M_COLSTS, J_COLMXL, P_COLDIR

[Related parameter]COL, COLLVL, COLLVLJG

[Available robot type]RV-3S/3SJ/3SB/3SJB series

RV-6S/6SL/12S/12SL series

RH-6SH/12SH/18SH series

Page 163: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 163/457

4-144 Detailed explanation of command words

4MELFA-BASIC IV 

COLLVL (Col Level)

[Function]Set the detection level of the impact detection function.The impact detection function can only be used in certain models (Refer to "[Available robot type]".). This

function is available for controller software version J2 or later.

[Format]

[Terminology]<J1 to J8 axis> Specify the detection level in a range between 1 and 500%.

If omitted, the previously set value is retained.Currently, the J7 and J8 axes do not function.The initial value is the setting value of the COLLVL parameter.

[Reference Program]10 COLLVL 80,80,80,80,80,80,, 'Specify the allowable level for impact detection.20 COLCHK ON 'Enable the impact detection function.30 MOV P140 COLLVL ,50,50,,,,, 'Change the allowable level of the J2 and J3 axes for impact detection.50 MOV P260 DLY 0.2 'After arriving at P2, disable impact detection.70 COLCHK OFF 'Disable the impact detection function.80 MOV P3

[Explanation](1) Set the allowable level of each axis for the impact detection function during program operation.

(2) Normally, the setting value of the allowable level immediately after power ON is the setting value of theCOLLVL parameter.

(3) "All axes 100%" is set as the initial value of the COLLVL parameter.(4) If this value is increased, the detection level (sensitivity) lowers; if this value is lowered, the detection

level increases.(5) Please do not increase the detection level too much, as it increases the possibility of erroneous

detection. Erroneous detection may also occur even with the initial value depending on the posture andoperating speed. In such a case, lower the sensitivity level.

(6) Erroneous detection may occur if the hand weight (HNDDATn parameter) and workpiece weight(WRKDATn parameter) are not set correctly. Be sure to set these parameters correctly before using.

(7) When the continuity function is enabled, the previously set value is restored at next power ON even if thepower is turned OFF.

(8) The allowable level is reset to the setting value of the COLLVL parameter when a program reset or anEND instruction is executed.(9) Even if an attempt is made to execute this instruction on robots that cannot use the impact detection

function, the instruction is ignored and thus no error occurs.(10) Currently, the impact detection function does not work even if the J7 and J8 axes are set. They are

reserved for future expansion.

[Related instructions and variables]COLCHK (Col Check), M_COLSTS, J_COLMXL, P_COLDIR

[Related parameter]COL,COLLVL

[Available robot type]

COLLVL[] [<J1 axis>],[<J2 axis>],[<J3 axis>],[<J4 axis>],[<J5 axis>],[<J6 axis>],[<J7 axis>],[<J8 axis>]

RV-3S/3SJ/3SB/3SJB series

RV-6S/6SL/12S/12SL series

RH-6SH/12SH/18SH series

Page 164: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 164/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-145

COM ON/COM OFF/COM STOP (Communication ON/OFF/STOP)

[Function]COM ON :Allows interrupts from a communication line.COM OFF :Prohibits interrupts from a communication line.

COM STOP :Prevents interrupts from a communication line temporarily (data is received). Jump immediately to the interrupt routine the next time the COM ON instruction is executed.

[Format]

[Terminology]<Communication Line No.> Describes numbers 1 to 3 assigned to the communication line. 

(If the argument is omitted, 1 is set as the default value.)

[Reference Program] Refer to Page 195, "ON COM GOSUB (ON Communication Go Subroutine)".

[Explanation](1) When COMMON OFF is executed, even if communications are attempted, the interrupt will not be gen-

erated.(2) For information on communication line Nos., refer to the Page 198, "OPEN (Open)".(3) After COM STOP is executed, even if communication is attempted, the interrupt will not be generated.

Note that the receiving data and the fact of the interrupt will be recorded, and be executed the next timethe line is reopened.

COM[(<Communication Line No.>)][]ON

COM[(<Communication Line No.>)][]OFF

COM[(<Communication Line No.>)][]STOP

Page 165: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 165/457

4-146 Detailed explanation of command words

4MELFA-BASIC IV 

DEF ACT (Define act)

[Function]This instruction defines the interrupt conditions for monitoring signals concurrently and performing interruptprocessing during program execution, as well as the processing that will take place when an interrupt

occurs.

[Format]

[Terminology]<Priority No.> This is the priority No. of the interrupt. It can be set with constant Nos. 1 to 8.<Expression> For the interrupt status, use the formats described below: (Refer to the syntax diagram)

<Numeric type data> <Comparison operator> <Numeric type data> or<Numeric type data> <Logical operator> <Numeric type data><Numeric type data> refers to the following:<Numeric type constant>| <Numeric variable>|<Numeric array variable>|

 

<Component data><Process> Refers to a GOTO statement or a GOSUB statement used to process an interrupt when

it occurs.<Type> When omitted: Stop type 1

The robot stops at the stop position, assuming 100% execution of the external override.If the external override is small, the time required for the robot to stop becomes longer, butit will always stop at the same position.S : Stop type 2 (only for software version E3 or later) 

The robot decelerates and stops in the shortest time and distance possible, independentlyof the external override.

L : Execution complete stop 

The interrupt processing is performed after the robot has moved to the target position(the line being executed is completed).

[Reference Program]10 DEF ACT 1,M_IN(17)=1 GOSUB 100 ' Defines the subroutine at line 100 to be the one to be

called up when the status for the general purpose inputsignal No. 17 is ON.

20 DEF ACT 2,MFG1 AND MFG2 GOTO 200 ' Defines the line 200 as the one to jump to when thelogic operation of AND applied to MFG1 or MFG2results in "true."

30 DEF ACT 3,M_TIMER(1)>10.5 GOSUB *LBL ' When 10.5 seconds pass, the program jumps to theline 300 subroutine.

  :100 M_TIMER(1)=0 ' Sets the timer to zero.110 ACT 3=1 ' Enables ACT 3.120 RETURN 0200 MOV P_SAFE210 END300 *LBL310 M_TIMER(1)=0.0 ' Resets the timer to zero.320 ACT 3=0 ' Disables ACT 3.320 RETURN 0

DEF[]ACT[]<Priority No.>, <Expression>[]<Process> [, <Type>]

Page 166: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 166/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-147

[Explanation](1) The priority level for the interrupts is decided by the <Priority No.>, and the priority level, from the highest

ranges from 1 to 8.(2) There can be up to 8 settings for the interrupts. Use the <Priority No.> to differentiate them.(3) An <expression> should be either a simple logical operation or a comparison operation (one operator).

Parentheses cannot be used either.

(4) If two DEF ACT instructions with the same priority number are included in a program, the latter onedefined becomes valid.

(5) Since DEF ACT defines only the interrupt, always use the ACT command to designate the enable/dis-able status of the interrupt.

(6) The communications interrupt (COM) has a higher priority level than any of the interrupts defined byDEF ACT.

(7) DEF ACT definitions are valid only in the programs where they are defined. These are invalid whencalled up in a program by CALLP. If necessary, the data in a sub program may need to be redefined.

(8) If an interrupt is generated when a GOTO command is designated by <Process> for a DEF ACT com-mand, during execution of the remaining program, the interrupt in progress will remain, and only inter-rupts of a higher level will be accepted. The interrupt in progress for a GOTO statement can be canceledwith the execution of an END statement.

(9) Expressions containing conditional expressions combined with logical operations, such as (M1 AND&H001) = 1, are not allowed.

Specify the proper interrupt stop type according to the purpose. Specify "S" for thestop type if it is desired to stop the robot in the shortest time and distance possibleby an interrupt while the robot is executing a movement instruction.

  CAUTION

Page 167: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 167/457

4-148 Detailed explanation of command words

4MELFA-BASIC IV 

The following conceptual diagrams illustrate the effects of the three types of execution program stop com-mands when the interrupt conditions are met while the robot is moving according to a movement instruction.

Table 4-14:Conceptual diagram showing the effects of different stop commands

[Related instructions]

 ACT (Act)

External override 100% (maximum speed) External override 50%

Stop type 1(If the argument isomitted)S1=S2

Stop type 2(S)

Execution com-plete stop(L)S3=S4

Speed

Time

Interrupt

Stop distance S1

Time

Speed

Interrupt

Stop distance S2

Speed

Time

InterruptSpeed

Time

Interrupt

Decelerate and stop immediately

Speed

Time

Interrupt

Total travel distance S3

Speed

Time

Interrupt

Total travel distance S4

Page 168: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 168/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-149

DEF ARCH (Define arch)

[Function]This instruction defines an arch shape for the arch motion movement corresponding to the MVA instruction.

[Format]This function is available for controller software version G2 or later.

[Terminology]<Arch number> Arch motion movement pattern number. Specify a number from 1 to 4 using a con-

stant or a variable.<Upward movement increment>

<Downward movement increment >Refer to figure at right. It is pos-sible to specify either a con-stant or a variable.

<Upward evasion increment><Downward evasion increment><Interpolation type> Interpolation type for upward

and downward movements.Linear/joint = 1/0

<Interpolation type 1> Detour/short cut = 1/0,<Interpolation type 2> 3-axis XYZ/Equivalent rotation = 1/0

If any of the arguments besides the arch number is omitted, the default value is employed.The default values are set by the following parameters. Check the corresponding parameters to see the values;it is also possible to modify the values.

Vertical multi-joint robot(RV-1A/2AJ, RV-4A/5AJ, etc.)  Horizontal multi-joint robot(RH-5AH **, etc.)

[Reference Program]10 DEF ARCH 1,5,5,20,2020 MVA P1,1 'Performs the arch motion movement defined in the shape definition in line 10.30 MVA P2,2 'The robot moves according to the default values specified by the parameters.

[Explanation]

(1) If the MVA instruction is executed without the DEF ARCH instruction, the robot moves according to thearch shape specified by the parameters.(2) Used to change the increments in a program, etc.

DEF[]ARCH[]<Arch number>, [<upward movement increment>][<downward movement increment >], 

[<Upward evasion increment>], [<downward evasion increment>],

[<interpolation type>], [<interpolation type 1>, <interpolation type 2> ]

Parameter name Arch number Upward movement

increment (mm)Downward movement

increment (mm)Upward evasionincrement (mm)

Downward evasionincrement (mm)

 ARCH1S 1 0.0 0.0 30.0 30.0

 ARCH2S 2 10.0 10.0 30.0 30.0

 ARCH3S 3 20.0 20.0 30.0 30.0

 ARCH4S 4 30.0 30.0 30.0 30.0

Parameter

name

 Arch

number 

Interpolation

type

Interpolation

type 1

Interpolation

type 2

Parameter

name

 Arch

number 

Interpolation

type

Interpolation

type 1

Interpolation

type 2 ARCH1T 1 1 0 0 ARCH1T 1 0 0 0

 ARCH2T 2 1 0 0 ARCH2T 2 0 0 0

 ARCH3T 3 1 0 0 ARCH3T 3 0 0 0

 ARCH4T 4 1 0 0 ARCH4T 4 0 0 0

× ●

Downwardmovementincrement

Downwardevasion

increment

Upnwardevasion

increment

Upnwardmovementincrement

Page 169: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 169/457

4-150 Detailed explanation of command words

4MELFA-BASIC IV 

[Related instructions]MVA (Move Arch), ACCEL (Accelerate), OVRD (Override), MVS (Move S)(Used as a reference for interpo-lation types 1 and 2)

Page 170: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 170/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-151

DEF CHAR (Define Character)

[Function]Declares a character string variable. It is used when using a variable with a name that begins with a charac-ter other than "C." It is not necessary to declare variables whose names begin with the character "C" using

the DEF CHAR instruction.[Format]

[Terminology]<Character string variable name> Designate a variable name.

[Reference Program] 10 DEF CHAR MESSAGE ' Declare "MESSAGE" as a character string variable.

 20 MESSAGE = "WORKSET" ' Substitute "WORKSET" in the MESSAGE variable. 30 CMSG = "ABC" ' Substitute "ABC" for variable CMSG. For variables starting with

C, the definition of "DEF CHAR" is not required.

[Explanation](1) The variable name can have up to eight characters. Refer to the Page 96, "4.3.6 Types of characters

that can be used in program" for the characters that can be used.(2) When designating multiple variable names, the maximum value (127 characters including command)

can be set on one line.(3) A variable becomes a global variable that is shared among programs by placing "_" after C in the vari-

able name and writing it in a base program. 

Refer to Page 105, "4.3.24 User-defined external variables" for details.

DEF[]CHAR[]<Character string variable name> 

[, <Character string variable name>...

Page 171: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 171/457

4-152 Detailed explanation of command words

4MELFA-BASIC IV 

DEF FN (Define function)

[Function]Defines a function and gives it name.

[Format]

[Terminology]<Identification character> The identification character has the following four type.

Numeric value type:MCharacter string type:CPosition type:PJoint type:J

<Name> Describe a user-selected character string. (5 is the maximum)<Dummy argument> When a function has been called up, it is transferred to the function.

It is possible to describe all the variables, and up to 16 variables can be used.<Function Definition Expression> 

Describe the expression for what operation to use as a function.

[Reference Program]10 DEF FNMAVE(MA,MB)=(MA+MB)/2 ' Define FNMAVE to obtain the average of two numeric val-

ues.20 MDATA1=2030 MDATA2=3040 MAVE=FNMAVE(MDATA1,MDATA2) ' Substitute average value 25 of 20 and 30 in numeric vari-

able MAVE.50 DEF FNPADD(PA,PB)=PA+PB ' Position type addition.60 P10=FNPADD(P1,P2)

[Explanation](1) FN + <Name> becomes the name of the function. The function name can be up to 8 characters long. Example) Numeric value type .... FNMMAX Identification character: M  Character string type ... FNCAME$ Identification character: C (Describe $ at the end of the name)(2) A function defined with DEF FN is called a user-defined function. A function as long as one line can be

described.(3) Built-in functions and user-defined functions that have already been defined can be used in the function

definition expression. In this case, up to 16 levels of user-defined functions can be written.

(4) If the variables used in <Function Definition Expression> are not located in <Dummy Argument>, thenthe value that the variable has at that time will be used. Also, an error will occur if during execution, thenumber or argument type (numeric value or character string) of arguments differs from the number ortype declared.

(5) A user-defined function is valid only in the program where it is defined. It cannot be used by a CALLPdesignation program.

DEF[]FN <Identification character><Name> [(<Dummy Argument> [, <Dummy Argument>]...)]

= <Function Definition Expression>

Page 172: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 172/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-153

DEF INTE/DEF FLOAT/DEF DOUBLE (Define Integer/Float/Double)

[Function]Use this instruction to declare numerical values. INTE stands for integer, FLOAT stands for single-precisionreal number, and DOUBLE stands for double-precision real number.

[Format]

[Terminology]<Numeric value variable name> Designate the variable name.

[Reference Program](1) The definition of the integer type variable.  10 DEF INTE WORK1, WORK2' Declare WORK 1 and WORK 2 as an numeric value variable name.  20 WORK1 = 100 ' Substitute the value 100 in WORK 1.  30 WORK2 = 10.562 ' Numerical "11" is set to WORK2.  40 WORK2 = 10.12 ' Numerical "10" is set to WORK2.

(2) The definition of the single precision type real number variable.  10 DEF FLOAT WORK3  20 WORK3 = 123.468 ' Numerical "123.468000" is set to WORK3.

(3) The definition of the double precision type real number variable.

  10 DEF DOUBLE WORK4  20 WORK4 = 100/3 ' Numerical "33.333332061767599" is set to WORK4. 

[Explanation](1) The variable name can have up to eight characters. Refer to the Page 96, "4.3.6 Types of characters

that can be used in program" for the characters that can be used.(2) When designating multiple variable names, the maximum value (123 characters including command)

can be set on one line.(3) The variable declared with INTE will be an integer type.(-32768 to +32767)(4) The variable declared with FLOAT will be a single-precision type.(+/-1.70141E+38)(5) The variable declared with DOUBLE will be a double-precision type.(+/-1.701411834604692E+308)

DEF[]INTE[] <Numeric value variable name> [, <Numeric value variable name>]...

DEF[] FLOAT[] <Numeric value variable name> [, <Numeric value variable name>]...

DEF[]DOUBLE[] <Numeric value variable name> [, <Numeric value variable name>]...

Page 173: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 173/457

4-154 Detailed explanation of command words

4MELFA-BASIC IV 

DEF IO (Define IO)

[Function]Declares an input/output variable. Use this instruction to specify bit widths. M_IN and M_OUT variables areused for normal single-bit signals, M_INB and M_OUTB are used in the case of 8-bit bytes, and M_INW and

M_OUTW are used in the case of 16-bit words.Be aware that it is not allowed to reference output signals with variables declared using this instruction.

[Format]

[Terminology]<Input/output variable name> Designate the variable name.<Type designation> Designate BIT(1bit), BYTE(8bit), WORD(16bit) or INTEGER.

<Input/output bit No.> Designate the input(When referencing) or output(When assigning) bit No.<Mask information> Designate when only a specific signal is to be validated.

[Reference Program](1) Assign the input variable named PORT1 to input/output signal number 6 in bit type.

  10 DEF IO PORT1 = BIT,6:

 100 PORT1 = 1 ' Output signal number 6 turns on.  : 200 PORT1 = 2 ' Output signal number 6 turns off.(Because the lowest bit of the numerical value 2 is

0.) 210 M1 = PORT1 ' Substitute the state of the input signal number 6 for M11.

(2) Assign the input variable named PORT2 to input/output signal number 5 in byte type, and specify themask information as 0F in hexadecimal.

  10 DEF IO PORT2 = BYTE, 5, &H0F  : 100 PORT2 = &HFF ' Output signal number 5 to 8 turns on.  : 200 M2 = PORT2 ' Substitute the value of the input signals 5 to 8 for the variable M2.

(3) Assign the input variable named PORT3 to input/output signal number 8 in word type, and specify themask information as 0FFF in hexadecimal.

  10 DEF IO PORT3 = WORD, 8, &H0FFF  : 100 PORT3 = 9 ' Output signal number 8 and 11 turns on.  : 200 M3 = PORT3 ' Substitute the value of the input signals 8 to 19 for the variable

M3.

DEF[]IO[]<Input/output variable name> = <Type designation>, <Input/output bit No.>

[, <Mask information>]

Page 174: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 174/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-155

[Explanation](1) An input signal is read when referencing this variable.(2) An output signal is written when assigning a value to this variable.(3) It is not allowed to reference an output signal by this variable. Use the M_OUT variable in order to refer-

ence an output signal.(4) The variable name can have up to eight characters. Refer to the Page 96, "4.3.6 Types of characters that

can be used in program" for the characters that can be used.(5) When mask information is designated, only the specified signal will be validated. Example) In the above example on the 20th line, the input/output data with a bit width of eight is masked by0F in hexadecimal. Thus, if PORT 2 is used thereafter,•When used as an input signal (M1 = PORT 2):Numbers 5 to 8 are used for input, and numbers 9 to 12 are always treated as 0.No. 12 No.5 (Input/output bit No.)  0000 1111  Invalid Valid 

•When used as an output signal (PORT 2 = M1):Data to be output this time is output to numbers 5 to 8, and the status currently being output is retained atnumbers 9 to 12.

 No. 12 No.5 (Input/output bit No.)  **** 1111  | |  Retains the current output status Output data of this time 

Page 175: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 175/457

4-156 Detailed explanation of command words

4MELFA-BASIC IV 

DEF JNT (Define Joint)

[Function]This instruction declares joint type position variables. It is used when using a variable with a name thatbegins with a character other than "J." It is not necessary to declare variables whose names begin with the

character "J" using the DEF JNT instruction.

[Format]

[Terminology]<Joint variable name> Designate a variable name.

[Reference Program] 10 DEF JNT SAFE ' Declare "SAFE" as a joint variable. 20 MOV J1 ' For joint type position variables starting with J, the definition of

"DEF JNT" is not required. 30 SAFE = (-50,120,30,300,0,0,0,0) 40 MOV SAFE ' Move to SAFE.

[Explanation](1) Use this instruction to define a joint position variable by a name beginning with a character other than J.(2) The variable name can have up to eight characters. Refer to the Page 96, "4.3.6 Types of characters that

can be used in program" for the characters that can be used. When designating multiple variablenames, the maximum value (127 characters including command) can be set on one line.

(3) A variable becomes a global variable that is shared among programs by placing "_" after J in the variablename and writing it in a base program.

 

Refer to Page 105, "4.3.24 User-defined external variables" for details.

DEF[]JNT[] <Joint variable name> [, <Joint variable name>]...

Page 176: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 176/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-157

DEF PLT (Define pallet)

[Function]Defines the pallet. (3-point pallet, 4-point pallet)

[Format]

[Terminology]<Pallet No.> This is the selection No. of the set pallet. (Constants from 1 to 8 only).<Start Point> Refers to the pallet's start point.<End Point A> One of the ending points for the pallet. Transit point of arc for arc pallet.<End Point B> Another ending point for the pallet. Ending point of arc for arc pallet.<Diagonal Point> The diagonal point from the pallet's start point. Insignificant for arc pallet.<Quantity A> The No. of workpieces from the pallet's start point to the end point A.

The No. of workpieces between the pallet start point and arc end point when usingan arc pallet.

<Quantity B> The No. of workpieces from the pallet's start point to the end point B.Insignificant for an arc pallet. (1, etc., must be designated.)

<Assignment Direction> Describes the direction of the number assignment when numbering divided gridpoints.

  1 : Zigzag 2 : Same direction 3 : Arc pallet

[Reference Program]10 DEF PLT 1,P1,P2,P3, ,4,3,1 ' Define a 3-point pallet.20 DEF PLT 1,P1,P2,P3,P4,4,3,1 ' Define a 4-point pallet.

[Explanation](1) The accuracy of the position calculation will be higher for a 4-point pallet than for a 3-point pallet.(2) The command is valid only within the program being executed. The command is invalid in the program

that calls up the command from another program. If necessary, redefine.(3) Quantity A and B should be a non-zero positive number, while if 0 or a negative number is assigned, an

error will occur.(4) If Quantity A x Quantity B exceeds 32,767, an error will occur when operation starts.(5) The value of quantity B is insignificant for the arc pallet, but it must not be omitted. The diagonal point will

be insignificant even when designated. Set a dummy value.(6) If the hand is facing downward, the signs of the A, B, and C axis coordinates at the starting point, end-

point A, and endpoint B must match. If the hand is facing downward, A = 180 (or -180), B = 0, and C =180 (or -180). If the signs of the A and C axis coordinates at the three positions do not match, the handmay rotate in the middle position. In this case, modify the signs so that they match in the position editscreen of the T/B. +180 and -180 result in the same posture; modifying signs poses no problem.

Please refer to the illustrations in 4.1.2Pallet operation, which explain this concept.

[Related instructions]PLT (Pallet)

DEF[]PLT[] <Pallet No.>, <Start Point>, <End Point A>, <End Point B>, [<Diagonal Point>],<Quantity A>, <Quantity B>, <Assignment Direction>

12

 

7

 

6

 

1

11

8

5

2

10

 

9

 

4

 

3

End point B

Start point End point A

Diagonal point

Start point10

7

4

1

11

8

5

2

12

9

6

3

23

End point

Transit pointEnd point B Diagonal point

Start point End point A

Zigzag Same direction Arc pallet

Page 177: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 177/457

4-158 Detailed explanation of command words

4MELFA-BASIC IV 

DEF POS (Define Position)

[Function]This instruction declares XYZ type position variables. It is used when using a variable with a name thatbegins with a character other than "P." It is not necessary to declare variables whose names begin with the

character "P" using the DEF POS instruction.

[Format]

[Terminology]<Position variable name> Designate a variable name.

[Reference Program] 10 DEF POS WORKSET ' Declare "WORKSET" as the XYZ type position variable. 20 MOV P1 ' For XYZ type position variables starting with P, the defini-

tion of "DEF POS" is not required. 30 WORKSET=(250,460,100,0,0,-90,0,0)(0,0) 40 MOV WORKSET ' Move to WORKSET.

[Explanation](1) Use this instruction to define a XYZ type position variable by a name beginning with a character other

than P.(2) The variable name can have up to eight characters. Refer to the Page 96, "4.3.6 Types of characters that

can be used in program" for the characters that can be used.(3) When designating multiple variable names, the maximum value (127 characters including command)

can be set on one line.(4) A variable becomes a global variable that is shared among programs by placing "_" after P in the vari-

able name and writing it in a base program. 

Refer to Page 105, "4.3.24 User-defined external variables" for details.

DEF[]POS[] <Position variable name> [, <Position variable name>]...

Page 178: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 178/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-159

DIM (Dim)

[Function]Declares the quantity of elements in the array variable. (Arrays up to the third dimension are possible.)

[Format]

[Terminology]<Variable name> Describe the name of the array variable.<Eelement Value> Describe in terms of constants, the number of elements in an array variable.

[Reference Program]10 DIM PDATA(10) ' Define the position array variable PDATA having ten elements.

20 DIM MDATA#(5) ' Define double-precision type array variable MDATA# having the fiveelements.

30 DIM M1%(6) ' Define integer-type array variable M1% having the six elements.40 DIM M2!(4) ' Define single-precision real number type array variable M2! having the

four elements.50 DIM CMOJI(7) ' Define the character-string type variable CMOJI having the seven ele-

ments.60 DIM MD6(2,3), PD1(5,5) ' Define the 2-dimensional single precision real number type array vari-

able MDATA having the element of 2x3.' Define the 2-dimensional position array variable PD 1 having the ele-ment of 5x5.

[Explanation](1) A one-dimensional, two-dimensional or three-dimensional array can be used.(2) In the case of numeric variables, it is possible to use integer, single-precision real and double-precision

real variables differently by adding a symbol that indicates the type of each variable to the variablename. If the variable type is omitted, a single-precision real variable will be assumed.

DIM MABC(10) ' Define the single-precision real number type array variable MABC having ten ele-ments.

(3) Eelement number start from 1 when actually referencing array variables. For PDATA on line 10 of thestatement example, the element number will be 1 to 10.

(4) <Eelement Value> can be described with numeric constants from 1 to 999. It is not allowed to use anumerical value operation expression.If the number of elements is specified using a real number, an integer with rounded decimal part will be

assumed. Depending on the system memory's free space, arrays may not be allocated for the numberof specified elements. In this case, an error will occur when lines are registered.(5) If an element number larger than the number of defined elements is specified, an error will occur at the

time of execution.(6) At the point when array variables are defined, variable values are indeterminate.(7) To use array variables, it is necessary to define them using the DIM instruction.(8) The arrays defined by the DIM instruction are valid only in the program where they are defined. To use

these arrays by a sub program called by the CALLP instruction, it is necessary to define them again.(9) Array variables can be used similar to normal variables. However, note that variables of which variable

names and/or the number of characters for specifying element numbers exceed eight characters can-not be used on the monitor variable screen and position edit screen of the teaching pendant.

(10) If a variable name whose second character is underlined "_" is registered in a user program, a userdefined external variable (a variable common among programs) will be assumed.. Refer to Page 105, "4.3.24 User-defined external variables" for details.

 

DIM[]<Variable name> (<Eelement Value> [, <Eelement Value> [, <Eelement Value>]])

[, <Variable name> (<Eelement Value> [, <Eelement Value>[, <Eelement Value>]])]...

Page 179: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 179/457

4-160 Detailed explanation of command words

4MELFA-BASIC IV 

DLY (Delay)

[Function]1) When used as a single command:  At a designated time, it causes a wait. It is used for positioning the robot and timing input/output signals.

2) When used as an additional pulse output:  Designates an output time for a pulse.

[Format]1) When used as a single command

2) When used as an additional pulse output

[Terminology]<Time> Describes the waiting time or the output time for the pulse output, in terms of a numeric operation

expression. Unit: [Seconds] The minimum value that can be set is 0.01 seconds. It is allowed to specify 0.00 as well.

[Reference Program](1) Waiting for time

10 DLY 30 ' Wait for 30 seconds(2) Pulse output of the signal  20 M_OUT(17)=1 DLY 0.5 ' Send the signal output to the general-purpose output signal 17

for 0.5 seconds.  30 M_OUTB(18)=1 DLY 0.5 ' Among general-purpose output signals 18 to 25, only signal 18 is

output (on) for the first 0.5 seconds, and signals 19 to 25 areoutput (on) after 0.5 seconds have passed.(3) Wait for the completion of positioning.

10 MOV P1 ' Moves to P1.  20 DLY 0.1 ' Positions to 1.(4) Wait for completion of hand opening. (closing)  10 HOPEN 1 ' Open the hand 1.  20 DLY 0.5 ' Wait for hand 1 to open securely.

[Explanation](1) This instruction sets the wait time in a program. It is used for timing input/output signals, positioning

movement instructions, and for specifying pulse output times when used in a signal output statement

(such as line 20 in [statement example] above).(2) The pulse output will be executed simultaneously as the next command in the lines that follow.(3) Up to 50 pulse outputs can be issued of all programs simultaneously. Exceeding this, an error will occur

when the program tries to execute it.(4) A pulse output reverses each of its bits after the specified time. This means that if M_OUTB (8-bit signal)

or M_OUTW (16-bit signal) is used, the corresponding number of bits are reversed.(5) As for pulse output, the execution of a program ends without waiting the elapse of the specified duration

if the END instruction or the last line of the program is executed during the specified duration. However,output turns off after the specified duration.

(6) The relation of the priority levels for other interrupts is as shown below: COM>ACT>WTHIF (WTH) >Pulse output (Time setting ON)

(7) Even if stop is input during the execution of a pulse output, the pulse output operation will not stop.

Note1) If stop is input at line 20 in the following program, the output signal state will be held, and the execu-

tion is stopped.10 M_OUT(17)=120 DLY 1030 M_OUT(17)=0

DLY[]<Time>

Example) M_OUT(1) = 1 DLY[]<Time>

Page 180: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 180/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-161

Note2) If a pulse output by the M_OUTB (8-bit signal) or the M_OUTW (1 6-bit signal) is used, each bits inthe corresponding bit width are reversed after the designated time.M_OUTB(1)=1 DLY 1.0In this case the bit pattern 00000001 is output for one second, and the bit pattern 11111110 is outputthereafter.

Page 181: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 181/457

4-162 Detailed explanation of command words

4MELFA-BASIC IV 

ERROR (error)

[Function]This instruction makes a program generate an error (9000s number).

[Format]

[Terminology]<Error No.> Either a constant or numeric operation expression can be set. Designate the No. within the range

of 9000 to 9299.

[Reference Program](1) Generate the error 9000.  100 ERROR 9000

(2) Change the error number to generate corresponding to the value of M1.40 IF M1 <> 0 THEN *LERR ' When M1 is not 0, branches to "*LERR".

  :  140 *LERR  150 MERR=9000+M1*10 ' Calculate the error number according to the value of M1.

  160 ERROR MERR ' The calculated error number is generated. 170 END

[Explanation](1) It is possible to generate any error in the 9000's number range by executing this instruction.

(2) If a LOW level or HIGH level error is generated, the program is paused. Lines after the ERROR instruction are not executed. A CAUTION error does not pause a program; the

next line and onward are executed. The action of system by error number is shown in the Table 4-15.(3) It is possible to create up to 20 error messages using parameters UER1 to UER20.(4) A system error occurs if a value outside the error number range shown in Table 4-15 is specified.

Table 4-15:Action of system by error number

[Related parameter]UER1 to 20

ERROR[]<Error No.>

No. System behavior  

9000 to 9099(H level error)

The program execution is stopped, and the servo power is shut off.The error state is reset when error reset is input.

9100 to 9199(L level error)

The program execution is stopped.The error state is reset when error reset is input.

9200 to 9299(CAUTION)

The program execution is continued.The error state is reset when error reset is input.

Page 182: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 182/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-163

END (End)

[Function]This instruction defines the final line of a program.It is also used to indicate the end of a program explicitly, by entering the END instruction at the end of the

main processing, in case a sub program is attached after the main program. In the case of a sub programcalled up by the CALLP instruction, the control is returned to the main program when the END instruction isexecuted.

[Format]

[Reference Program]10 MOV P120 GOSUB *ABC

30 END ' End the program.  :100 *ABC110 M1=1120 RETURN

[Explanation](1) This instruction defines the final line of a program. Use the HLT instruction to stop a program in the mid-

dle and put it in the pause status.(2) If executed from the operation panel, a program is executed in the continuos operation mode; it will be

executed again from the top even if it contains an END instruction. If it is desired to end a program atthe END instruction, press the END key on the operation panel to stop the cycle.

(3) It is allowed to have several END statements within one program.(4) The END statement does not need to be described at the end of the program.(5) If the END command is executed by the sub program called by CALLP, control will return to the main

program. The operation will be similar to the RETURN command of GOSUB.(6) The file and communication line which are opened are all closed by execution of the END command.(7) At program END, the SPD, ACCEL, OADL, JOVRD, OVRD, FINE and CNT settings will be initialized.

[Related instructions]HLT (Halt), CALLP (Call P)

END

Page 183: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 183/457

4-164 Detailed explanation of command words

4MELFA-BASIC IV 

FINE (Fine)

[Function]This instruction specifies completion conditions of the robot's positioning. It is invalid during the smoothmovement control (CNT 1).

Depending on the type of robot (RP series), positioning using the DLY instruction may be more effectivethan using the FINE instruction.

[Format]

[Terminology]<No. of pulses> Specify the positioning pulses number.

This will be invalid to when set to 0. The default value is 0.<Axis No.> Designate the axis No. to which the positioning pulses are to be designated. The positioning

pulses will be applied on all axes when omitted.

[Reference Program]10 FINE 300 ' Designate 300 for the positioning pulses.20 MOV P130 FINE 100,2 ' Change the 2nd axis positioning pulses to 100.40 MOV P250 FINE 0 ' Invalidate the positioning pulse designation.60 MOV P370 FINE 100 ' Designate 100 for the positioning pulses.80 MOV P4

[Explanation](1) The FINE instruction does not complete movement instructions such as MOV by giving commands to theservo; rather, it completes positioning by determining whether or not the feedback pulse value from theservo is within the specified range. It is thus possible to confirm positioning more accurately.

(2) There are cases when the DLY instruction (timer) is used for positioning instead of the FINE instruction.This instruction is easier to specify. 

10 MOV P1 

20 DLY 0.1(3) FINE is invalid in the program until the FINE command is executed. Once FINE is validated, it remains

valid until invalidated.(4) FINE is invalidated at the end of the program (Execution of the END instruction, program reset after

pausing).(5) When the continuous movement control valid state (CNT 1) is entered, the FINE command will be

ignored even if it is valid (i.e., it will be treated as invalid, but the status will be kept).(6) To the addition axis (general-purpose servo axis), although the valid/invalid change of FINE is possible,

specification of the pulse number cannot be performed. The value registered in the "INP" parameter onthe servo amplifier side is used. Thus, when the integers other than zero are specified, the FINEbecomes effective by the parameter set value of servo amplifier, and the FINE becomes invalid when 0is specified.

FINE[]<No. of pulses> [, <Axis No.>]

Page 184: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 184/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-165

FOR - NEXT (For-next)

[Function]Repeatedly executes the program between the FOR statement and NEXT statement until the end condi-tions are satisfied.

[Format]

[Terminology]<Counter> Describe the numerical variable that represents the counter for the number of repetitions.

Same for <Counter 1> and <Counter 2>.<Default Value> Set default value of the counter for the number of repetitions as a numeric operation

expression.<End Value> Set the end value of the counter for the number of repeats as a numeric operation

expression.<Increment> Set the value of the increments for the counter for the number of repetitions as a numeric

operation expression. It is allowed to omit this argument, including STEP.

[Reference Program](1) A program that adds the numbers 1 to 1010 MSUM=0 ' Initialize the total MSUM.20 FOR M1=1 TO 10 ' Increase the counter by 1 from 1 to 10 for the numeric variable M1.30 MSUM=MSUM+M1 ' Add M1 value to numeric variable MSUM.40 NEXT M1 ' Return to line 20.

(2) A program that puts the result of a product of two numbers into a 2-dimensional array variable10 DIM MBOX(10,10) ' Reserve space for a 10Å~10 array.20 FOR M1=1 TO 10 STEP 1 ' Increase the counter by 1 from 1 to 10 for the numeric variable M1.30 FOR M2=1 TO 10 STEP 1 ' Increase the counter by 1 from 1 to 10 for the numeric variable M2.40 MBOX(M1,M2)=M1*M2 ' Substitute the value of M1*M2 for the array variable MBOX (M1, M2).50 NEXT M2 ' Return to line 30.60 NEXT M1 ' Return to line 20.

[Explanation](1) It is possible to describe FOR-NEXT statements between other FOR-NEXT statements.Jumps in the pro-

gram caused by the FOR-NEXT instruction will add one more level to the control structure in a program.

It is possible to make the control structure of a program up to 16 levels deep. An error occurs at execu-tion if 16 levels are exceeded.

(2) If a GOTO instruction forces the program to jump out from between a FOR statement and a NEXT state-ment, the free memory available for control structure (stack memory) decreases. Thus, if a program isexecuted continuously, an error will eventually occur. Write a program in such a way that the loop exitswhen the condition of the FOR statement is met.

(3) A run-time error occurs under the following conditions. *The counter's <Default Value> is greater than <End Value> and <Increment> is a positive number. *The counter's <Default Value> is smaller than <End Value>, and <Increment> is a negative number.

(4) A run-time error occurs if a FOR statement and a NEXT statement are not paired.(5) When the NEXT statement corresponds to the closest FOR statement, the variable name in the NEXT

statement can be omitted. In the example, "M2" in line 50 and "M1" in line 60 can be omitted. The pro-

cessing speed will be slightly faster to omit the counter variable.

FOR[]<Counter> = <Default value> TO <End Value> [STEP <Increment>]

  :

NEXT[] [<Counter 1>]

Page 185: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 185/457

4-166 Detailed explanation of command words

4MELFA-BASIC IV 

FPRM (FPRM)

[Function]Defines the order of the arguments, the type, and number for the main program that uses arguments in asub program (i.e., when the host program uses another program with CALL P).

[Format]

[Terminology]<Dummy Argument> The variable in the sub program that is transferred to the main statement when

executed. All variables can be used. Up to 16 variables may be used.

[Reference Program]<Main program>10 M1=120 P2=P_CURR30 P3=P10040 CALLP "100",M1,P2,P3 ' It can be described like "CALLP "100", 1, P_CURR, P100" also.

<Sub program "100">10 FPRM M1,P1,P220 IF M1=1 THEN GOTO 4030 MOV P140 MVS P250 END ' Return to the main program.

[Explanation](1) FPRM is unnecessary if there are no arguments in the sub program that is called up.(2) An error occur when the type or number is different between the argument of CALLP and the dummy

argument that defined by FPRM.(3) It is not possible to pass the processing result of a sub program to a main program by assigning it in an

argument. 

To use the processing result of a sub program in a main program, pass the values using external vari-ables.

[Related instructions]CALLP (Call P)

FPRM[]<Dummy Argument> [,<Dummy Argument>] ...

Page 186: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 186/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-167

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 isused, 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.10 RELM ' Releases the mechanism in order to control mechanism 1 using slot 2.20 XRUN 2,"10" ' Start the program 10 in slot 2.30 WAIT M_RUN(2)=1 ' Wait for the starting confirmation of the slot 2.  :

Task slot 2. (Program "10")10 GETM 1 ' Get the control of mechanism 1.20 SERVO ON ' Turn on the servo of mechanism 1.30 MOV P1

40 MVS P250 P3=P_CURR ' Substitute P3 in mechanism 1 current position.60 SERVO OFF ' Turn mechanism 1 servo OFF.70 RELM ' Releases the control right of mechanism 1.80 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 theGETM 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 instruc-tion.

(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 isrestarted, GETM will be executed automatically.

(6) This instruction cannot be used in a constantly executed program.

[Related instructions]

RELM (Release Mechanism)

GETM[]<Mechanism No.>

Page 187: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 187/457

4-168 Detailed explanation of command words

4MELFA-BASIC IV 

GOSUB (RETURN)(Go Subroutine)

[Function]Calls up the subroutine at the designated line No. or line label. Be sure to return from the jump destinationusing the RETURN instruction.

[Format]

[Terminology]<Call Destination> Describe the line No. or label name.

[Reference Program]<For a line number>

100 GOSUB 1000

110 END

1000 MOV P11010 RETURN ' Be sure to use the RETURN instruction to return.

<For a label>100 GOSUB *LBL110 END

1000 *LBL1010 MOV P11020 RETURN ' Be sure to use the RETURN instruction to return.

[Explanation](1) Make sure to return from the subroutine by using the RETURN command. If return by GOTO command,

the memory for control structure (stack memory) will decrease, and it will cause the error at continuousexecuting.

(2) The call of other subroutines is possible again by the GOSUB command out of the subroutine. Thisapproach can be employed approximately up to 800 times.

(3) The line number or label can be specified as a jump destination. When the line or label of the call place does not exist, it becomes the execution-time error.

[Related instructions]

RETURN (Return)

GOSUB[]<Call Destination>

Page 188: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 188/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-169

GOTO (Go To)

[Function]This instruction makes a program branch to the specified line number or label line unconditionally.

[Format]

[Terminology]<Branch Destination> Describe the line No. or label name.

[Reference Program](1) Specify the line number.

10 MOV P1  :

  100 GOTO 10 ' Returns to the line number 10.  110 END

(2) Specify the label.100 GOTO *LBL ' Branches to the label *LBL.

  :  1000 *LBL  1010 MOV P1

[Explanation](1) A line number or label can be specified as a branch destination.(2) If a branch destination or label does not exist, an error will occur during execution.

GOTO[]<Branch Destination>

Page 189: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 189/457

4-170 Detailed explanation of command words

4MELFA-BASIC IV 

HLT (Halt)

[Function]Interrupts the execution of the program and movement of the robot, and stops. The program which wasbeing executed at this time becomes standby status.

[Format]

[Reference Program](1) Stop the robot without condition during program execution.150 HLT ' Stop the program without condition.

(2) Stop the robot on some conditions.100 IF M_IN(18)=1 THEN HLT ' Stop the program execution when the input signal 18 turns on.

200 MOV P1 WTHIF M_IN(17)=1, HLT ' When the input signal 17 turns on during moving to P1, the pro-gram execution is stopped.

[Explanation](1) Interrupts the execution of a program and decelerates the robot to a stop. The system will enter the wait-

ing state.(2) If the HLT instruction is used in multitask operation, only the task slot that executed the HLT instruction is

paused.(3) To restart, start the O/P or issue the start signal from an external source. The program will be restarted at

the next line after the HLT statement. Note that if the HLT statement is an appended statement, the

operation will restart from the same line of the program where it was interrupted.[Related instructions]

END (End)

HLT

Page 190: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 190/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-171

HOPEN / HCLOSE (Hand Open/Hand Close)

[Function]Commands the hand to open or close.

[Format]

[Terminology]<Hand No.> Select a numeric value between 1 and 8. Specify this argument using a

constant or a variable.<Starting grasp forcer> This parameter is valid for the motorized hand, and invalid for any other

type of hand. Set the required grasping force for starting the hand open/close.

 

Set the grasping force as a step between 0 and 63 (63 = 3.5kg). 

The default value is 63. When omitted, the previous setting value will beapplied.

<Holding grasp force> This parameter is valid for the motorized hand, and invalid for any othertype of hand. Set the required grasping force for holding the hand open/close. Set the grasping force as a step between 0 and 63 (63 = 3.5kg). The default value is 63. When omitted, the previous setting value will beapplied.

<Starting grasp force holding timer>This parameter is valid for the motorized hand. Set the time to hold the starting grasping force as a value from 0.00 (sec.). The default value is 0.3 sec.

[Reference Program]10 HOPEN 1 ' Open hand 1.20 DLY 0.2 ' Set the timer to 0.2 sec. (Wait for the hand to open securely.)30 HCLOSE 1 ' Close hand 1.40 DLY 0.2 ' Set the timer to 0.2 sec. (Wait for the hand to close securely.)50 MOV PUP '

[Explanation](1) The operation (single/double) of each hand is set with parameter HANDTYPE.(2) If the hand type is set to double solenoid, hands 1 to 4 can be supported. If the hand type is set to single

solenoid, hands 1 to 8 can be supported.

(3) The status of the hand output signal when the power is turned ON is set with parameter HANDINIT.(4) The hand input signal can be confirmed with the robot status variable M_HNDCQ ("Hand input number").

The signal can also be confirmed with the input signals No. 900 to 907 (when there is one mechanism).10 HCLOSE 1 

20 IF M_HNDCQ(1)<>1 THEN GOTO 20 

30 MOV P1(5) There are related parameters. Refer to Page 330, "5.10 Automatic return setting after jog feed at pause" 

and, Page 334, "5.13 About default hand status" of this manual.

HOPEN[]<Hand No.> [, <Starting grasp force>, <Holding grasp force>,<Starting grasp force holding time>]

HCLOSE[]<Hand No.>

Page 191: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 191/457

4-172 Detailed explanation of command words

4MELFA-BASIC IV 

[Related system variables]M_IN/M_INB/M_INW (900s number), M_OUT/M_OUTB/M_OUTW (900s number), M_HNDCQ

[Related instructions]LOADSET (Load Set), OADL (Optimal Acceleration)

[Related parameter]HANDTYPE, HANDINITRefer to Page 330, "5.10 Automatic return setting after jog feed at pause"and, Page 334, "5.13 Aboutdefault hand status".

Page 192: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 192/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-173

IF...THEN...ELSE...ENDIF (If Then Else)

[Function] A process is selected and executed according to the results of an expression.

[Format]

This function is available for controller software version G1 or later.

This BREAK command is available for controller software version J1 or later.

[Terminology]<Expression> Describe the expression targeted for comparison as a comparison operation expression

or logic operation expression.<Process> Describe the process following THEN for when the comparison results are true, and the

process following ELSE for when the comparison results are false.

[Reference Program](1) The software version earlier than G1 edition.  100 IF M1>10 THEN 1000 ' When M1 is larger than 10, jump to the line

number 1000.  110 IF M1>10 THEN GOTO 200 ELSE GOTO 300 ' If M1 is larger than 10, it jumps to line number

200; if smaller than 10, it jumps to line num-ber 300. The "GOTO" after" THEN" or "ELSE" can beomitted.

  :

  200 M1=10  210 MOV P1  220 GOTO 400  300 M1=-10  310 MOV P2  320 GOTO 400

(2) The software version is G1 edition or later.  100 IF M1>10 THEN  110 M1=10  120 MOV P1  130 ELSE  140 M1=-10  150 MOV P2  160 ENDIF

IF[]<Expression>[]THEN[]<Process>[][ELSE <Process>]

IF[]<Expression>[]THEN  <Process>  <Process>  BREAK  :[ELSE]  <Process>  <Process>  BREAK  :ENDIF

Page 193: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 193/457

4-174 Detailed explanation of command words

4MELFA-BASIC IV 

  * The description method of earlier than G1 edition is also possible.  250 IF M2=0 THEN GOSUB *SUB1 ELSE GOSUB *SUB2

(3) When a IF statement is described inside THEN or ELSE (allowed in revision G1 and later)

  300 IF M1>10 THEN  310 IF M2 > 20 THEN  320 M1 = 10  330 M2 = 10  340 ELSE

350 M1 = 0  360 M2 = 0  370 ENDIF  380 ELSE  390 M1 = -10  400 M2 = -10  410 ENDIF

(4) In the THEN or the ELSE, it can escape to the next line of ENDIF by BREAK.(Version J1 or later,)  300 IF M1>10 THEN  310 IF M2 > 20 THEN BREAK ' If the conditions are met, branches to line 390  320 M1 = 10  330 M2 = 10  340 ELSE

350 M1 = -10  360 IF M2>20 THEN BREAK ' If the conditions are met, branches to line 390  370 M2 = -10  380 ENDIF  390 IF M_BRKCQ=1 THEN HLT

  400 MOV P1

[Explanation](1) The IF .. THEN .. ELSE .. statements should be contained in one line.(2) It is allowed to split an IF .. THEN .. ELSE .. ENDIF block over several lines.(3) ELSE can be omitted.(4) Make sure to include the ENDIF statement in the IF .. THEN .. ELSE .. ENDIF block.(5) If the GOTO instruction is used to jump out from inside an IF .. THEN .. ELSE .. ENDIF block, an error

will occur when the memory for control structure (stack memory) becomes insufficient.(6) For IF .. THEN .. ELSE .. ENDIF, it is possible to describe IF .. THEN .. ELSE .. ENDIF inside THEN or

ELSE. (UP to eight levels of nesting is allowed.)(7) GOTO following THEN or ELSE may be omitted.

Example) IF M1 > 10 THEN 200 ELSE 300  Also, only when THEN is followed by GOTO, either one of THEN or GOTO may be omitted.

ELSE cannot be omitted.Example) IF M1 > 10 THEN GOTO 200 (The program at left can be rewritten as shown below.)  

--- IF M1 > 10 THEN 200 

--- IF M1 > 10 GOTO 200(8) In the THEN or the ELSE, it can escape to the next line of ENDIF by BREAK. That is, process of IF

THEN ENDIF can be skipped..(Version J1 or later,)

Page 194: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 194/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-175

INPUT (Input)

[Function]Inputs data into a file (including communication lines). Only ASCII character data can be received.Please refer to Page 337, "5.15 About the communication setting", which lists related parameters.

[Format]

[Terminology]<File No.> Describe a number between 1 and 8. 

This corresponds to the file No. assigned with the OPEN command.<Input data name> Describe the variable name for saving the input data. All variables can be described.

[Reference Program]10 OPEN "COM1:" AS #1 ' Assign RS-232-C to file No. 1.20 INPUT #1, M1 ' The value will be set to the numerical variable M1 if data are inputted from the

keyboard.30 INPUT #1, CABC$ ':

100 CLOSE #1

[Explanation](1) Data is input from file having the file No. opened with the OPEN statement, and is substituted in the vari-

able. If the OPEN statement has not been executed, an error will occur.(2) The type of data input and the type of variable that is substituting it must be the same.(3) When describing multiple variable names, use a comma (,) between variable names as delimiters.(4) When the INPUT statement is executed, the status will be "standby for input. "The input data will be sub-

stituted for the variables at the same time as the carriage return (CR and LF) are input.(5) If the protocol (in the case of the standard port: the "CRPC232" parameter is 0) of the specified port is for

PC support (non procedure), it is necessary to attach "PRN" at the head of any data sent from a PC. Nor-mally, the standard port is connected to a PC and used for transferring and debugging robot programs.Therefore, it is recommended to use the optional expansion serial interface if a data link is used.

(6) If the number of elements input is greater than the number of arguments in the INPUT statement, theywill be read and discarded. When the END or CLOSE statement is executed, the data saved in the buffer will be erased.

 Example) To input both a character string, numeric value and position. 10 INPUT #1,C1$,M1,P1

Data sent from the PC side (when received by the standard port of the robot: the "CRPS232" parameter is 0)

MELFA is substituted in C1$, 125.75 in M1, and (130.5, -117.2,55.1,16.2,0,0)(1,0) in P1.

[Related instructions]OPEN (Open), CLOSE (Close), PRINT (Print)

INPUT[]#<File No.>, <Input data name> [, <Input data name>] ...

PRNMELFA,125.75,(130.5,-117.2,55.1,16.2,0,0)(1,0) CR

Page 195: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 195/457

4-176 Detailed explanation of command words

4MELFA-BASIC IV 

JOVRD (J Override)

[Function]Designates the override that is valid only during the robot's joint movements.

[Format]

[Terminology]<Designated override> Describe the override as a real number.

 A numeric operation expression can also be described.Unit: [%] (Recommended range: 1 to 100.0)

[Reference Program]10 JOVRD 5020 MOV P130 JOVRD M_NJOVRD ' Set the default value.

[Explanation](1) The JOVRD command is valid only during joint interpolation.(2) The actual override is = (Operation panel (T/B) override setting value) x (Program override (OVRD com-

mand)) x (Joint override (JOVRD command)). The JOVRD command changes only the override for the joint interpolation movement.

(3) The 100% <Designate override> is the maximum capacity of the robot. Normally, the system defaultvalue (M_NOVRD) is set to 100%. The value is reset to the default value when the END statement isexecuted or the program is reset.

[Related instructions]

OVRD (Override), SPD (Speed)

[Related system variables]M_JOVRD/M_NJOVRD/M_OPOVRD/M_OVRD/M_NOVRD(M_NJOVRD:System default value, M_JOVRD:Currently specified joint override)

JOVRD[]<Designated override>

Page 196: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 196/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-177

JRC (Joint Roll Change)

[Function]• This instruction rewrites the current coordinate values by adding +/-360 degrees to the current joint coordi-

nate values of the applicable axis (refer to <Axis No> in [Terminology]) of the robot arm.

• User-defined axis (additional axis, user defined mechanism) 

This instruction rewrites the current coordinate values by adding/subtracting the value specified by aparameter to/from the current joint coordinate values of the specified axis. This instruction can be used forboth rotating and linear axes. The origin can also be reset at the current position.

[Format]

<Numeric Value> can be used in the controller's software version J1 or later.

[Terminology]<+1> The current joint angle of the designated axis is incremented by the amount designated

in parameter JRCQTT(The sign can be omitted.). For the priority axes of the robot arm,it is fixed at 360 degrees.

<-1> The current joint angle of the designated axis is decremented by the amount designatedin parameter JRCQTT. For the priority axes of the robot arm, it is fixed at 360 degrees.

<0> The origin for the designated axis is reset at the value designated in parameter JRCORG. This can be used only for the user-defined axis.

<Axis No> The target axis is specified with the number. The priority axes are used if omitted.[Applicable Models and Applicable Axes](1)Applicable models and priority axes

(2)User defined additional axes of all models(3)All axes of user defined mechanisms

The software version J1 or later.<Numeric Value> Specify an incremental/decremental number (a multiple of 360 degrees). Description

by the constant or the variable is possible (J1 edition or later is possible).

Example) +3: Increases the applicable axis angle by 1080 degrees.-2: Decreases the angle by 720 degrees..

[Reference Program]10 MOV P1 ' Moves to P1.20 JRC 1 ' Add 360 degrees to the current coordinate values of the applicable axis.30 MOV P1 ' Moves to P1.

The software version J1 or later.10 MOV P1 ' Moves to P1.(The movement to which the J6 axis moves in the minus direction)20 JRC +1 ' Add 360 degrees to the current coordinate values of the applicable axis.30 MOV P1 ’ Moves to P1.

40 JRC +1 ' Add 360 degrees to the current coordinate values of the applicable axis.50 MOV P1 ' Moves to P1.60 JRC -2 ’ Subtract 720 degrees from the current coordinate values of the applicable axis.

(Reverts)

JRC < [+] 1 / -1 / 0 > [, < Axis No>]

JRC < [+] <Numeric Value> / -<Numeric Value> / 0 > [, < Axis No>]

RV-A series: J6 axis

RH-A series: J4 axis

RV-S series: J6 axis

RH-S series: J4 axis

RP-A series: J4 axis

Page 197: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 197/457

4-178 Detailed explanation of command words

4MELFA-BASIC IV 

[Explanation](1) With the JRC 1/-1 instruction (JRC n/-n), the current joint coordinate values of the specified axis are

incremented/decremented. The origin for the designated axis is reset with the JRC 0 command.  Although the values of the joint coordinates change, the robot does not move.

(2) When using this command, change the movement range of the target axis beforehand so that it does notleave the movement range when the command is executed. The range can be changed by changingthe - side and + side value of the corresponding axis in the joint movement range parameter "MEJAR".Set the movement range for the rotating axis in the range of -2340 deg. to 2340 deg.

(3) If the designated axis is omitted, the priority axis will be the target. The priority axis is the rotating axis (J6axis) at the end of the robot.

(4) If the designated axis is omitted when a priority axis does not exist (robot incapable of JRC), or if thedesignated axis is not a target for JRC, an error will occur when the command is executed.

(5) If the origin is not set, an error will occur when the command is executed.(6) The robot is stopped while the JRC command is executed. Even if CNT is validated, the interpolation

connection will not be continuous when this command is executed.(7) The following parameter must be set before using the JRC command.

 

Set JRCEXE to 1. (JRC execution enabled) Change the movement range of the target axis with MEJAR. 

Set the position change amount during the JRC 1/-1(JRC n/-n) execution with JRCQTT.(Only for the additional axis or user-defined mechanism.) Set the origin position for executing JRC 0 with JRCORG.(Only for the additional axis or user-defined mechanism.)

(8) When parameter JRCEXE is set to 0, no process will take place even if JRC command is executed.(9) If the movement amount designated with parameter JRCQTT is not within the pulse data 0 to MAX., an

error will occur during the initialization. Here, MAX. is 2 ^ (Number of encoder bits + 15) - 1. For example,with a 13-bit encoder (8192 pulses), this will be MAX. = 2 ^ (13+15)-1 = 0x0fffffff,and for a 14-bit encoder (16384 pulses), this will be MAX. 2 ^ (14+15)-1 = 0x1fffffff.

The movement amount to pulse data conversion is as follows:

For rotating axisPulse data = movement amount (deg.)/360 * gear ratio denominator/gear ratio numerator * Num-ber of encoder pulses

For linear axisPulse data = movement amount (mm) * gear ratio denominator/gear ratio numerator * Number ofencoder pulses

(10) The origin data will change when JRC is executed, so the default origin data will be unusable.If the controller needs to be initialized due to a version upgrade, etc., the parameters must be backedup beforehand in the original state.

(11) Step return operation is not possible with the JRC command.(12) This instruction cannot be used in a constantly executed program.

[Related parameter]JRCEXE

Set whether to enable/disable the JRC execution. Execution disabled = 0 (default value)/execution enabled = 1

JRCQTTDesignate the amount to move (1 deg./1mm unit) when incrementing or decrementing with the JRC com-mand in additional axis or user-defined mechanism. For the JRC's applicable axis on the robot arm side, it is fixed at 360 degrees regardless of this setting.

JRCORGDesignate the origin for executing JRC 0. in additional axis or user-defined mechanism. Refer to Page 306, "5 Functions set with parameters" for detail.

[Target mechanism and target axis]•RV-1A/2AJ, RV-4A/5AJ and related models, RV-20A J6 axis•User-defined additional axis for all mechanisms•All user-defined mechanism axes

Page 198: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 198/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-179

LOADSET (Load Set)

[Function]This instruction specifies the condition of the hand/workpiece at execution of the OADL instruction.

[Format]

[Terminology]<Hand condition No.> 1 to 8.Designate the hand condition (HNDDAT 1 to 8) No. for which the weight and

size are designated. In the RV-S/RH-S series, 0 (HNDDAT0) can also be set.<Workpiece condition No.> 

1 to 8. Designate the hand condition (WRKDAT 1 to 8) No. for which the weightand size are designated. In the RV-S/RH-S series, 0 (WRKDAT0) can also be set.

[Reference Program]

10 OADL ON20 LOADSET 1,1 ' Hand 1(HNDDAT1) and workpiece 1(WRKDAT1) conditions.30 MOV P140 MOV P250 LOADSET 1,2 ' Hand 1(HNDDAT1) and workpiece 2(WRKDAT1) conditions.60 MOV P170 MOV P280 OADL OFF

For RV-S/RH-S series10 OADL ON20 LOADSET 1,1 ' Hand 1(HNDDAT1) and workpiece 1(WRKDAT1) conditions.

30 MOV P140 LOADSET 0,0 ' Hand 0(HNDDAT0) and workpiece 0(WRKDAT0) conditions.50 MOV P260 OADL OFF

[Explanation](1) Set the hand conditions and workpiece conditions used for optimum acceleration/deceleration. This is

used when setting the optimum acceleration/deceleration for workpiece types having different weights.(2) The maximum load is set for the hand when the program execution starts.(3) Set the weight, size (X, Y, Z) and center of gravity position (X, Y, Z) as the hand conditions in parameter

(HNDDAT 1 to 8).(4) Set the weight, size (X, Y, Z) and center of gravity position (X, Y, Z) as the workpiece conditions in

parameter (WRKDAT 1 to 8).(5) The hand conditions and workpiece conditions changed when this command is executed are reset to thesystem default value when the program is reset and when the END statement is executed.

 

 As the system default values, the hand conditions are set to the rated load, and the workpiece condi-tions are set to none (0kg).

(6) Regarding the system initial values, HNDDAT0, WRKDAT0 and HNDHOLD0 can be changed in the RV-S/RH-S series.

(7) Refer to Page 340, "5.16 Hand and Workpiece Conditions (optimum acceleration/deceleration settings)" for details on the optimum acceleration/deceleration.

[Related instructions]OADL (Optimal Acceleration), HOPEN / HCLOSE (Hand Open/Hand Close)

[Related parameter]HNDDAT1 to 8, WRKDAT1 to 8, HNDHOLD1 to 8Refer to Page 340, "5.16 Hand and Workpiece Conditions (optimum acceleration/deceleration settings)".Refer to Page 314, "Table 5-2: List Signal parameter" for the ACCMODE.

LOADSET[]<Hand condition No.>, <Workpiece condition No.>

Page 199: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 199/457

4-180 Detailed explanation of command words

4MELFA-BASIC IV 

MOV (Move)

[Function]Using joint interpolation operation, moves from the current position to the destination position.

[Format]

[Terminology]<Movement Target Position>This is the final position for interpolation operation. This position may be specified

using a position type variable and constant, or a joint variable.<Close Distance> If this value is designated, the actual movement target position will be a position

separated by the designated distance in the tool coordinate system Z axis direc-tion (+/- direction).

<Constants 1> 1/0 : Detour/short cut. The default value is 1(detour).<Constants 2> Invalid (Specify 0).<Appended conditions> The WTH and WHTIF statements can be used.

[Reference Program]10 MOV P1 TYPE 1,020 MOV J130 MOV (PLT 1,10),100.0 WTH M_OUT(17)=140 MOV P4+P5,50.0 TYPE 0,0 WTHIF M_IN(18)=1,M_OUT(20)=1

[Explanation](1) The joint angle differences of each axis are evenly interpolated at the starting point and endpoint posi-

tions. This means that the path of the tip cannot be guaranteed.

(2) By using the WTH and WTHIF statement, the signal output timing and motion can be synchronized.(3) The numeric constant 1 for the TYPE designates the posture interpolation amount.(4) Detour refers to the operating exactly according to the teaching posture. Short cut operation may take

place depending on the teaching posture.(5) Short cut operation refers to posture interpolation between the start point and end point in the direction

with less motion.(6) The detour/short cut designation is significant when the posture axis has a motion range of (180 deg. or

more.(7) Even if short cut is designated, if the target position is outside the motion range, the axis may move with

the detour in the reverse direction.(8) The TYPE numeric constant 2 setting is insignificant for joint interpolation.(9) This instruction cannot be used in a constantly executed program.

(10) If paused during execution of a MOV instruction and restarted after jog feed, the robot returns to theinterrupted position and restarts the MOV instruction. The interpolation method (JOINT interpolation / XYZinterpolation) which returns to the interrupted position can be changed by the "RETPATH" parameter.Moreover, it is also possible by changing the value of this RETPATH parameter to move to the direct targetposition, without returning to the interrupted position. (Refer to Page 330, "5.10 Automatic return settingafter jog feed at pause")

Fig.4-9:Example of joint interpolation motion path

MOV[]<Target Position> [, <Close Distance>] [[]TYPE[]<Constants 1>, <Constants 2>][] [<Appended conditions>]

P_CURR

P1

Page 200: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 200/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-181

MVA (Move Arch)

[Function]This instruction moves the robot from the current position to the target position with an arch movement (archinterpolation).

[Format]This function is available for controller software version G2 or later.

[Terminology]<Target Position> Final position of interpolation movement. This position may be specified using a

position type variable and constant, or a joint variable.<Arch number> A number defined by the DEF ARCH instruction (1 to 4). 

If the argument is omitted, 1 is set as the default value.

[Reference Program]10 DEF ARCH 1,5,5,20,20 ' Defines the arch shape configuration.20 OVRD 100,20,20 ' Specifies override.30 ACCEL 100,100,50,50,50,50 ' Specifies acceleration/deceleration rate.20 MVA P1,1 ' Performs the arch motion movement according to the shape configura-

tion defined in line 10.30 MVA P2,2 ' Moves the robot according to the default values registered in the

parameters.

MVA[]<Target Position> [, <Arch number>]

Page 201: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 201/457

4-182 Detailed explanation of command words

4MELFA-BASIC IV 

[Explanation](1) The robot moves upward along the Z-axis direction from the current position, then moves to a position

above the target position, and finally moves downward, reaching the target position. This so-called archmotion movement is performed with one instruction.

(2) If the MVA instruction is executed without the DEF ARCH instruction, the robot moves with the archshape configuration set in the parameters. Refer to Page 149, " DEF ARCH (Define arch)" for a detailed

description about the parameters.(3) The interpolation form, type and other items are also defined by the DEF ARCH instruction; refer to Page

149, " DEF ARCH (Define arch)".(4) This instruction cannot be used in a constantly executed program.(5) If paused during execution of a MVA instruction and restarted after jog feed, the robot returns to the inter-

rupted position and restarts the MVA instruction. (this can be changed by the "RETPATH" parameter).The interpolation method (JOINT interpolation / XYZ interpolation) which returns to the interrupted posi-tion can be changed by the "RETPATH" parameter. (Refer to Page 330, "5.10 Automatic return settingafter jog feed at pause") 

Fig.4-10:Example of arch interpolation motion path (seen from the side)

[Related instructions]DEF ARCH (Define arch), ACCEL (Accelerate), OVRD (Override)

DEF ARC H 1,5,5,20,20

5mm (Upwardmoving amount)

5mm (Downwardmoving amount)

20mm (Upwardretreat amount)

20mm (Downwardretreat amount)

Target po sitionStart position

DEF ARC H 1,5,5,20,20

*If Z is different between the movem ent starting position and the target position,  it will operate as follows:

Start position

Target po sition

20mm (Upwardretreat amount)

5mm (Upwardmoving amount)

5mm (Downward

moving amount)

20mm (Downward

retreat amount)

Page 202: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 202/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-183

MVC (Move C)

[Function]Carries out 3D circular interpolation in the order of start point, transit point 1, transit point 2 and start point.

[Format]

[Terminology]<Start point> The start point and end point for a circle. Describe a position operation expression or

 joint operation expression.<Transit point 1> Transit point 1 for a circular arc. Describe a position operation expression or joint oper-

ation expression.<Transit point 2> Transit point 2 for a circular arc. Describe a position operation expression or joint oper-

ation expression.<Additional condition> Describe a WTH conjunction or a WTHIF conjunction

[Reference Program]10 MVC P1,P2,P320 MVC P1,J2,P330 MVC P1,P2,P3 WTH M_OUT(17)=140 MVC P3,(PLT 1,5),P4 WTHIF M_IN(20)=1,M_OUT(21)=1

[Explanation](1) In circular interpolation motion, a circle is formed with the 3 given points, and the circumference is

moved. (360 degrees)(2) The posture at the starting point is maintained during circle interpolation. The postures while passing

points 1 and 2 are not considered.

(3) If the current position and the starting position do not match, the robot automatically moves to the start-ing point based on the linear interpolation (3-axis XYZ interpolation), and then performs the circle inter-polation.

(4) If paused during execution of a MVC instruction and restarted after jog feed, the robot returns to theinterrupted position by JOINT interpolation and restarts the remaining circle interpolation. The interpolation method (JOINT interpolation / XYZ interpolation) which returns to the interruptedposition can be changed by the "RETPATH" parameter. (Refer to Page 330, "5.10 Automatic return set-ting after jog feed at pause")

(5) This instruction cannot be used in a constantly executed program.

Fig.4-11:Example of circle interpolation motion path

MVC[]<Start point>,<Transit point 1>,<Transit point 2>[][<Additional condition>]

P1

P_CURR

P2

P3

MVC P 1, P2, P3

Moves by XYZinterpolation (3-axisXYZ interpolation)

Page 203: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 203/457

4-184 Detailed explanation of command words

4MELFA-BASIC IV 

MVR (Move R)

[Function]Carries out 3-dimensional circular interpolation movement from the start point to the end point via transitpoints.

[Format]

[Terminology]<Start Point> Start point for the arc. Describe a position operation expression or joint operation

expression.<Transit Point> Transit point for the arc. Describe a position operation expression or joint operation

expression.<End Point> End point for the arc. Describe a position operation expression or joint operation

expression.<Constants 1> Detour/short cut = 1/0, The default value is 0.<Constants 2> 3-axis XYZ/Equivalent rotation = 1/0, The default value is 0.<Appended conditions> The WTH and WTHIF statements can be used.

[Reference Program]10 MVR P1,P2,P320 MVR P1,J2,P330 MVR P1,P2,P3 WTH M_OUT(17)=140 MVR P3,(PLT 1,5),P4 WTHIF M_IN(20)=1,M_OUT(21)=1

MVR[]<Start Point>, <Transit Point>, <End Point> 

[[]TYPE[]<Constants 1>, <Constants 2>][] [<Appended Condition>]

Page 204: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 204/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-185

[Explanation](1) In circular interpolation motion, a circle is formed with three given points, and robot moves along the cir-

cumference.(2) The posture is interpolation from the start point to the end point; the transit point posture has no effect.(3) If the current position and start point do not match, the robot will automatically move with linear interpola-

tion (3-axis XYZ interpolation) to the start point.

(4) If paused during execution of a MVR instruction and restarted after jog feed, the robot returns to theinterrupted position by JOINT interpolation and restarts the remaining circle interpolation. The interpolation method (JOINT interpolation / XYZ interpolation) which returns to the interruptedposition can be changed by the "RETPATH" parameter. (Refer to Page 330, "5.10 Automatic return set-ting after jog feed at pause")

(5) If the start point and end point structure flags differ for an interpolation method other than 3-axis XYZinterpolation, an error will occur at the execution.

(6) Of the three designated points, if any points coincide with the other, or if three points are on a straightline, linear interpolation will take place from the start point to the end point. An error will not occur.

(7) If 3-axis XYZ is designated for the numeric constant 2, the numeric constant 1 will be invalidated, and therobot will move with the taught posture.

(8) Numeric constant 2 designates the posture interpolation type. 3-axis XYZ is used when carrying out

interpolation on the (X, Y, Z, J4, J5, J6) coordinate system, and the robot is to move near a particularpoint.(9) This instruction cannot be used in a constantly executed program.

Fig.4-12:Example of circular interpolation motion path 1

P2

P1 P3

MVR P1, P2, P3

Moves by XYZinterpolation (3-axis

XYZ interpolation)

P_CURR

Page 205: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 205/457

4-186 Detailed explanation of command words

4MELFA-BASIC IV 

MVR2 (Move R2)

[Function]Carries out 3-dimensional circular interpolation motion from the start point to the end point on the arc com-posed of the start point, end point, and reference points.

The direction of movement is in a direction that does not pass through the reference points.

[Format]

[Terminology]<Start Point> Start point for the arc. This position may be specified using a position type variable

and constant, or a joint variable.<End Point> End point for the arc. This position may be specified using a position type variable

and constant, or a joint variable.

<Reference point> Reference point for a circular arc. This position may be specified using a positiontype variable and constant, or a joint variable.<Constants 1> Detour/short cut = 1/0, The default value is 0.<Constants 2> 3-axis XYZ/Equivalent rotation = 1/0, The default value is 0.<Appended conditions> The WTH and WTHIF statements can be used.

[Reference Program]10 MVR2 P1,P2,P320 MVR2 P1,J2,P330 MVR2 P1,P2,P3 WTH M_OUT(17)=140 MVR2 P3,(PLT 1,5),P4 WTHIF M_IN(20)=1,M_OUT(21)=1

MVR2[]<Start Point>, <End Point>, <Reference point>[[]TYPE[]<Constants 1>, <Constants 2>][][<Appended Condition>]

Page 206: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 206/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-187

[Explanation](1) In circular interpolation motion, a circle is formed with three given points, and robot moves along the cir-

cumference.(2) The posture is interpolation from the start point to the end point; the reference point posture has no

effect.(3) If the current position and start point do not match, the robot will automatically move with linear interpola-

tion (3-axis XYZ interpolation) to the start point.(4) If paused during execution of a MVR instruction and restarted after jog feed, the robot returns to theinterrupted position by JOINT interpolation and restarts the remaining circle interpolation. The interpolation method (JOINT interpolation / XYZ interpolation) which returns to the interruptedposition can be changed by the "RETPATH" parameter. (Refer to Page 330, "5.10 Automatic return set-ting after jog feed at pause")

(5) The direction of movement is in a direction that does not pass through the reference points.(6) If the start point and end point structure flags differ for an interpolation method other than 3-axis XYZ

interpolation, an error will occur at the execution.(7) Of the three designated points, if any points coincide with the other, or if three points are on a straight

line, linear interpolation will take place from the start point to the end point. An error will not occur.(8) If 3-axis XYZ is designated for the numeric constant 2, the numeric constant 1 will be invalidated, and the

robot will move with the taught posture.

(9) Numeric constant 2 designates the posture interpolation type. 3-axis XYZ is used when carrying outinterpolation on the (X, Y, Z, J4, J5, J6) coordinate system, and the robot is to move near a particularpoint.

(10) This instruction cannot be used in a constantly executed program. 

Fig.4-13:Example of circular interpolation motion path 2

P2

P1 P3

MVR2 P1, P2, P3

Moves by XYZ

interpolation (3-axisXYZ interpolation)

P2

P1

P4

MVR2 P1, P2, P4

P_CURRP_CURR

Moves by XYZ

interpolation (3-axisXYZ interpolation)

Page 207: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 207/457

4-188 Detailed explanation of command words

4MELFA-BASIC IV 

MVR3 (Move R 3) 

[Function]Carries out 3-dimensional circular interpolation movement from the start point to the end point on the arccomposed of the center point, start point and end point.

[Format]

[Terminology]<Start Point> Start point for the arc. This position may be specified using a position type variable

and constant, or a joint variable.<End Point> End point for the arc. This position may be specified using a position type variable

and constant, or a joint variable.<Center Point> Center point for the arc. This position may be specified using a position type variable

and constant, or a joint variable.<Constants 1> Detour/short cut = 1/0, The default value is 0.<Constants 2> 3-axis XYZ/Equivalent rotation = 1/0, The default value is 0.<Appended conditions> The WTH and WTHIF statements can be used.

[Reference Program]10 MVR3 P1,P2,P320 MVR3 P1,J2,P330 MVR3 P1,P2,P3 WTH M_OUT(17)=140 MVR3 P3,(PLT 1,5),P4 WTHIF M_IN(20)=1,M_OUT(21)=1

MVR3[]<Start Point>, <End Point>, <Center Point> 

[[]TYPE[]<Constants 1>ÅC<Constants 2>][] [<Appended Condition>]

Page 208: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 208/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-189

[Explanation](1) In circular interpolation motion, a circle is formed with three given points, and robot moves along the cir-

cumference.(2) The posture is interpolation from the start point to the end point; the center point posture has no effect.(3) If the current position and start point do not match, the robot will automatically move with linear interpola-

tion (3-axis XYZ interpolation) to the start point.

(4) If paused during execution of a MVR3 instruction and restarted after jog feed, the robot returns to theinterrupted position by JOINT interpolation and restarts the remaining circle interpolation. The interpolation method (JOINT interpolation / XYZ interpolation) which returns to the interrupted positioncan be changed by the "RETPATH" parameter. (Refer to Page 330, "5.10 Automatic return setting after jogfeed at pause")

(5) If the start point and end point structure flags differ for an interpolation method other than 3-axis XYZinterpolation, an error will occur at the execution.

(6) If 3-axis XYZ is designated for the numeric constant 2, the numeric constant 1 will be invalidated, and therobot will move with the taught posture.

(7) Numeric constant 2 designates the posture interpolation type. 3-axis XYZ is used when carrying out inter-polation on the (X, Y, Z, J4, J5, J6) coordinate system, and the robot is to move near a particular point.

(8) The fan angle from the start point to the end point is 0 < fan angle < 180 deg.(9) Designate the positions so that the difference from the center point to the end point and the center point to

the distance is within 0.01mm.(10) If the three points are on the same line, or if the start point and center point, or end point and center point

are the same, an error will occur.(11) If the start point and end point are the same or if three points are the same, an error will not occur, and

the next command will be executed. Note that if the posture changes at this time, only the posture will beinterpolated.

(12) This instruction cannot be used in a constantly executed program. 

Fig.4-14:Example of circular interpolation motion path 3

P2

P3

P1

P_CURR

MVR3 P1, P2, P3

Moves by XYZinterpolation (3-axisXYZ interpolation)

Page 209: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 209/457

4-190 Detailed explanation of command words

4MELFA-BASIC IV 

MVS (Move S)

[Function]Carries out linear interpolation movement from the current position to the movement target position.

[Format 1]

[Format 2]

[Terminology]<Movement Target Position> The final position for the linear interpolation. This position may be specified

using a position type variable and constant, or a joint variable.<Close Distance> If this value is designated, the actual movement target position will be a posi-

tion separated by the designated distance in the tool coordinate system Zaxis direction (+/- direction).

<Constants 1> Detour/short cut = 1/0, The default value is 0(detour).<Constants 2> 3-axis XYZ/Equivalent rotation = 1/0, The default value is 0(equivalent rota-

tion).<Appended conditions> The WTH and WTHIF statements can be used.<Separation Distance> When this value is designated, the axis will move the designated distance

from the current position to the Z axis direction (+/- direction) of the tool coor-dinate system.

[Reference Program](1) Move to the target position P1 by XYZ interpolation.10 MVS P1

(2)Turns on the output signal 17 at the same time if it moves to the target position P1 by linear interpolation.10 MVS P1,100.0 WTH M_OUT(17)=1

(3)Turns on output signal 20 if the input signal 18 is turned on while moving 50 mm in the Z direction of thetool coordinate system of the target position P4+P5 (relative operation position obtained by addition) bylinear interpolation.

20 MVS P4+P5, 50.0 WTHIF M_IN(18)=1, M_OUT(20)=1

(4)Moves 50 mm in the Z direction of the tool coordinate system from the current position by linear interpolation.30 MVS ,50

MVS[]<Movement Target Position> [, <Close Distance>] [[]TYPE <Constants 1>,<Constants 2>][][<Appended Condition>]

MVS[], <Separation Distance> [][<Interpolation Type>]

Page 210: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 210/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-191

[Explanation](1) Linear interpolation motion is a type of movement where the robot moves from its current position to the

movement target position so that the locus of the control points is in a straight line.(2) The posture is interpolation from the start point to the end point.(3) In the case of the tool coordinate system specified by using <proximity distance> or <separation dis-

tance>, the + and - directions of the Z axis vary depending on the robot model. Refer to Page 324, "5.6

Standard Tool Coordinates" for detail. The "Fig.4-15:Example of movement at linear interpolation" is theexample of RV-1A movement.

Fig.4-15:Example of movement at linear interpolation

(4) If paused during execution of a MVS instruction and restarted after jog feed, the robot returns to the inter-rupted position and restarts the MVS instruction. This can be changed by the "RETPATH" parameter,and also the interpolation method (JOINT interpolation / XYZ interpolation) which returns to the inter-rupted position can be changed by same parameter. Some robots for liquid crystal transportation havedifferent default values of this parameter. Refer to Page 330, "5.10 Automatic return setting after jogfeed at pause".

(5) This instruction cannot be used in a constantly executed program.(6) If the start point and end point structure flags differ for an interpolation method other than 3-axis XYZ

interpolation, an error will occur at the execution.(7) If 3-axis XYZ is designated for the numeric constant 2, the numeric constant 1 will be invalidated, and the

robot will move with the taught posture.(8) Numeric constant 2 specifies the type of posture interpolation. Three-axis XYZ operation is used to pass

through near a singular point in order to perform interpolation in the coordinate system of (X, Y, Z, J4,J5, J6).

MVS P1

P1

P_CURRP_CURR

P1

MVS P1,-100

100mm

P_CURR

MVS ,-100100mm

Page 211: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 211/457

4-192 Detailed explanation of command words

4MELFA-BASIC IV 

(9) Description of singular points.<In the case of a vertical 6-axis robot>Movement from posture A, through posture B, to posture C cannot be performed using the normal linearinterpolation (MVS).

This limitation applies only when J4 axis is at zero degrees at allthe postures A, B, and C. This is because the structure flag of axisJ5 (wrist axis) is FLIP for posture A and NONFLIP for posture C.Moreover, in posture B, the wrist is fully extended and axes J4and J6 are located on the same line. In this case, the robot cannotperform a linear interpolation position calculation.The 3-axis XYZ (TYPE 0, 1) method in the command option ofMVS should be used if it is desired to perform linear interpolationbased on such posture coordinates. Note that, strictly speaking,this 3-axis XYZ method does not maintain the postures as itevenly interpolates the joint angle of axes J4, J5, and J6 at pos-ture A and C. Therefore, it is expected that the robot hand's pos-ture may move front and back while moving from posture A to

posture C.In this case, add one point in the middle to decrease the amountof change in the hand's posture.

 Another singular point is when the center of axis J5 is on the ori-gin and the wrist is facing upward. In this case, J1 and J6 arelocated on the same axis and it is not possible to calculate therobot position.

Fig.4-16:Singular point 1

<In the case of a 6-axis robot for liquid crystal transportation>

The singular points are when the wrist axis J5 is at +90degrees, and when the center of axis J6 is located at theorigin and the wrist is facing upward. In these cases, axesJ1 and J5 are located on the same axis and it is not possi-ble to calculate the robot position.

Fig.4-17:Singular point 2

NONFLIP

FLIP

About sing ular points of vertical 6-axis robots

1) Posture A

Posture at which thelag chang es status

2) Posture B

3) Posture C

0 °

+90° 

The s ingu l a r p o in t is a t ±90 °

Figure of the han d seen f rom the s ide

Page 212: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 212/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-193

OADL (Optimal Acceleration)

[Function] Automatically sets the optimum acceleration/deceleration according to the robot hand's load state (Optimumacceleration/deceleration control).

By employing this function, it becomes possible to shorten the robot's motion time (tact).The acceleration/deceleration speed during optimum acceleration/deceleration can be calculated using thefollowing equation:

 Acceleration/deceleration speed (sec) = Optimum acceleration/deceleration speed (sec) x ACCEL instruc-tion (%) x M_SETADL (%)

* The optimum acceleration/deceleration speed is the optimum acceleration/deceleration speed calculatedwhen an OADL instruction is used.

[Format]

[Terminology]<ON / OFF> ON : Start the optimum acceleration/deceleration speed.

OFF : End the optimum acceleration/deceleration speed.

[Reference Program]10 OADL ON20 MOV P1 ' Move with maximum load.30 LOADSET 1ÅC1 ' Set hand 1 and workpiece 1.40 MOV P2 ' Move with hand 1 + workpiece 1 load.50 HOPEN 1 '

60 MOV P3 ' Move with hand 1 load.70 HCLOSE 1 '80 MOV P4 ' Move with hand 1 + workpiece 1 load.90 OADL OFF

*When parameter HNDHOLD1 is set to 0, 1

[Explanation](1) The robot moves with the optimum acceleration/deceleration according to the hand conditions and work-

piece conditions designated with the LOADSET command.(2) The workpiece grasp/not grasp for when the hand is opened or closed is set with parameter HNDHOLD

1 to 8.(3) Initial setting of OADL can be changed by the ACCMODE parameter. (Refer to Page 314, "Table 5-2: List

Signal parameter" )(4) Once OADL is ON, it is valid until OADL OFF is executed or until the program END is executed.(5) Depending on the conditions of the hand and/or workpiece, the motion time may become longer than

usual.(6) It is possible to perform the optimum acceleration/deceleration operation by using the LOADSET and

OADL instructions, and by setting the HNDDAT1(0) through 8 and WRKDAT1(0) through 8 parameters toappropriate values. (Refer to Page 340, "5.16 Hand and Workpiece Conditions (optimum acceleration/deceleration settings)")

(7) The value of the acceleration/deceleration speed distribution rate in units of axes are predetermined bythe JADL parameter. This value varies with models in the S series. Refer to the JADL parameter.

OADL[]<ON / OFF>

Page 213: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 213/457

4-194 Detailed explanation of command words

4MELFA-BASIC IV 

Fig.4-18:Acceleration/deceleration pattern at light load

[Related instructions] ACCEL (Accelerate), LOADSET (Load Set), HOPEN / HCLOSE (Hand Open/Hand Close)

[Related parameter]HNDDAT 0 to 8, WRKDAT 0 to 8, HNDHOLD 1 to 8, ACCMODE, JADL

   S  p  e  e   d

Time

   S  p  e  e   d

Time

OADL ON

Page 214: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 214/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-195

ON COM GOSUB (ON Communication Go Subroutine)

[Function]Defines the starting line of a branching subroutine when an interrupt is generated from a designated com-munication line.

[Format]

[Terminology]<File No.> Describe a number between 1 and 3 assigned to the communication line.<Call Destination> Describe the line No. and label name.

[Reference Program]If an interrupt is generated from the file No. 1 communication line (COM1:), carry out the label RECV pro-

cess.  10 OPEN "COM1:" AS #1 ' Communication line opening.20 ON COM(1) GOSUB *RECV' The definition of interruption.

  30 COM(1) ON ' Enable interrupt from file No. 1 communication line.  40 '100 ' <<If the communicative interrupt occurs here, it will branch to label *RECV.>>110 '120 MOV P1130 COM(1) STOP ' Suspend the interrupt during movement only from P1 to P2.140 MOV P2150 COM(1) ON ' If there are some communications during movement from P1 to P2, the

interrupt occurs here.

160 '170 ' <<If the communicative interrupt occurs here, it will branch to label *RECV.>>260 '270 COM(1) OFF ' Disable interrupt from file No. 1 communication line.280 CLOSE #1290 END  :  :3000 *RECV ' Communication interruption processing.3010 INPUT #1, M0001 ' Set the received information as M0001 and P0001.3020 INPUT #1, P0001 :3100 RETURN 1 ' Returns control to the next line of interrupted line.

[Explanation](1) If the file No. is omitted, 1 will be used as the file No.(2) The file Nos. with the smallest No. have the order of priority for the interrupt.(3) If a communication interrupt is generated while the robot is moving, the robot will stop.

It is possible to use COM STOP to stop the interrupt, and prevent the robot from stopping.(4) Interrupts are prohibited in the initial state. To enable interrupts, execute the COM ON instruction after

this instruction.(5) Make sure to return from a subroutine using the RETURN instruction. An error occurs if the GOTO

instruction is used to return, because the free memory available for control structure (stack memory)decreases and eventually becomes insufficient.

[Related instructions]COM ON/COM OFF/COM STOP (Communication ON/OFF/STOP), RETURN (Return), OPEN (Open),INPUT (Input), PRINT (Print), CLOSE (Close)

ON[]COM[][(<File No.>)][]GOSUB[]<Call Destination>

Page 215: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 215/457

4-196 Detailed explanation of command words

4MELFA-BASIC IV 

ON ... GOSUB (ON Go Subroutine)

[Function]Calls up the subroutine at the line No. or label corresponding to the value.

[Format]

[Terminology]<Terminology> Designate the line No. or label on the line to branch to with a numeric operation expression.<Call Destination> Describe the line No. or the label No. The maximum number is 32.

[Reference Program]Sets the value equivalent to three bits of input signal 16 in M1, and branches according to the value of M1(1 through 7). 

(Calls line 1000 if M1 is 1, label LSUB if M1 is 2, line 2000 if M1 is 3, 4 or 5, and label L67 if M1 is 6 or 7.)10 M1 = M_INB(16) AND &H720 ON M1 GOSUB 1000,*LSUB,2000,2000,2000,*L67,*L67

1000 ' Describes processing when M1=1.1010 '1200 RETURN ' Be sure to return by using RETURN.

1210 *LSUB1220 ' Describes processing when M1=2.1300 RETURN ' Be sure to return by using RETURN.

1700 *L671710 ' Describes processing when M1=6 or M1=7.1720 RETURN ' Be sure to return by using RETURN.

2000 ' Describes processing when M1=3, M1=4, or M1=5.2010 '2020 RETURN ' Be sure to return by using RETURN.

[Explanation](1) The value of <Expression> determines which line No. or label subroutine to call. 

For example, if the value of <Expression> is 2, the line No. or label described for the second value iscalled.

(2) If the value of <expression> is larger than the number of <destinations called up>, the program control jumps to the next line. For example, the program control jumps to the next line if the value of <expres-sion> is 5 and there are only three <destinations called up>.

(3) When a line No. or label that is called up does not exist, or when there are two definitions, an error willoccur.

(4) Make sure to return from a subroutine using the RETURN instruction. An error occurs if the GOTOinstruction is used to return, because the free memory available for control structure (stack memory)decreases and eventually becomes insufficient.

ON[]<Terminology>[]GOSUB[][<Expression>] [, [<Call Destination>]] ...

Value of <Expression> Process <Control>

Real number Value is converted to an integer by rounding it off,and then branching is executed.

When 0, or when the value exceeds the num-ber of line Nos. or labels

Control proceeds to the next line

Negative number or 32767 is exceeded Execution error  

Page 216: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 216/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-197

ON ... GOTO (On Go To)

[Function]Branches to the line with the line No. or label that corresponds to the designated value.

[Format]

[Terminology]<Expression> Designate the line No. or label on the line to branch to with a numeric operation expression.<Call Destination> Describe the line No. or the label No. The maximum number is 32.

[Reference Program]Branches based on the value (1-7) of the numerical variable M1.(Branches to line 1000 if M1 is 1, to label LJMP if M1 is 2, to line 2000 if M1 is 3, 4 or 5, and to label L67 if

M1 is 6 or 7.) 100 ON M1 GOTO 1000,*LJMP,2000,2000,2000,*L67,*L67 110 ' Control is passed to this line when M1 is other than 1 through 7 (i.e., 0, or 8 or larger).

1000 ' Describes processing when M1=1.1010 ' :

1110 *LJMP ' When M1=2.1120 ' Describes processing when M1=2.1130 ' :

1700 *L67

1710 ' Describes processing when M1=6 or M1=7.1720 ' :

2000 ' Describes processing when M1=3, M1=4, or M1=5.2010 ' :

[Explanation](1) This is the GOTO version of ON GOSUB.(2) If the value of <expression> is larger than the number of <destinations called up>, the program control

 jumps to the next line. For example, the program control jumps to the next line if the value of <expres-sion> is 5 and there are only three <destinations called up>.

(3) When a line No. or label that is called up does not exist, or when there are two definitions, an error will

occur.

ON[]<Expression>[]GOTO[][<Branch Destination>] [, [<Branch Destination>]] ...

Value of <Expression> Process <Control>

Real number Value is converted to an integer by rounding it off,and then branching is executed.

When 0, or when the value exceeds the num-ber of line Nos. or labels

Control proceeds to the next line

Negative number or 32767 is exceeded Execution error  

Page 217: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 217/457

4-198 Detailed explanation of command words

4MELFA-BASIC IV 

OPEN (Open)

[Function]Open the file or communication lines.

[Format]

[Terminology]<File Descriptor> Describe a file name (including communication lines).

*To use a communication line, set "<Communication Line File Name>:"*When not using a communications line, set "<File Name>"

<Mode> Designate the method to access a file.*Omitted = random mode. This can be omitted when using a communication line.*ÅEINPUT = input mode. Inputs from an existing file.*OUTPUT = output mode (new file). Creates a new file and outputs it there.*APPEND = Output mode (existing file). Appends output to the end of an existing file.

<File No.> Specify a constant from 1 to 8.To interrupt from communication line: 1 to 3.

[Reference Program]

(1) Communication line.10 OPEN "COM1:" AS #1 ' Open standard RS-232C line as file No. 1.20 MOV P_0120 MOV P_0130 PRINT #1,P_CURR ' Output current position to external source.

"(100.00,200.00,300.00,400.00)(7.0)" format40 INPUT #1,M1,M2,M3 ' Receive from external source with "101.00,202.00,303.00" ASCII for-

mat.50 P_01.X=M160 P_01.Y=M270 P_01.C=RAD(M3) ' Copy to global data.80 CLOSE ' Close all opened files.90 END

(2) File operation. (Create the file "temp.txt" to the controller and write "abc")10 OPEN "temp.txt" FOR APPEND AS #120 PRINT #1, "abc"30 CLOSE #1

[Explanation](1) Opens the file specified in <File name> using the file number. 

Use this file No. when reading from or writing to the file.(2) A communication line is handled as a file. 

[Related instructions]CLOSE (Close), PRINT (Print), INPUT (Input)

[Related parameter]COMDEV

OPEN[] "<File Descriptor>" [][FOR <Mode>][]AS[] [#] <File No.>

File type File name Access method

File Describe with 16 characters or less. INPUT,PRINT,APPEND

Communi-

cation line

COM1: Standard RS-232C(default value)

COM2:The setting in the "COMDEV" parameter.  :COM8:The setting in the "COMDEV" parameter.

Omitted = random mode only

Page 218: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 218/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-199

OVRD (Override)

[Function]This instruction specifies the speed of the robot movement as a value in the range from 1 to 100%. This isthe override applied to the entire program.

[Format]

This function is available for controller software version G2 or later.

[Terminology]<Override> Designate the override with a real number. The default value is 100.

Unit: [%] (Recommended range: 0.1 to 100.0) A numeric operation expression can also be described. If 0 or a value over 100 is set,an error will occur.

<Override when moving upward/downward> 

Sets the override value when moving upward/downward by the arch motion instruction(MVA).

[Reference Program]10 OVRD 5020 MOV P130 MVS P240 OVRD M_NOVRD ' Set default value.

50 MOV P160 OVRD 30,10,10 ' Sets the override when moving upward/downward by the arch motioninstruction to 10.

70 MVA P3,3

[Explanation](1) The OVRD command is valid regardless of the interpolation type.(2) The actual override is as follows:*During joint interpolation: Operation panel (T/B) override setting value) x (Program override (OVRD com-

mand)) x (Joint override (JOVRD command)).*During linear interpolation: Operation panel (T/B) override setting value) x (Program override (OVRD com-

mand)) x (Linear designated speed (SPD command)).

(3) The OVRD command changes only the program override. 100% is the maximum capacity of the robot.Normally, the system default value (M_NOVRD) is set to 100%. The designated override is the systemdefault value until the OVRD command is executed in the program.

(4) Once the OVRD command has been executed, the designated override is applied until the next OVRDcommand is executed, the program END is executed or until the program is reset. The value will returnto the default value when the END statement is executed or the program is reset.

[Related instructions]JOVRD (J Override) (For joint interpolation), SPD (Speed)( For linear/circular interpolation)

[Related system variables]M_JOVRD/M_NJOVRD/M_OPOVRD/M_OVRD/M_NOVRD

(M_NOVRD (System default value), M_OVRD (Current designated speed))

OVRD[]<Override>

OVRD[]<Override> [, <Override when moving upward>] [, <Override when moving downward>]

Page 219: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 219/457

4-200 Detailed explanation of command words

4MELFA-BASIC IV 

PLT (Pallet)

[Function]Calculates the position of grid in the pallet.

[Format]

[Terminology]<Pallet No.> Select a pallet No. between 1 and 8 that has already been defined with a DEF PLT command.

Specify this argument using a constant or a variable.<Grid No.> The position number to calculate in the palette. Specify this argument using a constant

or a variable.

[Reference Program]100 DEF PLT 1,P1,P2,P3,P4,4,3,1' The definition of the four-point pallet. (P1,P2,P3,P4)110 '120 M1=1 ' Initialize the counter M1.130 *LOOP140 MOV PICK, 50 ' Moves 50 mm above the work unload position.150 OVRD 50160 MVS PICK170 HCLOSE 1 ' Close the hand.180 DLY 0.5 ' Wait for the hand to close securely (0.5 sec.)190 OVRD 100200 MVS,50 ' Moves 50 mm above the current position.

210 PLACE = PLT 1, M1 ' Calculates the M1th position220 MOV PLACE, 50 ' Moves 50 mm above the pallet top mount position.230 OVRD 50240 MVS PLACE250 HOPEN 1 ' Open the hand.260 DLY 0.5270 OVRD 100280 MVS,50 ' Moves 50 mm above the current position.290 M1=M1+1 ' Add the counter.300 IF M1 <=12 THEN *LOOP ' If the counter is within the limits, repeats from *LOOP.310 MOV PICK,50320 END

[Explanation](1) The position of grid of a pallet defined by the DEF PLT statement is operated.(2) The pallet Nos. are from 1 to 8, and up to 8 can be defined at once.(3) Note that the position of the grid may vary because of the designated direction in the pallet definition.(4) If a grid No. is designated that exceeds the largest grid No. defined in the pallet definition statement, an

error will occur during execution.(5) When using the pallet grid point as the target position of the movement command, an error will occur if

the point is not enclosed in parentheses as shown above. Refer to Page 71, "4.1.2 Pallet operation" fordetail.

[Related instructions]

DEF PLT (Define pallet)

PLT[]<Pallet No.> , <Grid No.>

Page 220: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 220/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-201

PREC (Precision)

[Function]This instruction is used to improve the motion path tracking. It switches between enabling and disabling thehigh accuracy mode.

Note) The available robot type is limited such as RV-4A. Refer to "[Available robot type]".

[Format]This function is available for controller software version D1 or later.

[Terminology]<ON / OFF> ON : When enabling the high accuracy mode.

OFF : When disabling the high accuracy mode.

[Reference Program]10 PREC ON ' Enables the high accuracy mode.20 MVS P130 MVS P240 PREC OFF ' Disables the high accuracy mode.50 MOV P1

 [Explanation]

(1) The high accuracy mode is enabled using the PREC ON instruction if it is desired to perform interpola-tion movement with increased path accuracy.

(2) When this instruction is used, the path accuracy is improved but the program execution time (tact time)may become longer because the acceleration/deceleration times are changed internally.

(3) The enabling/disabling of the high accuracy mode is activated from the first interpolation instruction afterthe execution of this instruction.

(4) The high accuracy mode is disabled if the PREC OFF or END instruction is executed, or a program resetoperation is performed.

(5) The high accuracy mode is disabled immediately after turning the power on.(6) The high accuracy mode is always disabled in jog movement.

[Available robot type]

PREC[]<ON / OFF>

RV-1A/2AJ series

RV-2A/3AJ series

RV-4A/5AJ series

RV-20A

RV-3S/3SJ/3SB/3SJB series

RV-6S/6SL/12S/12SL seriesRH-6SH/12SH/18SH series

Page 221: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 221/457

4-202 Detailed explanation of command words

4MELFA-BASIC IV 

PRINT (Print)

[Function]Outputs data into a file (including communication lines). All data uses the ASCII format.

[Format]

[Terminology]<File No.> Described with numbers 1 to 8.

Corresponds to the control No. assigned by the OPEN command.<Expression> Describes numeric operation expressions, position operation expressions and character

string expressions.

[Reference Program]10 OPEN "COM1" AS #1 ' Open standard RS-232-C line as file No. 1.20 MOV P_01.20 MDATA=150 ' Substitute 150 for the numeric variable MDATA.30 PRINT #1,"***PRINT TEST***" ' Outputs the character string "***PRINT TEST****."40 PRINT #1 ' Issue a carriage return50 PRINT #1,"MDATA=",MDATA ' Output the character string "MDATA" followed by the value of

MDATA, (150).60 PRINT #1 ' Issue a carriage return.40 PRINT #1,"****************" ' Outputs the character string "**************."50 END ' End the program.

The output result is shown below.***PRINT TEST***MDATA=150****************

[Explanation](1) If <Expression> is not described, then a carriage return will be output.(2) Output format of data (reference)

 

The output space for the value for <Expression> and for the character string is in units of 14 characters.When outputting multiple values, use a comma between each <Expression> as a delimiter.

 

If a semicolon (;) is used at the head of each space unit, it will output after the item that was last dis-played. The carriage return code will always be returned after the output data.

(3) The error occurs when OPEN command is not executed.(4) If data contains a double quotation mark ("), only up to the double quotation mark is output.

Example)

[10 M1=123.520 P1=(130.5,-117.2,55.1,16.2,0.0,0.0)(1,0) ]1)[30 PRINT# 1,"OUTPUT TEST",M1,P1]is described,OUTPUT TEST 123.5 (130.5,-117.2,55.1,16.2,0.0,0.0)(1,0) is output.

2)[30 PRINT# 1,"OUTPUT TEST";M1;P1]is described,OUTPUT TEST 123.5(130.5,-117.2,55.1,16.2,0.0,0.0)(1,0) is output.

If a comma or semicolon is inserted after a <Expression>, the carriage return will not be issued, and instead,printing will continue on the same line.

3)[30 PRINT# 1,"OUTPUT TEST",40 PRINT# 1,M1;

  50 PRINT# 1,P1 ]is described,

OUTPUT TEST 123.5(130.5,-117.2,55.1,16.2,0.0,0.0)(1,0) is output.

[Related instructions]OPEN (Open), CLOSE (Close), INPUT (Input)

PRINT[]#<File No.>[] [, [<Expression> ; ] ...[<Expression>[ ; ]]]

Page 222: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 222/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-203

PRIORITY (Priority)

[Function]In multitask program operation, multiple program lines are executed in sequence (one by one line accordingto the default setting). This instruction specifies the priority (number of lines executed in priority) when pro-

grams are executed in multitask operation.

[Format]This function is available for controller software version C2 or later.

[Terminology]<Number of executed lines> Specify the number of lines executed at once . 

Use a numerical value from 1 to 31.<Slot number> 1 to 32. If this argument is omitted, the current slot number is set.

[Reference Program]Slot 110 PRIORITY 3 ' Sets the number of executed lines for the current slot to 3.

Slot 210 PRIORITY 4 ' Sets the number of executed lines for this slot to 4.

[Explanation](1) Programs of other slots are not executed until the specified number of lines is executed. For example, as

in the statement example above, if PRIORITY 3 is set for slot 1's program and PRIORITY 4 is set for slot2's program, three lines of the slot 1 program are executed first, then four lines of the slot 2 program areexecuted. Afterward, this cycle is repeated.

(2) The default value is 1 for all the slots. In other words, the execution moves to the next slot every time oneline has been executed.

(3) An error occurs if there is no program corresponding to the specified task slot.(4) It is possible to change the priority even while the program of the specified task slot is being executed.

PRIORITY[]<Number of executed lines> [, <Slot number>]

Page 223: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 223/457

4-204 Detailed explanation of command words

4MELFA-BASIC IV 

RELM (Release Mechanism)

[Function]This instruction is used in connection with control of a mechanism via task slots during multitask operation.It is used to release the mechanism obtained by the GETM instruction.

[Format]

[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 110 RELM ' Releases the mechanism in order to control mechanism 1 using slot 2.20 XRUN 2,"10" ' Start the program 10 in slot 2.30 WAIT M_RUN(2)=1 ' Wait for the starting confirmation of the slot 2.

 :

Task slot 2. (Program "10")10 GETM 1 ' Get the control of mechanism 1.20 SERVO ON ' Turn on the servo of mechanism 1.30 MOV P140 MVS P250 SERVO OFF ' Turn off the servo of mechanism 1.60 RELM ' Releases the control right of mechanism 1.70 END

[Explanation](1) Releases the currently acquired mechanism resource.(2) If an interrupt is applied while the mechanism is acquired and the program execution is stopped, the

acquired mechanism resource will be automatically released.(3) This instruction cannot be used in a constantly executed program.

[Related instructions]GETM (Get Mechanism)

RELM

Page 224: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 224/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-205

REM (Remarks)

[Function]Uses the following character strings as comments.

[Format]

[Terminology]<Comment> Describe a user-selected character string.

Descriptions can be made in the range of position lines.

[Reference Program]10 REM ***MAIN PROGRAM***20 ' ***MAIN PROGRAM***

30 MOV P1 ' Move to P1.

[Explanation](1) REM can be abbreviated to be a single quotation mark (') .(2) It can be described after the instruction like an 30 line in reference program.

REM[][<Comment>]

Page 225: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 225/457

4-206 Detailed explanation of command words

4MELFA-BASIC IV 

RESET ERR (Reset Error)

[Function]This instruction resets an error generated in the robot controller. It is not allowed to use this instruction in theinitial status. If an error other than warnings occurs, normal programs other than constantly executed pro-

grams cannot be operated. This instruction is effective if used in constantly executed programs.

[Format]This function is available for controller software version B1 or later.

[Reference Program]Example of execution in a constantly executed program10 IF M_ERR=1 THEN RESET ERR 'Resets an error when an error occurs in the controller.

[Explanation](1) This instruction is used in a program whose start condition is set to constant execution (ALWAYS) by the

"SLT*" parameter when it is desired to reset system errors of the robot.(2) It becomes enabled when the controller's power is turned on again after changing the value of the

"ALWENA" parameter from 0 to 7.

[Related parameter] ALWENA

[Related system variables]M_ERR/M_ERRLVL/M_ERRNO

RESET ERR

Page 226: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 226/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-207

RETURN (Return)[Function]

(1) When returning from a normal subroutine returns to the next line after the GOSUB.(2) When returning from an interrupt processing subroutine, returns either to the line where the interrupt wasgenerated, or to the next line.

[Format](1) When returning from a normal subroutine:

(2) When returning from an interrupt processing subroutine:

[Terminology]

<Return Designation No.> Designate the line number where control will return to after an interrupt has beengenerated and processed.0 ... Return control to the line where the interrupt was generated.1 ... Return control to the next line after the line where the interrupt was issued.

[Reference Program](1) The example of RETURN from the usual subroutine .

10 ' ***MAIN PROGRAM***20 GOSUB *SUB_INIT ' Subroutine jumps to label SUB_INIT.30 MOV P1 :1000 ' ***SUB INIT*** ' Subroutine1010 *SUB_INIT1020 PSTART=P11030 M100=1231040 RETURN ' Returns to the line immediately following the line where the subroutine

was called from.

(2) The example of RETURN from the subroutine for interruption processing. Calls the subroutine on line100 when the input signal of general-purpose input signal number 17 is turned on.

10 DEF ACT 1,M_IN(17)=1 GOSUB 100' Definition of interrupt of ACT 1.20 ACT 1=1 ' Enable the ACT 1.  :100 ' The subroutine for interrupt of ACT 1.

110 ACT 1=0 ' Disable the interrupt.120 M_TIMER(1)=0 ' Set the timer to zero.130 MOV P2 ' Move to P2.140 WAIT M_IN(17)=0 ' Wait until the input signal 17 turns off.150 ACT 1=1 ' Set up interrupt again.160 RETURN 0 ' Returns control to the interrupted line.

RETURN

RETURN <Return Designation No.>

Page 227: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 227/457

4-208 Detailed explanation of command words

4MELFA-BASIC IV 

[Explanation](1) Writes the RETURN instruction at the end of the jump destination processing called up by the GOSUB

instruction.(2) An error occurs if the RETURN instruction is executed without being called by the GOSUB instruction.(3) Always use the RETURN instruction to return from a subroutine when called by the GOSUB instruction.

 An error occurs if the GOTO instruction is used to return, because the free memory available for control

structure (stack memory) decreases and eventually becomes insufficient.(4) When there is a RETURN command in a normal subroutine with a return-to designation number, andwhen there is a RETURN command in an interrupt-processing subroutine with no return-to destinationnumber, an error will occur.

(5) when returning from interruption processing to the next line by RETURN1, execute the statement to dis-able the interrupt. When that is not so, if interruption conditions have been satisfied, because interrup-tion processing will be executed again and it will return to the next line, the line may be skipped. Pleaserefer to Page 146, "DEF ACT (Define act)" for the interrupt processing.

[Related instructions]GOSUB (RETURN)(Go Subroutine), ON ... GOSUB (ON Go Subroutine), ON COM GOSUB (ON Communi-cation Go Subroutine), DEF ACT (Define act)

Page 228: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 228/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-209

SELECT CASE (Select Case)

[Function]Executes one of multiple statement blocks according to the condition expression value.

[Format]

[Terminology]<Condition> Describe a numeric operation expression.<Expression> Describe a numeric operation expression. The type must be the same as the condition

expression.<Process> Writes any instruction (other than the GOTO instruction) provided by MELFA-BASIC IV.

[Reference Program]10 SELECT MCNT20 M1=10 ' This line is not executed

30 CASE IS <= 10 ' MCNT <= 1040 MOV P150 BREAK60 CASE 11 'MCNT=1170 MOV P280 BREAK90 CASE 13 TO 18 '13 <= MCNTÅ <= 18100 MOV P4110 BREAK120 DEFAULT ' Other than the above.130 M_OUT(10)=1140 BREAK150 END SELECT

SELECT[] <Condition>CASE[]<Expression>

[<Process>]BREAK

CASE[]<Expression>[<Process>]BREAK

  :DEFAULT

[<Process>]BREAK

END[]SELECT

Page 229: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 229/457

4-210 Detailed explanation of command words

4MELFA-BASIC IV 

[Explanation](1) If the condition matches one of the CASE items, the process will be executed until the next CASE,

DEFAULT or ENDSELECT. If the case does not match with any of the CASE items but DEFAULT isdescribed, that block will be executed.

(2) If there is no DEFAULT, the program will jump to the line after ENDSELECT without processing.(3) The SELECT CASE and END SELECT statements must always correspond. If a GOTO instruction

forces the program to jump out from a CASE block of the SELECT CASE statement, the free memoryavailable for control structure (stack memory) decreases. Thus, if a program is executed continuously,an error will eventually occur.

(4) If an END SELECT statement that does not correspond to SELECT CASE is executed, an executionerror will occur.

(5) In the case of controller software version G1 or later, it is possible to write a SELECT CASE block withinanother SELECT CASE block (up to eight nesting levels are allowed).

(6) It is possible to write WHILE-WEND and FOR-NEXT within a CASE block.(7) Use "CASE IS", when using the comparison operators (<, =, >, etc.) for the "<Expression>".

Page 230: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 230/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-211

SERVO (Servo)

[Function]Controls the ON and OFF of the servo motor power.

[Format](1) The usual program

(2) The program of always (ALWAYS) execution.

[Terminology]<ON / OFF> ON : When turning the servo motor power on.

OFF : When turning the servo motor power off.<Mechanism No.> This is valid only within the program of always execution.

The range of the value is 1 to 3, and describe by constant or variable.

[Reference Program]10 SERVO ON ' Servo ON.20 IF M_SVO<>1 GOTO 20 ' Wait for servo ON.30 SPD M_NSPD40 MOV P150 SERVO OFF

[Explanation](1) The robot arm controls the servo power for all axes.(2) If additional axes are attached, the servo power supply for the additional axes is also affected.(3) If used in a program that is executed constantly, this instruction is enabled by changing the value of the

"ALWENA" parameter from 0 to 7 and then turning the controller's power on again.

[Related system variables]M_SVO (1 : ON, 0 : OFF)

[Related parameter] ALWENA

SERVO[]<ON / OFF>

SERVO[]<ON / OFF> [, <Mechanism No.>]

Page 231: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 231/457

4-212 Detailed explanation of command words

4MELFA-BASIC IV 

SKIP (Skip)

[Function]Transfers control of the program to the next line.

[Format]

[Reference Program]10 MOV P1 WTHIF M_IN(17)=1,SKIP ' If the input signal (M_IN(1 7)) turns ON while moving with joint

interpolation to the position indicated with position variable P1,stop the robot interpolation motion, and stop execution of thiscommand, and execute the next line.

20 IF M_SKIPCQ=1 THEN HLT ' Pauses the program if the execution is skipped.

[Explanation](1) This command is described with the WHT or WTHIF statements. In this case, the execution of that line is

interrupted, and control is automatically transferred to the next line. Execution of skip can be seen withthe M_SKIPCQ information.

[Related system variables]M_SETADL ( 1: Skipped, 0: Not skipped )

SKIP

Page 232: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 232/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-213

SPD (Speed)

[Function]Designates the speed for the robot's linear and circular movements. This instruction also specifies the opti-mum speed control mode.

[Format]

[Terminology]<Designated Speed> Designate the speed as a real number. Unit: [mm/s]

[Reference Program]10 SPD 100

20 MVS P130 SPD M_NSPD ' Set the default value.(The optimal speed-control mode .)40 MOV P250 MOV P360 OVRD 80 ' Countermeasure against an excessive speed error in the optimal speed mode70 MOV P480 OVRD 100

[Explanation](1) The SPD command is valid only for the robot's linear and circular movements.(2) The actual designated override is (Operation panel (T/B) override setting value) x (Program override

(OVRD command)) x (Linear designated speed (SPD command)).

(3) The SPD command changes only the linear/circular designated speed.(4) When M_NSPD (The default value is 10000) is designated for the designated speed, the robot will

always move at the maximum possible speed, so the line speed will not be constant(optimum speedcontrol).

(5) An error may occur depending on the posture of the robot despite of the optimal speed control. If anexcessive speed error occurs, insert an OVRD instruction in front of the error causing operation instruc-tion in order to lower the speed only in that segment.

(6) The system default value is applied for the designated speed until the SPD command is executed in theprogram. Once the SPD command is executed, that designated speed is held until the next SPD com-mand.

(7) The designated speed will return to the system default value when the program END statement is exe-cuted.

[Related system variables]M_SPD/M_NSPD/M_RSPD

SPD[]<Designated Speed

SPD[]M_NSPD (Optimum speed control mode)

Page 233: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 233/457

4-214 Detailed explanation of command words

4MELFA-BASIC IV 

SPDOPT (Speed Optimize)

[Function] Adjusts the speed so that the speed does not exceed during the linear interpolation operation in the horizon-tal direction which passes through near the OP (X=Y=0: one of the robot's singular points).

Note) This command is limited to the corresponding models such as the RH-1000G series. Refer to "[avail-able robot type]".

[Format]This function is available for controller software version H7 or later

[Terminology]<ON/OFF> ON: Enable the speed-optimization function.

OFF: Disable the speed-optimization function.

[Reference Program]10 MOV P120 SPDOPT ON ' Enable the speed-optimization funct ion.30 MVS P240 MVS P350 SPDOPT OFF ' Disable the speed-optimization func tion.60 MVS P6

[Explanation](1) When performing a XYZ interpolation operation while maintaining the speed of the control point, the J1

axis must rotate at a faster speed when passing through a point near the origin point O (one of therobot's singular points) as shown in Fig. 4-19, causing an excessive speed error depending on thespecified speed. If SPDOPT ON is executed, the speed is adjusted automatically in order to prevent anexcessive speed error from occurring. For example, while in operation at the command speed V, itapproaches the origin point O, and the speed will be exceeded if it continues to operate at the currentspeed, the speed is decreased automatically as shown by A in Fig. 4-20 in order to prevent the speedto be exceeded. Then, when it has passed near the origin point O and it becomes possible to increasethe speed, it starts accelerating to reach command speed V as shown by B in Fig. 4-20.

Fig.4-19:When passing through near the origin point by linear interpolation

(2) This instruction functions only for XYZ interpolation. It does not function for JOINT interpolation and CIR-CULAR interpolation. Also, it does not function for linear interpolation by which the J4 axis does notpass through the speed adjustment area and the singular point as shown in Page 215 "Fig. 4-21 Speed-optimization area and singular point area.".

SPDOPT[] <ON/OFF>

J2

+Y

+X

J2J4

J4

J1

origin

Page 234: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 234/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-215

Fig.4-20:The situation of the speed at speed-optimization.  Fig.4-21:Speed-optimization area and singular point area. 

(3) The initial state of the speed adjustment function immediately after the power is turned on can bechanged by the SPDOPT parameter. This parameter also limits the applicable models including the RH-1000G series. Please check that it is listed in the "Command List" in the Additional Handbook/StandardSpecifications before using it.The initial value on an applicable model is SPDOPT=1 (speed adjustment enabled).

(4) If the END instruction or a program reset operation is executed, the status of the speed adjustmentfunction returns to the initial state immediately after the power is turned on.

(5) When the speed adjustment function is enabled, error 2804 will be generated if the XYZ interpolation bywhich the J4 axis passes through a singular point area shown in Fig. 4-21 is executed, and theoperation is then suspended.

(6) Even if this instruction is described in a program, it is ignored on models other than the applicablemodels.

(7) Even if the speed adjustment function is enabled, an exceeded speed error may be generated if a pathis connected by enabling the CNT instruction near the origin point, or a XYZ interpolation operation thatdrastically changes the posture is executed. In such a case, move the position where a path isconnected away from the origin point, or adjust the speed by using the OVRD instruction.

(8) In the case of a XYZ interpolation that operates slightly in the horizontal direction but operatessignificantly in the vertical direction, the operation speed may degrade drastically when the speedadjustment function is enabled vs. when it is disabled. In such a case, disable the speed adjustmentfunction, or operate by using a JOINT interpolation (MOV instruction).

[The available robot type]

[Related parameter]SPDOPT

RH-1000G series

R1=360mm, R2=5mmfor RH-1000G

+Y

+X

Speed-optimization area

J4

Singular point area

R1

R2

Time

V

A↓

B↓

Speed-optimization area

Speed

Page 235: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 235/457

4-216 Detailed explanation of command words

4MELFA-BASIC IV 

TITLE (Title)

[Function] Appends the title to the program. The characters specified in the program list display field of the robot con-troller can be displayed using the separately sold personal computer support software.

This command is available for controller software version J1 or later.

[Format]

[Terminology]<Character String> Message for title

[Reference Program]10 TITLE "ROBOT Loader program"20 MOV P130 MVS P2

[Explanation](1) Although characters can be registered up to the maximum allowed for each line in the program, only a

maximum of 20 characters can be displayed in the program list display field of the robot controller usingthe personal computer support software.

TITLE[]"<Character String>"

Page 236: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 236/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-217

TOOL (Tool)

[Function]Designates the tool conversion data. This instruction specifies the length, position of the control point fromthe mechanical interface, and posture of the tools (hands).

[Format]

[Terminology]<Tool Conversion Data> Specifies the tool conversion data using the position operation expression. (Position

constants, position variables, etc.)

[Reference Program](1) Set up the direct numerical value.

10 TOOL (100,0,100,0,0,0) ' Changes the control position to an X-axis coordinate value of100 mm and a Z-axis coordinate value of 100 mm in the toolcoordinate system.

20 MVS P130 TOOL P_NTOOL ' Returns the control position to the initial value. (mechanical inter-

face position, flange plane.)

(2) Set up the position variable data in the XYZ coordinates system.(If (100,0,100,0,0,0,0,0) are set in PTL01, it will have the same meaning as (1).)10 TOOL PTL0120 MVS P1

[Explanation](1) The TOOL instruction is used to specify the control points at the tip of each hand in a system using dou-ble hands. If both hands are of the same type, the control point should be set by the "MEXTL" parame-ter instead of by the TOOL instruction.

(2) The tool conversion data changed with the TOOL command is saved in parameter MEXTL, and is savedeven after the controller power is turned OFF.

(3) The system default value (P_NTOOL) is applied until the TOOl command is executed. Once the TOOL command is executed, the designated tool conversion data is applied until the nextTOOL command is executed. This is operated with 6-axis three-dimension regardless of the mecha-nism structure.

(4) If different tool conversion data are used at teaching and automatic operation, the robot may move to anunexpected position. Make sure that the settings at operation and teaching match.The valid axis element of tool conversion data is different depending on the type of robot.

Set up the appropriate data referring to the Page 326, "Table 5-6: Valid axis elements of the tool conver-sion data depending on the robot model".

(5) Using the M_TOOL variable, it is possible to set the MEXTL1 to 4 parameters as tool data.

[Related parameter]MEXTL, MEXTL 1 to 4 Refer to Page 324, "5.6 Standard Tool Coordinates" for detail.

[Related system variables]P_TOOL/P_NTOOL, M_TOOL

TOOL[]<Tool Conversion Data>

Page 237: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 237/457

4-218 Detailed explanation of command words

4MELFA-BASIC IV 

TORQ (Torque)

[Function]Designates the torque limit for each axis. By specifying the torque limit, an excessive load (overload) onworks and so froth can be avoided. An excessive error is generated if the torque limit value ratio is

exceeded.

[Format]

[Terminology]<Axis No.> Designate the axis No. with a numeric constant. (1 to 6)<Torque Limitation Rate> Designate the limit of the force generated from the axis as a percentage. (1 to 100)

[Reference Program]

10 DEF ACT 1,M_FBD>10 GOTO *SUB1,S' Generate an interrupt when the difference between the com-mand position and the feedback position reaches 10 mm ormore.

20 ACT 1=1 ' Enable the interrupt 130 TORQ 3,10 ' Set the torque limit of the three axes to 10% of the normal torque

using the torque instruction.40 MVS P1 ' Moves50 MOV P2:100 *SUB1110 MOV P_FBC ' Align the command position with the feedback position.

120 M_OUT(10)=1 ' Signal No. 10 output130 HLT ' Stop when a difference occurs.

[Explanation](1) Restrict the torque limit value of the specified axis so that a torque exceeding the specified torque value

will not be applied during operation. Specify the ratio relative to the standard torque limit value. Thestandard torque limit value is predefined by the manufacturer.

(2) The available rate of torque limitation is changed by robot type. The setting is made for each servomotor axis; thus, it may not be the torque limit ratio at the control point of the tip of the actual robot. Tryvarious ratios accordingly.

(3) If the robot is stopped while still applying the torque limit, it may stop at the position where the commandposition and the feedback position deviate (due to friction, etc.). In such a case, an excessive error may

occur when resuming the operation. To avoid this, program so as to move to the feedback positionbefore resuming the operation, as shown on the 110th line of the above example.(4) This instruction is valid only for standard robot axes. It cannot be used for general-purpose servo axes

(additional axes and user-defined mechanisms). Change the parameters on the general-purpose servoside to obtain similar movement.

[Related system variables]P_FBC, M_FBD

TORQ[]<Axis No.>, <Torque Limitation Rate>

Page 238: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 238/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-219

WAIT (Wait)

[Function]Waits for the variable to reach the designated value.

[Format]

[Terminology]<Numeric variable> Designate a numeric variable. Use the input/output signal variable (in such cases

as M_IN, M_OUT) well.<Numeric constant> Designate a numeric constant.

[Reference Program](1) Signal state

10 WAIT M_IN(1)=1 ' The same meaning as "10 IF M_IN(1)=0 THEN GOTO 10".

20 WAIT M_IN(3)=0

(2) Task slot state30 WAIT M_RUN(2)=1

(3) Variable state40 WAIT M_01=100

[Explanation](1) This command is used as the interlock during signal input wait and during multitask execution.(2) The WAIT instruction allows the program control to continue to the next line once the specified condition

is met.

(3) In case the WAIT instruction is executed in several tasks at one time in the multitask execution status,the processing time (tact time) may become longer and affect the system. In such cases, use the IF-THEN instruction instead of the WAIT instruction.

Example) 50 WAIT M_ABC=0 .... 50 IF M_ABC<>0 THEN GOTO 50

WAIT[]<Numeric variable>=<Numeric constant>

Page 239: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 239/457

4-220 Detailed explanation of command words

4MELFA-BASIC IV 

WHILE-WEND (While End)

[Function]The program between the WHILE statement and WEND statement is repeated until the loop conditions aresatisfied.

[Format]

[Terminology]<Loop Condition> Describe a numeric operation expression. (Refer to the syntax diagram)

[Reference Program]Repeat the process while the numeric variable M1 value is between -5 and +5, and transfer control to lineafter WEND statement if range is exceeded.

10 WHILE (M1>=-5) AND (M1<=5) ' Repeat the process while the value of numeric variable M1 isbetween -5 and +5.

20 M1=-(M1+1) ' Add 1 to M1, and reverse the sign.30 PRINT# 1, M1 ' Output the M1 value.40 WEND ' Return to the WHILE statement (line 10)50 END ' End the program.

[Explanation](1) The program between the WHILE statement and WEND statement is repeated.

(2) If the result of <Expression> is true (not 0), the control moves to the line following the WHILE statementand the process is repeated.

(3) If the result of <Expression> is false (is 0), then the control moves to the line following the WEND state-ment.

(4) If a GOTO instruction forces the program to jump out from between a WHILE statement and a WENDstatement, the free memory available for control structure (stack memory) decreases. Thus, if a pro-gram is executed continuously, an error will eventually occur. Write a program in such a way that theloop exits when the condition of the WHILE statement is met.

WHILE[]<Loop Condition>

  :

WEND

Page 240: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 240/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-221

WTH (With)

[Function] A process is added to the interpolation motion.

[Format]

[Terminology]<Process> Describe the process to be added. The commands that can be described are as follow.

 1. <Numeric type data B> <Substitution operator><Numeric type data A> [Substitute,signal modifier command (refer to syntax diagram)]

 [Reference Program]

10 MOV P1 WTH M_OUT(17)=1 DLY M1+2 ' Simultaneously with the start of movement to P1, the out-

put signal No. 17 will turn ON for the value indicated withthe numeric variable M1 + two seconds.

[Explanation](1) This command can only be used to describe the additional condition for the movement command.(2) An error will occur if the WTH command is used alone.(3) The process will be executed simultaneously with the start of movement.(4) The relationship between the interrupts regarding the priority order is shown below. 

COM > ACT > WTHIF(WTH) > Pulse substitution

Example) MOV P1 WTH[]<Process>

Page 241: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 241/457

4-222 Detailed explanation of command words

4MELFA-BASIC IV 

WTHIF (With If)

[Function] A process is conditionally added to the interpolation motion command.

[Format]

[Terminology]<Additional Condition> Describe the condition for adding the process. (Same as ACT condition

expression)<Process> Describe the process to be added when the additional conditions are estab-

lished. (Same as WTH)The commands that can be described as a process are as follow. (Refer tosyntax diagram.)

  1. <Numeric type data B> <Substitution operator><Numeric type data A>  Example) M_OUT(1)=1, P1=P2  2. HLT statement  3. SKIP statement

[Reference Program](1) If the input signal 17 turns on, the robot will stop.

10 MOV P1 WTHIF M_IN(17)=1, HLT

(2) If the current command speed exceeds 200 mm/s, turn on the output signal 17 for the M1+2 seconds.20 MVS P2 WTHIF M_RSPD>200, M_OUT(17)=1 DLY M1+2

(3) If the rate of arrival exceeds 15% during movement to P3, turn on the output signal 1.30 MVS P3 WTHIF M_RATIO>15, M_OUT(1)=1

[Explanation](1) This command can only be used to describe the additional conditions to the movement command.(2) Monitoring of the condition will start simultaneously with the start of movement.(3) It is not allowed to write the DLY instruction at the processing part.

WTHIF[]<Additional Condition>, <Process>

Page 242: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 242/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-223

 XCLR (X Clear)

[Function]This instruction cancels the program selection status of the specified task slot from within a program. It isused during multitask operation.

[Format]

[Terminology]<Slot No.> Designate the slot number.

[Reference Program]10 XRUN 2,"1" ' Executes the first program in task slot 2.  :100 XSTP 2 ' Pauses the program of task slot 2.110 WAIT M_WAI(2)=1 ' Waits until the program of task slot 2 pauses.150 XRST 2 ' Cancels the pause status of the program of task slot 2.  :200 XCLR 2 ' Cancels the program selection status of task slot 2.210 END

[Explanation](1) An error occurs at execution if the specified slot does not select the program.(2) If the designated program is being operating, an error will occur at execution.(3) If the designated program is being pausing, an error will occur at execution.(4) If this instruction is used within a constantly executed program, it becomes enabled by changing the

value of the "ALWENA" parameter from 0 to 7 and turning the controller's power off and on again.

[Related instructions]XLOAD (X Load), XRST (X Reset), XRUN (X Run), XSTP (X Stop)

[Related parameter] ALWENA

XCLR[]<Slot No.>

Page 243: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 243/457

4-224 Detailed explanation of command words

4MELFA-BASIC IV 

 XLOAD (X Load)

[Function]This instruction commands the specified program to be loaded into the specified task slot from within a pro-gram.

It is used during multitask operation.

[Format]

[Terminology]<Slot No.> Designate the slot number.<Program Name> Designate the program name.

[Reference Program]10 IF M_PSA(2)=0 THEN 60 ' Checks whether slot 2 is in the program selectable state.20 XLOAD 2,"10" ' Select program 10 for slot 2.30 IF C_PRG(2)<>"10" THEN GOTO 30 ' Waits for a while until the program is loaded.40 XRUN 2 ' Start slot 2.50 WAIT M_RUN(2)=1 ' Wait to confirm starting of slot 2.60 '70 ' When the slot 2 is already operating, execute from here.

[Explanation](1) An error occurs at execution if the specified program does not exist.(2) If the designated program is already selected for another slot, an error will occur at execution.(3) If the designated program is being edited, an error will occur at execution.(4) If the designated program is being executed, an error will occur at execution.(5) Designate the program name in double quotations.(6) If used in a program that is executed constantly, this instruction is enabled by changing the value of the

"ALWENA" parameter from 0 to 7 and then turning the controller's power on again.(7) If XRUN is executed immediately after executing XLOAD, an error may occur while loading a program. If

necessary, perform a load completion check as shown on the 30th line of the statement example.

[Related instructions]XCLR (X Clear), XRST (X Reset), XRUN (X Run), XSTP (X Stop)

[Related parameter]

 ALWENA

XLOAD[]<Slot No.> <Program Name>

Page 244: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 244/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-225

 XRST (X Reset)

[Function]This instruction returns the program control to the first line if the program of the specified task slot is pausedby a command within the program (program reset). It is used during multitask operation.

[Format]

[Terminology]<Slot No.> Designate the slot number.

[Reference Program]10 XRUN 2 ' Start.20 WAIT M_RUN(2)=1 ' Wait to confirm starting.  :100 XSTP 2 ' Stop.110 WAIT M_WAI(2)=1 ' Wait for stop to complete.  :150 XRST 2 ' Set program execution start line to head line.160 WAIT M_PSA(2)=1 ' Wait for program reset to complete.  :200 XRUN 2 ' Restart.210 WAIT M_RUN(2)=1 ' Wait for restart to complete.

[Explanation](1) This is valid only when the slot is in the stopped state.

(2) If used in a program that is executed constantly, this instruction is enabled by changing the value of the"ALWENA" parameter from 0 to 7 and then turning the controller's power on again.

[Related instructions]XCLR (X Clear), XLOAD (X Load), XRUN (X Run), XSTP (X Stop)

[Related parameter] ALWENA

[Related system variables]M_PSA (Slot number) (1: Program selection is possible, 0: Program selection is impossible)M_RUN (Slot number) (1: Executing, 0: Not executing)

M_WAI (Slot number) (1: Stopping, 0: Not stopping)

XRST[]<Slot No.>

Page 245: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 245/457

4-226 Detailed explanation of command words

4MELFA-BASIC IV 

 XRUN (X Run)

[Function]This instruction executes concurrently the specified programs from within a program.It is used duringmultitask operation.

[Format]

[Terminology]<Slot No.> If the argument is omitted, the current operation mode is used.<Program Name> Designate the program name.<Operation Mode> 0 = Continuous operation,

1 = Cycle stop operation. If the operation mode is omitted, the current operation modewill be used. Specify this argument using a constant or a variable.

[Reference Program](1) When the program of execution is specified by XRUN command (continuous executing).

10 XRUN 2,"1" ' Start the program 1 with slot 2.20 WAIT M_RUN(2)=1 ' Wait to have started.

(2) When the program of execution is specified by XRUN command (cycle operation)10 XRUN 3,"2",1 ' Start the program 2 with slot 3 in the cycle operation mode20 WAIT M_RUN(3)=1 ' Wait to have started.

(3) When the program of execution is specified by XLOAD command (continuous executing).10 XLOAD 2, "1" ' Select the program 1 as the slot 2.20 IF C_PRG(2)<>"1" THEN GOTO 20 ' Wait for load complete.30 XRUN 2 ' Start the slot 2.

(4) When the program of execution is specified by XLOAD command (cycle operation)10 XLOAD 3, "2" ' Select the program 2 as the slot 3.20 IF C_PRG(2)<>"1" THEN GOTO 20 ' Wait for load complete30 XRUN 3, ,1 ' Start the program 1 with cycle operation.

[Explanation](1) An error occurs at execution if the specified program does not exist.(2) If the designated slot No. is already in use, an error will occur at execution.(3) If a program has not been loaded into a task slot, this instruction will load it. It is thus possible to operate

the program without executing the XLOAD instruction.(4) If XRUN is executed in the "Pausing" state with the program stopped midway, continuous execution will

start.(5) Designate the program name in double quotations.(6) If the operation mode is omitted, the current operation mode will be used.(7) If it is used in programs that are constantly executed, change the value from 0 to 7 in the ALWENA

parameter, and power ON the controller again.(8) If XRUN is executed immediately after executing XLOAD, an error may occur while loading a program. If

necessary, perform a load completion check as shown on the 20th line of both statement examples [3]and [4].

[Related instructions]XCLR (X Clear), XLOAD (X Load), XRST (X Reset), XSTP (X Stop)

[Related parameter]

 ALWENA

[Related system variables]M_RUN (Slot number) (1: Executing, 0: Not executing)

XRUN[]<Slot No.> [, "<Program Name>" [, <Operation Mode>] ]

Page 246: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 246/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-227

 XSTP (X Stop)

[Function]This instruction pauses the execution of the program in the specified task slot from within a program. If therobot is being operated by the program in the specified task slot, the robot stops. It is used in multitask oper-

ation.

[Format]

[Terminology]<Slot No.> Designate the slot No.

[Reference Program]10 XRUN 2 ' Execute.  :100 XSTP 2 ' Stop.110 WAIT M_WAI(2)=1 ' Wait for stop to complete.  :200 XRUN 2 ' Restart.

[Explanation](1) If the program is already stopped, an error will not occur.(2) XSTP can also stop the constant execution attribute program.(3) If used in a program that is executed constantly, this instruction is enabled by changing the value of the

"ALWENA" parameter from 0 to 7 and then turning the controller's power on again.

[Related instructions]XCLR (X Clear), XLOAD (X Load), XRST (X Reset), XRUN (X Run)

[Related parameter] ALWENA

[Related system variables]M_WAI (Slot number) (1: Stopping, 0: Not stopping)

XSTP[]<Slot No.>

Page 247: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 247/457

4-228 Detailed explanation of command words

4MELFA-BASIC IV 

Substitute

[Function]The results of an operation are substituted in a variable or array variable.

[Format]

For pulse substitution

[Terminology]<Variable Name> Designate the variable name of the value is to be substituted.

(Refer to the syntax diagram for the types of variables.)<Expression 1> Substitution value. Describe an numeric value operation expression.<Expression 2> Pulse timer. Describe an numeric value operation expression.

[Reference Program]

(1) Substitution of the variable operation result .10 P100=P1+P2*2

(2) Output of the signal.20 M_OUT(10)=1 ' Turn on the output signal 10.

(3) Pulse output of the signal.30 M_OUT(17)=1 DLY 2.0 ' Turn on the output signal 17 for 2 seconds.

[Explanation](1) When using this additionally for the pulse output, the pulse will be executed in parallel with the execution

of the commands on the following lines.(2) Be aware that if a pulse is output by M_OUTB or M_OUTW, the bits are reversed in 8-bit units or 16-bit

units, respectively. It is not possible to reverse at any bit widths.(3) If the END command or program's last line is executed during the designated time, or if the program exe-

cution is stopped due to an emergency stop, etc., the output state will be held. But, the output reversedafter the designated time.

<Variable Name> = <Expression 1>

<Variable Name> = <Expression 1> DLY <Expression 2>

Page 248: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 248/457

  4MELFA-BASIC IV 

  Detailed explanation of command words  4-229

(Label)

[Function]This indicates the jump site.

[Format]

The controller software version J1 or later 

[Terminology]<Label Name> Describe a character string that starts with an alphabetic character.

Up to 8 characters can be used. (Up to 9 characters including *.)<Command line> The command line can be described after the colon after the label (:).

[Reference Program]100 *SUB1200 IF M1=1 THEN GOTO *SUB1

The controller software version J1 or later 300 *LBL1 : IF M_IN(19)=0 THEN GOTO *LBL1' Wait by the 300 lines until the input signal of No. 10

turns on.

[Explanation](1) An error will not occur even if this is not referred to during the program.

(2) If the same label is defined several times in the same program, an error will occur at the execution.(3) The reserved words can't be used for the label.(4) If the underscore is used for the label name, the 1st character is "L." only. If the characters except "L" are

used (ex. *A_LABEL), an error occurs. Ex.) The correct example of the label with using the underscore. (The 1st character is "L") 

*L_ABC, *L12_345, *LABEL_1 

The mistake example of the label with using the underscore. 

*H_ABC, *ABC_123, *NG_, *_LABEL

(5) The software J1 or later, the command line can be described after the colon after the label (:). However,after the command line, the colon cannot be described and the command line cannot be described

again.

*<Label Name>

*<Label Name> [:<Command line>]

Page 249: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 249/457

4-230 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

4.12 Detailed explanation of Robot Status Variable4.12.1 How to Read Described items

[Function] : This indicates a function of a variable.[Format] : This indicates how to enter arguments of an instruction. [ ] means that

arguments may be omitted. 

System status variables can be used in conditional expressions, as wellas in reference and assignment statements. In the format example, onlyreference and assignment statements are given to make the descriptionsimple.

[Reference Program] : An example program using variables is shown.[Terminology] : This indicates the meaning and range of an argument.[Explanation] : This indicates detailed functions and precautions.[Reference] : This indicates related items.

4.12.2 Explanation of Each Robot Status VariableEach variable is explained below in alphabetical order.

Page 250: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 250/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-231

C_DATE 

[Function]This variable returns the current date in the format of year/month/date.

[Format]

[Reference Program]10 C1$=C_DATE ' "2000/12/01" is assigned to C1$.

[Explanation](1) The current date is assigned.(2) This variable only reads the data. Use the T/B to set the date.

[Reference]C_TIME

C_MAKER 

[Function]This variable returns information on the manufacturer of the robot controller.

[Format]

[Reference Program]10 C1$=C_MAKER ' "COPYRIGHT1999......." is assigned to C1$.

[Explanation](1) This variable returns information on the manufacturer of the robot controller.(2) This variable only reads the data.

[Reference]C_MECHA

Example) <Character String Variable >=C_DATE

Example) <Character String Variable >=C_MAKER

Page 251: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 251/457

4-232 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

C_MECHA

[Function]This variable returns the name of the mechanism to be used.

[Format]

[Terminology]<Character String Variable > Specify a character string variable to be assigned.<Mechanism Number> Enter the mechanism number. 1 to 3, If the argument is omitted, 1 is set

as the default value.

[Reference Program]10 C1$=C_MECHA(1) ' "RV-4A" is assigned to C1$. (If the robot type name is RV-4A)

[Explanation](1) This variable returns the name of the mechanism to be used.(2) This variable only reads the data.

C_PRG

[Function]This variable returns the selected program number (name).

[Format]

[Terminology]<Character String Variable > Specify a character string variable to be assigned.<Numeric> 1 to 32, Enter the task slot number. If the argument is omitted, 1 is set as

the default value.

[Reference Program]10 C1$=C_PRG(1) ' "10" is assigned to C1$. (if the program number is 10.)

[Explanation](1) The program number (name) set (loaded) into the specified task slot is assigned.(2) If this variable is used in single task operation, the task slot number becomes 1.(3) If it is set in the operation panel, that number is set.(4) This variable only reads the data.(5) If a task slot for which a program is not loaded is specified, an error occurs at execution.

Example) <Character String Variable >=C_MECHA[(<Mechanism Number>)]

Example) <Character String Variable >=C_PRG [(<Numeric>)]

Page 252: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 252/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-233

C_TIME 

[Function]This variable returns the current time in the format of time:minute:second (24 hours notation).

[Format]

[Reference Program]10 C1$=C_TIME ' "01/05/20" is assigned to C1$.

[Explanation](1) The current clock is assigned.(2) This variable only reads the data.(3) Use the T/B to set the time.

[Reference]C_DATE

C_USER 

[Function]This variable returns the data registered in the "USERMSG" parameter.

[Format]

[Reference Program]10 C1$=C_USER ' The characters registered in "USERMSG" are assigned to C1$.

[Explanation](1) This variable returns the data registered in the "USERMSG" parameter.(2) This variable only reads the data.(3) Use the PC support software or the T/B to change the parameter setting.

Example) <Character String Variable >=C_TME

Example) <Character String Variable >=C_USER

Page 253: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 253/457

4-234 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

J_CURR 

[Function]Returns the joint type data at the current position.

[Format]

[Terminology]<Joint Type Variable> Specify a joint type variable to be assigned.<Mechanism Number> Enter the mechanism number. 1 to 3, If the argument is omitted, 1 is set as the

default value.

[Reference Program]10 J1=J_CURR ' J1 will contain the current joint position.

[Explanation](1) The joint type variable for the current position of the robot specified by the mechanism number will be

obtained.(2) This variable only reads the data.

[Reference]P_CURR

Example) <Joint Type Variable>=J_CURR [(<Mechanism Number>)]

Page 254: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 254/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-235

J_COLMXL

[Function]Return the maximum value of the differences between the estimated torque and actual torque while theimpact detection function is being enabled.

The impact detection function can only be used in certain models (Refer to "[Available robot type]".). Thisfunction is available for controller software version J2 or later.

[Format]

[Terminology]<Joint Type Variable> Specify a joint type variable to be assigned.(Joint type variable will be used

even if this is a pulse value.)<Mechanism Number> Enter the mechanism number. 1 to 3, If the argument is omitted, 1 is set as the

default value.

[Reference Program]10 M1=100 'Set the initial value of the allowable impact level of each axis.20 M2=10030 M3=10040 M4=10050 M5=10060 M6=10070 COLLVL M1,M2,M3,M4,M5,M6,,'Set the allowable impact level of each axis.80 COLCHK ON 'Enable the impact detection function.

 

(Start the calculation of the maximum value of torque error.)90 MOV P1  :  :500 COLCHK OFF 'Disable the impact detection function. 

(End the calculation of the maximum value of torque error.)510 M1=J_COLMXL(1).J1+10 'For each axis, the allowable impact level with a margin of 10% is calcu-

lated.520 M2=J_COLMXL(1).J2+10530 M3=J_COLMXL(1).J3+10540 M4=J_COLMXL(1).J4+10550 M5=J_COLMXL(1).J5+10560 M6=J_COLMXL(1).J6+10

570 GOTO 70

Example) <Joint Type Variable>=J_COLMXL [(<Mechanism Number>)]

Page 255: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 255/457

4-236 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

[Explanation](1) Keep the maximum value of the error of the estimated torque and actual torque of each axis while impact

detection function is valid.

(2) When this value is 100%, it indicates that the maximum error value is the same as the manufacturer's ini-tial value of the allowable impact level.

(3) For robots that prohibit the use of impact detection, 0.0 is always returned for all axes.(4) The maximum error value is initialized to 0.0 when the servo is turned ON during the execution of a

COLCHK ON or COLLVL instruction.

(5) Because they are joint-type variables, it will be conversion values from rad to deg if they are read as jointvariables. Therefore, substitute each axis element by a numeric variable as shown in the syntax exam-ple when using these joint-type variables.

[Reference]COLCHK (Col Check), COLLVL (Col Level), M_COLSTS, P_COLDIR

[Available robot type]

J_ECURR 

[Function]Returns the current encoder pulse value.

[Format]

[Terminology]

<Joint Type Variable> Specify a joint type variable to be assigned.<Mechanism Number> Enter the mechanism number. 1 to 3, If the argument is omitted, 1 is set as the

default value.

[Reference Program]10 J1=J_ECURR(1) ' JA will contain the encoder pulse value of mechanism 1.20 MA=JA, 1 ’ Loads the encoder pulse value of the J1 axis to the MA.

[Explanation](1) Although the value to be returned is a pulse value, use the joint type as the substitution type. Then, spec-

ify joint component data, and use by substituting in a numeric variable.(2) This variable only reads the data.

RV-3S/3SJ/3SB/3SJB series

RV-6S/6SL/12S/12SL series

RH-6SH/12SH/18SH series

Example) <Joint Type Variable>=J_ECURR [(<Mechanism Number>)]

Estimatedtorque

Actual torque

COLMXL

COLLVL

Torque

Time

Page 256: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 256/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-237

J_FBC/J_AMPFBC 

[Function]J_FBC:Returns the current position of the joint type that has been generated by encoder feedback.J_AMPFBC:Returns the current feedback value of each axis

[Format]

[Terminology]<Joint Type Variable> Specify a joint type variable to be assigned.<Mechanism Number> Enter the mechanism number. 1 to 3, If the argument is omitted, 1 is set as the

default value.

[Reference Program]10 J1=J_FBC ' J1 will contain the current position of the joint that has been generated by

servo feedback.20 J1=J_AMPFBC ' The present current feedback value is entered in J2.

[Explanation](1) J_FBC returns the present position of the joint type generated by the feedback of the encoder.(2) J_FBC can check the difference between the command value to the servo and the delay in the actual

servo.(3) J_FBC can also check if there is a difference as a result of executing a CMP JNT instruction.(4) This variable only reads the data.

[Reference]P_FBC

J_ORIGIN 

[Function]Returns the joint data when the origin has been set.

[Format]

[Terminology]<Joint Type Variable> Specify a joint type variable to be assigned.<Mechanism Number> Enter the mechanism number. 1 to 3, If the argument is omitted, 1 is set as the

default value.

[Reference Program]10 J1=J_ORIGIN(1) ' J1 will contain the origin setting position of mechanism 1.

[Explanation]

(1) Returns the joint data when the origin has been set.(2) This can be used to check the origin, for instance, when the position of the robot shifted.(3) This variable only reads the data.

Example) <Joint Type Variable>=J_FBC [(<Mechanism Number>)]

Example) <Joint Type Variable>=J_AMPFBC [(<Mechanism Number>)]

Example) <Joint Type Variable>=J_ORIGIN [(<Mechanism Number>)]

Page 257: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 257/457

4-238 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

M_ACL/M_DACL/M_NACL/M_NDACL/M_ACLSTS

[Function]Returns information related to acceleration/deceleration time.M_ACL : Returns the ratio of current acceleration time. (%)

M_DACL : Returns the ratio of current deceleration time. (%)M_NACL : Returns the initial acceleration time value. (100%)M_NDACL : Returns the initial deceleration time value. (100%)M_ACLSTS : Returns the current acceleration/deceleration status.(Current status: 0 = Stopped, 1 = Accelerating, 2 = Constant speed, 3 = Decelerating)

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.<Equation> 1 to 32, Enter the task slot number. If this argument is omitted, the current slot

will be used as the default.

[Reference Program]10 M1=M_ACL ' M1 wil l contain the ratio of acceleration time set for task slot 1.

20 M1=M_DACL(2) ' M1 will contain the ratio of deceleration time set for task slot 2.30 M1=M_NACL ' M1 will contain the ratio of initial acceleration time value set for task slot 1.40 M1=M_NDACL(2) ' M1 will contain the ratio of initial deceleration time value set for task slot 2.50 M1=M_ACLSTS(3) ' M1 will contain the current acceleration/deceleration status for task slot 3.

[Explanation](1) The ratio of acceleration/deceleration time is the ration against each robot's maximum acceleration/

deceleration time (initial value). If this value is 50%, the amount of time needed to accelerate/decelerateis doubled, resulting in slower acceleration/deceleration.

(2) M_NACL and M_NDACL always return 100 (%).(3) This variable only reads the data.

Example) <Numeric Variable>=M_ACL [(<Equation>)]

Example) <Numeric Variable>=M_DACL [(<Equation>)]

Example) <Numeric Variable>=M_NACL [(<Equation>)]

Example) <Numeric Variable>=M_NDACL [(<Equation>)]

Example) <Numeric Variable>=M_ACLSTS [(<Equation>)]

Page 258: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 258/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-239

M_BRKCQ

[Function]Returns the result of executing a line containing a BREAK command that was executed last.1 : BREAK was executed

0 : BREAK was not executed

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.<Equation> 1 to 32, Enter the task slot number. If this argument is omitted, the current slot

will be used as the default.

[Reference Program]10 WHILE M1<>020 IF M2=0 THEN BREAK ' The remaining battery capacity time is assigned to M1.30 WEND40 IF M_BRKCQ=1 THEN HLT ' HLT, if BREAK in WHILE is executed.

[Explanation](1) Check the state of whether the BREAK command was executed.(2) This variable only reads the data.(3) If the M_BRKCQ variable is referenced even once, the BREAK status is cleared. (The value is set to

zero.) Therefore, to preserve the status, save it by substituting it into a numeric variable.(4) The BREAK status is also cleared even if it is referenced on T/B monitor screen and so forth.

M_BTIME 

[Function]Returns the remaining hour of battery left. (Unit: hour)

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.

[Reference Program]10 M1=M_BTIME ' The remaining battery capacity time is assigned to M1.

[Explanation](1) Returns the remaining hours the battery can last from now.(2) As for the battery life, 14,600 hours are stored as the initial value.(3) After summing the total amount of time the power of robot controller has been off, this value will be sub-

tracted from 14,600 and the result is returned.(4) This variable only reads the data.

Example) <Numeric Variable>=M_BRKCQ [(<Equation>)]

Example)<Numeric Variable>=M_BTME

Page 259: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 259/457

4-240 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

M_CMPDST 

[Function]Returns the amount of difference (in mm) between the command value and the actual value from the robotwhen executing the compliance function.

 [Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.<Mechanism Number> Enter the mechanism number. 1 to 3, If the argument is omitted, 1 is set as the

default value.

[Reference Program]10 MOV P120 CMPG 0.5,0.5,1.0,0.5,0.5, , , ' Set softness.30 CMP POS, &B00011011 ' Enter soft state.40 MVS P250 M_OUT(10)=160 MVS P170 M1=M_CMPDST(1) ' M1 will contain the difference between the position specified by the

operation command and the actual current position.80 CMP OFF ' Return to normal state.

[Explanation](1) This is used to check the positional discrepancy while executing the compliance function.

(2) This variable only reads the data.

Example)<Numeric Variable>=M_CMPDST [(<Mechanism Number>)]

Page 260: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 260/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-241

M_CMPLMT 

[Function]Returns whether or not the command value when the compliance function is being executed is about toexceed various limits.

1: The command value is about to exceed a limit.0: The command value is not about to exceed a limit.

[Format]

[Terminology]<Mechanism Number> Specify the mechanism number 1 to 3. The default value is 1.

[Reference Program]10 DEF ACT 1, M_CMPLMT(1)=1 GOTO *LMT' Define the conditions of interrupt 1.20 '30 '100 MOV P1110 CMPG 1,1,0,1,1,1,1,1120 CMP POS, &B100 ' Enable compliance mode.130 ACT 1=1 ' Enable interrupt 1.140 MVS P2 '150 '160 '1000 *LMT1010 MVS P1 ' Movement to P2 is interrupted and returns to P1.

1020 RESET ERR ' Reset the error.1030 HLT ' Execution is stopped.

[Explanation](1) This is used to recover from the error status by using interrupt processing if an error has occurred while

the command value in the compliance mode attempted to exceed a limit.(2) For various limits, the joint operation range and operation speed of the command value in the compli-

ance mode, and the dislocation between the commanded position and the actual position are checked.(3) 0 is set if the servo power is off, or the compliance mode is disabled.(4) This is a read only variable.

Example) DEF ACT 1, M_CMPLMT [(<Mechanism Number>)]=1 GOTO *LMT

Page 261: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 261/457

4-242 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

M_COLSTS

[Function]Return the impact detection status..1: Detecting an impact

0: No impact has been detectedThe impact detection function can only be used in certain models (Refer to "[Available robot type]".). Thisfunction is available for controller software version J2 or later.

[Format]

[Terminology]<Mechanism Number> Specify the mechanism number 1 to 3. The default value is 1.

[Reference Program]10 DEF ACT 1,M_COLSTS(1)=1 GOTO *HOME,S'Define the processing to be executed when an impactis detected using an interrupt.

20 ACT 1=130 COLCHK ON,NOERR 'Enable the impact detection function in the error non-occurrence mode.40 MOV P150 MOV P2 'If an impact is detected while executing lines 40 through 70, it jumps to

interrupt processing.60 MOV P370 MOV P480 ACT 1=0  :

  :1000 *HOME 'Interrupt processing during impact detection.1010 COLCHK OFF 'Disable the impact detection function.1020 SERVO ON 'Turn the servo on.1030 PESC=P_COLDIR(1)*(-2) 'Create the amount of movement for escape operation1040 PDST=P_FBC(1)+PESC 'Create the escape position.1050 MVS PDST 'Move to the escape position.1060 ERROR 9100 'Stop operation by generating a user-defined L level error.

[Explanation](1) When an impact is detected, it is set to 1. When the impact state is canceled, it is set to 0.(2) It is used as an interrupt condition in the DEF ACT instruction when used in the NOERR mode.

[Available robot type]

Example) DEF ACT 1, M_COLSTS [(<Mechanism Number>)]=1 GOTO *LCOL

RV-3S/3SJ/3SB/3SJB series

RV-6S/6SL/12S/12SL series

RH-6SH/12SH/18SH series

Page 262: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 262/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-243

M_CSTP 

[Function]Returns the status of whether or not a program is on cycle stop1: Cycle stop is entered, and cycle stop operation is in effect. 

(The input of the END key on the operation panel, or the input of a cycle stop signal)0: Other than above

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.

[Reference Program] 10 M1=M_CSTP ' 1 is assigned to M1. (When under a cycle stop)

[Explanation](1) When the END key on the operation panel is pressed while the program is under continuous execution,

the system enters a cycle operation state. The status at this time is returned as 1.(2) This variable only reads the data.

M_CYS

[Function]Returns the status of whether or not a program is on cycle operation

1: In cycle operation (operating mode set by the slot parameter SLT* to ...)0: Other than above.

[Format]

[Terminology]<Numerical variable> Specify the numerical variable to substitute.

[Reference Program] 10 M1=M_CYS ' The numerical value 1 is substituted for M1. (When under a cycle operation)

[Explanation](1) When starting a program, the cycle mode - either continuous operation or cycle operation - can be spec-

ified using a parameter, etc. Returns this operation mode.(2) Even if CYC has been specified in the slot parameter, the value will be 0 when continuous operation is

specified by XRUN.(3) This is a read only variable.

Example)<Numeric Variable>=M_CSTP

Example)<Numerical variable> = M_CYS

Page 263: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 263/457

4-244 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

M_DIN/M_DOUT 

[Function]This is used to write or reference the remote register of CC-Link (optional).M_DIN : References the input register.

M_DOUT : Writes or reference the output register.

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable that assigns the CC-Link register value.<Equation 1> Specifies the CC-Link register number (6000 or above).<Equation 2> Specifies the CC-Link register number (6000 or above).

[Reference Program]10 M1=M_DIN(6000) ' M1 will contain the CC-Link input register value.

' (If CC-Link station number is 1.)20 M1=M_DOUT(6000) ' M1 will contain the CC-Link output register value.30 M_DOUT(6000)=100 ' Writes 100 to the CC-Link output register.

[Explanation](1) For details, refer to the "CC-Link Interface Instruction Manual."(2) Signal numbers in 6,000's will be used for CC-Link.(3) M_DIN is read-only.

Example)<Numeric Variable>=M_DIN [(<Equation 1>)]

Example)<Numeric Variable>=M_DOUT [(<Equation 2>)]

Page 264: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 264/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-245

M_ERR/M_ERRLVL/M_ERRNO

[Function]Returns information regarding the error generated from the robot.M_ERR : Returns whether an error has been generated. (1: Error has been generated, 0: No error)

M_ERRLVL : Returns the level of the generated error. (Caution/Low/High1/High2 = 1/2/3/4)M_ERRNO : Returns the error number of the generated error.

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.

[Reference Program]10 IF M_ERR=0 THEN 10 ' Waits until an error is generated.20 M2=M_ERRLVL ' M2 wil l contain the error level30 M3=M_ERRNO ' M3 will contain the error number.

[Explanation](1) Normal programs will pause when an error (other than cautions) is generated. The error status of the

controller may be monitored using this variable for programs whose startup condition is set to ALWAYSby the SLT* parameter. The program set to ALWAYS will not stop even when an error is generated fromother programs.

(2) Level 1 errors are warnings, level 2 errors pause programs. Level 3 errors pause programs and turn the

servo power OFF, but error reset can be performed. Level 4 errors pause programs, turn the servopower OFF, and error reset cannot be performed. Thus, when a level 4 error occurs, it is necessary toturn the controller power OFF.

(3) This variable only reads the data.

[Related instructions]RESET ERR (Reset Error)

M_EXP 

[Function]Returns the base of natural logarithm (2.718281828459045).

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.

[Reference Program]10 M1=M_EXP ' Base of natural logarithm (2.718281828459045) is assigned to M1.

[Explanation](1) This is used when processing exponential and logarithmic functions.(2) This variable only reads the data.

Example) <Numeric Variable>=M_ERR

Example) <Numeric Variable>=M_ERRLVL

Example) <Numeric Variable>=M_ERRNO

Example) <Numeric Variable>=M_EXP

Page 265: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 265/457

4-246 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

M_FBD[Function]

Returns the difference between the command position and the feedback position.This variable is available for controller software version J1 or later.

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.<Mechanism Number> Specify the mechanism number 1 to 3. The default value is 1.

[Reference Program]10 DEF ACT 1,M_FBD>10 GOTO *SUB1,S ' Generate an interrupt when the difference between the

command position and the feedback position reaches 10mm or more.

20 ACT 1=1 ' An interrupt takes effect.30 TORQ 3,10 ' Set the torque limit of the three axes to 10% or less using

the torque instruction.40 MVS P1 ' Moves.50 END

100 *SUB1110 MOV P_FBC ' Align the command position with the feedback position.120 M_OUT(10)=1 ' Signal No. 10 output130 HLT ' Stop when a difference occurs.

[Explanation](1) This function returns the difference between the command position specified by the operation instruction

and the feedback position from the motor. When using the torque instruction, use this in combinationwith a DEF ACT instruction to prevent the occurrences of excessive errors (960, 970, etc.).

(2) This variable only reads the data.

[Reference]TORQ (Torque), P_FBC

Example) <Numeric Variable>=M_FBD[(<Mechanism Number>)]

Page 266: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 266/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-247

M_G

[Function]Returns gravitational constant (9.80665).

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.

[Reference Program]10 M1=M_G ' Gravitational constant (9.80665) is assigned to M1.

[Explanation](1) This is used to perform calculation related to gravity.(2) This variable only reads the data.

M_HNDCQ

[Function]Returns the hand check input signal value.

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.<Equation> Enter the hand input signal number.

1 to 8, (Corresponds to input signals 900 to 907.)

[Reference Program]10 M1=M_HNDCQ(1) ' M1 will contain the status of hand 1.

[Explanation](1) Returns one bit of the hand check input signal status (such as a sensor).(2) M_HNDCQ(1) corresponds to input signal number 900. Same result will be obtained using M_IN (900).(3) This variable only reads the data.

Example) <Numeric Variable>=M_G

Example) <Numeric Variable>=M_HNDCQ [(<Equation>)]

Page 267: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 267/457

4-248 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

M_IN/M_INB/M_INW 

[Function]Returns the value of the input signal.M_IN : Returns a bit.

M_INB : Returns a byte (8 bits).M_INW : Returns a word (16 bits).

[Format]

[Terminology]

<Numeric Variable> Specifies the numerical variable to assign.<Equation> Enter the input signal number. 0 to 32767 (Theoretical value)

0 to 255 : Standard remote inputs (Normally 32 points. 0 to 31)900 to 907 : Hand input.2000 to 5071 : Input signal of PROFIBUS.6000 to 8047 : Remote input for CC-Link.

[Reference Program]10 M1=M_IN(0) ' M1 will contain the value of the input signal 0 (1 or 0).20 M2=M_INB(0) ' M2 will contain the 8-bit information starting from input signal 0.30 M3=M_INB(3) AND &H7 ' M3 will contain the 3-bit information starting from input signal 3.40 M4=M_INW(5) ' M4 will contain the 16-bit information starting from input signal 5.

[Explanation](1) Returns the status of the input signal.(2) M_INB and M_INW will return 8- or 16-bit information starting from the specified number.(3) Although the signal number can be as large as 32767, only the signal numbers with corresponding hard-

ware will return a valid value. Value for a signal number without corresponding hardware is set as unde-fined.

(4) This variable only reads the data.

Example) <Numeric Variable>=M_IN(<Equation>)

Example) <Numeric Variable>=M_INB(<Equation>)

Example) <Numeric Variable>=M_INW(<Equation>)

Page 268: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 268/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-249

M_JOVRD/M_NJOVRD/M_OPOVRD/M_OVRD/M_NOVRD

[Function]Returns override value.M_JOVRD : Value specified by the override JOVRD instruction for joint interpolation.

M_NJOVRD : Initial override value (100%) for joint interpolation.M_OPOVRD : Override value of the operation panel.M_OVRD : Current override value, value specified by the OVRD instruction.M_NOVRD : Initial override value (100%).

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.<Equation> 1 to 32, Enter the task slot number. If this parameter is omitted, the current slot

will be used as the default.

[Reference Program]10 M1=M_OVRD ' M1 will contain the current override value.20 M2=M_NOVRD ' M2 will contain the initial override value (100%).

30 M3=M_JOVRD ' M3 will contain the current joint override value.40 M4=M_NJOVRD ' M4 will contain the initial joint override value.50 M5=M_OPOVRD ' M5 will contain the current OP (operation panel) override value.60 M6=M_OVRD(2) ' M6 will contain the current override value for slot 2.

[Explanation](1) If the argument is omitted, the current slot status will be returned.(2) This variable only reads the data.

Example)<Numeric Variable>=M_JOVRD [(i<Equation>)]

Example)<Numeric Variable>=M_NJOVRD[(i<Equation>)]

Example)<Numeric Variable>=M_OPOVRD

Example)<Numeric Variable>=M_OVRD[(<Equation>)]Example)<Numeric Variable>=M_NOVRD[(<Equation>)]

Page 269: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 269/457

4-250 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

M_LDFACT 

[Function]The load ratio for each joint axis can be referenced.This variable is available for controller software version J1 or later.

[Format]

[Terminology]<Numeric Variable> The load ratio of each axis is substituted. The range is 0 to 100%.<Axis Number> 1 to 8, Specifies the axis number.

[Reference Program]10 ACCEL 100,100 ' Lower the overall deceleration time to 50%.

20 MOV P130 MOV P240 IF M_LDFACT(2)>90 THEN50 ACCEL 50,50 ' Lower the acceleration/deceleration ratio to 50%.60 M_SETADL(2)=50 ' Furthermore, lower the acceleration/deceleration ratio of the J2 axis to

50%. (In actuality, 50% x 50% = 25%)70ELSE80 ACCELL 100.,100 ' Return the acceleration/deceleration time.90 ENDIF100 GOTO 20

[Explanation](1) The load ratio of each axis can be referenced.(2) The load ratio is derived from the current that flows to each axis motor and its flow time.(3) The load ratio rises when the robot is operated with a heavy load in a severe posture for a long period of

time.(4) When the load ratio reaches 100%, an overload error occurs. In the above example statement, once the

load ratio exceeds 90%, the k acceleration/deceleration time is lowered to 50%.(5) To lower the load ratio, measures, such as decreasing the acceleration/deceleration time, having the

robot standing by in natural posture, or shutting down the servo power supply, are effective.

[Related instructions] ACCEL (Accelerate), OVRD (Override), M_SETADL

Example)<Numeric Variable>=M_LDFACT(<Axis Number>)

Page 270: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 270/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-251

M_LINE 

[Function]Returns the line number that is being executed.

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.<Equation> 1 to 32, Specifies the task slot number. If this parameter is omitted, the current

slot will be used as the default.

[Reference Program]10 M1=M_LINE(2) ' M1 will contain the line number being executed by slot 2.

[Explanation](1) This can be used to monitor the line being executed by other tasks during multitask operation.(2) This variable only reads the data.

M_MODE 

[Function]Returns the key switch mode of the operation panel.1 : TEACH2 : AUTO(OP)

3 : AUTO(Ext.)

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.

[Reference Program]10 M1=M_MODE ' M1 will contain the key switch status.

[Explanation](1) This can be used in programs set to ALWAYS (constantly executed) during multitask operation.(2) This variable only reads the data.

Example)<Numeric Variable>=M_LINE [(<Equation>)]

Example)<Numeric Variable>=M_MODE

Page 271: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 271/457

4-252 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

M_ON/M_OFF 

[Function] Always returns 1 (M_ON) or 0 (M_OFF).

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.

[Reference Program]10 M1=M_ON ' 1 is assigned to M1.

20 M2=M_OFF ' 0 is assigned to M2.

[Explanation](1) Always returns 1 or 0.(2) This variable only reads the data.

Example)<Numeric Variable>=M_ON

Example)<Numeric Variable>=M_OFF

Page 272: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 272/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-253

M_OPEN 

[Function]RetReturns the status indicating whether or not a file is opened.Returns the status of other end of the RS-232C cable.

[Format]This function is available for controller software version H7 or later 

[Terminology]<Numerical variable> Specify the numerical variable to substitute.<File number> Specify the file number 1-8 by constant value of communication line opened by

OPEN command. The default value is 1. If 9 or more are specified, the errorwill occur when executing.

[Reference Program]100 OPEN "COM2:" AS #1 ' Open the communication line COM2 as the file number 1.110 IF M_OPEN(1)<>1 THEN GOTO 110 ' Wait until the file number 1 opens.

[Explanation](1) This is a read only variable.(2) The return value differ corresponding to the file type specified by OPEN command as follows.

*Refer to separate manual "Ethernet Interface INSTRUCTION MANUAL" when using the ethernet.

[Related instructions]OPEN (Open)

[Related parameter]

COMDEV

Example)<Numerical variable>=M_OPEN [<File number>]

Kind of files Meaning Value

File Returns the status indicating whether or not a file isopened.Returns 1 until the CLOSE instruction, the ENDinstruction or END in a program is executed after exe-

cuting the OPEN instruction.

1: Already opened-1: Undefined file number (notopened)

Communication lineRS-232C

*Returns the status of other end of the RS-232Ccable.Returns the status of the CTS signal input as is.(This can be used only when the RTS signal of otherend is enabled using the Mitsubishi genuine cablespecification.)

1: Already connected (CTS signal isON)

 

0: Unconnected (CTS signal is OFF)-1: Undefined file number (notopened)

Page 273: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 273/457

4-254 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

M_OUT/M_OUTB/M_OUTW 

[Function]Writes or references external output signal.M_OUT:Output signal bit.

M_OUTB:Output signal byte (8 bits).M_OUTW:Output signal word (16 bits).

[Format]

[Terminology]

<Numeric Variable> Specifies the numerical variable to assign.<Equation> Specify the output signal number.

0 to 255 : Standard remote outputs.900 to 907 : Hand output.2000 to 5071 : Output signal of PROFIBUS.6000 to 8047 : Remote output for CC-Link.

[Reference Program]10 M_OUT(2)=1 ' Turn ON output signal 2 (1 bit).20 M_OUTB(2)=&HFF ' Turns ON 8-bits starting from the output signal 2.30 M_OUTW(2)=&HFFFF ' Turns ON 16-bits starting from the output signal 2.40 M4=M_OUTB(2) AND &H0F ' M4 will contain the 4-bit information starting from output signal 2.

[Explanation](1) This is used when writing or referencing external output signals.(2) Numbers in 900's will be used as I/O signals for the hand.(3) Numbers 6000 and beyond will be referenced/assigned to the CC-Link (optional).

M_PI 

[Function]Returns pi (3.14159265358979).

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.

[Reference Program]10 M1=M_PI ' 3.14159265358979 is assigned to M1.

[Explanation]

(1) A variable to be assigned will be a real value.(2) This variable only reads the data.

Example)M_OUT(<Equation>)=<Numeric Variable>

Example)M_OUTB(<Equation>)=<Numeric Variable>

Example)M_OUTW(<Equation>)=<Numeric Variable>

Example)<Numeric Variable>=M_PI

Page 274: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 274/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-255

M_PSA

[Function]Returns whether the program is selectable by the specified task slot.1 : Program is selectable.

0 : Program not selectable (when the program is paused).

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.<Equation> 1 to 32, Specifies the task slot number. If this parameter is omitted, the current

slot will be used as the default.

[Reference Program]10 M1=M_PSA(2) ' M1 will contain the program selectable status of task slot 2.

[Explanation](1) Returns whether the program is selectable by the specified task slot.(2) This variable only reads the data.

M_RATIO

[Function]Returns how much the robot has approached the target position (0 to 100%) while the robot is moving.

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.<Equation> 1 to 32, Specifies the task slot number. If this parameter is omitted, the current

slot will be used as the default.

[Reference Program]10 MOV P1 WTHIF M_RATIO>80, M_OUT(1)=1' The output signal 1 will turn ON when the robot has

moved 80% of the distance until the target position isreached while moving toward P1.

[Explanation](1) This is used, for instance, when performing a procedure at a specific position while the robot is moving.(2) This variable only reads the data.

Example)<Numeric Variable>=M_PSA [(<Equation>)]

Example)<Numeric Variable>=M_RATIO [(<Equation>)]

Page 275: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 275/457

4-256 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

M_RDST 

[Function]Returns the remaining distance to the target position (in mm) while the robot is moving.

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.<Equation> 1 to 32, Specifies the task slot number. If this parameter is omitted, the current

slot will be used as the default.

[Reference Program]10 MOV P1 WTHIF M_RDST<10 M_OUT(10)=1' The output signal 1 will turn ON when the remaining dis-

tance until the target position is reached becomes 10mm or less while moving toward P1.

[Explanation](1) This is used, for instance, when performing a procedure at a specific position while the robot is moving.(2) This variable only reads the data.

M_RUN 

[Function]Returns whether the program for the specified task slot is being executed.

1 : Executing.0 : Not executing (paused or stopped).

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.<Equation> 1 to 32, Specifies the task slot number. If this parameter is omitted, the current

slot will be used as the default.

[Reference Program]10 M1=M_RUN(2) ' M1 will contain the execution status of slot 2.

[Explanation](1) This will contain 1 if the specified slot is running, or 0 if the slot is stopped (or paused).(2) Combine M_RUN and M_WAI to determine if the program has stopped (in case the currently executed

line is the top line).(3) This variable only reads the data.

Example)<Numeric Variable>=M_RDST [(<Equation>)]

Example)<Numeric Variable>=M_RUN [(<Equation>)]

Page 276: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 276/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-257

M_SETADL

[Function]Set the acceleration/deceleration time distribution rate of the specified axis when optimum acceleration/deceleration control is enabled (OADL ON). Since it can be set for each axis, it is possible to reduce the

motor load of an axis with a high load. Also, unlike a method that sets all axes uniformity, such as OVRD,SPD and ACCEL instructions, the effect on the tact time can be minimized as much as possible. The initialvalue is the setting value of the JADL parameter.This status variable can only be used in certain models (Refer to "[Available robot type]".). This function isavailable for controller software version J2 or later.

[Format]

[Terminology]<Axis Number> 1 to 8, Specifies the axis number.<Numeric Variable> Specify the ratio for the standard acceleration/deceleration time, between 1

and 100. The unit is %. The initial value is the value of the optimum accelera-tion/deceleration adjustment rate parameter (JADL).

[Reference Program]10 ACCEL 100,50 ' Set the overall acceleration/deceleration distribution rate to 50%.20 IF M_LDFACT(2)>90 THEN ' If the load rate of the J2 axis exceeds 90%,30 M?SETADL(2)=70 ' set the acceleration/deceleration time distribution rate of the J2

axis to 70%.40 ENDIF ' Acceleration 70% (= 100% x 70%), deceleration 35% (= 50% x

70%)50 MOV P160 MOV P270 M_SETADL(2)=100 ' Return the acceleration/deceleration time distribution rate of the

J2 axis to 100%.80 MOV P3 ' Acceleration 100%, deceleration 50%90 ACCEL 100,100 ' Return the overall deceleration distribution rate to 100%.100 MOV P4

[Explanation](1) The acceleration/deceleration time distribution rate when optimum acceleration/deceleration is enabled

can be set in units of axes. If 100% is specified, the acceleration/deceleration time becomes the short-est.

(2) Using this status variable, the acceleration/deceleration time can be set so as to reduce the load on axeswhere overload and overheat errors occur.

(3) The setting of this status variable is applied to both the acceleration time and deceleration time.(4) When this status variable is used together with an ACCEL instruction, the specification of the accelera-

tion/deceleration distribution rate of the ACCEL instruction is also applied to the acceleration/decelera-tion time calculated using the optimum acceleration/deceleration speed.

(5) With the ACCEL instruction, the acceleration/deceleration time changes at the specified rate. Becausethis status variable is set independently for each axis and also the acceleration/deceleration time thattakes account of the motor load is calculated, the change in the acceleration/deceleration time mayshow a slightly different value than the specified rate.

[Reference] ACCEL (Accelerate),OVRD (Override),SPD (Speed),M_LDFACT

[Available robot type]

Example)M_SETADL(<Axis Number>)=<Numeric Variable>

RV-3S/3SJ/3SB/3SJB series

RV-6S/6SL/12S/12SL series

Page 277: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 277/457

4-258 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

M_SKIPCQ

[Function]Returns the result of executing the line containing the last executed SKIP command.1 : SKIP has been executed.

0 : SKIP has not been executed.

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.<Equation> 1 to 32, Specifies the task slot number. If this parameter is omitted, the current

slot will be used as the default.

[Reference Program]10 MOV P1 WTHIF M_IN(10)=1,SKIP ' If the input signal 10 is 1 when starting to move to P1, skipthe MOV instruction.

20 IF M_SKIPCQ=1 THEN GOTO 1000 ' If SKIP instruction has been executed, jump to line 1000. ÅE1000 END

[Explanation](1) Checks if a SKIP instruction has been executed.(2) This variable only reads the data.(3) If the M_SKIPCQ variable is referenced even once, the SKIP status is cleared. (The value is set to zero.)

Therefore, to preserve the status, save it by substituting it into a numeric variable.

Example)<Numeric Variable>=M_SKIPCQ [(<Equation>)]

Page 278: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 278/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-259

M_SPD/M_NSPD/M_RSPD

[Function]Returns the speed information during XYZ and JOINT interpolation.M_SPD : Currently set speed.

M_NSPD : Initial value (optimum speed control).M_RSPD : Directive speed.

[Format]

[Terminology]

<Numeric Variable> Specifies the numerical variable to assign.<Equation> 1 to 32, Specifies the task slot number. If this parameter is omitted, the current

slot will be used as the default.

[Reference Program]10 M1=M_SPD ' M1 will contain the currently set speed.20 SPD M_NSPD ' Reverts the speed to the optimum speed control mode.

[Explanation](1) M_RSPD returns the directive speed at which the robot is operating.(2) This can be used in M_RSPD multitask programs or with WTH and WTHIF statements.(3) This variable only reads the data.

M_SVO

[Function]Returns the current status of the servo power supply.1 : Servo power ON0 : Servo power OFF

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.<Mechanism Number> Enter the mechanism number. 1 to 3, If the argument is omitted, 1 is set as the

default value.

[Reference Program]10 M1=M_SVO(1) ' M1 will contain the current status of the servo power supply.

[Explanation](1) The status of the robot's servo can be checked.

(2) This variable only reads the data.

Example)<Numeric Variable>=M_SPD [(<Equation>)]

Example)<Numeric Variable>=M_NSPD [(<Equation>)]

Example)<Numeric Variable>=M_RSPD [(<Equation>)]

Example)<Numeric Variable>=M_SVO [(<Mechanism Number>)]

Page 279: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 279/457

4-260 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

M_TIMER 

[Function]Time is measured in milliseconds. This can be used to measure the operation time of the robot or to mea-sure time accurately.

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.<Equation> Enter the number to 8 from 1. Parentheses are required.

[Reference Program]10 M_TIMER(1)=020 MOV P130 MOV P240 M1=M_TIMER(1) ' M1 will contain the amount of time required to move from P1 to P2 (in ms).

Example) If the time is 5.346 sec. the value of M1 is 5346.50 M_TIMER(1) ' Set to 1.5 sec.

[Explanation](1) A value may be assigned. The unit is seconds when set to M_TIMER.(2) Since measurement can be made in milliseconds (ms), precise execution time measurement is possible.

Example)<Numeric Variable>=M_TMER (<Equation>)

Page 280: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 280/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-261

M_TOOL

[Function]In addition to using the tool data (MEXTL1 to 4) of the specified number as the current tool data, it is also setin the MEXTL parameter.

The current tool number can also be read.. This function is available for controller software version J1 orlater 

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.<Mechanism Number> Enter the mechanism number to 3 from 1.

If the argument is omitted, 1 is set as the default value.<Equation> Enter the tool number to 4 from 1.

[Reference Program]Setting Tool Data10 TOOL (0,0,100,0,0,0) ' Specify tool data (0,0,100,0,0,0), and write it into MEXTL.20 MOV P130 M_TOOL=2 ' Change the tool data to the value of tool number 2 (MEXTL2).40 MOV P2

Referencing the Tool Number 

10 IF M_IN(900)=1 THEN ' Change the tool data by a hand input signal.20 M_TOOL=1 ' Set tool 1 in tool data.30 ELSE40 M_TOOL=2 ' Set tool 2 in tool data.50 ENDIF60 MOV P1

[Explanation](1) The values set in the MEXTL1, MEXTL2, MEXTL3 and MEXTL4 tool parameters are reflected in the tool

data. It is also written into the MEXTL parameter.(2) Tool numbers 1 to 4 correspond to MEXTL1 to 4.(3) While referencing, the currently set tool number is read.(4) If the reading value is 0, it indicates that tool data other than MEXTL1 to 4 is set as the current tool data.(5) The same setting can be performed on the Tool Setup screen of the teaching pendant. For more infor-

mation, see Page 19, "3.2.8 Switching Tool Data".

[Reference]TOOL (Tool), MEXTL, MEXTL1, MEXTL2, MEXTL3, MEXTL4

Example)<Numeric Variable>=M_TOOL [(<Mechanism Number>)]'Referencing the Current Tool Number 

Example)M_TOOL [(<Mechanism Number>)] = [(<Equation>)] 'Set a tool number.

Page 281: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 281/457

4-262 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

M_UAR 

[Function]Returns whether the robot is in the user-defined area.Bits 0 through 7 correspond to areas 1 through 8.

1 : Within user-defined area0 : Outside user-defined area

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.<Mechanism Number> Enter the mechanism number. 1 to 3, If the argument is omitted, 1 is set as the

default value.

[Reference Program]10 M1=M_UAR(1) ' M1 indicates whether the robot is within or outside the user-defined area. 

The value 4 indicates that the robot is in the user-defined area 3.

[Explanation](1) For details on how to use user-defined areas, refer to Page 328, "About user-defined area".(2) This variable only reads the data.

M_WAI 

[Function]Returns the standby status of the program for the specified task slot.1 : Paused (The program has been paused.)0 : Not paused (Either the program is running or is being stopped.)

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.

<Equation> 1 to 32, Specifies the task slot number. If this parameter is omitted, the currentslot will be used as the default.

[Reference Program]10 M1=M_WAI(1) ' M1 wil l contain the standby status of slot 1.

[Explanation](1) This can be used to check whether the program has been paused.(2) Combine M_RUN and M_WAI to determine if the program has stopped (in case the currently executed

line is the top line).(3) This variable only reads the data.

[Reference]M_WUPOV, M_WUPRT, M_WUPST

Example)<Numeric Variable>=M_UAR [(<Mechanism Number>)]

Example)<Numeric Variable>=M_WAI [(<Equation>)]

Page 282: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 282/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-263

M_WUPOV 

[Function]Returns the value of an override (warm-up operation override, unit: %) to be applied to the command speedin order to reduce the operation speed when in the warm-up operation status.This status variable can be

used in the controller's software version J8 or later.Note: For more information about the warm-up operation mode, see Page 355, "5.19 Warm-Up OperationMode" for detail.

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.<Mechanism Number> Enter the mechanism number. 1 to 3, If the argument is omitted, 1 is set as the

default value.

[Reference Program]10 M1=M_WUPOV(1) ' The value of a warm-up operation override is entered in M1.

[Explanation](1) This is used to confirm the value of an override (warm-up operation override) to be applied to the com-

mand speed in order to reduce the operation speed when the robot is in the warm-up operation status(the status in which operation is performed by automatically reducing the speed).

(2) If the warm-up operation mode is disabled, the MODE switch on the front of the controller is set to"TEACH," or the machine is being locked, the value is always 100.

(3) If the normal status changes to the warm-up operation status, or the warm-up operation status is setimmediately after power on, the value specified in the first element (the initial value of a warm-up oper-

ation override) of the WUPOVRD parameter is set as the initial value, and the value of M_WUPOVincreases according to the operation of the robot. And when the warm-up operation status is canceled,the value of M_WUPOV is set to 100.

(4) The actual override in the warm-up operation status is as follows: During joint interpolation operation = (operation panel (T/B) override setting value) x (program override(OVRD instruction)) x (joint override (JOVRD instruction)) x warm-up operation overrideDuring linear interpolation operation = (operation panel (T/B) override setting value) x (program over-ride (OVRD instruction)) x (linear specification speed (SPD instruction)) x warm-up operation override

(5) This variable only reads the data.

Example)<Numeric Variable> = M_WUPOV [(<Mechanism Number>)]

Page 283: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 283/457

4-264 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

M_WUPRT 

[Function]Returns the time (sec) during which a target axis must operate to cancel the warm-up operation status. This status variable can be used in the controller's software version J8 or later.

Note: For more information about the warm-up operation mode, see Page 355, "5.19 Warm-Up OperationMode" for detail.

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.<Mechanism Number> Enter the mechanism number. 1 to 3, If the argument is omitted, 1 is set as the

default value.

[Reference Program]10 M1=M_WUPRT(1) ' The time during which a target axis must operate is entered in M1.

[Explanation](1) This is used to confirm when the warm-up operation status can be canceled after how long more the joint

axis specified in the WUPAXIS parameter (warm-up operation mode target axis) operates when therobot is in the warm-up operation status (the status in which operation is performed by automaticallyreducing the speed).

(2) If the warm-up operation mode is disabled, 0 is always returned.(3) If the normal status changes to the warm-up operation status, or the warm-up operation status is set

immediately after power on, the time specified in the first element (the valid time of the warm-up opera-tion mode) of the WUPTIME parameter is set as the initial value, and the value of M_WUPRT

decreases according to the operation of the robot. And when the value is set to 0, the warm-up opera-tion status is canceled.

(4) If a multiple number of target axes in warm-up operation mode exist, the value of the axis with the short-est operation time among them is returned.For example, when a target axis (A) operates and the warm-up operation status is canceled in remain-ing 20 seconds (when M_WUPRT = 20), if another target axis (B) that has continuously been stoppedchanges from the normal status to the warm-up operation status, (B) becomes the axis with the shortestoperation time (operation time of 0 sec). Therefore, the time during which (B) must operate (= the validtime of the warm-up operation mode, initial value is 60 sec) becomes the value of this status variable(M_WUPRT = 60).

(5) This variable only reads the data.

Example)<Numeric Variable> = M_WUPRT [(<Mechanism Number>)]

Page 284: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 284/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-265

M_WUPST 

[Function]Returns the time (sec) until the warm-up operation status is set again after it has been canceled. This status variable can be used in the controller's software version J8 or later.

Note: For more information about the warm-up operation mode, see Page 355, "5.19 Warm-Up OperationMode" for detail.

[Format]

[Terminology]<Numeric Variable> Specifies the numerical variable to assign.<Mechanism Number> Enter the mechanism number. 1 to 3, If the argument is omitted, 1 is set as the

default value.

[Reference Program]10 M1=M_WUPST(1) ' The time until the warm-up operation status is set again is entered in M1.

[Explanation](1) This is used to confirm when the warm-up operation status is set again after how long more the joint axis

specified in the WUPAXIS parameter (warm-up operation mode target axis) continues to stop operatingwhile the robot’s warm-up operation status (the status in which operation is performed by automaticallyreducing the speed) is canceled.

(2) If the warm-up operation mode is disabled, the time specified in the second element (warm-up operationmode resume time) of the WUPTIME parameter is returned.

(3) If a target axis operates while the warm-up operation status is canceled, the time specified in the secondelement (warm-up operation mode resume time) of the WUPTIME parameter is set as the initial value,

and the value of M_WUPST decreases while the target axis is stopping. And when the value is set to 0,the warm-up operation status is set.

(4) If a multiple number of target axes exist, the value of the axis that has been stopped the longest amongthem is returned.

(5) This variable only reads the data.

Example)<Numeric Variable> = M_WUPST [(<Mechanism Number>)]

Page 285: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 285/457

4-266 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

P_BASE/P_NBASE 

[Function]Returns information related to the base conversion data.P_BASE : Returns the base conversion data that is currently being set.

P_NBASE : Returns the initial value (0, 0, 0, 0, 0, 0) (0, 0).

[Format]

[Terminology]<Position Variables> Specifies the position variable to assign.<Mechanism Number> Enter the mechanism number. 1 to 3, If the argument is omitted, 1 is set as the

default value.

[Reference Program]10 P1=P_BASE ' P1 will contain the base conversion data that is currently being set.20 BASE P_NBASE ' Resets the base conversion data to the initial value.

[Explanation](1) P_NBASE will contain (0, 0, 0, 0, 0, 0) (0, 0).(2) Be careful when using base conversion since it may affect the teaching data.(3) Use the BASE instruction when changing the base position.(4) This variable only reads the data.

Example)<Position Variables>=P_BASE [(<Mechanism Number>)]

Example)<Position Variables>=P_NBASE

Page 286: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 286/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-267

P_COLDIR 

[Function]Return the operation direction of the robot when an impact is detected.The impact detection function can only be used in certain models (Refer to "[Available robot type]".). This

function is available for controller software version J2 or later.

[Format]

[Terminology]<Position Variables> Specifies the position variable to assign.<Mechanism Number> Enter the mechanism number. 1 to 3, If the argument is omitted, 1 is set as the

default value.[Reference Program]

Refer to Page 141, " [Reference Program 2]" for "COLCHK (Col Check)".

[Explanation](1) This is used to verify the operation direction of the robot in automatic restoration operation after impact

detection.(2) The operation direction of the robot at the very moment of impact detection is expressed as a ratio using

the maximum travel axis as @1.0. Example: If the robot was being operated at a ratio of (X-axis direc-tion:Y-axis direction) = (2:-1)...P_COLDIR = (1,-0.5,0,0,0,0)(0,0)

(3) The posture axis and structural flag are always (*.*.*.0,0,0,0,0)(0,0).(4) A value is calculated when an impact is detected, and then that value is retained until the next impact is

detected.(5) If an impact is detected when an external object hits the robot in the stationary state, all axes are set to

0.0.

(6) Because this variable calculates the operation direction based on the target position of an operationinstruction, all elements may be set to 0.0 if an impact occurs at a position near the target position.

(7) This is read only.(8) For robots that prohibit the use of impact detection, 0.0 is always returned for all axes.

[Reference]COLCHK (Col Check), COLLVL (Col Level), M_COLSTS, J_COLMXL

[Available robot type]

Example)<Position Variables>=P_COLDIR [(<Mechanism Number>)]

RV-3S/3SJ/3SB/3SJB series

RV-6S/6SL/12S/12SL series

RH-6SH/12SH/18SH series

Page 287: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 287/457

4-268 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

P_CURR 

[Function]Returns the current position (X, Y, Z, A, B, C,L1,L2) (FL1, FL2).

[Format]

[Terminology]<Position Variables> Specifies the position variable to assign.<Mechanism Number> Enter the mechanism number. 1 to 3, If the argument is omitted, 1 is set as the

default value.[Reference Program]

10 DEF ACT 1,M_IN(10)=1 GOTO 1000 ' Defines interrupt.20 ACT 1=1 ' Enables interrupt.30 MOV P140 MOV P250 ACT 1=0 ' Disables interrupt.

1000 P100=P_CURR ' Loads the current position when an interrupt signal isreceived.

1010 MOV P100,-100 ' Moves 100 mm above P100 (i.e, -100 mm in the Z direc-tion of the tool).

1020 END ' Ends the program.

[Explanation](1) This can be used to identify the current position.

(2) This variable only reads the data.

[Reference]J_CURR

Example)<Position Variables>=P_CURR [(<Mechanism Number>)]

Page 288: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 288/457

  4MELFA-BASIC IV 

  Detailed explanation of Robot Status Variable  4-269

P_FBC 

[Function]Returns the current position (X,Y,Z,A,B,C,L1,L2)(FL1,FL2) based on the feedback values from the servo.

[Format]

[Terminology]<Position Variables> Specifies the position variable to assign.<Mechanism Number> Enter the mechanism number. 1 to 3, If the argument is omitted, 1 is set as the

default value.[Reference Program]

10 P1=P_FBC ' P1 will contain the current position based on the feedback.

[Explanation](1) Returns the current position based on the feedback values from the servo.(2) This variable only reads the data.

[Reference]TORQ (Torque),J_FBC/J_AMPFBC,M_FBD

P_SAFE 

[Function]

Returns the safe point (XYZ position of the JSAFE parameter).

[Format]

[Terminology]<Position Variables> Specifies the position variable to assign.<Mechanism Number> Enter the mechanism number. 1 to 3, If the argument is omitted, 1 is set as the

default value.

[Reference Program]10 P1=P_SAFE ' P1 will contain the set safe point being set.

[Explanation](1) Returns the XYZ position, which has been converted from the joint position registered in parameter

JSAFE.(2) This variable only reads the data.

Example)<Position Variables>=P_FBC [(<Mechanism Number>)]

Example)<Position Variables>=P_SAFE [(<Mechanism Number>)]

Page 289: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 289/457

4-270 Detailed explanation of Robot Status Variable

4MELFA-BASIC IV 

P_TOOL/P_NTOOL

[Function]Returns tool conversion data.P_TOOL: Returns the tool conversion data that is currently being set.

P_NTOOL: Returns the initial value (0,0,0,0,0,0,0,0)(0,0).[Format]

[Terminology]<Position Variables> Specifies the position variable to assign.<Mechanism Number> Enter the mechanism number. 1 to 3, If the argument is omitted, 1 is set as the

default value.

[Reference Program]10 P1=P_TOOL ' P1 will contain the tool conversion data.

[Explanation](1) P_TOOL returns the tool conversion data set by the TOOL instruction or the MEXTL parameter.(2) Use the TOOL instruction when changing tool data.(3) This variable only reads the data.

P_ZERO

[Function] Always returns (0,0,0,0,0,0,0,0)(0,0).

[Format]

[Terminology]<Position Variables> Specifies the position variable to assign.

[Reference Program]10 P1=P_ZERO '(0,0,0,0,0,0,0,0)(0,0) is assigned to P1.

[Explanation](1) This can be used to initialize the P variable to zeros.(2) This variable only reads the data.

Example)<Position Variables>=P_TOOL [(<Mechanism Number>)]

Example)<Position Variables>=P_NTOOL

Example)<Position Variables>=P_ZERO

Page 290: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 290/457

  4MELFA-BASIC IV 

  Detailed Explanation of Functions  4-271

4.13 Detailed Explanation of Functions4.13.1 How to Read Described items

[Function] : This indicates a function of a function.[Format] : This indicates how to input the function argument.[Reference Program] : An example program using function is shown.

[Terminology] : This indicates the meaning and range of an argument.[Explanation] : This indicates detailed functions and precautions.[Reference] : This indicates related function.

4.13.2 Explanation of Each FunctionEach variable is explained below in alphabetical order.

Page 291: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 291/457

4-272 Detailed Explanation of Functions

4MELFA-BASIC IV 

 ABS

[Function]Returns the absolute value of a given value.

[Format]

[Reference Program]10 P2.C=ABS(P1.C) ' P2.C will contain the value of P1.C without the sign.20 MOV P230 M2=-10040 M1=ABS(M2) ' 100 is assigned to M1.

[Explanation]

(1) Returns the absolute value (Value with the positive sign) of a given value.

[Reference]SGN

<Numeric Variable>=ABS(<Equation>)

Page 292: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 292/457

  4MELFA-BASIC IV 

  Detailed Explanation of Functions  4-273

 ALIGN 

[Function]Positional posture axes (A, B, and C axes) are converted to the closest XYZ postures (0, +/-90, and +/-180). ALIGN outputs numerical values only. The actual operation will involve movement instructions such as the

MOV instruction.

[Format]

[Reference Program] 10 P1=P_CURR 20 P2=ALIGN(P1) 30 MOV P2

[Explanation](1) Converts the A, B, and C components of the position data to the closest XYZ postures (0, +/-90, and +/-180).

(2) Since the return value is of position data type, an error will be generated if the left-hand side is of jointvariable type.

(3) This function cannot be used in vertical multi-joint 5-axes robot.

The following shows a sample case for the axis B.

<Position Variables>=ALIGN(<Position>)

Page 293: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 293/457

4-274 Detailed Explanation of Functions

4MELFA-BASIC IV 

 ASC 

[Function]Returns the character code of the first character in the string.

[Format]

[Reference Program] 10 M1=ASC("A") ' &H41is assigned to M1.

[Explanation](1) Returns the character code of the first character in the string.(2) An error will be generated if the string is a null string.

[Reference]CHR$, VAL, CVI, CVS, CVD

 ATN/ATN2 

[Function]Calculates the arc tangent.

[Format]

[Terminology]<Numeric Variable> Calculates the arc tangent with specified expression, and returns the result. The unit is radian.<Equation> Calculated value of delta Y/delta X.<Equation 1> delta Y<Equation 2> delta X

[Reference Program]10 M1=ATN(100/100) 'PI/4 is assigned to M1.20 M2=ATN2(-100,100) '-PI/4 is assigned to M1.

[Explanation](1) Calculates the arc tangent of a given equation. Unit is in radians.(2) The range of the returned value for ATN is -PI/2 < ATN < PI/2.(3) The range of the returned value for ATN2 is -PI < ATN < PI.(4) If <Equation 2> evaluates to 0, ATN2 will return PI/2 when <Equation 1> evaluates to a positive value

and -PI/2 when <Equation 1> evaluates to a negative value.(5) In the case of ATN2, it is not possible to describe a function that contains an argument in <Equation 1>

and <Equation 2>. If such a function is described, an error will be generated during execution. NG exampleM1=ATN2(MAX(MA,MB), 100) 

M1=ATN2(CINT(10.2), 100)

[Reference]SIN, COS, TAN

<Numeric Variable>=ASC(<Character String Expression>)

<Numeric Variable>=ATN(<Equation>)

<Numeric Variable>=ATN2(<Equation 1>, <Equation 2>)

Page 294: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 294/457

  4MELFA-BASIC IV 

  Detailed Explanation of Functions  4-275

BIN$ 

[Function]Value is converted to a binary string.

[Format]

[Reference Program] 10 M1=&B11111111 20 C1$=BIN$(M1) ' C1$ will contain the character string of "11111111".

[Explanation](1) Value is converted to a binary string.(2) If the equation does not evaluate to an integer, the integral value obtained by rounding the fraction will be

converted to a binary string.(3) VAL is a command that performs the opposite of this function.

[Reference]HEX$, STR$, VAL

<Character String Variable >=BIN$(<Equation>)

Page 295: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 295/457

4-276 Detailed Explanation of Functions

4MELFA-BASIC IV 

CALARC 

[Function]Provides information regarding the arc that contains the three specified points.

[Format]

[Terminology]<Position 1> Specifies the starting point of the arc.<Position 2> Specifies the passing point of the arc. Same as the three points in the MVR instruction.<Position 3> Specifies the endpoint of the arc.

<Numeric Variable 1> Radius of the specified arc (in mm) will be calculated and returned.<Numeric Variable 2> Central angle of the specified arc (in radians) will be calculated and returned.<Numeric Variable 3> Length of the specified arc (in mm) will be calculated and returned.<Position Variables 1> The center coordinates of the specified arc (in mm) will be calculated and returned (as a position data

type, ABC are all zeros).<Numeric Variable 4> Return value

1 : Calculation was performed normally.-1 : Of positions 1, 2, and 3, either two points had the exact same position or all three points were on

a straight line.-2 : All three points are at approximately the same position.

[Reference Program]10 M1=CALARC(P1,P2,P3,M10,M20,M30,P10)20 IF M1<>1 THEN END ' Ends if an error occurs.30 MR=M10 ' Radius.40 MRD=M20 ' Circular arc angle.50 MARCLEN=M30 ' Circular arc length.60 PC=P10 ' Coordinates of the center point.

[Explanation](1) Provides information regarding the arc that is determined by the three specified points, position 1, posi-

tion 2 and position 3.(2) If the arc generation and calculation of various values succeeded, 1 will be returned as the return value.(3) If some points have the exact same position or if all three points are on a straight line, -1 will be returned

as the return value. In such cases, the distance between the starting point and the endpoint will bereturned as the arc length, -1 as the radius, 0 as the central angle, and (0, 0, 0) as the center point.

(4) If circular arc generation fails, -2 will be returned as the return value. If a circular arc cannot be gener-ated, -1, 0, 0 and (0, 0, 0) are returned as the radius, central angle, arc length and center point, respec-tively.

(5) It is not possible to describe a function that contains an argument in <position 1>, <position 2>, <position3>, <numeric variable 1>, <numerical variable 2>, <numeric variable 3> and <position variable 1>. Ifsuch a function is described, an error will be generated during execution.

<Numeric Variable 4> = CALARC(<Position 1>, <Position 2>, <Position 3>,

<Numeric Variable 1>, <Numeric Variable 2>, <Numeric Variable 3>,

<Position Variables 1>)

Page 296: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 296/457

  4MELFA-BASIC IV 

  Detailed Explanation of Functions  4-277

CHR$ 

[Function]Returns the character that has the character code obtained from the specified equation.

[Format]

[Reference Program]10 M1=&H4020 C1$=CHR$(M1+1) ' "A" is assigned to C1$.

[Explanation](1) Returns the character that has the character code obtained from the specified equation.(2) If the equation does not evaluate to an integer, the character will be returned whose character code cor-

responds to the integral value obtained by rounding the fraction.

[Reference] ASC

CINT 

[Function]Rounds the fractional part of an equation to convert the value into an integer.

[Format]

[Reference Program]10 M1=CINT(1.5) ' 2 is assigned to M1.20 M2=CINT(1.4) ' 1 is assigned to M2.30 M3=CINT(-1.4) ' -1 is assigned to M3.40 M4=CINT(-1.5) ' -2 is assigned to M4.

[Explanation](1) Returns the value obtained by rounding the fractional part of an equation.

[Reference]INT, FIX

<Character String Variable >=CHR$(<Equation>)

<Numeric Variable>=CINT(<Equation>)

Page 297: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 297/457

4-278 Detailed Explanation of Functions

4MELFA-BASIC IV 

CKSUM 

[Function]Calculates the checksum of the string.

[Format]

[Terminology]<Character String> Specifies the string from which the checksum should be calculated.<Equation 1> Specifies the first character position from where the checksum calculation

starts.<Equation 2> Specifies the first character position from where the checksum calculation

ends.

[Reference Program]10 M1=CKSUM("ABCDEFG",1,3)' &H41("A")+&H42("B")+&H43("C")=&HC6 is assigned to M1.

[Explanation](1) Adds the character codes of all characters in the string from the starting position to the end position and

returns a value between 0 and 255.(2) If the starting position is outside the range of the string, an error will be generated.(3) If the end position exceeds the end of the string, checksum from the starting position to the last character

in the string will be calculated.(4) If the result of addition exceeds 255, a degenerated value of 255 or less will be returned.(5) It is not possible to describe a function that contains an argument in <Character String>, <Equation 1>

and <Equation 2>. If such a function is described, an error will be generated during execution.

COS

[Function]Gives the cosine.

[Format]

[Reference Program]10 M1=COS(RAD(60))

[Explanation](1) Calculates the cosine of the equation.(2) The range of arguments will be the entire range of values that are allowed.(3) The range of the return value will be from -1 to 1.(4) The unit of arguments is in radians.

[Reference]SIN, TAN, ATN/ATN2

<Numeric Variable>=CKSUM(<Character String>, <Equation 1>, <Equation 2>)

<Numeric Variable>=COS(<Equation>)

Page 298: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 298/457

  4MELFA-BASIC IV 

  Detailed Explanation of Functions  4-279

CVI 

[Function]Converts the character codes of the first two characters of a string into an integer.

[Format]

[Reference Program]10 M1=CVI("10ABC") ' &H3031 is assigned to M1.

[Explanation](1) Converts the character codes of the first two characters of a string into an integer.(2) An error will be generated if the string consists of one character or less.(3) MKI$ can be used to convert numerical values into a string.(4) This can be used to reduce the amount of communication data when transmitting numerical data with

external devices.

[Reference] ASC, CVS, CVD, MKI$, MKS$, MKD$

CVS

[Function]Converts the character codes of the first four characters of a string into a single precision real number.

[Format]

[Reference Program]10 M1=CVS("FFFF") ' 12689.6 is assigned to M1.

[Explanation](1) Converts the character codes of the first four characters of a string into an single-precision real number.(2) An error will be generated if the string consists of three character or less.(3) MKS$ can be used to convert numerical values into a string.

[Reference] ASC, CVI, CVD, MKI$, MKS$, MKD$

<Numeric Variable>=CVI(<Character String Expression>)

<Numeric Variable>=CVS(<Character String Expression>)

Page 299: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 299/457

4-280 Detailed Explanation of Functions

4MELFA-BASIC IV 

CVD

[Function]Converts the character codes of the first eight characters of a string into a double precision real number.

[Format]

[Reference Program]10 M1=CVD("FFFFFFFF") ' +3.52954E+30 is assigned to M1.

[Explanation](1) Converts the character codes of the first eight characters of a string into a double precision real number.(2) An error will be generated if the string consists of seven character or less.(3) MKD$ can be used to convert numerical values into a string.

[Reference] ASC, CVI, CVS, MKI$, MKS$, MKD$

DEG

[Function]Converts the unit of angle measurement from radians (rad) into degrees (deg).

[Format]

[Reference Program]10 P1=P_CURR20 IF DEG(P1.C) < 170 OR DEG(P1.C) > -150 THEN *NOERR30 ERROR(9100)

40 *NOERR

[Explanation](1) Converts the radian value of an equation into degree value.(2) When the posture angles of the position data are to be displayed using positional constants, the unit

used for ((500, 0, 600, 180, 0, 180) (7, 0)) is DEG. As in the case of P1.C, the unit used will be in radi-ans (rad) when the rotational element of the positional variable is to be referenced directly. Value ofP1.C can be handled in DEG. In such case, set parameter "PRGMDEG" to 1.

[Reference]RAD

<Numeric Variable>=CVD(<Character String Expression>)

<Numeric Variable>=DEG(<Equation>)

Page 300: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 300/457

  4MELFA-BASIC IV 

  Detailed Explanation of Functions  4-281

DIST 

[Function]Calculates the distance between two points (position variables).

[Format]

[Reference Program]10 M1=DIST(P1,P2) ' M1 will contain the distance between positions 1 and 2.

[Explanation](1) Returns the distance between positions 1 and 2 (in mm).(2) Posture angles of the position data will be ignored; only the X, Y, and Z data will be used for calculation.(3) The joint variables cannot be used. Trying to use it will result in an error during execution.(4) It is not possible to describe a function that contains an argument in <position 1> and <position 2>. If

such a function is described, an error will be generated during execution.

EXP 

[Function]Calculates exponential functions. (an equation that uses "e" as the base.)

[Format]

[Reference Program]10 M1=EXP(2) ' e2 is assigned to M1.

[Explanation](1) Returns the exponential function value of the equation.

[Reference]LN

<Numeric Variable>=DIST(<Position 1>, <Position 2>)

<Numeric Variable>=EXP(<Equation>)

Page 301: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 301/457

4-282 Detailed Explanation of Functions

4MELFA-BASIC IV 

FIX 

[Function]Returns the integral portion of the equation.

[Format]

[Reference Program]10 M1=FIX(5.5) ' 5 is assigned to M1.

[Explanation](1) Returns the integral portion of the equation value.(2) If the equation evaluates to a positive value, the same number as INT will be returned.(3) If the equation evaluates to a negative value, then for instance FIX(-2.3) = -2.0 will be observed.

[Reference]CINT, INT

<Numeric Variable>=FIX(<Equation>)

Page 302: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 302/457

  4MELFA-BASIC IV 

  Detailed Explanation of Functions  4-283

FRAM 

[Function]Calculates the position data that indicates a coordinate system (plane) specified by three position data.Normally, use DEF PLT and PLT instructions for pallet calculation.

[Format]

[Terminology]<Numeric Variable 1> This will be the origin of X, Y, and Z of the plane to be specified by three posi-

tions. A variable or a constant.<Numeric Variable 2> A point on the X axis of the plane to be specified by three positions. A variable

or a constant.

<Numeric Variable 3> A point in the positive Y direction of the X-Y plane on the plane to be specifiedby three positions. A variable or a constant.

<Numeric Variable 4> Variable to which the result is assigned.Substitute the structural flag by the value of <position 1>.

[Reference Program]10 BASE P_NBASE20 P100=FRAM(P1,P2,P3) ' Create P100 coordinate system based on P1, P2 and P3 positions.30 P10=INV(P10)40 P10. X=P1. X50 P10. Y=P1. Y60 P10. Z=P1. Z

70 BASE P10 ' Position of P100 will be used as the origin for robot.:

[Explanation](1) This can be used to define the base coordinate system.(2) This creates a plane from the three coordinates X, Y, and Z for the three positions to calculate the posi-

tion of the origin and the inclination of the plane, and returns the result as a position variable. The X, Y,and Z coordinates of the position data will be identical to that of position variable 1, while A, B, and Cwill be the inclination of the plane to be specified by the three positions.

(3) Since the return value is a position data, an error will be generated if a joint variable is used in the left-hand side.

(4) It is not possible to describe a function that contains an argument in <position 1>, <position 2> and

<position 3>. If such a function is described, an error will be generated during execution. 

NG exampleP10=FRAM(FPRM(P01,P02,P03), P04, P05)

[Reference]Relative conversion (* operator). Refer to Page 328, "5.8 About user-defined area".

<Numeric Variable 4>=FRAM(<Numeric Variable 1>, <Numeric Variable 2>,

<Numeric Variable 3>)

Page 303: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 303/457

4-284 Detailed Explanation of Functions

4MELFA-BASIC IV 

HEX$ 

[Function]Converts the value of an equation (Between -32768 to 32767) into hexadecimal string.

[Format]

[Reference Program]10 C1$=HEX$(&H41FF) ' "41FF" is assigned to C1$.20 C2$=HEX$(&H41FF,2) ' "FF" is assigned to C2$.

[Explanation](1) Converts the value of an equation into hexadecimal string.(2) If <Number of output characters> is specified, the right most part of the converted string is output for the

specified length.(3) If the numerical value is not an integer, the integer value obtained by rounding the fraction will be con-

verted into hexadecimal string.(4) VAL is a command that performs this procedure in reverse.(5) If <number of output characters> is specified, it is not possible to describe a function that contains an

argument in <Equation>. If such a function is described, an error will be generated during execution. NG example C1$=HEX$(ASC("a"),1)

[Reference]BIN$, STR$, VAL

INT [Function]

Returns the largest integer that does not exceed the value of the equation.

[Format]

[Reference Program]10 M1=INT(3.3) ' 3 is assigned to M1.

[Explanation](1) Returns the largest integer that does not exceed the value of the equation.(2) If the nquation evaluates to a positive value, the same number as FIX will be returned.(3) If the equation evaluates to a negative value, then for instance FIX(-2.3) = -3.0 will be observed.

[Reference]CINT, FIX

<Character String Variable >=HEX$(<Equation> [, <Number of output characters>])

<Numeric Variable>=INT(<Equation>)

Page 304: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 304/457

  4MELFA-BASIC IV 

  Detailed Explanation of Functions  4-285

INV 

[Function]Obtains the position data of the inverse matrix of the position variable. This is used to perform relative calcu-lation of the positions.

[Format]

[Reference Program]10 P1=INV(P2) ' P1 will contain the inverse matrix of P2.

[Explanation](1) Obtains the position data of the inverse matrix of the position variable.(2) Joint variables cannot be used as the argument. When a joint variable is used, an error will be gener-

ated.(3) Since the return value is a position data, an error will be generated if a joint variable is used in the left-

hand side.

JTOP 

[Function]Given joint data will be converted into position data.

[Format]

[Reference Program]10 P1=JTOP(J1) ' The position that expresses the J1 (joint type) position using the XYZ

type will be assigned to P1.[Explanation]

(1) Converts the joint data into the position data.(2) Position variables cannot be used as the argument. When a position variable is used, an error will be

generated.(3) Since the return value is a position data, an error will be generated if a joint variable is used in the left-

hand side.

[Reference]PTOJ

<Position Variables>=INV(<Position Variables>)

<Position Variables>=JTOP(<Joint Variables>)

Page 305: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 305/457

4-286 Detailed Explanation of Functions

4MELFA-BASIC IV 

LEFT$ 

[Function]Obtains a string of the specified length starting from the left end.

[Format]

[Reference Program]10 C1$=LEFT$("ABC",2) ' "AB" is assigned to C1$.

[Explanation](1) Obtains a string of the specified length starting from the left end.(2) An error will be generated if the value is a negative value or is longer than the string.(3) It is not possible to describe a function that contains an argument in <Character String> and <Equation>.

If such a function is described, an error will be generated during execution.

[Reference]MID$, RIGHT$

LEN 

[Function]Returns the length of the string.

[Format]

[Reference Program]10 M1=LEN("ABCDEFG") ' 7 is assigned to M1.

[Explanation](1) Returns the length of the argument string.

[Reference]LEFT$, MID$, RIGHT$

<Character String Variable >=LEFT$(<Character String>, <Equation>)

<Numeric Variable>=LEN(<Character String>)

Page 306: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 306/457

  4MELFA-BASIC IV 

  Detailed Explanation of Functions  4-287

LN 

[Function]Returns the natural logarithm. (Base e.)

[Format]

[Reference Program]10 M1=LN(2) ' 0.693147 is assigned to M1.

[Explanation](1) Returns the natural logarithm of the value of the equation.(2) An error will be generated if the equation evaluates to a zero or a negative value.

[Reference]EXP, LOG

LOG

[Function]Returns the common logarithm. (Base 10.)

[Format]

[Reference Program]10 M1=LOG(2) ' 0.301030 is assigned to M1.

[Explanation](1) Returns the common logarithm of the value of the equation.(2) An error will be generated if the equation evaluates to a zero or a negative value.

[Reference]EXP, LN

<Numeric Variable>=LN(<Equation>)

<Numeric Variable>=LOG(<Equation>)

Page 307: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 307/457

4-288 Detailed Explanation of Functions

4MELFA-BASIC IV 

MAX 

[Function]Obtains the maximum value.

[Format]

[Reference Program]10 M1=MAX(2,1,3,4,10,100) ' 100 is assigned to M1.

[Explanation](1) Returns the maximum value among the arbitrary number of arguments.(2) The length of this instruction can be up to the number of characters allowed in a single line (123 charac-

ters).(3) It is not possible to describe a function that contains an argument in <Equation 1>, <Equation 2> and ....

. If such a function is described, an error will be generated during execution.

[Reference]MIN

MID$ 

[Function]Returns a string of the specified length starting from the specified position of the string.

[Format]

[Reference Program]10 C1$=MID$("ABCDEFG",3,2) ' "CD" is assigned to C1$.

[Explanation](1) A string of the length specified by argument 3 is extracted from the string specified by the first argument

starting from the position specified by argument 2 and returned.(2) An error will be generated if equation 2 or 3 evaluates to a zero or a negative value.(3) An error is generated if the position of the last character to be extracted is larger than the length of the

string specified by the first argument.(4) It is not possible to describe a function that contains an argument in <Character String>, <Equation 2>

and <Equation 3>. If such a function is described, an error will be generated during execution.

[Reference]LEFT$, RIGHT$, LEN

<Numeric Variable>=MAX(<Equation 1>, <Equation 2>, ...)

<Character String Variable >=MID$(<Character String>, <Equation 2>, <Equation 3>)

Page 308: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 308/457

  4MELFA-BASIC IV 

  Detailed Explanation of Functions  4-289

MIN 

[Function]Obtains the minimum value.

[Format]

[Reference Program]10 M1=MIN(2,1,3,4,10,100) ' 1 is assigned to M1.

[Explanation](1) Returns the minimum value among the arbitrary number of arguments.(2) The length of this instruction can be up to the number of characters allowed in a single line (123 charac-

ters).(3) It is not possible to describe a function that contains an argument in <Equation 1>, <Equation 2> and ....

. If such a function is described, an error will be generated during execution.

[Reference]MAX

MIRROR$ 

[Function]Inverts the bit string representing each character code of the string in binary, and obtains the character-coded string.

[Format]

[Reference Program]10 C1$=MIRROR$("BJ") ' "RB" is assigned to C1$.

' "BJ" =&H42,&H4A=&B01000010,&B01001010.' Inverted =&H52,&H42=&B01010010,&B01000010.' Output ="RB".

[Explanation](1) Inverts the bit string representing each character code of the string in binary, and obtains the character-coded string.

<Numeric Variable>=MIN(<Equation 1>, <Equation 2>, ......)

<Character String Variable >=MIRROR$(<Character String Expression>)

Page 309: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 309/457

4-290 Detailed Explanation of Functions

4MELFA-BASIC IV 

MKI$ 

[Function]Converts the value of an equation (integer) into a two-byte string.

[Format]

[Reference Program]10 C1$=MKI$(20299) ' "OK" is assigned to C1$.20 M1=CVI(C1$) ' 20299 is assigned to M1.

[Explanation](1) Converts the lowest two bytes of the value of an equation (integer) into a strings.(2) Use CVI to convert the string to a value.(3) This can be used to reduce the amount of communication data when transmitting numerical data to

external devices.

[Reference] ASC, CVI, CVS, CVD, MKS$, MKD$

MKS$ 

[Function]Converts the value of an equation (single-precision real number) into a four-byte string.

[Format]

[Reference Program]10 C1$=MKS$(100.1) '20 M1=CVS(C1$) ' 100.1 is assigned to M1.

[Explanation](1) Converts the lowest four bytes of the value of an equation (single-precision real number) into the strings.(2) Use CVS to convert the string to a value.

(3) This can be used to reduce the amount of communication data when transmitting numerical data toexternal devices.

[Reference] ASC, CVI, CVS, CVD, MKI$, MKD$

<Character String Variable >=MKI$(<Equation>)

<Character String Variable >=MKS$(<Equation>)

Page 310: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 310/457

  4MELFA-BASIC IV 

  Detailed Explanation of Functions  4-291

MKD$ 

[Function]Converts the value of an equation (double-precision real number) into a eight-byte string.

[Format]

[Reference Program]10 C1$=MKD$(10000.1) '20 M1=CVD(C1$) ' 10000.1 is assigned to M1.

[Explanation](1) Converts the lowest eight bytes of the value of an equation (single-precision real number) into the

strings.(2) Use CVD to convert the string to a value.(3) This can be used to reduce the amount of communication data when transmitting numerical data to

external devices.

[Reference] ASC, CVI, CVS, CVD, MKI$, MKI$

POSCQ

[Function]

Checks whether the given position is within the movement range.

[Format]

[Reference Program]10 M1=POSCQ(P1) ' M1 will contain 1 if the position P1 is within the movement range.

[Explanation](1) Check whether the position data given by an argument is within the movement range of the robot. Value

1 will be returned if it is within the movement range of the robot; value 0 will be returned if it is outsidethe movement range of the robot.(2) Arguments must give either the position data type or joint data type.

<Character String Variable >=MKD$(<Equation>)

<Numeric Variable>=POSCQ(<Position Variables>)

Page 311: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 311/457

4-292 Detailed Explanation of Functions

4MELFA-BASIC IV 

POSMID

[Function]Obtain the middle position data when a linear interpolation is performed between two given points.

[Format]

[Reference Program]10 P1=POSMID(P2,P3,0,0) ' The position data (including posture) of the middle point between P2

and P3 will be assigned to P1.

[Explanation](1) Obtain the position data of the middle point when a linear interpolation is performed between two posi-

tion data.(2) The first argument gives the starting point of the linear interpolation, while the second argument gives

the endpoint of the linear interpolation.(3) The third and fourth arguments correspond to the two TYPE arguments of the MVS command.(4) The arguments for the starting and end points must be positions that allow linear interpolation with the

specified interpolation type. For instance, an error will be generated if the structure flags of the startingand end points are different.

(5) It is not possible to describe a function that contains an argument in <Position Variables 1>, <PositionVariables 2>,<Equation 1> and <Equation 2>. If such a function is described, an error will be generatedduring execution.

PTOJ 

[Function]Converts the given position data into a joint data.

[Format]

[Reference Program]10 J1=PTOJ(P1) ' J1 will contain the value of P1 (XYZ position variable) that has been con-

verted into joint data type.

[Explanation](1) Converts the position data into the joint data.(2) Joint variables(J variable) cannot be used as the argument. When a joint variable is used, an error will

be generated.(3) Since the return value is a joint data, an error will be generated if a position variable is used in the left-

hand side.

[Reference]JTOP

<Position Variables>=POSMID(<Position Variables 1>, <Position Variables 2>,<Equation 1>,

<Equation 2>)

<Joint Variable>=PTOJ(<Position Variables>)

Page 312: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 312/457

  4MELFA-BASIC IV 

  Detailed Explanation of Functions  4-293

RAD

[Function]Converts the unit of angle measurement from degrees (deg) into radians (rad).

[Format]

[Reference Program]10 P1=P_CURR20 P1.C=RAD(90)30 MOV P1 ' Moves to P1, which is obtained by changing the C axis of the current position

to 90 degrees.

[Explanation]

(1) Converts the degree value of an equation into radian value.(2) This can be used to assign values to the posture components (ABC) of a position variable or to executetrigonometric functions.

[Reference]DEG

RDFL 1

[Function]Returns the structure flag of the specified position using character data "R"/"L", "A"/"B", and "N"/"F".

[Format]

[Terminology]<Position Variables> Specifies the position variable from which the structure flag will be extracted.<Equation> Specifies which structure flag is to be extracted.

0 = "R" / "L", 1 = "A" / "B", 2 = "N" / "F"[Reference Program]

10 P1=(100,0,100,180,0,180)(7,0)' Since the structure flag 7 (&B111) is RAN,20 C1$=RDFL1(P1,1) ' C1$ will contain "A".

[Explanation](1) Of the structure flags in the position data specified by argument 1, the flag specified by argument 2 willbe extracted.

(2) This function extracts information from the FL1 element of position data.(3) It is not possible to describe a function that contains an argument in <Position Variables> and

<Equation>. If such a function is described, an error will be generated during execution.

[Reference]RDFL 2, SETFL 1, SETFL 2

<Numeric Variable>=RAD(<Equation>)

<Character String Variable >=RDFL1(<Position Variables>, <Equation>)

Page 313: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 313/457

4-294 Detailed Explanation of Functions

4MELFA-BASIC IV 

RDFL 2 

[Function]Returns the multiple rotation information of the specified joint axis.

[Format]

[Terminology]<Position Variables> Specifies the position variable from which the multiple rotation information is to be extracted.<Equation> Specifies the value for the joint axis from which the multiple rotation information is to be extracted. (1

through 8)[Reference Program]

10 P1=(100,0,100,180,0,180)(7,&H00100000)'20 M1=RDFL2(P1,6) ' 1 is assigned to M1.

[Explanation](1) Of the multiple rotation information of the position data specified by argument 1, the value for the joint

axis specified by argument 2 is extracted.(2) The range of the return value is between -8 and 7.(3) This function extracts information from the FL2 element of position data.(4) Structure flag 2 (multiple rotation information) has a 32-bit structure, which contains 4 bits of information

per axis for 8 axes.(5) When displaying in T/B and the multiple rotation is a negative value, value of -1 to -8 is converted into F

to 8 (4-bit signed hexadecimal notation) and displayed.

(6) It is not possible to describe a function that contains an argument in <Position Variables> and<Equation>. If such a function is described, an error will be generated during execution.

[Reference]RDFL 1, SETFL 1, SETFL 2, JRC (Joint Roll Change)

<Numeric Variable>=RDFL2(<Position Variables>, <Equation>)

<Sample display of multiple rotation information in TB> 87654321 axis<Relationship between display and number of multiple

rotations per axis>

When mult iple rotation of axis J6 is +1: FL2=00100000 ....... ........ -2 -1 0 +1 +2......... ......

When multiple rotation of axis J6 is -1: FL2=00F00000 ............... E F 0 1 2...............

Page 314: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 314/457

  4MELFA-BASIC IV 

  Detailed Explanation of Functions  4-295

RND

[Function]Generates a random number.

[Format]

[Terminology]<Equation> Specifies the initial value of random numbers. If this value is set to 0, subsequent random numbers

will be generated without setting the initial value of random numbers.<Numeric Variable> A value in the range of 0.0 to 1.0 wil l be returned.

[Reference Program]10 DIM MRND(10)20 C1=RIGHT$(C_TIME,2) ' Initializes random numbers using the clock.30 MRNDBS=CVI(C1)) ' in order to obtain different sequence of numbers.40 MRND(1)=RND(MRNDBS) ' Sets the initial value of random numbers and extracts the first random

number.50 FOR M1=2 TO 10 ' Obtain other nine random numbers.60 MRND(M1)=RND(0)70 NEXT M1

[Explanation](1) Initializes random numbers using the value provided by the argument and extracts a random number.(2) If the equation provided as the argument evaluates to 0, initialization of random numbers will not take

place and the next random number will be extracted.(3) When the same value is used to perform initialization of random numbers, identical random number

sequence will be obtained.

RIGHT$ 

[Function]Obtains a string of the specified length starting from the right end.

[Format]

[Reference Program]10 C1$=RIGHT$("ABCDEFG",3) ' "EFG" is assigned to C1$.

[Explanation](1) Obtains a string of the specified length starting from the right end.(2) An error will be generated if the value of the second argument is a negative value or is longer than the

first string.(3) It is not possible to describe a function that contains an argument in <Character String> and <Equation>.

If such a function is described, an error will be generated during execution.

[Reference]LEFT$, MID$, LEN

<Numeric Variable>=RND(<Equation>)

<Character String Variable >=RIGHT$(<Character String>, <Equation>)

Page 315: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 315/457

4-296 Detailed Explanation of Functions

4MELFA-BASIC IV 

SETFL 1

[Function]Changes the structure flag of the specified position using a string (such as "RAN").

[Format]

[Terminology]<Position Variables>Specifies the position variable whose structure flag is to be changed.<Character String> Specifies the structure flag to be changed. Multiple flags can be specified.

"R" or "L": Right/Left setting."A" or "B": Above/Below setting."N" or "F": Nonflip/Flip setting.

[Reference Program]10 MOV P120 P2=SETFL1(P1,"LBF")30 MOV P2

[Explanation](1) Returns the position data obtained by changing the structure flags in the position data specified by argu-

ment 1 to flag values specified by argument 2.(2) This function changes information from the FL1 element of position data. The content of the position data

given by the argument will remain unchanged.(3) The structure flag will be specified starting from the last character in the string. Therefore, for instance, if

the string "LR" is specified, the resulting structure flag will be "L".

(4) If the flags are changed using a numerical value, set P1.FL1=7.(5) Structure flags may have different meanings depending on the robot model. For details, please refer to"ROBOT ARM SETUP & MAINTENANCE" for each robot.

The structure flag corresponds to 7 in the position constant (100, 0, 300, 180, 0, 180) (7, 0). The actual posi-tion is a bit pattern.

(6) It is not possible to describe a function that contains an argument in <Position Variables> and<Character String>. If such a function is described, an error will be generated during execution.

[Reference]RDFL 1, RDFL 2, SETFL 2

<Position Variables>=SETFL1(<Position Variables>, <Character String>)

  7 = & B 0 0 0 0 0 1 1 1

1/0=N/F1/0=A/B1/0=R/L

Page 316: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 316/457

  4MELFA-BASIC IV 

  Detailed Explanation of Functions  4-297

SETFL 2 

[Function]Changes the multiple rotation data of the specified position.

[Format]

[Terminology]<Position Variables> Specifies the position variable whose multiple rotation data are to be changed.<Equation 1> Specifies the axis number for which the multiple rotation data are to be

changed. (1 through 8).<Equation 2> Specifies the multiple rotation data value to be changed (-8 through 7).

[Reference Program]

10 MOV P120 P2=SETFL2(P1,6,1)30 MOV P2

[Explanation](1) Returns the position data obtained by changing the position data's multiple rotation information of the

 joint axis specified by equation 1 to the value specified by equation 2.(2) This function changes information from the FL2 element of position data.(3) The content of the position of position variables given by the argument (X, Y, Z, A, B, C, and FL1) will

remain unchanged.

(4) It is not possible to describe a function that contains an argument in <Position Variables>, <Equation 1>and <Equation 2>. If such a function is described, an error will be generated during execution.

[Reference]RDFL 1, RDFL 2, SETFL 1

<Position Variables>=SETFL2(<Position Variables>, <Equation 1>, <Equation 2>)

-900 -540 -180 0 180 540 900

・・・-2

(E)-1(F) 0 1 2 ・・・

Value of multiplerotation data

ngle of each axis

Value of multiple rotation data

Page 317: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 317/457

4-298 Detailed Explanation of Functions

4MELFA-BASIC IV 

SETJNT 

[Function]Sets the value to the joint variable.This function is available for controller software version J2 or later.

[Format]

[Terminology]<Joint Variable> Sets the value to the joint variable.<J1 Axis>-<J8 Axis> The unit is RAD (the unit is mm for direct-driven axes).

[Reference Program]10 J1=J_CURR20 FOR M1=0 to 60 SETP 1030 M2=J1.J3+RAD(M1)40 J2=SETJNT(J1.J1,J1.J2,M2) ' Only for the value of the J3 axis, it is rotated by 10 degrees each

time. The same value is used for the J4 and succeeding axes.50 MOV J260 NEXT M170 M0=RAD(0)80 M90=RAD(90)70 J3=SETJNT(M0,M0,M90,M0,M90,M0)100 MOV J3

[Explanation](1) The value of each axis in joint variables can be changed.(2) Variable can be described as arguments.(3) Arguments can be omitted except for the J1 axis. They can be omitted for all subsequent axes. (Argu-

ments such as SETJNT(10,10,,,,10) cannot be described.)(4) In an argument, it is not allowed to describe a function with an argument. If described, an error occurs

when executed.

[Reference]SETPOS

[Related parameter] AXUNT, PRGMDEG

<<Joint Variable>>=SETJNT(<J1 Axis>[,<J2 Axis>[,<J3 Axis>[,<J4 Axis>

  [,<J5 Axis>[,<J6 Axis>[,<J7 Axis>[,<J8 Axis>]]]]]]])

Page 318: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 318/457

  4MELFA-BASIC IV 

  Detailed Explanation of Functions  4-299

SETPOS

[Function]Sets the value to the Position variableThis function is available for controller software version J2 or later.

[Format]

[Terminology]<Position Variable> Sets the value to the Position variable.<X Axis>-<Z Axis> The unit is mm.<A Axis>-<C Axis> The unit is RAD. (It can be switched to DEG using the PRGMDEG parameter.)<L1 Axis>-<L2 Axis> The unit depends on "AXUNT" Parameter.

[Reference Program]10 P1=P_CURR20 FOR M1=0 to 100 SETP 1030 M2=P1.Z+M140 P2=SETPOS(P1.X, P1.Y, M2) ' Only for the value of the Z axis, it is rotated by 10 mm each time.

The same value is used for the A and succeeding axes.50 MOV J260 NEXT M1

[Explanation](1) The value of each axis in joint variables can be changed.(2) Variable can be described as arguments.(3) Arguments can be omitted except for the X axis. They can be omitted for all subsequent axes. (Argu-

ments such as SETPOS(10,10,,,,10) cannot be described.)(4) In an argument, it is not allowed to describe a function with an argument. If described, an error occurs

when executed.

[Reference]SETJNT

[Related parameter]

 AXUNT, PRGMDEG

<<Position Variable>>=SETPOS(<X Axis>[,<Y Axis>[,<Z Axis>

  [,<A Axis>[,<B Axis>[,<C Axis>[,<L1 Axis>[,<L2 Axis>]]]]]]])

Page 319: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 319/457

4-300 Detailed Explanation of Functions

4MELFA-BASIC IV 

SGN 

[Function]Checks the sign of the equation.

[Format]

[Reference Program]10 M1=-1220 M2=SGN(M1) ' -1 is assigned to M2.

[Explanation](1) Checks the sign of the equation and returns the following value.

Positive value 1

0 0Negative value -1

SIN 

[Function]Calculates the sine.

[Format]

[Reference Program]10 M1=SIN(RAD(60)) ' 0.866025 is assigned to M1.

[Explanation](1) Calculates the sine to which the given equation evaluates.(2) The range of values will be the entire range that numerical values can take.(3) The range of the return value will be from -1 to 1.(4) The unit of arguments is in radians.

[Reference]

COS, TAN, ATN/ATN2

<Numeric Variable>=SGN(<Equation>)

<Numeric Variable>=SIN(<Equation>)

Page 320: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 320/457

  4MELFA-BASIC IV 

  Detailed Explanation of Functions  4-301

SQR 

[Function]Calculates the square root of an equation value.

[Format]

[Reference Program]10 M1=SQR(2) ' 1.414214 is assigned to M1.

[Explanation](1) Calculates the square root of the value to which the given equation evaluates.(2) An error will be generated if the equation given by the argument evaluates to a negative value.

STRPOS

[Function]Searches for a specified string in a string.

[Format]

[Reference Program]

10 M1=STRPOS("ABCDEFG","DEF") ' 4 is assigned to M1.

[Explanation](1) Returns the position of the first occurrence of the string specified by argument 2 from the string specified

by argument 1.(2) An error will be generated if the length of the argument 2 is 0.(3) For instance, if argument 1 is "ABCDEFG" and argument 2 is "DEF", 4 will be returned.(4) If the search string could not be found, 0 will be returned.(5) It is not possible to describe a function that contains an argument in <Character String 1> and <Charac-

ter String 2>. If such a function is described, an error will be generated during execution.

<Numeric Variable>=SQR(<Equation>)

<Numeric Variable>=STRPOS(<Character String 1>, <Character String 2>)

Page 321: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 321/457

4-302 Detailed Explanation of Functions

4MELFA-BASIC IV 

STR$ 

[Function]Converts the value of the equation into a decimal string.

[Format]

[Reference Program]10 C1$=STR$(123) ' "123" is assigned to C1$.

[Explanation](1) Converts the value of the equation into a decimal string.(2) VAL is a command that performs this procedure in reverse.

[Reference]BIN$, HEX$, VAL

TAN 

[Function]Calculates the tangent.

[Format]

[Reference Program]10 M1=TAN(RAD(60)) ' 1.732051 is assigned to M1.

[Explanation](1) Returns the tangent of the value to which the equation evaluates.(2) The range of arguments will be the entire range of values that are allowed.(3) The range of return values will be the entire range that numerical values can take.(4) The unit of arguments is in radians.

[Reference]SIN, COS, ATN/ATN2

<Character String Variable >=STR$(<Equation>)

<Numeric Variable>=TAN(<Equation>)

Page 322: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 322/457

  4MELFA-BASIC IV 

  Detailed Explanation of Functions  4-303

VAL

[Function]Converts the value in the string into a numerical value.

[Format]

[Reference Program]10 M1=VAL("15")20 M2=VAL("&B1111")30 M3=VAL("&HF")

[Explanation](1) Converts the given character string expression string into a numerical value.

(2) Binary (&B), decimal, and hexadecimal (&H) notations can be used for the string.(3) In the example above, M1, M2 and M3 evaluate to the same value (15).

[Reference]BIN$, HEX$, STR$

<Numeric Variable>=VAL(<Character String Expression>)

Page 323: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 323/457

4-304 Detailed Explanation of Functions

4MELFA-BASIC IV 

ZONE 

[Function]Checks if the specified position is within the specified area (a rectangular solid defined by two points).

[Format]

[Terminology]<Position 1> The position to be checked.<Position 2> The position of the first point that specifies the area.<Position 3> The position of the second point that specifies the area. (diagonal point)

Positions 1 to 3 set the XYZ coordinates variable system (P variable X, Y, Z, A, B, C, L1 and L2).

[Reference Program]

10 M1=ZONE(P1,P2,P3)20 IF M1=1 THEN MOV P_SAFE ELSE END

[Explanation](1) This will check if position 1 is inside the rectangular solid defined by the two points, position 2 and posi-

tion 3. (The two points will become the diagonal points of the rectangular solid.) If the point is inside therectangular solid, 1 is returned; otherwise, 0 is returned.

(2) To check whether position 1 is inside that area, each element of position 1 (X, Y, Z, A, B, C, L1 and L2)will be checked if it is between the values for position 2 and position 3.

(3) As for the posture angles (A, B, and C), they are checked by rotating in the positive direction from theangle in position 2 to position 3 and by seeing if the target value is inside the swiped range.Example) If P2.A is -100 and P3.A is +100, if P1.A is 50, the value is within the range. Similar checkingwill be performed for B and C axes. (Refer to diagram below.)

(4) For components that are not checked or do not exist, if the unit is in degrees, position 2 will be set to -360 and position 3 will be set to 360. If the unit is in millimeters, position 2 will be set to -10000 andposition 3 will be set to 10000.

(5) It is not possible to describe a function that contains an argument in <Position 1>, <Position 2> and<Position 3>. If such a function is described, an error will be generated during execution.

<Numeric Variable>=ZONE(<Position 1>, <Position 2>, <Position 3>)

 

P2  P3 

P1

+ -

±0°

<Position 2><Position 3>

±180°

Example) If the value passes through 0 from -90 to +90,  the following setting is necessity.  Sets the negative value to ABC of <position 2>.  Sets the positive value to ABC of <position 3>.

Example) If the value passes through 180 from -90 to +90,the following setting is necessity.

  Sets the positive value to ABC of <position 2>.  Sets the negative value to ABC of <position 3>.

+ -

±0°

<Position 3><Position 2>

±180°

Page 324: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 324/457

  4MELFA-BASIC IV 

  Detailed Explanation of Functions  4-305

ZONE 2 

[Function]Checks if the specified position is within the specified area (Cylindrical area defined by two points).

[Format]This function is available for controller software version G5 or later 

[Terminology]<Position 1> The position to be checked.<Position 2> The position of the first point that specifies the area.<Position 3> The position of the second point that specifies the area.<Equation> Radius of the hemisphere on both ends.

[Reference Program]10 M1=ZONE2(P1,P2,P3,50)20 IF M1=1 THEN MOV P_SAFE ELSE END

[Explanation](1) This will check if position 1 is inside the cylindrical area (Refer to diagram below) defined by the two

points, position 2 and position 3, and the radius represented by the equation. If the point is inside thespace, 1 is returned; otherwise, 0 is returned.

(2) This function checks whether the check position (X, Y, and Z coordinates) is within the specified area,but does not take the posture components into consideration.

(3) It is not possible to describe a function that contains an argument in <Position 1>, <Position 2>, <Posi-tion 3> and <Equation>. If such a function is described, an error will be generated during execution.

<Numeric Variable>=ZONE2(<Position 1>, <Position 2>, <Position 3>, <Equation>)

P2 P3

P1r

Page 325: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 325/457

5-306 Movement parameter 

5Functions set with parameters

5 Functions set with parameters

This controller has various parameters listed in Table 5-2. It is possible to change various functions anddefault settings by changing the parameter settings.

For the parameters regarding dedicated I/O signals, refer to Page 371, "6.3 Dedicated input/output". Afterchanging the parameters, make sure to turn the robot controller's power OFF and then turn ON.

Parameter settings will not be in effect until the power is turned on again. For detailed operating method forparameters, refer to Page 54, "(1) Setting the parameters".

When changing parameters, check thoroughly the function and setting values first.Otherwise, the robot may move unexpectedly, which could result in personal injury orproperty damage.

5.1 Movement parameter These parameters set the movement range, coordinate system and the items pertaining to the hand of therobot.

Table 5-1:List Movement parameter

No. Classification Content Reference1 Movement parameter These parameters set the movement range, coordinate system and the items

pertaining to the hand of the robot.Page 306

2 Signal parameter These parameters set the items pertaining to signals. Page 314

3 Operation parameter These parameters set the items pertaining to the operations of the controller, T/B and so forth.

Page 315

4 Command parameter These parameters set the items pertaining to the robot language. Page 318

5 Communication parameter These parameters set the items pertaining to communications. Page 322

Parameter Parameter

nameNo. of arrays

No. of characters Details explanation Factory setting

Joint movementrange

MEJAR Real value 16 Set the overrun limit value for the joint coordinate system.Sets the movement range for each axis. Expanding of the move-ment range is not recommended, since there is possibility that therobot may strike the mechanical stopper.Set the minus and plus directions. (-J1,+J1,-J2,+J2,......-J8,+J8)Unit:deg

Setting value foreach mechanism

XYZ movementrange

MEPAR Real value 6 Set the overrun limit value for the XYZ coordinate system.The movement range of the robot will be limited based on XYZcoordinate system. This can be used to prevent the robot fromstriking peripheral devices during manual operation when the robot

is installed within the device.Set the minus and plus directions. (-X,+X,-Y,+Y,-Z,+Z) Unit:mm

(-X,+X,-Y,+Y,-Z,+Z)=-10000,10000,

 

-10000,10000, 

-10000,10000

Standard tool coor-dinates

Refer to"5.6Standard ToolCoordinates".

MEXTL Real value 6 Initial values will be set for the hand tip (control point) and themechanical interface (hand mounting surface). The factory defaultsetting is set to the mechanical interface as the control point.Change this value if a hand is installed and the control point needsto be changed to the hand tip. (This will allow posture control at the hand tip for XYZ or tool jogoperation.)(X, Y, Z, A, B, C) Unit: mm, ABC deg.

(X,Y,Z,A,B,C) =0.0,0.0,0.0,0.0,0.0,0.0

Tool coordinate 1Refer to"M_TOOL"

MEXTL1 Real value 6 If the M_TOOL variable is substituted by 1, the tool data can beswitched using this parameter value.

(X,Y,Z,A,B,C) =0.0,0.0,0.0,0.0,0.0,0.0

Tool coordinate 2Refer to

"M_TOOL"

MEXTL2 Real value 6 If the M_TOOL variable is substituted by 2, the tool data can beswitched using this parameter value.

(X,Y,Z,A,B,C) =0.0,0.0,0.0,0.0,0.0,0

.0Tool coordinate 3Refer to"M_TOOL"

MEXTL3 Real value 6 If the M_TOOL variable is substituted by 3, the tool data can beswitched using this parameter value.

(X,Y,Z,A,B,C) =0.0,0.0,0.0,0.0,0.0,0.0

  CAUTION

Page 326: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 326/457

  5Functions set with parameters

  Movement parameter   5-307

Tool coordinate 4Refer to"M_TOOL"

MEXTL4 Real value 6 If the M_TOOL variable is substituted by 4, the tool data can beswitched using this parameter value.

(X,Y,Z,A,B,C) =0.0,0.0,0.0,0.0,0.0,0.0

Tool base coordi-

nates

Refer to"5.6Standard ToolCoordinates"

MEXBS Real value 6 Sets the positional relationship between the base coordinate sys-

tem and the robot coordinate system. The factory default setting isset so that the base coordinate system and the robot coordinatesystem are identical.This will be set when the coordinate system for the whole device ischanged. This parameter does not need to be changed very often.This is set when the coordinate system for the whole device is tobe identical.(X, Y, Z, A, B, C) Unit: mm, ABC deg.

(X,Y,Z,A,B,C) =

0.0,0.0,0.0,0.0,0.0,0.0

User area

Refer to"5.8About user-defined area"

Designate an area (rectangle defined with two XYZ coordinatepoints.

 A signal will be output if that area is outside the movement area(interference), or if the robot's current position is within that area.Up to eight limits can be set using the following four types ofparameters. For components that are not checked or do not exist,if the unit is in degrees, set AREA*P1 to -360 and AREA*P2 to

360. If the unit is in mm, set AREA*P1 to -10000 and AREA*P2 to10000 as the corresponding component.

 AREA*P1* is 1 to 8

Real value 8 Designate the first point of the area.(X, Y, Z, A, B, C) Unit: mm, ABC deg.

(X,Y,Z,A,B,C)=0.0,0.0,0.0,-360.0,-360.0,-360.0

 AREA*P2* is 1 to 8

Real value 8 Designate the secand point of the area.(X, Y, Z, A, B, C) Unit: mm, ABC deg.

(X,Y,Z,A,B,C)=0.0,0.0,0.0,+360.0,+360.0,+360.0

 AREA*ME* is 1 to 8

Integer 1 Designate the mechanism No. for which the user-defined area is tobe validated.The mechanism No. is 1 to 4, but normally 1 is set.

0

 AREA*AT* is 1 to 8

Integer 1 Specify the behavior of the robot when the robot enters the userdefinition area.(Invalid / In-zone signal output/Error output=0/1/2)

Invalid:This function will be invalid.In-zone signal output:The dedicated output signal USRAREA willturn ON.Error output:An error is generated. Posture data will be ignored.

0(Invalid)

USRAREA Defines the number of the signal that outputs the status.Refer to Page 371, "6.3 Dedicated input/output"

-1,-1

Free plane limit

Refer to"5.9Free planelimit"

*The function [-1:The operable area

is the side wherethe robot coordi-nate origin doesnot exist] can beused in the control-ler's software ver-sion J1 or later.

This is the overrun limit set on a free plane.Create a plane with three coordinate points, and set the area thatdoes not include the origin as the outside-movement area. Up toeight limits can be set using the following three types of parame-ters.

SFC*P* is 1 to 8

Real value 9 Designate three points for creating the plane.X1,Y1,Z1:Origin position in the planeX2,Y2,Z2:Position on the X-axis in the planeX3,Y3,Z3:Position in the positive Y direction of the X-Y plane in the

plane

(X1,Y1,Z1, X2,Y2,Z2,

 

X3,Y3,Z3)=0.0,0.0,0.0,0.0,0.0,0.0,0.0,0

.0,0.0SFC*ME* is 1 to 8

Integer 1 Designate the mechanism No. for which the free plane limit is to bevalidated.The mechanism No. is 1 to 3, but normally 1 is set.

0

SFC*AT* is 1 to 8

Integer 1 Designate the valid/Invalid of the set free plane limit. 0:Invalid 1: Valid (The operable area is the robot coordinate origin side.)-1: Valid (The operable area is the side where the robot coordinateorigin does not exist.)

0(Invalid)

Safe point position JSAFE Real value 8 Specifies the safe point position. Robot moves to the safe pointposition if the robot program executes MOV P_SAFE instruction orreceives input of the SAFEPOS signal, which is an external signal.(J1,J2,J3,J4,J5,J6,J7,J8) Unit:deg

Not allowed

User-designated

origin

USERORG Real value 8 Designate the user-designated origin position. This normally does

not need to be set.(J1,J2,J3,J4,J5,J6,J7,J8) Unit:deg

(J1,J2,J3,J4,J5,J6,

 J7,J8)=0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0

Parameter Parameter

nameNo. of arrays

No. of characters Details explanation Factory setting

Page 327: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 327/457

5-308 Movement parameter 

5Functions set with parameters

User-designatedorigin

USERORG Real value 8 Designate the user-designated origin position. This normally doesnot need to be set.(J1,J2,J3,J4,J5,J6,J7,J8) Unit:deg

(J1,J2,J3,J4,J5,J6, J7,J8)=0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0

Select the functionof singular pointadjacent alarmRefer to Page 344,"5.17 About the sin-gular point adjacentalarm"**This parametercan be used forcontroller softwareversion G8 or later.

MESNGLSW Integer 1 Designate the valid/invalid of the singular point adjacent alarm.(Invalid/Valid=0/1)When this parameter is set up "VALID", this warning sound isbuzzing even if parameter: BZR (buzzer ON/OFF) is set up "OFF".

1(Valid)

Jog set ting JOGJSP Real value 3 Designate the joint jog and step operation speed.(Inching H, inching L, maximum override.)Inching H: Feed amount when jog speed is set to High Unit: deg.Inching L: Feed amount when jog speed is set to Low Unit: deg.Maximum override: Operates at OP override x maximum override.

Setting value foreach mechanism

JOGPSP Real value 3 Designate the XYZ jog and step operation speed.

(Inching H, inching L, maximum override.)Inching H: Feed amount when jog speed is set to HighUnit: deg.Inching L: Feed amount when jog speed is set to LowUnit: deg.Maximum override: Operates at OP override x maximum override.Operation exceeding the maximum speed 250 mm/s cannot beperformed.

Setting value for

each mechanism

Jog speed limitvalue

JOGSPMX Real value 1 Limit the robot movement speed during the teach mode.Unit: mm/sEven if a value larger than 250 is set, the maximum value will belimited to 250.

250.0

 Automatic returnsetting after jog feedat pause

Refer to"5.10Automatic returnsetting after jog feedat pause"

*The "2: Return byXYZ interpolation"is available for con-troller software ver-sion H4 or later.

RETPATH Integer 1 While running a program, if the program is paused by a stop andthen the robot is moved by a jog feed for instance, at the time ofrestart, this setting makes the robot return to the position at whichthe program was halted before continuing. If this function is dis-abled, movement instructions will be carried out from the currentposition until the next point. The robot does not return to the posi-tion where the program was halted.

0: Invalid .  1: Return by JOINT interpolation.  2: Return by XYZ interpolation.Note) When returning by XYZ interpolation, carry out shorter cir-

cuit movement by 3 axis XYZ interpolation.Note) In the circle interpolation (MVC, MVR, MVR2, MVR3) com-

mand, this function is valid for H4 or later. Moreover, in thecircle interpolation command and the MVA command, evenif set up with 0, the operation is same as 1.

The RH-1000G and1500G series andRH-15UHC are 2..The type other thanthe above are 1.

Parameter Parameter

nameNo. of arrays

No. of characters Details explanation Factory setting

Page 328: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 328/457

  5Functions set with parameters

  Movement parameter   5-309

The gravity direc-tion

*This parametercan be used forcontroller softwareversion H4 or later.

Note) This functioncan be used in RV-1A/2AJ, RV-4A/5AJseries, and RV-20A.

MEGDIR Real value 4 This parameter specifies the direction and magnitude of gravita-tional acceleration that acts on the robot according to the installa-tion posture for the X, Y, and Z axes of the robot coordinatesystem, respectively (unit: mm/second2).

There are four elements: installation posture, gravitational acceler-ation in the X axis direction, gravitational acceleration in the Y axisdirection, and then gravitational acceleration in the Z axis direction,in this order from the left.

The example of the setting of gravity acceleration is shown below.Example: If the robot is tilted 30 degrees forward (see the figurebelow):The direction gravity acceleration of X axis (Xg) = 9.8 x sin(30degrees) = 4.9 .The direction gravity acceleration of the Z axis (Zg) = 9.8 x cos(30degrees) = 8.5 .Note that the value is set to -8.5 because the direction is oppositeto the Z axis of the robot coordinate system.The direction gravity acceleration of the Y axis (Yg) = 0.0Therefore, the set value is (3.0, 4.9, 0.0, and -8.5)

0.0, 0.0, 0.0, 0.0

Hand initial state

Refer to"5.13About defaulthand status"

HANDINIT Integer 8 Set the pneumatic hand I/F output for when the power is turnedON.

This parameter specifies the initial value when turning ON thepower to the dedicated hand signals (900’S) at the robot's tip.To set the init ial status at power ON when controlling the handusing general-purpose I/Os (other than 900’S) or CC-Link (6000’S)(specifying a signal other than one in 900’S by the HANDTYPEparameter), do not use this HANDINIT parameter, but use theORST* parameter.The value set by the ORST* parameter becomes the initial value ofsignals at power ON.

1,0,1,0,1,0,1,0

Hand type

Refer to"5.12About thehand type"

HAND-TYPE

Characterstring 8

Set the single/double solenoid hand type and output signal No.(D:double solenoid, S:single solenoid).Set the signal No. after the hand type.When D900 is set, the signal No. 900 and 901 will be output.In the case of D (double solenoid), please configure the setting sothat the signals do not overlap

D900,D902,D904,D906,,,,

Parameter Parameter

nameNo. of arrays

No. of characters Details explanation Factory setting

Installationposture

Setting value (Installation posture,gravitational acceleration in the X axis

direction, gravitational acceleration in theY axis direction, and then gravitational

acceleration in the Z axis direction)

On floor ( 0.0, 0.0, 0.0, 0.0 )

 Against wall ( 1.0, 0.0, 0.0, 0.0 )

Hanging ( 2.0, 0.0, 0.0, 0.0 )

Optionalposture*1

( 3.0, ***, ***, *** )

Page 329: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 329/457

5-310 Movement parameter 

5Functions set with parameters

Hand and work-piece conditions(Used in optimumacceleration/decel-

eration and impactdetection)

Refer to "5.16Handand Workpiece Con-ditions (optimumacceleration/deceler-ation settings)"

Set the hand conditions and work conditions for when OADL ON isset with the program.Up to eight conditions can be set. The condition combination isselected with the LOADSET command.

HNDDAT0 Real value 7 Set the initial condition of the hand. (Designate with the tool coordi-nate system.)Immediately after power ON, this setting value is used.To use the impact detection function during jog operation, set theactual hand condition before using. If it is not set, erroneous detec-tion may occur.

(Weight, size X, size Y, Size Z, center of gravity X, center of gravityY, center of gravity Z) Unit: Kg, mm

RV-3S/3SJ/3SB/3SJB3.50, 284.00, 284.00,286.00, 0.00, 0.00,75.00

RV-6S/6SL6.00, 213.00, 213.00,17.00, 0.00, 0.00,130.00

RV-12S/12SL12.00, 265.00, 265.00,22.00, 0.00, 0.00,66.00

RH-6SH6.00, 99.00, 99.00,76.00, 0.00, 0.00,38.00

RH-12SH12.00, 225.00, 225.00,30.00, 0.00, 0.00,15.00

RH-18SH18.00, 258.00, 258.00,34.00, 0.00, 0.00,17.00

Other type aresecret.

HNDDAT*

* is 1 to 8

Real value 7 Set the initial condition of the hand. (Designate with the tool coordi-

nate system.)(Weight, size X, size Y, Size Z, center of gravity X, center of gravityY, center of gravity Z) Unit: Kg, mm

Standard load

,0.0,0.0,0.0,0.0,0.0,0.0

WRKDAT0 Real value 7 Set the work conditions. (Designate with the tool coordinate sys-tem.)Immediately after power ON, this setting value is used.(Weight, size X, size Y, Size Z, center of gravity X, center of gravityY, center of gravity Z) Unit: Kg, mm

RV-S/RH-S series0.0,0.0,0.0,0.0,0.0,0.0,0.0Other type aresecret.

WRKDAT** is 1 to 8

Real value 7 Set the work conditions. (Designate with the tool coordinate sys-tem.)(Weight, size X, size Y, Size Z, center of gravity X, center of gravityY, center of gravity Z) Unit: Kg, mm

0.0,0.0,0.0,0.0,0.0,0.0,0.0

HNDHOLD** is 1 to 8

Integer 2 Set whether to grasp or not grasp the workpiece when HOPEN ( orHCLOSE ) is executed.

(Setting for OPEN, setting for CLOSE)(No grasp/grasp = 0/1)

0,1

Maximum acceler-ation/decelerationsetting

Refer to "5.16Handand Workpiece Con-ditions (optimumacceleration/deceler-ation settings)"

*This parametercan be used forcontroller software

version G1 or later.

 ACCMODE Integer 1 Sets the initial value and enables/disables the optimum accelera-tion/deceleration mode. (Invalid/Valid=0/1)

RH-A/RH-S/RV-Sseries and RV-100TH/150TH/100THL/150THL........1Except theabove..............0

Parameter Parameter

nameNo. of arrays

No. of characters Details explanation Factory setting

Page 330: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 330/457

  5Functions set with parameters

  Movement parameter   5-311

Optimumacceleration/decelerationadjustment rate

*This parametercan be used forcontroller softwareversion J2 or later.

JADL Real value 8 Set the initial value (value at power ON) of the acceleration/decelerationadjustment rate (%) during optimum acceleration/deceleration. It is therate applied to the acceleration/deceleration speed calculated by optimumacceleration/deceleration control. In the RV-S series, high-speed

operation can be performed by setting this value to a larger value.However, if the robot is operated continuously for a certain period of timeat high speed, overload and overheat errors may occur. Lower the settingvalue if such errors occur.In the RV-S series, the initial values have been set so as to preventoverload and overheat errors from occurring.They are applied to both the deceleration and acceleration speeds.

* What is an overload error? An overload error occurs when the load rate reaches a certainvalue in order to prevent the motor from being damaged by heatfrom high-speed rotation.* What is an overheat error?

 An overheat error occurs when the temperature reaches a certainvalue in order to prevent the position detector from being damaged

by heat from high-speed rotation.Note) This function is valid only in the RV-S series.

RV-3S/3SJ/3SB/3SJB series100,100,100,100,100,100,100,100

(%)

RV-6S/12S50,50,50,50,50,50,50,50(%)

RV-6SL/12SL35,35,35,35,35,35,35,35(%)

Speed optimiza-tion interpolationfunctional switch

*This parametercan be used forcontroller softwareversion H7 or later.

SPDOPT Integer 1 Set enable/disable of speed optimization interpolation function justafter the power supply turned on  1: Enable

(Enable the speed optimization interpolation function at thepower on)

0: Disable(Disable the speed optimization interpolation function at the

power on) -1: Disable the SPDOPT commandIf the value of this parameter is 1 or 0, it is possible to switchbetween enabling and disabling the speed adjustment interpola-tion function using the SPDOPT instruction in a program.If the value is -1, the speed adjustment interpolation function is

always disabled even if the SPDOPT instruction is used in a pro-gram.Note)This function is supported by limited models of RH-1000Gsystems, etc.

Only RH-1000Gseries is 1.Other type are -1.

Impact Detection

*This parametercan be used forcontroller softwareversion J2 or later.

COL Integer 3 Define whether the impact detection function can/cannot be used,and whether it is enabled/disabled immediately after power ON.Element 1: The impact detection function can (1)/cannot (0) beused.Element 2: It is enabled (1)/disabled (0) as the initial state duringoperation.Element 3: Enable (1)/disable (0)/NOERR mode (2) during jogoperationThe NOERR mode does not issue an error even if impact isdetected. It only turns off the servo. Use the NOERR mode if it isdifficult to operate because of frequently occurred errors when animpact is detected.Note) This function is valid only in the RV-S/RH-S series.

RV-S series is 0,0,1

RH-S series is 1,0,1

Detection level

*This parametercan be used forcontroller softwareversion J2 or later.

COLLVL Integer 8 Set the initial value of the detection level of each axis duringprogram operation.Setting range: 1 to 500, unit: % * If a value exceeding the settingrange is specified, the closest value allowed within the range isused instead.Note) This function is valid only in the RV-S/RH-S series.

200,200,200,200,200,200,200,200

Detection levelduring jogoperation

COLLVLJG Real value 8 Set the detection level during jog operation. Unit (%)To increase detection sensitiv ity, reduce the numeric value.If an impact error occurs even when no impact occurs during jogoperation, increase the numeric value.Note) This function is valid only in the RV-S/RH-S series.

The standard is200,200,200,200,200,200,200,200, butit varies withmodels.

Parameter Parameter

nameNo. of arrays

No. of characters Details explanation Factory setting

Page 331: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 331/457

5-312 Movement parameter 

5Functions set with parameters

Selection of wristrotation angle (axis

 A) coordinatesystem

RCD Integer 1 Switch the control and display method of the wrist rotation angle(axis A of the XYZ coordinates system) of a vertical 5-axis typerobot. This parameter is invalid for robots of other types.2: General angle methodControl axis A such that the hand's posture is maintained if thevalue of axis A is the same before and after an operation. Note thatthere are cases where the hand's posture cannot be maintaineddepending on the attitude of the wrist (axis B of the XYZcoordinates system). Under normal circumstances, use thismethod without changing the setting at shipment from the factory.0/1/3 = General angle method of the E series/joint angle method/old general angle methodThese options are prepared for the compatibility with programs(position data) created for older models (e.g., RV-E3J, RV-E5NJ).To use programs (position data) created for older models, changethe parameter value to the same value as the RCD value specifiedfor the given older model.

Note that these methods are not mutually compatible; the posturesof the hand in the middle of movement and at the registeredposition may be different for two different values of this parameter,

even if the robot is moving toward the same position data. Makesure to set the same method as when the position data wasregistered in order to execute the program.

2 (general anglemethod)

Warm-up operationmode setting

*This parametercan be used forcontroller softwareversion J8 or later.

WUPENA Integer 1 Designate the valid/invalid of the Warm-up operation mode.0:Invalid1: Valid

Note: If a value other than the above is set, everything will bedisabled.

Note: For multiple mechanisms, this mode is set for eachmechanism.

0(Invalid)

Warm-up operationmode target axis

*This parametercan be used forcontroller softwareversion J8 or later.

WUPAXIS Integer 1 Specify the joint axis that will be the target of control in the warm-up operation mode by selecting bit ON or OFF in hexadecimal(J1, J2, .... from the lower bits).

Bit ON: Target axisBit OFF: Other than target axis

 A joint axis that will generate an excessive difference error whenoperated at low temperature will be a target axis.Note: If the bit of a non-existent axis is set to ON, it will not be a

target axis.Note: If there is no target axis, the warm-up operation mode will be

disabled.Note: For multiple mechanisms, this mode is set for each

mechanism.

RV-6S/12S serires:00111000(J4, J5, J6 axis)

RV-3S/3SB

:00001110RV-3SJ/3SJB:00000110

The type other thanthe above are 0

Warm-up operationmode control time

*This parametercan be used for

controller softwareversion J8 or later.

WUPTIME Real value 2 Specify the time to be used in the processing of warm-up operationmode. (Valid time, resume time) Unit: min.

Valid time: Specify the time during which the robot is operated inthe warm-up operation status and at a reduced speed.(Setting range: 0 to 60)Resume time: Specify the time until the warm-up operation statusis set again after it has been canceled if a target axis continues to

stop. (Setting range: 1 to 1440)

Note: If a value outside the setting range is specified, it isprocessed as if the closest value in the setting range isspecified.

Note: If the valid time is 0 min, the warm-up operation mode will bedisabled.

Note: For multiple mechanisms, this mode is set for eachmechanism.

1, 60

Parameter Parameter

nameNo. of arrays

No. of characters Details explanation Factory setting

Page 332: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 332/457

  5Functions set with parameters

  Movement parameter   5-313

Warm-up operationoverride

*This parametercan be used forcontroller softwareversion J8 or later.

WUPOVRD Integer 2 Perform settings pertaining to the speed in the warm-up operationstatus.(Initial value, ratio of value constant time) Unit: %

Initial value: Specify the initial value of an override (warm-upoperation override) to be applied to the operation speed when inthe warm-up operation status. (Setting range: 50 to 100)Ratio of value constant time: Specify the duration of time duringwhich the override to be applied to the operation speed when inthe warm-up operation status does not change from the initialvalue, using the ratio to the valid time.(Setting range: 0 to 50)

The correspondence between the values of warm-up operationoverrides and the setting values of various elements is shown inthe figure below.

Note: If a value outside the setting range is specified, it isprocessed as if the closest value in the setting range isspecified.

Note: If the initial value of an override is 100%, the warm-upoperation mode will be disabled.

Note: For multiple mechanisms, this mode is set for eachmechanism.

70, 50

Functional settingof compliance error 

*This parametercan be used forcontroller softwareversion H6 or later.

CMPERR Integer 1 Setting this parameter prevents errors 2710 through 2740 (errorsthat occur if the position command generated in compliancecontrol is abnormal) from occurring.

1: Enable error generation0: Disable error generation

The contents of applicable errors are as follows:2710: The displacement from the original position command is

too large.2720: Exceeded the joint limit of the compliance command2730: Exceeded the speed of the compliance command2740: Coordinate conversion error of the compliance

command

If these errors occur, compliance control is not functioningnormally. It is thus necessary to re-examine the teaching positionand the program content to correct the causes of these errors.Change this parameter value to 0 (disable error generation) onlywhen you can determine that doing so does not cause anyoperational problem even if the current operation is not suspendedby an error.

1 (Enable errorgeneration)

Parameter Parameter

nameNo. of arrays

No. of characters Details explanation Factory setting

100%

Value constant time

Valid time of the warm-up operation status

Warm-upoperation override

Time duringwhich a target

axis is operating

Initial value(First element)

Value constant time = Valid time xRatio of value constant time(Second element)

Page 333: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 333/457

5-314 Signal parameter 

5Functions set with parameters

5.2 Signal parameter These parameters set the items pertaining to signals

Table 5-2:List Signal parameter  

Parameter Parameter

name

No. of arrays

No. of charactersDetails explanation Factory setting

Dedicated I/Osignal

For the parameters of the dedicated I/O signal, refer to Page 371,"6.3 Dedicated input/output". 

Stop input Bcontact desig-nation

INB Integer 1 Change the dedicated input (stop) between the A contact and Bcontact.(A contact/B contact = 0/1)

0(A contact)

Reads the pro-gram numberfrom the numeri-cal input whenthe start signalis input.

PST Integer 1 To select a program from the normal external input signal, set thenumerical input signal (IODATA) to the program number, establishthe number with the program select signal (PRGSEL), and startwith the START signal. If this function is enabled, the programselect signal becomes unnecessary, and when the START signalturns ON, the program number is read from the numerical input sig-nal (IODATA).(Function invalid/Valid=0/1)

0(Invalid)

CC-Link errorrelease permis-sion.

*This parame-ter can be usedfor controllersoftware versionH7 or later.

E7730 Integer 1 If the controller is used without connecting CC-Link even though it isequipped with the CC-Link option, error 7730 is generated and thecontroller becomes inoperable. This error cannot be canceledunder normal circumstances, but it becomes possible to temporarilycancel the error by using this parameter.(Enable temporary error cancellation/disable error cancellation = 1/0)

This parameter becomes valid immediately after the value ischanged by the T/B or Personal Computer support software. It isnot necessary to turn the power supply off and on again. Note, how-ever, that the value of this parameter returns to 0 again (it is nolonger possible to cancel the error) when the power supply is turnedoff and on because changes of the parameter value are not stored.

0 (disable errorcancellation)

Output signalreset pattern

Refer to"5.14About theoutput signalreset pattern"

Set the operation to be taken when the general-purpose output sig-nal for the CLR command or dedicated input (OUTRESET) is reset.Signals are output in the pattern set here even when the power isturned ON.Set with a 32-bit unit for each signal using the following parame-ters.(OFF/ON/hold=0/1/*)

ORST0 Characterstring 4

Set the signal No. 0 to 31. 00000000,00000000,00000000,00000000

ORST32  :ORST8016

Characterstring 4

Set the signal No. 32 to 63.  :Set the signal No. 8016 to 8047

00000000,00000000,00000000,00000000  :

Output reset atreset

SLRSTIO Integer 1 Designate the function to carry out general-purpose output signalreset when the program is reset.

(Invalid/Valid=0/1)

0(Invalid)

Page 334: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 334/457

  5Functions set with parameters

  Operation parameter   5-315

5.3 Operation parameter These parameters set the items pertaining to the operations of the controller, T/B and so forth.

Table 5-3:List Operation parameter

Parameter 

Parameter

name

No. of arrays

No. of characters Details explanation Factory settingBuzzer ON/OFF

BZR Integer 1 Specifies the on/off of the buzzer sound that can be heard when anerror occurs in the robot controller.(OFF/ON=0/ÇP)

1(ON)

Program resetoperation rights

PRSTENA Integer 1 Whether or not the operation right is required for program resetoperation (Required/Not required = 0/1)

If operation rights are abandoned, program can be reset from any-where. However, this is not possible under the teaching mode forsafety reasons.

0(Required)

Program resetwhen keyswitch is

switched

MDRST Integer 1 Program paused status is canceled when the key switch is oper-ated.(Invalid/Valid=0/1)

0(Invalid)

Operation paneldisplay mode .

This parameteris available forcontroller soft-ware version J1or later.

OPDISP Integer 1 Setting of the 5-digit LED display when the key switch is changedover 0: Override display takes effect when the key switch is changedover (initial value).1: The current display mode is maintained even after the key switchis changed over.

Program selec-tion rights set-ting

OPPSL Integer 1 Specifies the program selection operation rights when the keyswitch of the operation panel is in AUTO (OP) mode.(External/OP=0/1)

1(OP)

RMTPSL Integer 1 Designate the program selection operation rights for the automatic(Ext) mode.

(External/OP=0/1)

0(External)

TB overrideoperation rights

OVRDTB Integer 1 Specifies whether the operation rights are required when changingoverride from T/B.(Not required/Required = 0/1)

0(Not required)

Speed settingduring modechange

OVRDMD Integer 2 Override is set automatically when the mode is changed.First element..........override value when the mode is automatically

changed from teaching modeSecond element.....Override value when the mode is changed from

 Auto to Teaching.Current status is maintained if changed to 0.

0,0

Overridechange opera-tion rights

OVRDENA Integer 1 Specifies whether operation rights is required to change override.(Not required/Required = 0/1)If this is set to "Not required," override change can be set from any-where.

0(Required)

This parameterswitches theaccess target ofa program.Refer to Page345, "5.18

 About ROMoperation/high-speed RAMoperation func-tion".

*This parametercan be used forcontroller soft-

ware versionH7 or later.

ROMDRV Integer 1 The access target of a program can be switched between RAM andROM.

0: RAM mode. (Standard mode.)1: ROM mode. (Special mode.)2: High-speed RAM mode (DRAM memory is used; can be used insoftware version J1 or later)

0 (RAM mode.)

Page 335: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 335/457

5-316 Operation parameter 

5Functions set with parameters

Copy the infor-mation on theRAM to theROM

 

Refer to Page345, "5.18 About ROMoperation/high-speed RAMoperation func-tion".

*This parametercan be used forcontroller soft-ware versionH7 or later.

BACKUP Characterstring 1

Copy the program, the parameter, the common variable, and theerror log to the ROM from the RAM.

Do not change this parameter.

SRAM->FLROM(unchangeable)

Restore theinformation on

the ROM to theRAM.

Refer to Page345, "5.18

 About ROMoperation/high-speed RAMoperation func-tion".

*This parametercan be used forcontroller soft-ware versionH7 or later.

RESTORE Characterstring 1

Restore the program, the parameter, the common variable, and theerror log to the RAM from the ROM.

Do not change this parameter.

FLROM->SRAM(unchangeable)

Maintenanceforecast* The parame-ters pertainingto maintenanceforecast can beused in the con-troller's soft-ware version J1or later.

MFENA Integer 1 This sets whether maintenance forecast is enabled or disabled.1: Enable0: Disable

Note) This function is limited to the RV-S/RH-S series. This param-eter does not take effect on models that do not support the mainte-nance forecast function.

RV-S/RH-S series........1

Except theabove...........0

Maintenanceforecast execu-tion interval

MFINTVL Integer 2 This sets the interval of collecting data for maintenance forecast.1st element: Data collection level -- 1 (lowest) to 5 (highest)2nd element: Forecast check execution interval (unit: hours)

1(lowest),6(hour)

Maintenanceforecastannouncementmethod

MFEPRO Integer 2 This sets the maintenance forecast announcement method. Set 0in order to stop a warning or signal output.1st element: 1: Generates a warning, 0: Does not generate a warn-

ing2nd element: 1: Outputs a dedicated signal, 0: Does not output a

dedicated signal

0 (Does not gener-ate a warning) ,0 (Does not outputa signal)

Parameter Parameter

nameNo. of arrays

No. of charactersDetails explanation Factory setting

Page 336: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 336/457

  5Functions set with parameters

  Operation parameter   5-317

ResettingMaintenanceForecast

Note)When readingthis parameterform theteachingpendant, enterall parameternames andthen read.

MFGRST Integer 1 Reset the accumulated data relating to grease in the maintenanceforecast function.* When axes generated a warning (numbered in 7530's) thatprompts the replenishment of grease in the maintenance forecast

function and, as a result, grease was replenished, the data relatingto grease accumulated on the controller must be reset.Generally, a reset operation is performed on the MaintenanceForecast screen in Personal Computer Support software (versionE1 or later). However, if a personal computer cannot be readied,the accumulated data can be reset by entering this parameter fromthe teaching pendant instead.

0: Reset all axes.1 to 8: Reset thespecification axis.

MFBRST Integer 1 Reset the accumulated data relating to grease in the maintenanceforecast function.* When axes generated a warning (numbered in 7530's) thatprompts the replacement of belt in the maintenance forecastfunction and, as a result, the belt was replaced, the data relating tothe belt accumulated on the controller must be reset.Generally, a reset operation is performed on the Maintenance

Forecast screen in Personal Computer Support software (versionE1 or later). However, if a personal computer cannot be readied,the accumulated data can be reset by entering this parameter fromthe teaching pendant instead.

0: Reset all axes.1 to 8: Reset thespecification axis.

PositionRestorationSupport

*This parametercan be used forcontroller soft-ware version J2or later.

DJNT Real value 8 The OP correction data obtained by the Position RestorationSupport tool is input. Do not change it with any tool other than thePosition Restoration Support tool. It can only be referenced on adedicated parameter screen in the Personal Computer Supportsoftware.

It varies with models.

MEXDTL Real value 6 The standard tool correction data obtained by the PositionRestoration Support tool is input. Do not change it with any toolother than the Position Restoration Support tool.

(X,Y,Z,A,B,C) =0.0, 0.0, 0.0,0.0, 0.0, 0.0

MEXDTL1 Real value 6 The correction data for tool number 1 obtained by the Position

Restoration Support tool is input. Do not change it with any toolother than the Position Restoration Support tool.

(X,Y,Z,A,B,C) =0.0, 0.0, 0.0,0.0, 0.0, 0.0

MEXDTL2 Real value 6 The correction data for tool number 2 obtained by the PositionRestoration Support tool is input. Do not change it with any toolother than the Position Restoration Support tool.

(X,Y,Z,A,B,C) =0.0, 0.0, 0.0,0.0, 0.0, 0.0

MEXDTL3 Real value 6 The correction data for tool number 3 obtained by the PositionRestoration Support tool is input. Do not change it with any toolother than the Position Restoration Support tool.

(X,Y,Z,A,B,C) =0.0, 0.0, 0.0,0.0, 0.0, 0.0

MEXDTL4 Real value 6 The correction data for tool number obtained by the PositionRestoration Support tool is input. Do not change it with any toolother than the Position Restoration Support tool.

(X,Y,Z,A,B,C) =0.0, 0.0, 0.0,0.0, 0.0, 0.0

MEXDBS Real value 6 The correction data for the base obtained by the PositionRestoration Support tool is input. Do not change it with any tool

other than the Position Restoration Support tool.

(X,Y,Z,A,B,C) =0.0, 0.0, 0.0,

0.0, 0.0, 0.0

Parameter Parameter

nameNo. of arrays

No. of charactersDetails explanation Factory setting

Page 337: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 337/457

5-318 Command parameter 

5Functions set with parameters

5.4 Command parameter This parameter sets the items pertaining to the program execution and robot language.

Table 5-4: List Program Execution Related Parameter

Parameter Parameter

name

No. of arraysNo. of characters

Details explanation Factory setting

No. of multi-tasks

TASKMAX Integer 1 Designate the number of programs to be executed simultaneously. 8

Slot table(Set during mul-titask opera-tion.)

Operation conditions for each task slot is set during multitask opera-tions. These are set when the program is reset.

SLT** is 1 to 32

Characterstring 4

Designate the [program name],[operation mode],[starting condi-tions],[order of priority].

Program name: Selected program name. Use uppercase letters whenusing alphabet. Lowercase characters are not recognized.

Operation mode: Continuous/1 cycle = REP/CYCREP:The program will be executed repeatedly.CYC:The program ends after one cycle is completed. (The program

does not end if it runs in an endless loop created by a GOTO

instruction.)

Starting conditions: Normal/Error/Always =START/ERROR/ALWAYSSTART:This is executed by the START button on the operation panel or

by the start signal. ALWAYS:This is executed immediately after the controller's power is

turned on. This program does not affect the status such asstartup. To edit a program whose attribute is set to ALWAYS,first cancel the ALWAYS attribute.

 A program with the ALWAYS attribute is being executed con-tinuously and therefore cannot be edited. Change ALWAYS toSTART and turn on the controller's power again to stop theconstant execution.

ERROR:This is executed when an error is generated. This programdoes not affect the status such as startup.

Programs with ALWAYS or ERROR set as the starting condition cannotexecute the following movement instructions. An error will be gener-ated if any of them is executed.MOV,MVS,MVR,MVR2,MVR3,MVC,MVA,DRIVE,GETM,RELM,JRC

Order of priority: 1 to 31 (31 is the maximum)This value shows the number of lines to be executed at a time. This hasthe same meaning as the number of lines in the PRIORITY instruction.For instance, when two slots are used during execution, if SLT1 is setto 1 and SLT2 is set to 2, after one line of program in SLT1 is executed,two lines of program in SLT2 is executed.Therefore, more SLT2 programs will be executed and as a result, prior-ity of SLT2 is higher.

"",REP,START,1

Page 338: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 338/457

  5Functions set with parameters

  Command parameter   5-319

Program selec-tion save

SLOTON Integer 1 This parameter specifies whether or not to store the program name inthe SLT1 parameter at program selection, as well as whether or not tomaintain the program selection status at the end of cycle operation.

(1) Enabling program name storage at program selection (Bit 0, enable/disable storage = 1/0)

Enable storage: The name of the current program is stored in the SLT1parameter at program selection for slot 1. Moreover,the program specified in the SLT1 parameter isselected when the power supply is turned on.

Disable storage: The name of the current program is not stored in SLT1parameter at program selection for slot 1. In the sameway as when the storage is enabled, the program spec-ified in the SLT1 parameter is selected when the powersupply is turned on.

(2) Maintaining program at the end of cycle operation 

(Bit 1, maintain/do not maintain = 1/0)Maintain: The status of program selection is maintained at the end

of cycle operation. The parameter value does notbecome P.0000.Do not maintain: The status of program selection is not maintained at

the end of cycle operation. The parameter valuebecomes P.0000.

Setting values and operations

0: Disable storage, do not maintain1: Enable storage, do not maintain (initial value)2: Disable storage, maintain3: Enable storage, maintain

1(Valid)

Setting that allowsthe execution ofX** instructionsand SERVOinstruction in an

 ALWAYS pro-gram.Refer to"5.11Automatic exe-cution of program atpower up"

 ALWENA Integer 1 XRUN, XLOAD, XSTP, XRST, SERVO and RESET ERR instructionsbecome available in a program whose SLT* parameter is set to "con-stantly execute" (startup condition is set to ALWAYS).

Furthermore, the XRUN instruction can directly be executed from the T/B's edit screen or support software in the controller's software versionJ1 or later.

Enable/Disable = 1/0

0(Not allowed)

User base pro-gram

Refer to"4.3.24User-defined externalvariables"

PRGUSR Characterstring 1

User base program is a program that is set when user-defined externalvariables are to be used. In case of DEF number, variable declarationinstructions such as INTE and DIM are described.If an array variable is declared in the user base program using the DIMinstruction, the same variable name must be redefined using the DIMinstruction in the program that uses the user base program. Variablesneed not be redefined if the variable is not an array.

""(Non)

Parameter Parameter

nameNo. of arrays

No. of charactersDetails explanation Factory setting

Page 339: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 339/457

5-320 Command parameter 

5Functions set with parameters

Continue func-tion

CTN Integer 1 For only the program execution slot 1, the state when the power isturned OFF is held, and the operation can be continued from the savedstate when the power is turned ON next. The saved data is the programexecution environment (override, execution step line, program vari-

ables, etc.), and the output signal state. When this function is valid, ifthe robot is operated when the power is turned OFF, the robot will startin the standby state when the power is turned ON next. To continueoperation, turn the servo power ON, and input start. (Function invalid/Valid=0/1)

<Precautions>(1) This function stores the status of execution memory at the time ofpower off using a part of program memory area. Therefore, this functioncannot be used unless there is free space of at least 100K bytes in theprogram memory area.Please follow the precautions listed below when using this function.The program may become destroyed if the precautions are not fol-lowed.1) Back up all programs in a PC and delete all programs in the control-

ler.2) Set the "CTN" parameter to 1 and turn the power ON again.3) Reload only the necessary programs onto the controller. If there isnot sufficient empty space at this point, this function cannot be used. Ifthere is not enough space, revert the parameters.(2) Do not change the parameters while the program is still left on,because the program will be destroyed.

 Although there are 210K bytes of standard memory, available spacewill be 110K bytes when this function is enabled.Reduction of 1100 points in position count conversionReduction of 2200 steps in step count conversionWith the standard specifications, the memory will drop by 56%. Numberof points = 2500 -> 1400 points/Prg. Number of steps = 5000 -> 28000steps/Prg.(3)As for robots with axes without brakes (J4 and J6 axes of RV-1A/

2AJ, or J4 axis of RH-5AH), the arm may lower due to gravitationalweight or rotate itself when the power is turned off. Thus, extra care isnecessary when using this function.(4)Program that can continue using the Continuity function is the oneloaded in task slot 1. Programs in task slot 2 or subsequent slots willnot continue but will restart in program reset state.(5)The following parameters cannot be changed after this function isenabled. Be sure to change them, if necessary, prior to enabling thisfunction.SLTn, SLOTON, TASKMAX.(6)If parameters in the slot table (SLT*) are changed after enabling thisfunction, the changes are not reflected in the slot table. Disable thecontinue function once, turn the power supply off and then on, and thenchange parameters in the slot table.

0(Invalid)

JRC command(Multiple rota-tion function ofaxes)

*This parametercan be used forcontroller soft-ware versionE4 or later.

Set the execution status of the JRC instruction.

JRCEXE Integer 1 Set the validity of the JRC command execution.Execution valid/invalid = (1/0)

0(Executioninvalid)

JRCQTT Real value 8 JSet the change amount to increment or decrement with the JRC com-mand in the order of J1, J2, J3 to J8 axes from the head element.The setting is valid only for the user-defined axis, so the J7 and J8 axeswill be valid for the robot's additional axis, and a random axis for themechanism's additional axis.The unit relies on the parameter AXUNT.

JRC executionvalid robot0,0,0,0,0,360,0,0 or0,0,0,360,0,0,0,0

JRC executioninvalid robot0,0,0,0,0,0,0,0

JRCORG Real value 8 Set the origin coordinate value for executing the JRC O command andsetting the origin.

This setting is valid only for the user-defined axis.The unit relies on the parameter AXUNT.

0,0,0,0,0,0,0,0

Setting of addi-tional axis

 AXUNT Integer 16 Set the unit system for the additional axis. Angle(degree)/Length(mm) = 0/1

0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

Parameter Parameter

nameNo. of arrays

No. of charactersDetails explanation Factory setting

Page 340: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 340/457

  5Functions set with parameters

  Command parameter   5-321

User error set-ting

UER1 to UER20

Integer 1,Characterstring 3

Sets the message, cause, and method of recovery for errors from theERROR instruction. Maximum of 20 user errors can be set.First element ... error number to set (9000 to 9299 is the availablerange). The default value 9900 is not available. Change the value

before proceeding.Second element ... Error messageThird element ... CauseFourth element ... Method of recoveryIf a space character is included in the message, enclose the entiremessage in double quotation marks ("").Example)9000,"Time Out","No Signal","Check Button"

9900,"mes-sage","cause","treat"

Unit setting forthe rotationalelement of posi-tion data

PRGMDEG Integer 1 Specifies the unit used for describing the rotational element of positiondata in the robot program.0:RAD1:DEGExample)M1=P1.A (Unit for this case is specified.)(Default unit for referencing data components is radian.)The default rotational element for the position constant (P1=(100, 0,300, 0, 180, 0, 180) (7, 0)) is DEG. This parameter is irrelevant.

0(RAD)

Set the delaytime of the GC/GO commandand the movingcommand.

*This parameteris valid forusing theMOVEMAS-TER commandonly.

*This parametercan be used for

controller soft-ware versionH7 or later.

HANDDLY Integer 1 The delay time of hand open/close in MOVEMASTER command is thetime specified by GP command. (Default value is 0.3 sec.)The delay time of hand open/close can be specified by this parameter.

The units of the delay time specified by GP command are 1 / 10 sec-

onds.The units of the delay time specified with this parameter are 1 / 1000seconds (=msec).

-1

Robot languagesetting

RLING Integer 1 Select the robot language1:MELFA-BASIC IV0:MOVEMASTER COMMANDNote) This function is only available for certain types of robots, such asRV-1A. Please verify that the type of robot that you are using is listed inthe "Command List" of "Separate Volume: Standard Specification"before using this instruction.

1

Display lan-

guage Note1)

LNG Characterstring 1

Set up the display language."JPN":Japanese"ENG":English

The following language is changed.

(1)The display LCD of teaching pendant.(2) Personal computer support software.*alarm message of the robot.*Parameter explanation list.(3)Alarm message that read from the robot with external communica-tion. (Standard RS232C, Extended serial I/F, Ethernet I/F)

The "JPN" isJapanese spec-ification.The "ENG" isEnglish specifi-

cation.

Extension ofexternal vari-able

PRGGBL - Sets "1" to this parameter, and turns on the controller power again, thenthe capacity of each program external variable will double.However, if a variable with the same name is being used as a user-defined external variable, an error will occur when the power is turnedON, and it is not possible to expand. It is necessary to correct the userdefinition external variable.

0

Note1) The parameter is set up based on the order specifications before shipment.Order to dealer when the instruction manual of the other language is necessity. More, the caution seals that stuck on the robot arm and the controller are made based on thelanguage of the order specification. Use it carefully when selecting the other language.

Parameter Parameter

nameNo. of arrays

No. of charactersDetails explanation Factory setting

Parameter value Motorized hand Pneumatic hand

-1 When the status ofthe hand changes,the delay timerspecified by GPcommand is taken.

The delay time specifiedby the GP instruction isstored in this parameterwhen opening/closing thehand, regardless ofwhether or not the handstatus has changed.

0 No delay No delayValue

Unit(msec)When the status of the hand changes, the delaytimer specified with this parameter is taken.

Page 341: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 341/457

5-322 Communication parameter 

5Functions set with parameters

5.5 Communication parameter These parameters set the items pertaining to communications

Table 5-5:List Communication parameter 

Parameter Parameter

name

No. of arrays

No. of charactersDetails explanation Factory setting

Communicationsetting

Refer to"5.15About thecommunicationsetting"

Communication environment is set for RS-232C in the front of the robotcontroller. However, since this is used by the PC support software, thisnormally does not need to be changed.When connecting vision sensors, etc., use of optional expansion serialinterface is recommended.

COMDEV Characterstring 8

This configures which lines will be assigned to COM1 and COM2 whenusing communication lines in the OPEN instruction in MELFA BASIC IV.This parameter must be set if data link (used by the OPEN instruction)is to be performed.This parameter specifies the device that corresponds to COMn speci-fied in the OPEN statement in the program (n is between 1 and 8).Parameters are starting from the left COM1, COM2, ... , COM8 in thatorder.

To use expansion serial interface as COM,if CH1 is installed in option slot 1, "OPT11" should be entered as thevalue for the parameter.If CH2 (RS232) is installed in slot 1, "OPT12" should be entered as thevalue for the parameter.If CH2 (RS422) is installed in slot 1, "OPT13" should be entered as thevalue for the parameter.If CH1 is installed in slot 2, "OPT21" should be entered as the value forthe parameter.If CH2 (RS232) is installed in slot 2, "OPT22" should be entered as thevalue for the parameter.If CH2 (RS422) is installed in slot 2, "OPT23" should be entered as thevalue for the parameter.

For instance, if CH1 is used in slot 1 and is to be assigned to COM2,

use '"RS232", "OPT11", , , , , '.If CH2 is used in slot 2 and is to be assigned to COM3, use '"RS232", ,"OPT22", , , , ,'.If Ethernet interface is to be used as COM and is installed in option slot1 withNETPORT1, enter "OPT11" for the parameter value.NETPORT2, enter "OPT12" for the parameter value.NETPORT3, enter "OPT13" for the parameter value.NETPORT4, enter "OPT14" for the parameter value.NETPORT5, enter "OPT15" for the parameter value.NETPORT6, enter "OPT16" for the parameter value.NETPORT7, enter "OPT17" for the parameter value.NETPORT8, enter "OPT18" for the parameter value.NETPORT9, enter "OPT19" for the parameter value.

COM1 is already assigned the standard RS232C in the front of the con-

troller. The following restrictions apply when optional cards are installed.Option slot 1: Additional axis, expansion serial interface, EthernetOption slot 2: Additional axis, expansion serial interface, CC-LinkOption slot 3: Additional axis

 Additional axis cards are for CR1-only cases.For optional expansion serial interface, refer to "Expansion Serial Inter-face Instruction Manual".For optional expansion serial interface, refer to "Ethernet InterfaceInstruction Manual ".

"RS232", , , , , , ,

CBAU232 Integer 1 Baud rate(9600,19200)For optional expansion serial interface, refer to "Expansion Serial Inter-face Instruction Manual".

9600

CPRTY232 Integer 1 Parity bit(0: None, 1: Odd, 2: Even )For optional expansion serial interface, refer to "Expansion Serial Inter-face Instruction Manual".

2 ( Even)

CSTOP232 Integer 1 Stop bit(1,2)For optional expansion serial interface, refer to "Expansion Serial Inter-face Instruction Manual".

2 (Stop bit)

Page 342: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 342/457

  5Functions set with parameters

  Communication parameter   5-323

CTERM232 Integer 1 End code(0:CR 1:CR+LF)For optional expansion serial interface, refer to "Expansion Serial Inter-face Instruction Manual".

0 (CR)

CPRC232 Integer 1 Communication method(protocol)

0: For support software (Non-procedure)If data link is to be performed (OPEN, PRINT and INPUT instructionsare executed from the program) under this setting, the external devicemust attach three characters "PRN" at the beginning when transmittingdata.1: For support software (With procedure) PC side must also bechanged.2: For data link with the robot program (used when communicating withvision sensors, etc.)Be advised that under this setting, connection with the support softwarecannot be made. Use the optional expansion serial interface.For optional expansion serial interface, refer to "Expansion Serial Inter-face Instruction Manual".

0

Parameter Parameter

nameNo. of arrays

No. of charactersDetails explanation Factory setting

Page 343: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 343/457

5-324 Standard Tool Coordinates

5Functions set with parameters

5.6 Standard Tool CoordinatesTools data must be set if the robot's control point is to be set at the hand tip when the hand is installed on therobot. The setting can be done in the following three manners.

1) Set in the MEXTL parameter.2) Set in the robot program using the TOOL instruction.

3) Set a tool number in the M_TOOL variable. (Allowed in the controller's software version J1 or later.)The values set by the MEXTL1 to 4 parameters are used as tool data. Refer to Page 261, " M_TOOL".

The default value at the factory default setting is set to zero, where the control point is set to the mechanicalinterface (flange plane).

Structure of tools data : X, Y, Z, A, B, CX, Y and Z axis:Shift from the mechanical interface in the tool coordinate system A axis :X-axis rotation in the tool coordinate systemB axis :Y-axis rotation in the tool coordinate systemC axis :Z-axis rotation in the tool coordinate system

<A case for a vertical 6-axisrobot>1) Sample parameter settingParameter name: MEXTLValue: 0, 0, 95, 0, 0, 02) Sample TOOL instruction set-ting10 TOOL (0,0,95,0,0,0)

 A 6-axis robot can take variouspostures within the movementrange.

<A case for a vertical 5-axisrobot>1) Sample parameter setting

Parameter name: MEXTLValue: 0, 0, 95, 0, 0, 02) Sample TOOL instruction set-ting10 TOOL (0,0,95,0,0,0)

Only the Z-axis component isvalid for a 5-axis robot for move-ment range reasons. Data input toother axes will be ignored.

Zt

Yt

Xt

Mechanical interface

Default tool coordinate system:Xt,Yt,ZtZr

YrXr

Robot coordinate system:Xr,Yr,Zr

Tool coordinatesystem after the change:Xt,Yt,Zt

 

Example) 95mm 

Zt

Yt

Xt

A case for a vertical 6-axis robot 

Zt

Default tool coordinate system:Zt

Zr

YrXr

Zt

A case for a vertical 5-axis robot

Mechanical interface

Tool coordinatesystem after the change:Zt

Robot coordinate system:Xr,Yr,Zr

Example) 95mm

Page 344: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 344/457

  5Functions set with parameters

  Standard Tool Coordinates  5-325

<A case for a horizontal 4-axis robot>1) Sample parameter settingParameter name: MEXTLValue: 0, 0, -10, 0, 0, 02) Sample TOOL instruction setting

10 TOOL (0,0,-10,0,0,0)

Horizontal 4-axis robots can basicallyoffset using parallel shifting. Note thatthe orientation of the tool coordinatesystem is set up differently from thatof vertical robots.

<A case for a RP series robot>1) Sample parameter settingParameter name: MEXTLValue: 0, 0, -10, 0, 0, 02) Sample TOOL instruction set-ting10 TOOL (0,0,-10,0,0,0)

RP-series robots use the samecoordinate system as the hori-zontal 4-axis robots. Note that

the orientation of the tool coordi-nate system is set up differentlyfrom that of vertical robots.

<A case for a palletizing robot>1) Sample parameter settingParameter name: MEXTL Value: 0, 0, +10, 0, 0, 02) Sample TOOL instruction set-ting10 TOOL (0,0,+10,0,0,0)

<Other robots>The following models basically use the same coordinate system as the horizontal 4-axis robots.

Liquid crystal glass transportation robot: RH-1000G***, RH-1500G***, RC-1000GW***,Palletizing robot : RV-100TH*, RV-150TH

 

Zt

YtXt

Xr

Yr

Zr

A case for a horizontal 4-axis robot

Mechanical interface

Default tool coordinate system:Xt,Yt,Zt

Robot coordinate system:Xr,Yr,Zr

 

A case for a RP series robot 

Mechanical interface

Default tool coordinate system:Xt,Yt,ZtRobot coordinate system:Xr,Yr,Zr

Yr

Xr

Zr

YrXrXt

Yt

Zt

Zr

Xr

Yr

XtYt

A case for a palletizing robot

Mechanical interface

Default tool coordinate system: Xt, Yt, Zt

Robot coordinate system: Xr, Yr, Zr

Zt

Page 345: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 345/457

5-326 Standard Tool Coordinates

5Functions set with parameters

 An axis element of the tool conversion data may or may not be valid depending on the robot model.See Table 5-6 to set the appropriate data.

Table 5-6:Valid axis elements of the tool conversion data depending on the robot model

Type Number ofaxis

 An axis element of the tool conversion dataNote1)

Note1) O: Valid, @: Invalid. This is meaningless and ignored if set., X: The setting value is fixed to 0.If a value other than 0 is set, operation may be adversely affected.

X Y Z A B C

RP-1AH/3AH/5AH 4 O O O X X O

RV-1A, RV-2A, RV-4A,RV-3AL , RV-3S, RV-3SB,RV-6S, RV-12S/SL, RV-18S

6 O O O O O O

RV-2AJ, RV-3AJ, RV-5AJ,RV-4AJL, RV-3SJ, RV-3SJB

5 @ @ O @ @ @

RH-5AH/10AH/15AH 

RH-6SH/12SH/18SH 4O O O @ @ O

RH-15UHC O O O X X O

RH-1000GH Series 4 O O O X X O

RH-1000GJ Series 5 O O O X X ORH-1500GJ Series O O O X X O

RH-1500G Series 6 O O O O O O

RC-1000G Series 4 O O O X X ONote2)

Note2) All elements were added (This is not relative calculation)

RV-60TH 

RV-100TH/150TH 

RV-100THL/150THL4 O O O X X O

RS-30FG, RS-30AG 4 O O O O X XNote2)

RV-15AJ/15AP 5/10 O @ O @ @ @

Page 346: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 346/457

  5Functions set with parameters

   About Standard Base Coordinates  5-327

5.7 About Standard Base CoordinatesWhen shifting the robot origin to a position other than the center position of the J1 axis of the robot, the con-version is performed using the base coordinate system. The setting will be done from the following twopoints. When base data is changed, the coordinates of teaching positions will be values based on the basecoordinate system.

1) Set in the MEXTL parameter.2) Set in the robot program using the BASE instruction.The factory default setting value is set to zero at the base coordinate system position, which is identical tothe robot origin.Structure of base coordinate system data: X, Y, Z, A, B, and CX, Y and Z axis : The position of robot coordinate system from the base coordinate system origin A axis : X-axis rotation in the base coordinate systemB axis : Y-axis rotation in the base coordinate systemC axis : Z-axis rotation in the base coordinate system

(Example)1) Sample parameter settingParameter name: MEXBS

ValueÅF100,150,0,0,0,-302) Sample BASE instruction setting10 BASE (100,150,0,0,0,-30)

Normally, the base coordinate systemneed not be changed. If you wish tochange it, see the sample above whenconfiguring the system. Note that theBASE instruction within the robot pro-gram may shift the robot to an unex-pected position. Exercise caution whenexecuting the instruction.

 An axis element of the base conversion data may or may not be valid depending on the robot model.See Table 5-7 to set the appropriate data.

Table 5-7:Valid axis elements of the base conversion data depending on the robot model

TypeNumber of

axis

 An axis element of the base conversion data Note1)

Note1) O: Valid, @: Invalid. This is meaningless and ignored if set., X: The setting value is fixed to 0.

X Y Z A B C

RP-1AH/3AH/5AH 4 O O O X X O

RV-1A, RV-2A, RV-4A,RV-3AL , RV-3S, RV-3SB,RV-6S, RV-12S/SL, RV-18S

6 O O O O O O

RV-2AJ, RV-3AJ, RV-5AJ,

RV-4AJL, RV-3SJ, RV-3SJB

5 O O O @ @ @

RH-5AH/10AH/15AH 

RH-6SH/12SH/18SH 4O O O @ @ O

RH-15UHC O O O X X O

RH-1000GH Series 4 O O O X X O

RH-1000GJ Series5

O O O X X O

RH-1500GJ Series O O O X X O

RH-1500G Series 6 O O O O O O

RC-1000G Series 4 O O O X X ONote2)

Note2) All elements were added (This is not relative calculation)

RV-60TH 

RV-100TH/150TH 

RV-100THL/150THL4 O O O X X O

RS-30AG, RS-30AG 4 O O O O X XNote2)

RV-15AJ/15AP 5/10 @ @ @ @ @ ONote3)

Note3) The setting is made in units of 45 degrees

 

Zr

Yr

Xr

Zb

Yb

XbCr

150mm

100mm

-30°

Base coordinate system:Xb,Yb,Zb

Robot coordinate system:Xr,Yr,Zr

Page 347: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 347/457

5-328  About user-defined area

5Functions set with parameters

5.8 About user-defined areaWhen operation is performed together withperipheral devices, work area may have tobe shared. Under such circumstances, onedevice must let the other know when it is

within the shared area. For this purpose, arobot can be configured to output a signalwhile it is in a certain area by settingparameters.For instance, in the diagram to the left, thefollowing parameter setting will output thesignal 10 when operating in area (1) andoutput the signal 11 when operating in area(2).

Similar confirmation is possible using theM_UAR variable if checking within the pro-gram. Refer to Page 262, "M_UAR".

*1 Enter the coordinates (x, y, and z) for x11 to z22.*2 In the setting sample above, since the posture data (A, B, and C) are ignored, a signal will be output

regardless of the posture. To set the posture data (A, B, and C), set the values in the AREA*P1 to AREA*P2 direction. (Example: In the case of -10 -> +30, evaluation as in-area occurs in the range from-10 to + 30, but in the case of +30 -> -10 evaluation as in-area occurs in the range from +30 to -10.)

*3 For a non-existent axis of the posture data (for instance the A- and B-axes of horizontal multi-joint typerobots), make sure that AREA*P1 is set to -360 and AREA*P2 is set to +360.

*4 AREA*ME specifies to which mechanism will the area checking configuration apply. Under the standard

configuration (one unit is connected), this is set to 1.*5 AREA*AT specifies the type of area checking. The meaning of the value is shown below.0 = Does not check, 1 = Outputs a signal, 2 = Generates an error.If 2, posture data, L1 and L2 are ignored.

*6 If additional axes are used, set an area for axes L1 and L2 respectively.

Parameter name Meaning of the value Value AREA1P1 Position data for the first point: X,Y,Z,A,B,C,L1,L2 x11, y11, z11, -360, -360, -360,0,0

 AREA1P2 Position data for the second point: X,Y,Z,A,B,C,L1,L2 x12, y12, z12, 360, 360, 360,0,0

 AREA1ME Target mechanism number: Usually 1 1

 AREA1AT Invalid/Output signal/Error: 0/1/2 1

 AREA2P1 Position data for the first point: X,Y,Z,A,B,C,L1,L2 x21, y21, z21, -360, -360, -360,0,0

 AREA2P2 Position data for the second point: X,Y,Z,A,B,C,L1,L2 x22, y22, z22, 360, 360, 360,0,0

 AREA2ME Target mechanism number: Usually 1 1

 AREA2AT Invalid/Output signal/Error: 0/1/2 1

USRAREA Output signal: starting number, end number 10, 11(Information regarding whether or not the robot is in

 AREA1 is output to the signal 10, and whether or notthe robot is in AREA2 is output to the signal 11.)Set 10,10 in the case of one area.

X

Y

Z

AREA1P1(x11,y11,z11) 

AREA1P2(x12,y12,z12) 

AREA2P1(x21,y21,z21) 

AREA2P2(x22,y22,z22) 

(1)(2)

+ -

±0°

<AREA*P1><AREA*P2>

±180°

Example) If the value passes through 0 from -100 to +100,  the following setting is necessity.  Sets the negative value to ABC of <AREA*P1>.  Sets the positive value to ABC of <AREA*P2>.Example) If the value passes through 180 from -100 to +100,

the following setting is necessity.  Sets the positive value to ABC of <AREA*P1>.  Sets the negative value to ABC of <AREA*P2>.

Page 348: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 348/457

  5Functions set with parameters

  Free plane limit   5-329

5.9 Free plane limitDefines any plane in the robot coordinate system, determines the front or back of the plane, and generatesa free plane limit error.

 As can be seen in the diagram to the left, anyplane can be defined by three points (P1, P2, and

P3), after which an evaluation of which side of theplane it is in (the side that includes the robot originor the other side) can be performed.This function can be used to prevent collision withthe floor or interference with peripheral devices.Maximum of eight planes can be monitored.There is no limit to the plane.

 After setting the parameters above, turn the controller's power ON again. This will allow the generation offree plane limit error when it crosses the plane.

Parameter and value Explanation

SFCnP(n=1 to 8) Specif ies the 3 points that def ine the plane.P1 coordinates X1, Y1, and Z1: The origin of the planeP2 coordinates X2,Y2,Z2: A position on the X axis of the planeP3 coordinates X3,Y3,Z3: A position in the positive Y direction of the X-Y plane in the plane

SFCnME(n=1 to 3) Specifies the mechanism number to which the free plane limit applies. Usually, set up 1.In the case of multiple mechanisms, the mechanism numbers are specified.

SFCnAT(n=1 to 8) Designate the valid/Invalid of the set free plane limit. 0:Invalid 1: Valid (The operable area is the robot coordinate origin side.)-1: Valid (The operable area is the side where the robot coordinate origin does not exist. The control-ler software version J1 or later.)

P1

P2

P3

Page 349: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 349/457

5-330  Automatic return setting after jog feed at pause

5Functions set with parameters

5.10 Automatic return setting after jog feed at pauseThis specifies the path behavior that takes place when the robot is paused during automatic operation orduring step feed operation, moved to a different position using a jog feed with T/B, and the automatic opera-tion is resumed or the step feed operation is executed again. See the following diagram.

*1: The "RETPATH=2" is available for controller software version H4 or later.

The table below lists the values that can be specified for each interpolation instruction and controller soft-ware version.

Table 5-8:Interpolation instruction and RETPATH setting value

Parameter and value Description of the operation

RETPATH=1 (Default) 1) Returns to the original position where the pause took place using joint interpolation.2) Resumes from the line that was paused.

RETPATH=0 Resumes from the line that was paused from the position resulting after the jog operation. Therefore,movement will take place using the interpolation method of the instruction under execution from thecurrent position to the next target position.

RETPATH=2 *1 1) Return by XYZ interpolation to the interrupted position.2) Resume the interrupted line.

Interpolationcommand

Is before than H4 edition Note1)

Note1) If "RETPATH=2" is set for versions earlier than H4, the same operation as when "RETPATH=1" isset is obtained. (Returns to interrupted position by JOINT interpolation)

Is H4 edition or later 

MOVMVS

01

012

MVC

MVRMVR2MVR3

0

1

0 (The same operation as 1) Note2)

12

Note2) Note that the operation when RETPATH=0 is set depends on the software version at circularinterpolation (MVC, MVR, MVR2, MVR3). For versions later than H4, the same operation as whenRETPATH=1 is set is obtained even if RETPATH=0 is set. (Returns to interrupted position by JOINTinterpolation)

MVA 0 (The same operation as 1) Note3)

1

Note3) In the MVA command, even if set up with RETPATH=0, the operation is same as RETPATH=1. 

(Returns to interrupted position by JOINT interpolation)

0 (The same operation as 1) Note3)

12

RETPATH=1 or 2 RETPATH=0

Move to targetpositionJog feed

Interrupt here

Resume theautomaticexecution

Return to interrupted positionRETP ATH=1 :JOINT interpolation

RET PAT H=2:XYZ interpolation

Jog feed

Interrupt here

Move to targetposition

Resume theautomaticexecution

Page 350: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 350/457

  5Functions set with parameters

   Automatic return setting after jog feed at pause  5-331

[Caution] If movement other than a joint jog (XYZ, tools, cylindrical, etc.) has been used when the "RET-PATH" parameter is set to 1, joint interpolation will be used to return to the original position at thetime pause took place. Therefore, be careful not to interfere with peripheral devices.

[Caution] If the parameter "RETPATH" is set to 2 for a robot whose structure data is valid or with multiplerotations, and the robot is moved from a suspended position by joint jog, the robot is moved to a

position different from the original structure data and/or multiple-rotation data and may becomeunable to return to the suspended position. In this case, adjust the position of the robot to the sus-pended position and resume moving the robot.

If "RETPATH=1 or 2" is set as shown in the figure below, and the robot is operated continuously (continuouspath operation) using the CNT instruction, the robot returns to a position on the travel path from P1 to P2instead of the suspended position. When "RETPATH=0" is set, the robot moves to the target position fromthe current position.

P1

P2

P1

P2

RETPATH=1 or 2 RETPATH=0

Move to targetposition

Jog feed

Interrupt here

Resume theautomaticexecution

Jog feed

Move to targetposition

Resume theautomaticexecution

Interrupt here

Page 351: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 351/457

5-332  Automatic execution of program at power up

5Functions set with parameters

5.11 Automatic execution of program at power upThe following illustrates how to automatically run a robot program when the controller's power is turned on.However, since the robot starts operating simply by turning the power on, exercise caution upon using thisfunction.

Related parameters

(1) First, create an ALWAYS program and an operating program.<Program #2, ALWAYS program>

< Program #1, operating program > (this can be any program)

(2) Set the parameter.

 After the setting is complete, turn the controller's power OFF.

(3) Turn the power ON.In the sample above, after the controller's power is turned on, when the key switch is turned to AUTO (Ext.),program #1 is executed and the robot starts its operation.

Parameter and value Description of the operation

SLT* Exmple) SLT2=2,ALWAYS,REPSpecifies the program name, start condition, and operation status. The point here is the start condition.

 ALWENA 0->7In the ALWAYS program, it is possible to execute multitask-related instructions such as XRUN andXLOAD, and also the SERVO instruction.

100 ' Auto Start Sample Program

110 '120 ' Execute Program #1 if the key switch is AUTO (Ext.).130 ' Stop the program and return the execution line to the beginning of the program if the key switch is not AUTO(Ext.).140 '150 IF M_MODE<>3 AND (M_RUN(1)=1 OR M_WAI(1)=1) THEN GOSUB *MTSTOP160 IF M_MODE=3 AND M_RUN(1)=0 AND M_WAI(1)=0 THEN GOSUB *MTSTART165 IF M_MODE=2 THEN HLT ' for DEBUG170 END180 '190 *MTSTART200 XRUN 1,"1"210 RETURN220 '230 *MTSTOP240 XSTP 1250 XRST 1260 RETURN

100 'Main Program (Position data is for RV-2AJ.)110 SERVO ON120 M_OUT(8)=0130 MOV P1140 M_OUT(8)=1150 MOV P2160 END

P1=(+300.00,-200.00,+200.00,+0.00,+180.00,+0.00)(6,0)P2=(+300.00,+200.00,+200.00,+0.00,+180.00,+0.00)(6,0)

Parameter and value Description of the operation

SLT2 SLT2=2,ALWAYS,REP ’Execute program #2 in ALWAYS mode.

 ALWENA 0->7In the ALWAYS program, it is possible to execute multitask-related instructions such as XRUN andXLOAD, and also the SERVO instruction.

Page 352: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 352/457

  5Functions set with parameters

   About the hand type  5-333

5.12 About the hand typeThe factory default setting assumes that the double-solenoid type hand will be used. If the single-solenoidtype is used or if a general-purpose signal is to be used to control the robot, the HANDTYPE parametermust be set as described below.

Table 5-9:Factory default parameter settings

Note) The default settings are D224, D226, D192 and D194 in the case of the RC-1300G series.

From the left, the values correspond to hand #1, #2, and so on. The default value is shown below.Hand 1 = accesses signals #900 and #901Hand 2 = accesses signals #902 and #903Hand 3 = accesses signals #904 and #905Hand 4 = accesses signals #906 and #907The hand numbers 1 through 4 (or 8) will be used as the argument in the hand open/close instructions

(HOPEN or HCLOSE).

<Setting method>When a double-solenoid type is used, 'D' must be added in front of the signal number to specify the number.In the case of double-solenoid type, hand number will be from 1 to 4.When a single-solenoid type is used, 'S' must be added in front of the signal number to specify the number.In the case of single-solenoid type, hand number will be from 1 to 8.

<Example>1) To assign two hands of the double-solenoid type from the general-purpose signal #10 

HANDTYPE=D10,D12, , , , ,2) To assign three hands of the double-solenoid type from the general-purpose signal #10

 

HANDTYPE=S10,S,11,S12, , , , ,3) To assign hand 1 to the general-purpose signal #10 as the single-solenoid type while assigning hand

2 to the general-purpose signal #12 as the single-solenoid type 

HANDTYPE=D10,S12, , , , ,

Parameter name Value

HANDTYPE D900,D902,D904,D906, , , ,

Page 353: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 353/457

5-334  About default hand status

5Functions set with parameters

5.13 About default hand statusThe factory default setting is shown below.

 A single controller can control multiple robots. If pneumatic hand interface is to be used for each robot, thehand output signal number is assigned in the following manner.

Mechanism #1 = #900 to #907 (This will be the case for standard configuration with one unit connected.)Mechanism #2 = #910 to #917 

Mechanism #3 = #920 to #927When electric-powered hand interface is used, the system will use the 900's using special controls. Theusers should not access the 900's directly but instead use the hand control instructions or the hand opera-tion from T/B only. If you access the 900's, normal opening and closing of the hand will not be possible.

The default parameters are set as shown below so that all hands start as "Open" immediately after powerup.

The above describes the situation for standard configuration (one unit is connected). When multiple mecha-nisms are used, specify the mechanism number to set the HANDINIT parameter.

If for instance hand 1 alone needs to be closed when the power is turned ON, the following should be set.Similarly, in the case of electric-powered hand (hand number is fixed to 1), the hand will be closed when thepower is turned on if the following configuration is applied.

[Caution1] If you set the initial hand status to "Open," note that the workpiece may be dropped when thepower is turned ON.

[Caution2] This parameter specifies the initial value when turning ON the power to the dedicated hand sig-nals (900’s) at the robot's tip.To set the initial status at power ON when controlling the hand using general-purpose I/Os (otherthan 900’s) or CC-Link (6000’s) (specifying a signal other than one in 900Åfs by the HANDTYPEparameter), do not use this HANDINIT parameter, but use the ORST* parameter. The value set by the ORST* parameter becomes the initial value of signals at power ON.

Hand type StatusStatus of output signal number 

Mechanism #1 Mechanism #2 Mechanism #3

When pneumatic hand inter-face is installed (double-sole-noid is assumed)

Hand 1 = Open

Hand 2 =Open

Hand 3 =Open

Hand 4 =Open

900=1901=0902=1903=0904=1905=0906=1907=0

910=1911=0912=1913=0914=1915=0916=1917=0

920=1921=0922=1923=0924=1925=0926=1927=0

When electric-powered handinterface is installed

Hand open M_OUT (9*0) through M_OUT (9*7) are used by the system and thereforeunavailable to the user. If used, normal opening and closing of the handwill not be possible.

I/F before interface installation - M_OUT (9*0) through M_OUT (9*7) do not function.

Parameter name Signal number Value

HANDINIT

900, 901, 902, 903, 904, 905, 906, 9071, 0, 1, 0, 1, 0, 1, 0

Parameter name Signal number Value

HANDINIT 900, 901, 902, 903, 904, 905, 906, 907 0, 1, 1, 0, 1, 0, 1, 0, 1

Page 354: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 354/457

  5Functions set with parameters

   About the output signal reset pattern  5-335

5.14 About the output signal reset patternThe factory default setting sets all general-purpose output signals to OFF (0) at power up. The status of gen-eral-purpose output signals after power up can be changed by changing the following parameter. Note thatthis parameter also affects the general-purpose output signal reset operation (called by dedicated I/O sig-nals) and the reset pattern after executing the CLR instruction.

The value corresponds to bits from the left.

Setting is "0", "1", or "*"."0" = Set to off "1" = Set to on"*" = Maintain status with no change. (Set to off at power up.)

Parameter name Value (Values are all set to 0 at the factory default setting.)

   R  e  m  o   t  e   I   /   O

ORST0 Signal number  0----------7 8--------15 16--------23 24-------3100000000, 00000000, 00000000, 00000000

ORST32 32------40 41------49 50-------57 58-------66 (Same as above)00000000, 00000000, 00000000, 00000000

ORST64 00000000, 00000000, 00000000, 00000000

ORST96 00000000, 00000000, 00000000, 00000000

ORST128 00000000, 00000000, 00000000, 00000000

ORST160 00000000, 00000000, 00000000, 00000000

ORST192 00000000, 00000000, 00000000, 00000000

ORST224 00000000, 00000000, 00000000, 00000000

   P   R   O   F   I   B   U   S  o  p   t   i  o  n

ORST2000 00000000, 00000000, 00000000, 00000000

ORST2032 00000000, 00000000, 00000000, 00000000

ORST2064 00000000, 00000000, 00000000, 00000000

ORST2096 00000000, 00000000, 00000000, 00000000

ORST2128 00000000, 00000000, 00000000, 00000000

ORST2160 00000000, 00000000, 00000000, 00000000

ORST2192 00000000, 00000000, 00000000, 00000000

ORST2224 00000000, 00000000, 00000000, 00000000

ORST2256 00000000, 00000000, 00000000, 00000000

ORST2288 00000000, 00000000, 00000000, 00000000

  : :

  : :

  : :

ORST4984 00000000, 00000000, 00000000, 00000000

ORST5016 00000000, 00000000, 00000000, 00000000

   C   C  -   L   i  n   k  o  p   t   i  o  n

ORST6000 00000000, 00000000, 00000000, 00000000

ORST6032 00000000, 00000000, 00000000, 00000000

ORST6064 00000000, 00000000, 00000000, 00000000

ORST6096 00000000, 00000000, 00000000, 00000000

ORST6128 00000000, 00000000, 00000000, 00000000

ORST6160 00000000, 00000000, 00000000, 00000000

ORST6192 00000000, 00000000, 00000000, 00000000

ORST6224 00000000, 00000000, 00000000, 00000000

ORST6256 00000000, 00000000, 00000000, 00000000

ORST6288 00000000, 00000000, 00000000, 00000000

  : :

  : :

  : :

ORST7984 00000000, 00000000, 00000000, 00000000

ORST8016 00000000, 00000000, 00000000, 00000000

Page 355: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 355/457

5-336  About the output signal reset pattern

5Functions set with parameters

For instance, if you want to always turn ON immediately after power up the general-purpose signals 10, 11and 12 of the standard I/O and 32, 33 and 40 of the expansion I/O, the robot should be set to the configura-tion shown below.

In addition to the above, to make 20, 21 and 22 retain their individual on/off status upon a general-purposeoutput signal reset, the robot should be set to the configuration shown below.

In the case above, general-purpose signals 20, 21 and 22 will start up as 0 (off) after a power up. The settingcannot be made in such a way that will turn the signal to 1 (on) after power up and will retain the current sta-tus upon a general-purpose output signal reset.

[Caution] When editing the parameters, do not enter an incorrect number of zeros. If the number of zeros is

incorrect, an error is generated next time the power is turned on.

Parameter name Value

ORST0 00000000, 00111000, 00000000, 00000000

ORST32 11000000, 10000000, 00000000, 00000000

Parameter name Value

ORST0 00000000, 00111000, 0000***0, 00000000

ORST32 11000000, 10000000, 00000000, 00000000

Page 356: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 356/457

  5Functions set with parameters

   About the communication setting   5-337

5.15 About the communication setting(1) Overview

The controller for the CRn series can support 1 standard RS-232C, 2 optional expansion serial cards (2ports per card), totaling 5 ports. The optional expansion serial interface card has two ports, where one is RS-232C only and the other can select either RS-232C or RS-422. Up to two expansion serial cards can be

used.Standard RS-232C port normally connects to a PC for robot program transferring and debugging done withthe PC support software. Optional cards can link with vision sensor and external devices for data communi-cation. Communication is performed using the communication instructions (OPEN, CLOSE, PRINT, INPUT,etc.) in the robot program. This is referred to as data link. The controller cannot be controlled from externaldevices such as a PC (i.e., automatic execution or status monitoring). If this is necessary, contact the dealeror branch from where the robot has been purchased for further consultation.

Caution)The example above is for robot controller CR1. Controllers other than the CR1 do not requireexpansion option box.

(2) Performing data link with the outside using RS-232C Although the standard RS-232C can be used as the data link port, it is recommended that the standard RS-232C be reserved for robot program correction and monitoring at the time of start up and an optional expan-sion serial interface be provided as a dedicated data link port. The following sample program shows how touse an expansion serial interface.<Parameter setting> The communication setting of the expansion serial interface is described below.

For expansion serial interface, refer to "Expansion Serial Interface Instruction Manual."

Parameter name Default value After change Meaning

COMDEV RS232, , , , , , , RS232,OPT11, , , , , , When using CH1 in option slot 1

CBAUE11 9600 <- Baud rate = 9600bps

CPRTYE11 2 <- Parity = Even

CSTOPE11 2 <- Stop bit = 2

CTERME11 0(CR) 1(CRLF) Termination code = CRLF (carriage return and line feed)

CPRCE11 0 2 Switch to data linkThis setting is for communicating with the outside usingOPEN, PRINT, INPUT and CLOSE instructions in the robotprogram.

Communication example OPEN "COM2:" AS #1PRINT #1, "ABC"M1 = 10PRINT #1, M1INPUT #1, C1$INPUT #1, M1

 Robot External"ABC"CRLF->

"10"CRLF->  <-"RUN"CRLF  <-"20"CRLF

 

Machine cable 

Machine cable 

Vision unit

 

Expansion serial 

Expansion option

Use of PC with the support software 

Standard RS-232C

Example of standard RS-232C port usage

Use of PC with the support software 

Standard RS-232C

Example of expansion RS-232C port usage

Page 357: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 357/457

5-338  About the communication setting 

5Functions set with parameters

<Sample robot program>The following is a sample program which moves to the camera position, obtains correction data from RS-232C, moves to the position above the corrected position, moves to the target position, closes hand, andbreaks away.

In this example, the camera origin position must be stored in robot coordinates through teaching in advance.The Z-axis also must allow the grasping of the workpiece.

<Communication data> (Data string sent by the external devices such as the sensor.)Data sent to the robot is sent in the order of X, Y, and then C. CR (carriage return = 0d in hexadecimal) issent as the termination code. The units are mm, mm, and deg (degree), respectively. In the following exam-

ple, data sent is X = 12.34 mm, Y = 0.39 mm, and C = 56.78degree.

(3) Notes on using both the PC support software and the data link software on standard portIf the standard port on the front face of the controller is to be used to connect to both the PC support soft-ware at power up and to an external device (such as a PC that is running specialized software) via the datalink during operation, the data transmitted to the controller from external devices must have "PRN" at thebeginning of each data string.

These letters are required to distinguish between PC support software protocol and data link communica-tion. After "PRN", data should follow immediately; do not insert a space.

Therefore, if the communication protocol from the external device cannot be changed, then the device can-not be used under the default standard port setting. Although it is possible to set a parameter (CPRC232) sothat the "PRN" is not required, changing of this parameter disallows the use of PC support software. There-fore, if "PRN" cannot be added to the transmission data from the external device, use the optional expansionserial interface.

Vision sensor AS50VS from Mitsubishi comes with the standard functions to support this "PRN", whichallows them to be supported at the standard port. However, with only the standard port, PC support softwareand vision sensor cannot be used at the same time since there is only one port.

Command Comment

10 OPEN "COM2:" AS #1 'Opens RS232C communication.

20 MOV P1,-50 'Moves to camera position.

30 M_OUT(10)=1 DLY 0.5 'Outputs camera start signal (start up the sensor).

40 PX=P1 'Obtains the camera origin.

50 INPUT #1,MX,MY,MC 'Inputs correction data.

60 PX.X=PX.X+MX 'Applies correction data in the X direction.

70 PX.Y=PX.Y+MY 'Applies correction data in the Y direction.

80 PX.C=PX.C+RAD(MC) 'Applies correction data in the C axis.

90 MOV PX,-50 'Moves to a position above the workpiece.

100 OVRD 30 'Slows down.

110 MVS PX 'Moves to the target position.

120 DLY 0.3 'Waits for positioning.

130 HCLOSE 'Closes hand.

140 DLY 0.3 'Waits for hand closing to complete.

150 MVS ,-50 'Breaks away.

: : :

"12.34,0.39,56.78(CR)"

Example) "PRN12.34,0.39,56.78(CR)"

Page 358: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 358/457

  5Functions set with parameters

   About the communication setting   5-339

(4) How to ensure stable communication between the personal computer support software and the robot con-troller.

When communicating with the robot controller (hereinafter referred to as the R/C) using the PersonalComputer Support Software (hereinafter referred to as the Software), depending on the personal computer model and settings the communication may become unstable in a batch backup or program upload/down-loadwhere large amounts of data are transmitted. To ensure stable communication with the R/C, change thecommunication settings (communication protocol) of the R/C and the Software as shown below. If thecommunication settings of the R/C and the Software do not match, normal communication cannot beestablished. Be sure to change the settings on both the R/C and Software sides.<The Robot Controller> As for the R/C communication settings, change the following parameters:

To communicate with the personal computer via an extended RS-232C port by using an extension serialinterface board, change the parameters of the extended RC-232C port.

<The Personal Computer Support Software>Change the communication settings of the personal computer support software through the "communicationserver."

When communicating with the R/C using your custom software, reset the R/C protocol setting to "Non-Pro-cedural" in advance.

Parameter Default Change to

Communication protocol (CPRC232) 0 (Non-Procedural) 1 (Procedural)

Parameter Default

Protocol Non-Procedural Procedural

 

Change to procedural.

 

Page 359: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 359/457

5-340 Hand and Workpiece Conditions (optimum acceleration/deceleration settings)

5Functions set with parameters

5.16 Hand and Workpiece Conditions (optimum acceleration/deceleration settings)Optimum acceleration/deceleration control allows the optimum acceleration/deceleration to be performed byLOADSET and OADL instructions automatically in response to the load at the robot tip. The followingparameters must be set correctly in order to obtain the optimum acceleration/deceleration.This parameter is also used in the impact detection function installed in the RV-S/RH-S series.

When using the impact detection function during jog operation, set HNDDAT0 and WRKDAT0 correctly.The factory default setting is as follows.

Parameter values define, from the left in order, weight, size X, Y, and Z, and center of gravity X, Y, and Z. Upto eight hand conditions and eight workpiece conditions can be set. For the size of a hand, enter the lengthof a rectangular solid that can contain a hand. Optimal acceleration/deceleration will be calculated from thehand condition and the workpiece condition specified by a LOADSET instruction.

Parameter values that define grasping or not grasping is shown from the left for cases where the hand isopen or closed."0" = Set to not grasping"1" = Set to graspingDepending on the hand's open/close status, optimum acceleration/deceleration calculation will be per-formed for either hand-alone condition or hand-and-workpiece condition.

The hand's open/close status can be changed by executing the HOPEN/HCLOSE instruction.

The coordinate axes used as references when setting the hand and workpiece conditions are shown below

for each robot model. The references of the coordinate axes are the same for both the hand and workpiececonditions. Note that all the sizes are set in positive values.

Parameter Value

  s  e   t   t   i  n  g   t   h  e   h  a  n   d  c  o  n   d   i   t   i  o  n  s

HNDDAT0 It varies with models. (It is released only with the RV-S/RH-S series.)

HNDDAT1 Maximum load, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0

HNDDAT2 Maximum load, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0

HNDDAT3 Maximum load, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0

HNDDAT4 Maximum load, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0

HNDDAT5 Maximum load, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0

HNDDAT6 Maximum load, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0

HNDDAT7 Maximum load, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0

HNDDAT8 Maximum load, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0

  s  e   t   t   i  n  g   t   h  e  w  o  r   k  p   i  e  c  e  c  o  n   d   i   t   i  o  n  s WRKDAT0 It varies with models. (It is released only with the RV-S/RH-S series.)

WRKDAT1 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0

WRKDAT2 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0

WRKDAT3 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0

WRKDAT4 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0

WRKDAT5 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0

WRKDAT6 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0

WRKDAT7 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0

WRKDAT8 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0

Parameter Value(Factory default)

HNDHOLD1 0, 1

HNDHOLD2 0, 1

HNDHOLD3 0, 1

HNDHOLD4 0, 1

HNDHOLD5 0, 1

HNDHOLD6 0, 1

HNDHOLD7 0, 1

HNDHOLD8 0, 1

Page 360: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 360/457

  5Functions set with parameters

  Hand and Workpiece Conditions (optimum acceleration/deceleration settings)  5-341

*RP-A series

*RV-A, RV-S series

+Z

+X

+Y

Definitions of Coordinate AxesIn the coordinate system with the tip of theJ4 axis as the origin:

Z axis: The upward direction is positive.X axis: The direction of extension in the armorientation is positive.

Y axis: A right hand coordinate system

 Axes that must be set:Only the X and Y elements of the center ofgravity and the X and Y elements of the sizemust be set.

+Z

Definitions of Coordinate AxesThe tool coordinate is used for the coordinate axes.

 Axes that must be set:Only the X, Y and Z elements of the center of gravity and the X, Yand Z elements of the size must be set.

+Y

+X

6-axis type5-axis type

*Example of RV-1A/2AJ

+Z

+Y

+X

Page 361: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 361/457

5-342 Hand and Workpiece Conditions (optimum acceleration/deceleration settings)

5Functions set with parameters

*RH-A, RH-S series

*RH-1000G***

*RH-1500G***

+Z

+X +Y

Definitions of Coordinate AxesIn the coordinate system with the tip ofthe J4 axis as the origin:Z axis: The upward direction is positive.X axis: The direction of extension in the

arm orientation is positive.Y axis: A right hand coordinate system

 Axes that must be set:Only the X element of the center ofgravity and the X and Y elements of thesize must be set.

+Z

+X

+Y

Definitions of Coordinate AxesIn the coordinate system with the center of theJ5 axis as the origin for the 5-axis type andwith the center of the J4 axis as the origin forthe 4-axis type:Z axis: The upward direction is positive.X axis: The direction of extension in the arm

orientation is positive.Y axis: A right hand coordinate system

 Axes that must be set:Only the X element of the center of gravity andthe X and Y elements of the size must be set.

+Z

+X

+Y

Definitions of Coordinate AxesIn the coordinate system with the center ofthe J6 axis as the origin for the 6-axis typeand with the center of the J5 axis as theorigin for the 5-axis type:Z axis: The upward direction is positive.X axis: The direction of extension in the arm

orientation is positive.Y axis: A right hand coordinate system

 Axes that must be set:Only the X element of the center of gravity

and the X and Y elements of the size mustbe set.

Page 362: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 362/457

  5Functions set with parameters

  Hand and Workpiece Conditions (optimum acceleration/deceleration settings)  5-343

*RC-1000GHWDC-SA/1000GHWLC-SA

*RV-100TH/100THL/150TH/150THL/60TH

+Z

+Y

+X

Definitions of Coordinate AxesIn the coordinate system with the center of the

flange as the origin:Z axis: The upward direction is positive.X axis: The front of the left hand is the plus

directionY axis: The front of the right hand is the plus

direction Axes that must be set:Only the X element of the center of gravity andthe X and Y elements of the size must be set.

*The hand of the figure is an example.

+Z

+X

+Y

Definitions of Coordinate AxesIn the coordinate system with the centerof the J4 axis as the origin:

Z axis: The upward direction is positive.X axis: The direction of extension in the

arm orientation is positive.

Y axis: A right hand coordinate system 

(In the figure, the front direction)

 Axes that must be set:Only the X and Y elements of the centerof gravity and the X and Y elements ofthe size must be set.

Page 363: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 363/457

5-344  About the singular point adjacent alarm

5Functions set with parameters

5.17 About the singular point adjacent alarmWhen a robot having a singular point is being operated using a T/B, a singular point adjacent alarm is gen-erated to warn the operators of the robot if the control point of the robot approaches a singular point.  Even if an alarm is generated, the robot continues to operate as long as it can perform operation unlessoperation is suspended. Also, an alarm is reset automatically when the robot moves away from a singular

point. The following describes the details of the singular point adjacent alarm. 

Note that this function is supported by the controller with the software version of G9 or later.

(1) Operations that generate an alarm An alarm is generated if the control point of a robot approaches a singular point while a robot is performingany of the following operations using the T/B.

1) Jog operation (other than in joint jog mode)2) Step feed and step return operations3) MS position moving operation4) Direct execution operation

If the robot approaches a singular point by any of the operations listed above, the buzzer of the controllerkeeps buzzing (continuous sound). However, the STATUS. NUMBER display on the operation panel doesnot change. Also, in the case of "[1] Jog operation (other than joint jog mode)" above, a warning is displayed on the T/Bscreen together with the sound of the buzzer.

Fig.5-1:Warning Display During Jog Operation

(2) Operations that do not generate an alarmNo alarm is generated when a robot is performing any of the operations listed below even if the control pointof the robot approaches a singular point.

1) Additional axis jog operation initiated in joint jog mode using the T/B2) When the joint interpolation instruction is executed even by an operation from the T/B 

(Execution of the MOV instruction, MO position moving operation)3) When the program is running automatically4) Jog operation using dedicated input signals (such as JOGENA and JOGM)5) When the robot is being operated using external force by releasing the brake6) When the robot is stationary

XYZ 100%X: +360.00 

Y: +280.00 

Z: +170.00

XYZ 100%!X: +360.00 

!Y: +280.00 

!Z: +170.00

Page 364: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 364/457

  5Functions set with parameters

   About ROM operation/high-speed RAM operation function  5-345

5.18 About ROM operation/high-speed RAM operation function

Because the ROM operation /high-speed RAM function has some restrictions onprogram operation and data retention, please use it after thoroughly understanding

the specifications.(1) Overview

Initially, the robot programs are saved in the RAM (SRAM) that is backed up in the battery.By saving the robot programs in Flash ROM (FLROM), a loss of files due to the depletion of the backup bat-tery, damage to the programs due to unexpected power shutoff (including momentary power failure) duringa file access operation, or changes or deletion of the programs and position data due to an erroneous oper-ation.By changing the parameter values, the access target of the programs can be switched between ROM andRAM. Once the access target of the programs is switched to ROM, it is referred to as in or during the ROMoperation.This function can be used with controller software version H7 or later.

 Additionally, the high-speed RAM operation (using DRAM memory) function can be used in the controller'ssoftware version J1 or later.Table 5-10:ROM operation/high-speed RAM parameter list

Table 5-11:Relationship between the role of each memory and the ROMDRV parameter 

Caution 1)"Save Parameters" and "Save Error Log" in order to save system data. The data files to be reador written by the programs (OPEN/PRINT/INPUT) are included.

Caution 2)Program management operation refers to the operations, such as copying, deleting and renamingthe programs in the controller, by using the T/B and personal computer support software.

Parameter Description and value

ROMDRV Switches the access target of the programs between ROM and RAM.0 = RAM mode (initial value)1 = ROM mode2 = High-speed RAM mode (high-speed RAM operation : DRAM memory is used. Can be used in software ver-sion J1 or later)

BACKUP Copies programs, parameters, common variables and error logs from the RAM area into the ROM area.SRAM -> FLROM (fixed) * If this processing is canceled while being executed, "CANCEL" is displayed in thevalue field.

RESTORE Rewrites programs, parameters, common variables and error logs in the ROM area into the RAM area.

FLROM -> SRAM (fixed) * If this processing is canceled while being executed, "CANCEL" is displayed in thevalue field.

Memorytype

FeatureROMDRVparameter 

0(RAM mode) 1(ROM mode) 2(High-speed RAM mode)

DRAM High-speed executionpossibleExecution of programsthat are erased when thepower is OFF

Execution of programs(Discard the execution result)

Execution of programs(Discard the execution result)

SRAM Not erased by power OFF

Erased when a battery isconsumed. 

Read/write enabled

Execution of programs

(Save the executionresult)Program managementoperationRead/write system dataRead/write commonvariablesRead/write programs

Read/write system dataProgram managementoperationRead/write system dataRead/write common variablesRead/write programs

ROM Not erased by power OFFNot Erased when a bat-tery is consumed.Read only enabled

(Program management oper-ation disabled)

Read/write common variablesRead/write programs

Page 365: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 365/457

5-346  About ROM operation/high-speed RAM operation function

5Functions set with parameters

Table 5-12:ROM operation/high-speed RAM operation function image

DRAM is used as execution memory during ROM operation/high-speed RAM operation; it can perform lan-guage processing at a maximum speed of about 1.2 times faster than that of SRAM memory used for nor-mal RAM operation. (The speed varies depending on the contents of each program.)Note that the operations of the robot, such as program execution and step operation, can be performed sim-ilar to RAM operations (when starting in the RAM mode); however, there are restrictions on some opera-tions. Please refer to the following precautions.

parameterROMDRV

Power ON

ROMmode (1)

RAM

mode(0)

high-speed RAMmode (2)

File System

ROM Area SRAM Area

Exection Area

DRAM Aerea

(high-speedExecution)

SRAM Area

(Save enabled)

・Target of executable programs.・Programs to be backed up.・Changing parameters.・Saving error logs.

・Reading programs.・Editing (writing) programs.・Copying, moving and renaming programs.・Files to be access by the OPEN instruction.・Program Exection Area.・Save the execution result.

・Save the execution result.

File System

ROM Area SRAM Area

Exection Area

DRAM Aerea(high-speedExecution)

SRAM Area(Save enabled)

File System

ROM Area SRAM Area

Exection Area

DRAM Aerea(high-speed

Execution)

SRAM Area

(Save enabled)

・Target of executable programs.・Programs to be backed up.・Reading programs.  → Enble

・Editing (writing) programs.・Copying, moving and renaming programs. ・rename → Error

・Changing parameters.・Saving error logs.・Files to be accessed by the OPENinstruction.

Page 366: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 366/457

  5Functions set with parameters

   About ROM operation/high-speed RAM operation function  5-347

 Precautions

* About variablesVariables may be changed by executing programs during the ROM operation/high-speed RAM operation;however, the changed values will be discarded when the controller power is turned off. The following liststhe handling of variables during the ROM operation.

* Changing variables during program execution

If the execution of a program is aborted during the ROM operation and "Variable Monitor" (refer to Page 50,"3.12 Operating the monitor screen".) of the T/B is used, the program cannot be resumed. Although the stoplamp stays lit, if the program is executed, the program will be executed from the first line. Be carefulbecause peripheral devices may interfere with the robot.

The values of variables cannot be changed by using "Variable Monitor" (refer to Page 50, "3.12 Operatingthe monitor screen".) of the T/B during the ROM operation. Program Monitor (watch function) of PC supportsoftware can be used to change the values of variables in task slots other than the editing slot.

* About programsThe target of program editing also becomes the ROM area. The programs in the controller is placed in theprotected state (protect ON), and they cannot be canceled during the ROM operation. Once the ROM oper-ation is switched to the RAM operation, the protect information reverts to the state set during the RAM oper-

ation. 

Programs may be read during the ROM operation, but they cannot be written. Similarly, programs can nei-ther be copied nor renamed.

* About parametersParameters and error log files are always saved in the RAM area regardless of switching between the ROMoperation and the RAM operation. However, the RLNG parameter (for switching the robot language, refer toPage 321, " RLING".) cannot be changed during the ROM operation.Only a limited number of robot models can use the RLNG parameter.

* About backupDuring the ROM operation, programs are backed up from the ROM area, and parameters and error log filesare backed up from the RAM area.

* About direct executioWhile in the ROM operation, local variables cannot be rewritten by direct execution.

Variable Note1)

Note1)There are numeric value variables, character string variables, position variables and joint variables.

In ROM operation In high-speed RAMoperation

In RAM operation

Local variable The values of local variables areretained during program operation;however, they will be discarded whenswitching programs by the OP orexternal I/O signal, as well as whenthe power is turned off. The values ofvariables in the program called by theCALLP instruction will be discardedwhen they return to the called pro-gram.The values of variables in a programcalled by a CALLP instruction are dis-

carded upon returning to the callingprogram.

The values of variables used ina program being executedwhen the power was shut downare discarded.They are saved when a pro-gram is selected or a CALLPinstruction finishes.

The values of variablesare retained even afterthe power is turned off.Note2)

Note2)However, if a program is rewritten by using PC support software, the values of local variables used byprograms will be discarded.

Program external variable The values of variables are retaineduntil the power is turned off. (Theywill not be discarded by switchingprograms. The contents of changeswill be discarded when the power isturned off.)

The values of variables areretained as they are even afterthe power is shut down.

The values of variablesare retained even afterthe power is turned off.

User-defined external vari-able

The contents of changes arediscarded when the power isshut down.

Page 367: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 367/457

5-348  About ROM operation/high-speed RAM operation function

5Functions set with parameters

* About the continue functionWhile in the ROM operation, the continue function is disabled even if it is set.The continue function saves the execution status at the time of power OFF, and starts operating from thesaved status the next time the power is turned on.

*About extension memory

When extension memory is installed or removed during the ROM operation, an error will occur. Install orremove extension memory only after switching to the RAM operation.

* About operating timesThe operating times (power ON time and remaining battery time) are updated regardless of switchingbetween the ROM and RAM operations.

* About production informationThe production information monitor (program operation count, cycle time, etc.) of Personal Computer sup-port software is not added or updated during the ROM operation.

(2) Procedures for switching between ROM and RAMRAM operation,The following shows the procedures for switching ROM operation, RAM operation and high-

speed RAM operation:

For more information about the operating procedure of each of the above, see the following pages.

P o w e r O N

E n t e r B A C K U Pp a r a m e te r  

C a n c e l?

C a n c e lp a r a m e t e r  

P o w e r O F F t o O N

C h a n g e R O M D R Vp a r a m e t e r f r o m 0

t o 1

P o w e r O F F t o O N

E n d

P o w e r O N

E n t e r R E S T O R Ep a r a m e t e r  

C a n c e l ?

C a n c e lp a r a m e t e r  

P o w e r O F F t o O N

C h a n g e R O M D R Vp a r a m e t e r f r o m 1

t o 0

P o w e r O F F t o O N

E n d

P r o c e d u r e f o r s w i t c h in gf r o m R A M o p e r a t i o n t o R O M o p e r a t i o n

P r o c e d u r e f o r s w i tc h i n gf ro m R O M o p e r a t i o n t o R A M o p e r a t i o n

Y e s

N o

Y e s

N o

M a n i p u l a t eo p e r a t io n p a n e l

M a n i p u l a t eo p e r a t io n p a n e l

( 3 ) - [ 1 ]

( 3 ) - [ 2 ] ・ ・ ・

( 3 ) - [ 3 ]

( 4 ) - [ 1 ]

( 4 ) - [ 2 ] ・ ・ ・

( 4 ) - [ 3 ]

P r o c e d u r e f o r s w i t c h in gf ro m R A M o p e r a t io n t o h i g h - s p e e d

R A M o p e r a t i o n

P o w e r O N

C h a n g e R O M D R Vp a r a m e t e r f r o m

0 t o 2

P o w e r O F F t o O N

E n d

( 7 ) - ①

P r o c e d u r e f o r s w i t c h i n gf ro m h i g h - s p e e d R A M o p e r a t io n t o

R A M o p e r a t i o n

P o w e r O N

C h a n g e R O M D R Vp a r a m e t e r f r o m

2 t o 0

P o w e r O F F t o O N

E n d

( 7 ) - ②

Page 368: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 368/457

  5Functions set with parameters

   About ROM operation/high-speed RAM operation function  5-349

(3) Switching to the ROM operationUse the following procedure (steps [1] to [3]) to switch to the ROM operation.

[1] Prepare to copy the information in the RAM area into the ROM area.

The programs created before the RAM operation was switchedto the ROM operation are saved in the RAM area of the file sys-tem of the controller. First, copy these programs into the ROMarea using the following procedure. After the programs in the ROM area are cleared once, they arecopied from the RAM area.

1) Display the parameter setting screen from themaintenance screen.

2) Enter "BACKUP" in the parameter name field, andpress the [INP] key.

3) When "SRAM->FLROM" is displayed in the datafield, press the [INP] key again as is. * Do not change the content of the data field. 

 A self-check is performed to check whether or notthe programs are normal prior to writing them intothe ROM area. The ALWAYS program isautomatically stopped during the self-check. Whenthe program check is complete, the cursor moves tothe parameter name field. If any abnormality isfound during the program check, an error is outputand the date of ROM write operation is registered inan error log.

 

[Cancel Operation]To cancel switching to the ROM operation, press the[INP] key again here. When "CANCEL" is displayedin the data field, press the [INP] key again. 

4) Be sure to shut off the power here. Also, be sure toshut off the power during [Cancel Operation] in step3) above. Copy to the ROM area is performed thenext time the power is turned on. If the power is notshut off after the operation in step 3), data will not beproperly copied into the ROM area.

5) Turn on the power to the controller.  After the power is turned on, "OK" is displayed in"STATUS NUMBER" on the operation panel. Afterverifying that "OK" is displayed, press the [START]

button on the operation panel. (The following pagedescribes the detail of this operation.)

File system of the controller 

ROM area RAM area

[1]

Copy

ProgramsParameters

CommonvariablesError logs

ProgramsParameters

CommonvariablesError logs

<PARAM>

(BACKUP )( )

(CANCEL )

SET DATA

<PARAM>

(BACKUP )( )

( )SET PARAM.NAME

<PARAM>(BACKUP )( )

(SRAM->FLROM )

SET DATA

[INP] key

[INP] key

<MENU>

1.TEACH 2.RUN3.FILE 4.MONI

5.MAINT 6.SET

<MAINT>

1.PARAM 2.INIT3.BRAKE 4.ORIGIN

5.POWER

[5] key

[1] key

* Do not change thecontent of the data field.

<PARAM>

(BACKUP )( )

(SRAM->FLROM )SET PARAM.NAME

To cancel, press the[INP] key again here.

Power shutoff 

Cancel

Power shutoff 

Switch to ROM operation

<PARAM>(BACKUP )( )

(CANCEL )

SET PARAM.NAME

Press the [INP] key again.

Page 369: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 369/457

5-350  About ROM operation/high-speed RAM operation function

5Functions set with parameters

[2] Execute a copy operation by manipulating the operation panel.

The time required to start up after the power is turned on is based on controller software version H7.It varies depending on the version in use and how memory is used.

[3] Change the parameter value and switch to the ROM operation.

Change the value of the ROMDRV parameter from 0 to 1.

 After changing it, be sure to shut off the power, and turn it on again.

  If switching from the RAM operation to the ROM operation is performed withoutcopying any program into the ROM area, there would be no program to execute, ora program in which the corrected content has not been reflected would be executed.Therefore, be sure to perform the program copy operation described above.

START

ST TUS NUMBER

ST TUS NUMBER

ST TUS NUMBER

ST TUS NUMBER

ST TUS NUMBER

ST TUS NUMBER

Power ON

 Approx. 8 s ec .

 Approx. 12 sec.

 Approx. 22 s ec .ST TUS NUMBER

Power ON

The com pletion of writing into the ROM area isdisplayed.This display varies depending on whether or not there is extension memory.OK0: When standard memory is usedOK3: When 2 M B extension memory is used

When 2 MB extension memory is used, it takesapproximately 28 seconds longer to start upafter the power is turned on.

 Approx. 12 s ec .

Press the [START] button on the operation panel."88888" is displayed in STATUS NUMBER just likefor normal operation.

Power ON atnormal o peration

Power ON after a writeoperation into the ROM area

  Caution

<パラメータ>(ROMDRV )( )(0 )データ ヲ シテイ

<パラメータ>(ROMDRV )( )(1 )データ ヲ シテイ

値を[1]に変更

[INP]キー

<PARAM>(ROMDRV )( )(0 )SET DATA

<PARAM>

(ROMDRV )( )(1 )SET DATA

Change the value to 1.

[INP] key

Page 370: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 370/457

  5Functions set with parameters

   About ROM operation/high-speed RAM operation function  5-351

(4) Display during the ROM operation A dot is lit in the right edge of "STATUS NUMBER" on the operation panel during the ROM operation.

(5) Program editing during the ROM operationIt is possible to read the programs in the controller during the ROM operation; however, if a rewrite operationis performed, an error will occur. To edit a program, cancel the ROM operation (change the value of theROMDRV parameter from 1 to 0, and reset the power to the controller) first, and then edit it. To switch backto the ROM operation after the completion of program editing, be sure to perform the operation "Copy Pro-grams to ROM Area."

ST TUS NUMBER ST TUS NUMBER

ST TUS NUMBER ST TUS NUMBER

ST TUS NUMBERT TUS NUMBER

In ROM operation In RAM operation

During overridedisplay

During programnumber display

During line number display

 A dot is lit in the right edg e o f the display.

Page 371: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 371/457

5-352  About ROM operation/high-speed RAM operation function

5Functions set with parameters

(6) Switching to the RAM operationUse the following procedure (steps [1] to [3]) to switch to the RAM operation.

[1] Prepare to write the information in the ROM area back to the RAM area.

Write the programs and parameters written into the ROM areawhen the RAM operation was switched to the ROM operationback into the RAM area.

 At this point, after the information (programs, parameters, val-ues of common variables, and error logs) in the RAM area iscleared once, restore processing is performed from the ROMarea.

1) Display the parameter setting screen from themaintenance screen.

2) Enter "RESTORE" in the parameter name field, andpress the [INP] key.

3) When "FLROM->SRAM" is displayed in the datafield, press the [INP] key again as is. * Do not change the content of the data field. 

Prepare to restore the information back into theRAM area. At this point, the ALWAYS program doesnot stop. When the preparation is complete, thecursor moves to the parameter name field. 

[Cancel Operation]To cancel switching to the RAM operation, press the

[INP] key again here. When "CANCEL" is displayedin the data field, press the [INP] key again. Thecursor moves to the parameter name field.

4) Be sure to shut off the power here. Also, be sure toshut off the power during [Cancel Operation] in step3) above. Copy to the RAM area is performed thenext time the power is turned on. If the power is notshut off after the operation in step 3), data will not beproperly copied into the RAM area.

5) Turn on the power to the controller.  After the power is turned on, "OK" is displayed in"STATUS NUMBER" on the operation panel. Afterverifying that "OK" is displayed, press the [START]button on the operation panel. (The following pagedescribes the detail of this operation.)

  If the information in the RAM area is restored into the ROM area, all thecontents of the parameters changed during the ROM operation, the values ofcommon variables, and logs of errors occurred are discarded. If any parameter

was changed during the ROM operation, change the parameter again afterswitching to the RAM operation is complete.

File system of the controller 

[1]

Copy

ROM area RAM area

ProgramsParameters

CommonvariablesError logs

ProgramsParameters

CommonvariablesError logs

  CAUTION

<PARAM>(RESTORE )( )(CANCEL )SET PARAM.NAME

<PARAM>(RESTORE )( )( )SET PARAM.NAME

<PARAM>(RESTORE )( )(FLROM->SRAM )SET DATA

[INP] key

[INP] key

<MENU>1.TEACH 2.RUN3.FILE 4.MONI5.MAINT 6.SET

<MAINT>1.PARAM 2.INIT3.BRAKE 4.ORIGIN5.POWER

[5] key

[1] key

* Do not change thecontent of the data field.

<PARAM>(RESTORE )( )(FLROM->SRAM )SET PARAM.NAME

To cancel, press the[INP] key again here.

Power shutoff 

Cancel

<PARAM>(RESTORE )( )

(CANCEL )SET DATA

Press the [INP] key again.

Power shutoff 

Return to RAM operation

Page 372: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 372/457

  5Functions set with parameters

   About ROM operation/high-speed RAM operation function  5-353

[2] Execute a restore operation by manipulating the operation panel

[3] Change the parameter value and switch to the RAM operation.

Change the value of the ROMDRV parameter from 1 to 0.

 After changing it, be sure to shut off the power, and turn it onagain.

START

ST TUS NUMBER

ST TUS NUMBER

ST TUS NUMBER

ST TUS NUMBER

ST TUS NUMBER

ST TUS NUMBER

Power ON

 Approx. 8 sec.

 Ap prox. 12 sec.

 Ap prox. 8 sec.ST TUS NUMBER

Power ON

The completion of restoring into the RAM areais displayed.This display varies depending on whether or not there is extension memory.OK4: W hen standard memory is usedOK7: W hen 2 MB extension memory is used

* The time required to start up after the power is turned on is almost the same as the normaloperation, which is different from when writingto the ROM area.

 Ap prox. 12 sec.

Press the [START] button on the operation panel."88888" is displayed in STATUS NUMBER just likefor normal operation.

Power ON atnormal operation

Power ON after a writerestoring into the ROM area

<PARAM>(ROMDRV )( )(1 )SET DATA

<PARAM>(ROMDRV )( )(0 )SET DATA

Change the value to 0.

[INP] key

Page 373: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 373/457

5-354  About ROM operation/high-speed RAM operation function

5Functions set with parameters

(7) Switching to the high-speed RAM operation(DRAM operation)Use the following procedure to switch to the high-speed RAM operation.[1]Change the applicable parameter and switch to high-speed RAM operation (DRAM operation).

Change the value of the ROMDRV parameter from 0 to 2.

 After changing it, be sure to shut off the power, and turn it onagain.

[2]Change back the parameter and return to RAM operation.

Change the value of the ROMDRV parameter from 2 to 0.

 After changing it, be sure to shut off the power, and turn it onagain.

<PARAM>(ROMDRV )( )

(0 )SET DATA

<PARAM>(ROMDRV )( )(2 )SET DATA

Change the value to 2.

[INP] key

<PARAM>(ROMDRV )( )(2 )SET DATA

<PARAM>(ROMDRV )( )(0 )SET DATA

Change the value to 0.

[INP] key

Page 374: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 374/457

  5Functions set with parameters

  Warm-Up Operation Mode  5-355

5.19 Warm-Up Operation Mode

(1) Functional OverviewThe acceleration/deceleration speed and servo system of Mitsubishi robots are adjusted so that they can beused with the optimum performance in a normal temperature environment. Therefore, if robots are operated

in a low temperature environment or after a prolonged stop, they may not exhibit the intrinsic performancedue to change in the viscosity of grease used to lubricate the parts, leading to deterioration of position accu-racy and a servo error such as an excessive difference error. In this case, we ask you to operate robots inactual productions after conducting a running-in operation (warm-up operation) at a low speed. To do so, aprogram for warm-up operation must be prepared separately.The warm-up operation mode is the function that operates the robot at a reduced speed immediately afterpowering on the controller and gradually returns to the original speed as the operation time elapses. Thismode allows you to perform a warm-up operation easily without preparing a separate program. If an exces-sive difference error occurs when operating the robot in a low temperature environment or after a prolongedstop, enable the warm-up operation mode.This function can be used in software version J8 or later of the controller.

*To Use the Warm-Up Operation ModeTo use the warm-up operation mode, specify 1 (enable) in the WUPENA parameter and power on the con-troller again.

Note: To use the warm-up operation mode on the robot other than the RV-S series, it is necessary to specifya joint axis to be the target of the warm-up operation mode in the WUPAXIS parameter, other than theWUPENA parameter. For more information, see "(2)Function Details"

*When the Warm-Up Operation Mode Is EnabledWhen the warm-up operation mode is enabled, powering on the controller enters the warm-up operationstatus (the speed is automatically reduced). In the warm-up operation status, the robot operates at a speedlower than the specified operation speed, then gradually returns to the specified speed as the operation timeof a target axis elapses. The ratio of reducing the speed is referred to as the warm-up operation override.When this value is 100%, the robot operates at the specified speed. In parameter setting at shipment fromthe factory, the value of a warm-up operation override changes as shown in the Fig. 5-2 below according tothe operation time of a target axis.

Fig.5-2:Changes in Warm-Up Operation Override

Even in the warm-up operation status, the robot does not decrease its speed if the

MODE switch on the controller's front panel is set to "TEACH," for a jog operation orfor an operation by real-time external control (MXT instruction), and operates at theoriginally specified speed.

100%

Time during whichvalues are constant

(30 sec)

Valid time of the warm-up operation status(60 sec)

Warm-up operationoverride

Time duringwhich a target

axis is operating

Initial value(70%)

  CAUTION

Page 375: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 375/457

5-356 Warm-Up Operation Mode

5Functions set with parameters

In the warm-up operation status, because the robot operates at a speed lower thanthe originally specified speed, be sure to apply an interlock with peripheral units.

If the operating duty of the target axis is low, a servo error such as an excessive dif-ference error may occur even when the warm-up operation mode is enabled.In such a case, change the program, and lower the speed as well as the acceleration/deceleration speed.

 Also, when STATUS NUMBER on the controller's front panel is set to override display in the warm-up oper-ation status, an underscore (_) is displayed in the second digit from the left so that you can confirm thewarm-up operation status.

Fig.5-3:Override Display in the Warm-Up Operation Status

When a target axis operates and the warm-up operation status is canceled, the robot operates at the speci-fied speed. Note that the joint section cools down at a low temperature if the robot continues to stop after thewarm-up operation status is canceled. Therefore, if a target axis continues to stop for a prolonged period(the setting value at shipment from the factory is 60 min), the warm-up operation status is set again and therobot operates at a reduced speed.

Note 1: When powering off the controller and then powering on again, if the power-off period is short, thetemperature of the robot's joint section does not decrease too much. Therefore, when powering offthe controller and then powering on again after the warm-up operation status is canceled, if thepower-off period is short, the robot starts in the normal status instead of the warm-up operation sta-

tus.Note 2: A target axis refers to the joint axis that is the target of control in the warm-up operation mode. It is

the joint axis specified in the WUPAXIS parameter.

  CAUTION

  CAUTION

Normal Status Warm-Up Operation Status

Page 376: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 376/457

  5Functions set with parameters

  Warm-Up Operation Mode  5-357

(2) Function Details1)Parameters, Dedicated I/O Signals and Status Variables of the Warm-Up Operation Mode

The following parameters, dedicated I/O signals and status variables have been added in the warm-up operationmode. Refer to Page 306, "5.1 Movement parameter", Page 371, "6.3 Dedicated input/output" andPage 60, "4

MELFA-BASIC IV" for details.

Table 5-13:Parameter List of the Warm-Up Operation Mode

Table 5-14:Dedicated I/O Signal List of Warm-Up Operation Mode

Table 5-15:Status Variable of Warm-Up Operation Mode

Parameter name Description and value

WUPENA Designate the valid/invalid of the Warm-up operation mode.0:Invalid/ 1: Valid

WUPAXIS Specify the joint axis that will be the target of control in the warm-up operation mode by selecting bit ON orOFF in hexadecimal (J1, J2, Åc from the lower bits).

Bit ON: Target axis/ Bit OFF: Other than target axis

WUPTIME Specify the time (unit: min.) to be used in the processing of warm-up operation mode. Specify the valid time inthe first element, and the resume time in the second element.Valid time: Specify the time during which the robot is operated in the warm-up operation status and at a

reduced speed. (Setting range: 0 to 60)Resume time: Specify the time until the warm-up operation status is set again after it has been canceled if a

target axis continues to stop. (Setting range: 1 to 1440)

WUPOVRD Perform settings pertaining to the speed in the warm-up operation status. Specify the initial value in the firstelement, and the value constant time in the second element. The unit is % for both.Initial value: Specify the initial value of an override (warm-up operation override) to be applied to the operation

speed when in the warm-up operation status. (Setting range: 50 to 100)Ratio of value constant time: Specify the duration of time during which the override to be applied to the opera-

tion speed when in the warm-up operation status does not change from the ini-tial value, using the ratio to the valid time. (Setting range: 0 to 50)

Parameter name Class Function

MnWUPENA (n=1t o 3)(Operation right required)

Input Enables the warm-up operation mode of each mechanism. (n: FMechanism No.)

Output Outputs that the warm-up operation mode is currently enabled. (n: FMechanism No.)

MnWUPMD(n=1 to 3) Output Outputs that the status is the warm-up operation status, and thus the robot will operate at areduced speed. (n: FMechanism No.)

Status variable Function

M_WUPOV Returns the value of an override (warm-up operation override) to be applied to the command speed inorder to reduce the operation speed when in the warm-up operation status.

M_WUPRT Returns the time during which a target axis in the warm-up operation mode must operate to cancel thewarm-up operation status.

M_WUPST Returns the time until the warm-up operation status is set again after it has been canceled.

Page 377: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 377/457

5-358 Warm-Up Operation Mode

5Functions set with parameters

2) To Use the Warm-Up Operation ModeTo use the warm-up operation mode, enable its function with parameters. The function can also be enabledor disabled with a dedicated input signal.

*Specifying with a ParameterTo enable the warm-up operation mode with a parameter, set 1 in the WUPENA parameter. After changingthe parameter, the warm-up operation mode is enabled by powering on the controller again. In the followingcases, however, the warm-up operation mode will not be enabled even if 1 is set in the WUPENA parame-ter.• When 0 is set in the WUPAXIS parameter (a target axis in the warm-up operation mode does not exist)• When 0 is set in the first element of the WUPTIME parameter (the warm-up operation status period is 0

min)• When 100 is set in the first element of the WUPOVRD parameter (the speed is not decreased even in the

warm-up operation status)When using the warm-up operation mode, change these parameters to appropriate setting values.

Note: For robots other than the RV-S series, the setting value of the WUPAXIS parameter at shipment fromthe factory has been set to 0. When using the warm-up operation mode, specify a target axis in the

warm-up operation mode (the joint axis to be the target of control in the warm-up operation mode; forexample, a joint axis that generates an excessive difference error when operating in a low tempera-ture environment).

*Switching with a Dedicated Input SignalBy assigning the MnWUPENA (n = 1 to 3: mechanism number) dedicated input signal, the warm-up opera-tion mode can be enabled or disabled without powering on the controller again. Also, the current enable/dis-able status can be checked with the MnWUPENA (n = 1 to 3: mechanism number) dedicated output signal.

Note 1:In order for the dedicated input signal above to function, it is necessary to enable the warm-up oper-ation mode in advance by setting the parameters described previously.

Note 2:This dedicated input signal requires the operation right of external I/O. Also, no input is accepted

during operation or jog operation.Note 3:The enable/disable status specified by this dedicated input signal is held even after the control right

of external I/O is lost.

3) When the Warm-Up Operation Mode Is EnabledWhen the warm-up operation mode is enabled, powering on the controller enters the warm-up operationstatus.In the warm-up operation status, the robot operates at a speed lower than the actual operation speed byapplying a warm-up operation override to the specified speed. The operation speed is gradually returned tothe specified speed as the operation time of a target axis elapses. When the warm-up operation status iscanceled, the robot will start operating at the specified speed.

*Initial Status Immediately After Power OnWhen the warm-up operation mode is enabled, powering on the controller enters the warm-up operationstatus.However, when powering off the controller and then powering on again after the warm-up operation status iscanceled, if the power-off period is short, the robot starts in the normal status instead of the warm-up opera-tion status as the temperature of the robot's joint section has not been lowered much from power-off. To bespecific, the robot starts in the normal status if the following condition is satisfied:Condition: The robot starts in the normal status if the time during which a target axis continues to stop from

the cancellation of the warm-up operation status to powering on is shorter than the time specifiedin the second element of the WUPTIME parameter (the resume time of the warm-up operationstatus).

Note that if the warm-up operation mode is switched to be enabled with the MnWUPENA (n = 1 to 3: mech-anism number) dedicated input signal, the warm-up operation status is always set.

Page 378: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 378/457

  5Functions set with parameters

  Warm-Up Operation Mode  5-359

*Methods to Check the Warm-Up Operation StatusWhether the current status is the warm-up operation status or normal status can be checked in the followingthree methods:• Checking with STATUS NUMBER on the controller's front panel

 

The current status can be checked by setting STATUS NUMBER to override display. In the warm-up oper-ation status, an underscore (_) is displayed in the second digit from the left.

Fig.5-4:Override Display in the Warm-Up Operation Status

• Checking with a status variableThe current status can be checked by monitoring the value of the M_WUPOV status variable (the value of awarm-up operation override). In the normal status, the value of M_WUPOV is set to 100%; in the warm-upoperation status, it is below 100%.

• Checking with a dedicated output signalIn the warm-up operation status, the MnWUPMD (n = 1 to 3: mechanism number) dedicated output signal isoutput.

*Switching Between the Normal Status and the Warm-Up Operation StatusWhen in the warm-up operation status, if a target axis in the warm-up operation mode continues operatingand its operation time exceeds the valid time of the warm-up operation status, the warm-up operation statusis canceled and the normal status is set. Thereafter, if the robot continues to stop, the joint section is cooleddown in a low temperature environment. When a target axis continues to stop over an extended period oftime and the resume time of the warm-up operation status is exceeded, the normal status switches to thewarm-up operation status again.

• Canceling the warm-up operation statusIf the accumulated time a target axis has operated exceeds the valid time of the warm-up operation status,the warm-up operation status is canceled and the normal status is set. Specify the valid time of the warm-upoperation status in the first element of the WUPTIME parameter. (The setting value at shipment from thefactory is 1 min.) If a multiple number of target axes exist, the warm-up operation status is canceled when alltarget axes exceed the valid time. Note that, with the M_WUPRT status variable, you can check when thewarm-up operation status will be canceled after how much more time a target axis operates.

• Switching from the normal status to the warning-up operation statusIf the time during which a target axis continues to stop exceeds the resume time of the warm-up operationstatus, the normal status switches to the warm-up operation status. Specify the resume time of the warm-up

operation status in the second element of the WUPTIME parameter. (The setting value at shipment from thefactory is 60 min.)If a multiple number of target axes exist, the warm-up operation status is set when at least one of the axesexceeds the resume time of the warm-up operation status.Note that, with the M_WUPST status variable, you can check when the status is switched to the warm-upoperation status after how much more time a target axis continues to stop.Note: If a target axis is not operating even when the robot is operating, it is determined that the target axis is

stopping.

Normal Status Warm-Up Operation Status

Page 379: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 379/457

5-360 Warm-Up Operation Mode

5Functions set with parameters

The following Fig. 5-5 shows an example of a timing chart for switching from the normal status to the warm-up operation status.

Fig.5-5:Example of Switching Between the Normal Status and the Warm-Up Operation Status

*Warm-Up Operation Override Value An override to be applied to the operation speed in order to reduce the speed in the warm-up operation sta-

tus is referred to as the warm-up operation override. The warm-up operation override changes as shown inthe figure below according to the time during which a target axis operates, and is immediately reflected inthe operation of the robot. Specify the initial value of the warm-up operation override and the ratio of thetime during which the override does not change in relation to the valid time of the warm-up operation statususing the WUPOVRD parameter. (The initial value is 70% and the ratio is 50% (= 30 sec) in the settings atshipment from the factory.)These values can be checked with the M_WUPOV status variable.

Fig.5-6:Changes in Warm-Up Operation Override

Normal status

Operating

Stopping

 Accumulated valueof target axis

operation time

Time during whicha target axis

continues to stop

Warm-upoperation status

Valid time

Resume time

Because the accumulatedoperation time reaches the validtime, the warm-up operationstatus is canceled.

Target axisoperation

Because a target axiscontinues to stop for thetime specified as the

resume time, the statuschanges to the warm-upoperation status again.

Time

100%

Value constant time

Valid time of the warm-up operation status

Warm-up operationoverride

Time during which atarget value is operating

Initial value

Change to the warm-up operation status Cancel the warm-up operation status

・Initial value: First element of the WUPOVRD parameter ・Valid time: Second element of the WUPTIME parameter ・Value constant time: Valid time x ratio specified in the second

element of the WUPOVRD parameter 

Page 380: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 380/457

  5Functions set with parameters

  Warm-Up Operation Mode  5-361

Note that the actual override in the warm-up operation status is as follows:• During joint interpolation operation = (operation panel (T/B) override setting value) x (program override

(OVRD instruction)) x (joint override (JOVRD instruction)) x warm-up operation override• During linear interpolation operation = (operation panel (T/B) override setting value) x (program override

(OVRD instruction)) x (linear specification speed (SPD instruction)) x warm-up operation override

Note 1:If the MODE switch on the controller's front panel is set to "TEACH," or for a jog operation or an oper-ation by real-time external control (MXT instruction), the warm-up operation override is not reflectedand the robot operates at the originally specified speed.

Note 2:In the warm-up operation status, because the robot operates at a speed lower than the originallyspecified speed, be sure to apply an interlock with peripheral units.

Note 3:If a multiple number of target axes exist, the warm-up operation override is calculated using the min-imum operation time among the target axes. If a certain target axis does not operate and the value ofthe M_WUPRT status variable does not change, the value of the warm-up operation override doesnot change regardless how much other target axes operate.

 

 Also, the value may return to the initial value before reaching 100% depending on whether each tar-get axis is operating or stopping. For example, when the value of a warm-up operation override is larger than the initial value, if a cer-

tain target axis switches from the normal status to the warm-up operation status, the operation timeof that axis becomes the smallest (the operation time is 0 sec) and the warm-up operation overridereturns to the initial value.

(3) If alarms are generated1) An excessive difference error occurs even if operating in the warm-up operation status.• If an error occurs when the warm-up operation override is set to the initial value, decrease the value of the

initial value (the first element of the WUPOVRD parameter).• If an error occurs while the warm-up operation override is increasing to 100%, the valid time of the warm-

up operation status or the value constant time may be too short. Increase the value of the first element ofthe WUPTIME parameter (valid time) or the second element of the WUPOVRD parameter (value constanttime ratio).

• If an error cannot be resolved after taking the above actions, change the operation program, and lower thespeed and/or the acceleration/deceleration speed.

2) An excessive difference error occurs if the warm-up operation status is canceled.• Increase the value of the first element of the WUPTIME parameter, and extend the valid time of the warm-

up operation status.• Check to see if the robot's load and the surrounding temperature are within the specification range.• Check whether the target axis continues to stop for an extended period of time after the warm-up operation

status has been canceled. In such a case, decrease the value of the second element of the WUPTIMEparameter, and shorten the time until the warm-up operation status is set again.

• If an error cannot be resolved after taking the above actions, change the operation program, and reducethe speed and/or the acceleration/deceleration speed.

3) The warm-up operation status is not canceled at all.• Check the setting value of the WUPAXIS parameter to see if a joint section that does not operate at all is

set as a target axis in the warm-up operation mode.• Check to see if a target axis has been stopping longer than the resume time (the second element of the

WUPTIME parameter) of the warm-up operation status.• Check to see if an operation is continuing at an extremely low specified speed (about 3 to 5% in override

during joint interpolation). If the specified speed is low, there is no need to use the warm-up operationmode. Thus, disable the warm-up operation mode.

Page 381: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 381/457

5-362  About singular point passage function

5Functions set with parameters

5.20 About singular point passage function(1) Overview of the function

Mitsubishi's robots calculate linear interpolation movement and store teaching positions as position data inthe XYZ coordinates system. In the case of a vertical 6-axis robot, for example, the position data isexpressed using coordinate values of the robot's X, Y, Z, A, B and C axes, but the robot can be in several

different postures even if the position data is the same. For this reason, the robot's position can be selectedamong the possible options using the coordinate values and the structure flag (a flag indicating the posture).However, there can be an infinite number of combinations of angles that a particular joint axis can take.Even if the structure flag is used, at the positions where this flag is switched, it may not be possible to oper-ate the robot with the desired position and posture (for example, in the case of a vertical 6-axis robot, axesJ4 and J6 are not uniquely determined when axis J5 is 0 degree). Such positions are called singular points,and they cannot be reached through XYZ jog and linear interpolation-based operation. To avoid this prob-lem in the past, the operation layout had to be designed such that no singular points would exist in the work-ing area, or the robot had to be operated using joint interpolation if it could not avoid passing a singularpoint.The singular point passage function allows a robot to pass singular points through XYZ jog and linear inter-polation, which helps increasing the degree of freedom for the layout design by enlarging the working areaby linear interpolation.

*Positions of singular points that can be passedThe positions of singular points that the singular point passage function allows the robot to pass are as fol-lows.

In the case of vertical 6-axis robots

<1> Positions where axis J5 = 0 degreeIn these positions, the structure flagswitches between NonFlip and Flip.

<2> Positions where the center of axis J5 coincides with therotation axis of axis J1

In these positions, the structure flag switches between Rightand Left.

In the case of vertical 5-axis robots

<1> Positions where the center of mechanical interface coincides with the rotationaxis of axis J1In these positions, the structure flag switches between Right and Left.

Page 382: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 382/457

  5Functions set with parameters

   About singular point passage function  5-363

*Operation when the singular point passage function is validWhen the singular point passage function is made valid, the robot can move from position A to position C viaposition B (the position of a singular point) and vice versa through XYZ jog and linear interpolation opera-tion. In this case, the value of the structure flag switches before and after passing position B.If the singular point passage function is invalid (or not supported), the robot stops before moving from posi-tion A to position B, as an error occurs. The robot stops immediately before position B in the case of XYZ jogoperation.

The robot can pass a singular point when the robot's motion path passes through the singular point. If themotion path does not go through the singular point (passes near the singular point), the robot continuesoperation without switching the value of the structure flag.•Positions D -> E -> F: The robot's motion path passes through a singular point

(the structure flag switches before and after position E).

•Positions G -> H -> I: The robot's motion path passes near a singular point(the structure flag is not switched).

When passing near a singular point, the robot may rotate in a wide circle as in thecase of position H in the figure above. Be sure to keep an eye on the robot and avoidgetting in the way when working near the robot, such as when teaching positions.

Position A Position B Position C

 

Position D Position E Position F

 

Position G Position H Position IPosition H

  CAUTION

Page 383: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 383/457

5-364  About singular point passage function

5Functions set with parameters

*How to use the singular point passage functionIn order to use the singular point passage function in jog operation, specify 1 (valid) for parameter FSP-JOGMD and turn the power supply to the controller off and on again. To use the function in automatic oper-ation, specify 2 for constant 2 in the TYPE specification of the interpolation instruction.

*Applicable modelsThe models supporting the singular point passage function are the RV-3S/3SJ/3SB/3SJB series and thefunction can be used in controller software of version K1 or later. If the singular point passage function ismade valid for non-applicable models, conventional motion is performed in the case of jog operation and anerror occurs in the case of automatic operation.

*LimitationsThere are the following limitations to the use of the singular point passage function.

(1) The singular point passage function cannot be used if additional axes are used for multiple mecha-nisms.

(2) The singular point passage function cannot be used if synchronization control is used for additionalaxes of a robot.

(3) The singular point passage function cannot be used if the compliance mode is valid.

(4) The singular point passage function cannot be used if the collision detection function is valid.(5) The information collection level of the maintenance forecast function must be set to level 1 (factory

setting).(6) MELFA-BASIC IV has instructions corresponding to the singular point passage function, but there are

no corresponding commands for the MOVEMASTER COMMAND. Use MELFA-BASIC IV to use thesingular point passage function.

(2) Singular point passage function in jog operationIn case of jog operation, the singular point passage function is specified to be valid (1) or invalid (0) byparameter FSPJOGMD.

1) For robots that cannot use the singular point passage function, changing the setting value of parameterFSPJOGMD has no effect; the same operation as in the past is performed (the models supporting thesingular point passage function are the RV-3S/3SJ/3SB/3SJB series).

2) It is not possible to specify multiple axes to perform jog operation at the same time when passing a sin-gular point. If it is attempted to operate an axis while another axis is operating, the operation is ignored.

3) A singular point adjacent alarm is generated if the robot comes near a singular point when performing jogoperation using a T/B. See Page 344, "5.17 About the singular point adjacent alarm".

4) The specification of parameter FSPJOGMD is reflected in jog operation via dedicated input signals aswell.

(3) Singular point passage function in position data confirmation (position jump)The specification of parameter FSPJOGMD is also reflected in position data confirmation (position jump).

If an interpolation instruction (e.g., MVS P1) is executed directly from T/B whenparameter FSPJOGMD is set to 1 (valid), the robot operates with the singular pointpassage function enabled even if the function is not made valid by the TYPE specifi-cation.

FSPJOGMD XYZ jog TOOL jog 3-axis XYZ jog CYLINDER jog JOINT jog

0(Factory setting)

Same as in the past Same as in the past Same as in the past Same as in the past Same as in the past

1Singular point pas-sage XYZ jog

Singular point pas-sage TOOL jog

Same as in the past Same as in the past Same as in the past

FSPJOGMD MO position movement MS position movement

0(Factory setting)

Same as in the past Same as in the past

1 Same as in the past Singular point passage position movement

  CAUTION

Page 384: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 384/457

  5Functions set with parameters

   About singular point passage function  5-365

(4) Singular point passage function in automatic operationIn order to use the singular point passage function in automatic operation, make the function valid in theTYPE specification for each target interpolation instruction.

TYPE (Type)

[Function]Specify the singular point passage function in the TYPE specification of an interpolation instruction. Theinterpolation instructions that support this function are linear interpolation (MVS), circular interpolation(MVR, MVR2 and MVR3) and circular interpolation (MVC). These instructions can be used in controller soft-ware of version K1 or later.

[Format]

[Terminology]<Constant 1> 0/1 : Short cut/detour  <Constant 2> 0/1/2 : Equivalent rotation/3-axis XYZ/singular point passage

[Reference Program]10 MVS P1 TYPE 0,2 ' Perform linear interpolation from the current position to P1 with the sin-

gular point passage function enabled.20 MVR P1,P2,P3 TYPE 0,2 ' Perform circular interpolation from P1 to P3 with the singular point pas-

sage function enabled.

[Explanation](1) A runtime error occurs if 2 is specified for constant 2 for robots that do not support the singular point pas-

sage function.

(2) The structure flag is not checked between the starting point and the end point if the singular point passagefunction is specified. Moreover, since the structure flag of the target position cannot be identified, the move-ment range is not checked for the target position and intermediate positions before the start of operation.

(3) If a speed is specified with the SPD instruction, the specified speed is set as the upper limit and the robotautomatically lowers the speed down to the level where a speed error does not occur near a singular point.

(4) The optimal acceleration/deceleration is not applied for interpolation instructions for which the singularpoint passage function is specified; the robot operates with a fixed acceleration/deceleration. At this point, ifthe acceleration time and the deceleration time are different due to the specification of the ACCEL instruc-tion, the longer time is used for both acceleration and deceleration.

(5) The specification of the CNT instruction is not applied to interpolation instructions for which the singularpoint passage function is specified; the robot operates with acceleration/deceleration enabled.

(6) If the current position and the starting point position are different when a circular interpolation instruction is

set to be executed, the robot continues to operate until the starting point using 3-axis XYZ linear interpola-tion even if the singular point passage function is specified in the TYPE specification.(7) If an interpolation for which the singular point passage function is specified is paused and the operation is

resumed after jog movement, the robot moves to the position at which the operation was paused accordingto parameter RETPATH. If parameter RETPATH is set to 0 (invalid: do not return to the paused position),the structure flag is not switched unless the motion path after resuming the operation does not pass a sin-gular point as in the figure below. Thus, the posture of the robot at the completion of interpolation may bedifferent from the case where the operation is not paused.

TYPE[]<Constant 1>, <Constant 2>

Page 385: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 385/457

5-366  About singular point passage function

5Functions set with parameters

(8) If the singular point passage function is specified, the operation speed may be lowered compared to nor-mal linear interpolation, etc. Moreover, the singular point passage function may affect the execution speedof programs as the function involves complicated processing. Specify the singular point passage functiononly for interpolation instructions where the function is required.

NonFlip

Singular point

The structure flag changes from NonFlip toFlip as the robot passes a singular point

NonFlip

Singular point

The structure flag remains NonFlip as therobot does not pass a singular point

Pause

JogResume

Page 386: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 386/457

  6External input/output functions

  Types  6-367

6 External input/output functions

6.1 Types(1)Dedicated input/output................ These I/O signals are used to indicate various statuses, such as the

statuses of remote operations including the execution and stopping ofrobot programs, status information during execution, and status of the

servo power supply. 

 A desired function is assigned to each I/O signal. Functions areassigned in two ways: one is to set the applicable signal number ineach dedicated parameter (Refer to "6.3 Dedicated input/output" onpage 371), while the other is to use an emergency stop input (Refer to"6.6 Emergency stop input" on page 389). Frequently used functionshave been assigned to signals in advance. The user may add new func-tions or modify the existing functions.

(2)General-purpose input/output ..... These I/O signals are used to communicate with the PLC, etc., via robotprograms. They are used to acquire positioning signals from peripheraldevices or check the robot position. Usage is not limited.

(3)Hand input/output ....................... These I/O signals are used in the control of robot hands, for example, toinstruct the hand to open or close or to acquire information from thesensors installed in the hand. They can be controlled with user pro-grams. Wiring is performed until near the tip of the robot hand. (Handoutputs are optional.)

Table 6-1:Overall I/O Signal Map

I/O Signal number How to use

Standard remote I/Os 0 to 31 (15)Note1)

Note1)The descriptions in parentheses apply to the CR1 controller.

Refers/assigns with theM_IN,M_INB,M_INW,M_OUT,M_OUTB or M_OUTW vari-able

Example) IF M_IN(0)=1 THEN M_OUT(0)=1

Expansion remote I/Os 32 to 255 (240) Note1) Same as the above.

Hand input/output 900 to 907 Same as the above. May be substituted by the HOPENand HCLOSE instructions.

Example) IF M_IN(900) THEN M_OUT(900)=1HOPEN 1 , HCLOSE 1

CC-Link Bit Note2) 

Note2)For details on CC-Link, refer to "CC-Link Interface Instruction Manual."

When one station is occupied:6000 to 6031When four station is occupied:6000 to 6127(This is the signal number for station number1. The last 2 bits cannot be used.)

Refers/assigns with the M_IN, M_INB, M_INW, M_OUT,M_OUTB or M_OUTW variable

Example) IF M_IN(6000)=1 THEN M_OUT(6000)=1

CC-Link RegisterNote2) When one station is occupied:6000 to 6003When four station is occupied:6000 to 6015(This is the signal number for station number1.)

Referenced or assigned by the M_DIN and M_DOUT vari-ables.

Example) IF M_DIN(6000)=1000 THENM_OUT(6000)=200

Page 387: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 387/457

6-368 Connection method 

6External input/output functions

6.2 Connection methodThe robot and external input/output device are connected by connecting the optional external input/outputcable to the parallel input/output unit connector in the controller and the external input/output device. Oneparallel input/output unit is mounted in the controller as a standard. However, up to eight units can bemounted using options.

The power supply (24VDC) for the remote input/output unit installed outside of the controller, and the powersupply (12 to 24VDC) for the input/output circuit must be prepared by the user.The standard input/output unit pin Nos. and signal assignment are shown in Table 6-2 and Table 6-3. Thepin layout is shown in Fig. 6-1. Refer to the Table 6-4, for the CR1 controller source type.Refer to the separate "Standard Specifications" for details on the electrical specifications of the input/outputcircuit.

<Differences between Controller Models>The number of standard I/O points provided by the CR1 controller is 16 for input points and 16 for outputpoints.Controllers other than CR1 (CR2, CR3, CR4, CR7, CR8 and CR9) provide 32 input points and 32 outputpoints as the standard.

Table 6-2:Table of standard parallel input/output unit CN100 pin Nos. and signal assignments

PinNo.

2A-CBLwire color

Note1)

Note1)The wire colors indicate the identification of the optional external input/output cables.

Function namePinNo.

2A-CBL wire color  

Note1)

Function name

General-purposeDedicated/powersupply, common

General-purposeDedicated/powersupply, common

1 Orange/red A FG 26 Orange/blue A FG2 Gray/red A 0V: for pins 4-7 27 Gray/blue A 0V: for pins 29-323 White/red A 12/24V: for pins 4-7 28 White/blue A 12/24V: for pins 29-324 Orange/red A General-purpose output 0 Running Note2)

Note2)These are assigned as the default. The assignment can be changed with the dedicated input/outputparameter. Refer to "6.3 Dedicated input/output" on page 371.

29 Yellow/blue A General-purpose output 45 Pink/red A General-purpose output 1 During servo ON Note2) 30 Pink/blue A General-purpose output 56 Orange/red B General-purpose output 2 During error

occurrenceNote2)31 Orange/blue B General-purpose output 6

7 Gray/red B General-purpose output 3 Operation r ights Note2) 32 Gray/blue B General-purpose output 78 White/red B 0V: for pins 10-13 33 White/blue B 0V: for pins 35-389 Orange/red B 12/24V: for pins 10-13 34 Yellow/blue B 12/24V: for pins 35-38

10 Pink/red B General-purpose output 8 35 Pink/blue B General-purpose output 1211 Orange/red C General-purpose output 9 36 Orange/blue C General-purpose output 1312 Gray/red C General-purpose output 10 37 Gray/blue C General-purpose output 1413 White/red C General-purpose output 11 38 White/blue C General-purpose output 1514 Orange/red C COM0(12V/24V(COM)) :

for pins 15-2239 Yellow/blue C COM1(12V/

24V(COM)) : for pins40-47

15 Pink/red C General-purpose input 0 Stop (all slots stop) Note3)

Note3)The stop input assignment is fixed to the input signal 0.

40 Pink/blue C General-purpose input 816 Orange/red D General-purpose input 1 Servo OFF Note2) 41 Orange/blue D General-purpose input 917 Gray/red D General-purpose input 2 Error reset Note2) 42 Gray/blue D General-purpose input 1018 White/red D General-purpose input 3 Servo ON Note2) 43 White/blue D General-purpose input 1119 Orange/red D General-purpose input 4 Operation rights Note2) 44 Yellow/blue D General-purpose input 1220 Pink/red D General-purpose input 5 45 Pink/blue D General-purpose input 1321 Orange/red E General-purpose input 6 46 Orange/blue E General-purpose input 1422 Gray/red E General-purpose input 7 47 Gray/blue E General-purpose input 1523 White/red E 48 White/blue E24 Orange/red E 49 Yellow/blue E

25 Pink/red E 50 Pink/blue E

Page 388: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 388/457

  6External input/output functions

  Connection method   6-369

Table 6-3:Table of standard parallel input/output unit CN300 pin Nos. and signal assignments

Table 6-4:Standard parallel I/O interface CN100pin No. and signal assignment list<Source type of CR1 controller> 

PinNo.

2A-CBL wire color

Note1)

Note1) The wire colors indicate the identification of the optional external input/output cables.

Function namePinNo.

2A-CBL wire color  

Function name

General-purposeDedicated/powersupply, common

General-purposeDedicated/powersupply, common

1 Orange/red A FG 26 Orange/blue A FG2 Gray/red A 0V: for pins 4-7 27 Gray/blue A 0V: for pins 29-32

3 White/red A 12/24V: for pins 4-7 28 White/blue A 12/24V: for pins 29-324 Orange/red A General-purpose output 16 29 Yellow/blue A General-purpose output 205 Pink/red A General-purpose output 17 30 Pink/blue A General-purpose output 216 Orange/red B General-purpose output 18 31 Orange/blue B General-purpose output 227 Gray/red B General-purpose output 19 32 Gray/blue B General-purpose output 238 White/red B 0V: for pins 10-13 33 White/blue B 0V: for pins 35-389 Orange/red B 12/24V: for pins 10-13 34 Yellow/blue B 12/24V: for pins 35-38

10 Pink/red B General-purpose output 24 35 Pink/blue B General-purpose output 2811 Orange/red C General-purpose output 25 36 Orange/blue C General-purpose output 2912 Gray/red C General-purpose output 26 37 Gray/blue C General-purpose output 3013 White/red C General-purpose output 27 38 White/blue C General-purpose output 3114 Orange/red C COM0(12V/24V(COM)) :

for pins 15-22

39 Yellow/blue C COM1(12V/24V(COM)) : for pins40-47

15 Pink/red C General-purpose input 16 40 Pink/blue C General-purpose input 2416 Orange/red D General-purpose input 17 41 Orange/blue D General-purpose input 2517 Gray/red D General-purpose input 18 42 Gray/blue D General-purpose input 2618 White/red D General-purpose input 19 43 White/blue D General-purpose input 2719 Orange/red D General-purpose input 20 44 Yellow/blue D General-purpose input 2820 Pink/red D General-purpose input 21 45 Pink/blue D General-purpose input 2921 Orange/red E General-purpose input 22 46 Orange/blue E General-purpose input 3022 Gray/red E General-purpose input 23 47 Gray/blue E General-purpose input 3123 White/red E 48 White/blue E24 Orange/red E 49 Yellow/blue E25 Pink/red E 50 Pink/blue E

PinNo.

2A-CBLwire color

Note1)

Note1) The wire colors indicate the identification of the optional external input/output cables.

Function namePinNo.

2A-CBLwire color 

Function name

General-purposeDedicated/power supply,

commonGeneral-purpose

Dedicated/powersupply, common

1 Orange/Red A FG 26 Orange/Blue A FG2 Gray/Red A 0V:For pins 4-7, 10-13 27 Gray/Blue A 0V:For pins 29-32, 35-383 White/Red A 12V/24V:For pins 4-7, 10-13 28 White/Blue A 12V/24V:For pins 29-32,

35-384 Yellow/Red A General-purpose output 0 Running 29 Yellow/Blue A General-purpose output 45 Pink/Red A General-purpose output 1 Servo on 30 Pink/Blue A General-purpose output 56 Orange/Red B General-purpose output 2 Error 31 Orange/Blue B General-purpose output 67 Gray/Red B General-purpose output 3 Operation rights 32 Gray/Blue B General-purpose output 78 White/Red B Reserved 33 White/Blue B Reserved9 Yellow/Red B Reserved 34 Yellow/Blue B Reserved10 Pink/Red B General-purpose output 8 35 Pink/Blue B General-purpose output

1211 Orange/Red C General-purpose output 9 36 Orange/Blue C General-purpose output

1312 Gray/Red C General-purpose output

1037 Gray/Blue C General-purpose output

14

13 White/Red C General-purpose output11 38 White/Blue C General-purpose output1514 Yellow/Red C COM0(12V/24V(COM)) :For

pins 15-2239 Yellow/Blue C COM1(12V/24V(COM))

:For pins 40-4715 Pink/Red C General-purpose input 0 Stop(All slot) Note2)

Note2) The assignment of the dedicated input signal "STOP" is fixed.

40 Pink/Blue C General-purpose input 8

16 Orange/Red D General-purpose input 1 Servo off 41 Orange/Blue D General-purpose input 917 Gray/Red D General-purpose input 2 Error reset 42 Gray/Blue D General-purpose input 1018 White/Red D General-purpose input 3 Start 43 White/Blue D General-purpose input 1119 Yellow/Red D General-purpose input 4 Servo on 44 Yellow/Blue D General-purpose input 1220 Pink/Red D General-purpose input 5 Operation rights 45 Pink/Blue D General-purpose input 1321 Orange/Red E General-purpose input 6 46 Orange/Blue E General-purpose input 1422 Gray/Red E General-purpose input 7 47 Gray/Blue E General-purpose input 1523 White/Red E Reserved 48 White/Blue E Reserved24 Yellow/Red E Reserved 49 Yellow/Blue E Reserved25 Pink/Red E Reserved 50 Pink/Blue E Reserved

Page 389: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 389/457

6-370 Connection method 

6External input/output functions

The signals assigned as a dedicated input can be used as general-purpose inputsduring program execution. However, for safety purposes, these must not beshared with the general-purpose inputs except for inputting values. The signalsassigned as dedicated outputs cannot be used in the program. If used, an error willoccur during operation

.

Fig.6-1:Parallel input/output unit connection and pin layout

  CAUTION

50

1

25

26

<CN100>

<CN300>

Input 16 to 31

Output 16 to 31

Input 0 to 15

Output 0 to 15

(Channel No. is set to 0 at shipment)

Connection and pin layout

Control unit

 * 2A-RZ361 is an input/output32/32 point unit (Occupiesone station)

  CAUTION [*1]The channel number is set to "0".The channel No. of 8 to F is used for themaker test. If any value of 8 to F is set, it maybe dangerous since the robot unexpectedlymoves. Don't set any value of 8 to F. There is no station number setting switch inthe I/O card equipped in the standard of CR1controller.

Page 390: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 390/457

  6External input/output functions

  Dedicated input/output   6-371

6.3 Dedicated input/output

The functions shown in Table 6-5 are available for the dedicated input/output signals. These are used by theparallel input/output unit by assigning the signal No. in the parameter.The signal No. is assigned by the signal No. used in the order of "input signal" and "output signal" in eachparameter. Refer to "(1)Setting the parameters" in "3.13 Operation of maintenance screen" on page 54 for

details on setting the parameters. If a "-1" is designated for the assigned signal No., that signal will be inval-idated.The I/O parameters can be set on the T/B parameter screen or by using the maintenance tool of the PC sup-port software (optional).To use the dedicated I/O signals, set the key switch on the operation panel to AUTO (Ext.) beforehand.

Table 6-5:Table of dedicated input/output

Parametername

Class Name FunctionSignallevelNote5)

Factory shipmentsignal number.Input, output

RCREADY Input - - -1(No meaning),-1Output Controller power ON

readyOutputs that the power has been turned ON and that the externalinput signal can be received.

 ATEXTMD Input - - -1(No meaning),-1Output Remote mode output This output indicates that the key switch on the operation panel isset to AUTO (Ext.), which is a remote operation mode.This signal must be turned ON before any control tasks using I/Osignals can be performed.

TEACHMD Input - - -1(No meaning),-1Output Teaching mode output This output indicates that the key switch on the operation panel is

set to Teaching mode. ATTOPMD Input - - -1(No meaning),

-1Output Automatic mode output This output indicates that the key switch on the operation panel isset to AUTO (OP),

IOENA Input Operation rights inputsignal

Sets the validity of the operation rights for the external signal con-trol.

Level 5,

3Output Operation rights outputsignal

Outputs the operation rights valid state for the external signal con-trol.

The operation right is given when the operation right input signal isON, the mode switch is set to AUTO (Ext.), and there is no otherdevice that currently has the operation right.

START(Operationright required)

Input Start input This input starts a program. To start a specific program, select theprogram using the program selection signal "PRGSEL" and numer-ical input "IODATA," and then input the start signal. Note that whenthe parameter "PST" is enabled, the system reads the programnumber from the numerical input (IODATA) and starts the corre-sponding program (i.e., program selection becomes no longer nec-essary). All task slots are executed during multitask operation.However, slots whose starting condition is set to ALWAYS orERROR via a parameter "SLT**" will not be executed.

Edge 3,

 0Output Operating output This output indicates that a program is being executed. During mul-titask operation, this signal turns ON when at least one task slot is

operating.However, slots whose starting condition is set to ALWAYS orERROR via a parameter "SLT**" will not be executed.

STOP Input Stop input This input stops the program being executed. (This does not applyto slots whose starting condition is set to ALWAYS or ERROR.)The stop input signal No. is fixed to 0, and cannot be changed. All task slots are stopped during multitask operation.However, slots whose starting condition is set to ALWAYS orERROR via a parameter "SLT**" will not be executed.Contacts A and B may be changed using the parameter INB.

Level 0(Cannotchange),

-1Output Pausing output This output indicates that the program is paused.

Turns ON when there is not slot multitask running, and at least oneslot is pausing.However, slots whose starting condition is set to ALWAYS orERROR via a parameter "SLT**" will not be executed.

Page 391: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 391/457

6-372 Dedicated input/output 

6External input/output functions

Parametername

Class Name FunctionSignallevelNote5)

Factory shipmentsignal number.Input, output

STOP2 Input Stop input This input stops the program being executed.(The specification is the same as for the STOP parameter.)

Unlike the STOP parameter, signal numbers can be changed.

Level -1

-1Output Pausing output This output indicates that the program is paused.(The specification is the same as for the STOP parameter.)

STOPSTS Input - - -1(No meaning),-1Output Stop signal input Outputs that the stop is being input. (Logical ADD of all devices.)

SLOTINIT(Operationright required)

Input Program reset This input cancels the paused status of the program and brings theexecuting line to the top. Executing a program reset makes it pos-sible to select a program.In the multitask mode, the program reset is applied to all task slots.However, slots whose starting condition is set to ALWAYS orERROR via a parameter "SLT**" will not be executed.

Edge -1,

-1Output Program selection

enabled outputOutputs that in the program selection enabled state.Turns ON when program are not running or pausing.In multitask operation, this output turns ON when all task slots areneither operating nor paused.

However, slots whose starting condition is set to ALWAYS orERROR via a parameter "SLT**" will not be executed.ERRRESET Input Error reset input signal Releases the error state. Edge 2,

2Output Error occurring outputsignal

Outputs that an error has occurred.

SRVON(Operationright required)

Input Servo ON input signal This input turns ON the servo power supply for the robot.With a multi-mechanism configuration, the servo power suppliesfor all mechanisms will be turned ON.

Edge 4,

1Output In servo ON output sig-nal

This output turns ON when the servo power supply for the robot isON. If the servo power supply is OFF, this output also remainsOFF.With a multi-mechanism configuration, this output turns ON whenthe servo of at least one mechanism is ON.

SRVOFF Input Servo OFF input signal This input turns OFF the servo power supply for the robot.(Applica-ble to all mechanisms)

The servo cannot be turned ON while this signal is being input.

Level 1,

-1Output Servo ON disable out-

put signalThis output indicates a status where the servo power supply can-not be turned ON. (Echo back)

 AUTOENA Input Automatic operationenabled input

Disables automatic operation when inactive. If this signal is inac-tive, and the AUTO mode is entered, E5010 will occur.This input is used to interlock the operations via the operationpanel with the I/O signals. Use of this input is not a requirement.

Level -1,

 -1Output Automatic operationenabled output

Outputs the automatic operation enabled state.

CYCLE Input Cycle stop input signal Starts the cycle stop. Edge -1,-1Output In cycle stop operation

output signalOutputs that the cycle stop is operating.Turns OFF when the cycle stop is completed.

MELOCK(Operationright required)

Input Machine lock input sig-nal

Sets/releases the machine lock state for all mechanisms.This can be set or released when all slots are in the program selec-tion state.

Signal level will be set to Level when program selection is enabled.

Level -1,

-1Output In machine lock state

output signalOutputs the machine lock state.This turns On when at least one mechanism is in the machine lockstate. During the machine lock state, the robot will not move, andprogram operation will be enabled.

SAFEPOS(Operationright required)

Input Safe point return inputsignal

Requests the safe point return operation.This signal initiates a joint interpolation movement to the positionset by the parameter "JSAFE." The speed is determined by theoverride setting. Be careful not to interfere with peripheral devices.

Edge -1,

-1Output In safe point return out-

put signalOutputs that the safe point return is taking place.

BATERR Input - - -1,-1Output Battery voltage drop Outputs that the battery voltage has dropped.

OUTRESET(Operation

right required)

Input General-purpose out-put signal reset

Resets the general-purpose output signal.The operation at the input is set with parameters ORST0 to

ORST224.

Edge -1,

-1(No meaning)Output - -

Page 392: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 392/457

  6External input/output functions

  Dedicated input/output   6-373

Parametername

Class Name FunctionSignallevelNote5)

Factory shipmentsignal number.Input, output

HLVLERR Input - - -1(No meaning),-1Output High level error output

signal

Outputs that a high level error is occurring.

LLVLERR Input - - -1(No meaning),-1Output Low level error output

signalOutputs that a low level error is occurring.

CLVLERR Input - - -1(No meaning),-1Output Warning level error out-

put signalOutputs that a warning level error is occurring.

EMGERR Input - - -1(No meaning),-1Output Emergency stop output

signalOutputs that an emergency stop is occurring.

SnSTART(n=1 to 32)(Operationright required)

Input Slot n start input Starts each slot. n=1 to 32 Edge -1,-1Output Slot n in operation out-

putOutputs the operating state for each slot. n=1 to 32

SnSTOP

(n=1 to 32)

Input Slot n stop input Outputs the operating state for each slot. n=1 to 32 Level -1,

-1Output Slot n in pausing output Outputs that each slot and program is temporarily stopped.n=1 to 32MnSRVOFF(n=1 to 3)

Input Mechanism n servoOFF input signal

This signal turns OFF the servo for each mechanism. n=1 to 3The servo cannot be turned ON while this signal is being input.

Level -1,

-1

Output Mechanism n servo ONdisabled output signal

Outputs the servo ON disabled state. (Echo back)

MnSRVON(n=1 to 3)(Operationright required)

Input Mechanism n servo ONinput signal

Turns the servo for each mechanism ON.n=1 to 3

Edge -1,

-1Output Mechanism n in servoON output signal.

Turns the servo for each mechanism ON.n=1 to 3

MnMELOCK(n=1 to 3)(Operationright required)

Input Mechanism n machinelock input signal

Sets/releases the machine lock state for each mechanism.n=1 to 3

Level -1,-1

Output Mechanism n inmachine lock output

signal

Outputs that the machine lock state is entered.n=1 to 3

PRGSEL(Operationright required)

Input Program selection inputsignal

Designates the setting value for the program No. with numericvalue input signals.The program for slot 1 is selected. Output this signal when at least30 ms has elapsed following the start of output to the numericalinput (IODATA). This signal should also be output to the robot for atleast 30 ms.

Edge -1,Note5)

-1(No meaning)Output - -OVRDSEL(Operationright required)

Input Override selection inputsignal

Designates the setting value for the override with the numericvalue input signals.Output this signal when at least 30 ms has elapsed following thestart of output to the numerical input (IODATA). This signal shouldalso be output to the robot for at least 30 ms.

Edge -1,Note5)

-1(No meaning)Output - -IODATA Input Numeric value input

(Start bit number, 

end bit number)

Numerical values are read as binary values.

*Program number (Read by the PRGSEL) 

If the parameter "PST" is enabled, it is read by the start signal.*Override (Read by the OVRDSEL)

 

The bit width can be set arbitrarily. However, the accuracy of outputvalues cannot be guaranteed when they exceed the set bit width.Output this input to the robot for at least 30 ms before inputting thePRGSEL or other setting signals.

Level -1(Start bit),

-1(End bit),Note1)Note5)

-1(Start bit),-1(End bit)

Output Numeric value output(Start bit number,

 

end bit number)

Numerical values are output as binary values.*Program number (Output by the PRGOUT),*Override (Output by the OVRDOUT),*Outputs the line number (output by the LINEOUT)*Error number (output by the ERROUT).The bit width can be set arbitrarily. However, the accuracy of outputvalues cannot be guaranteed when they exceed the set bit width.Read this signal when at least 30 ms has elapsed following the

start of input of a program number (PRGOUT) or other signal to therobot.

Page 393: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 393/457

6-374 Dedicated input/output 

6External input/output functions

Parametername

Class Name FunctionSignallevelNote5)

Factory shipmentsignal number.Input, output

DIODATA Input Numeric value input(Register number)

The specified numeric values are loaded.For numeric values, it is possible to enter real numbers consisting

of 16 bits. Similar to the IODATA parameter, "program number,""override value" and other values are input to the specified regis-ters. When inputting to the robot, input PRGSEL (program numberselection) and OVRDSEL (override selection) after outputting atleast for 30 ms.Note) This parameter is exclusively used for CC-Link. Also, if the

IODATA parameter is set, the numeric values set in theIODATA parameter take precedence.

Level -1

-1Output Numeric value output(Register number)

The numeric values of the specified items are output.For numeric values, it is possible to output real numbers consistingof 16 bits. Similar to the IODATA parameter, "program number,""override value," "line number," "error number" and other valuesare output to the specified registers. When LINEOUT (line numberoutput request) and ERROUT (error number output request) areinput, these values are output to the specified registers. Be sure to

wait for at least 30 ms after that, and then load these values.Note) This parameter is exclusively used for CC-Link. Also, if theIODATA parameter is set, the numeric values set in theIODATA parameter and this parameter are output.

PRGOUT Input Program No. outputrequest

The program number for task slot 1 is output to the numerical out-put (IODATA). After the start of inputting this signal to the robot,wait at least 30 ms before reading the numerical output (IODATA)signal.

Edge -1,Note5)

-1Output Program No. output sig-nal

The "program number output in progress" status is output to thenumerical output.

LINEOUT Input Line No. output request The line number for task slot 1 is output to the numerical output(IODATA). After the start of inputting this signal to the robot, wait atleast 30 ms before reading the numerical output (IODATA) signal.

Edge -1,Note5)

-1Output Line No. output request The "line number output in progress" status is output to the numer-ical output.

OVRDOUT Input Override value request The OP override is output to the numerical output (IODATA). Afterthe start of inputting this signal to the robot, wait at least 30 msbefore reading the numerical output (IODATA) signal.

Edge -1,Note5)

-1Output Override value outputsignal

The "override output in progress" status is output to the numericaloutput.

ERROUT Input Error No. output request The error number is output to the numerical output (IODATA). Afterthe start of inputting this signal to the robot, wait at least 30 msbefore reading the numerical output (IODATA) signal.

Edge -1,Note5)

-1Output Error No. output signal The "error number output in progress" status is output to thenumerical output.

JOGENA(Operationright required)

Input Jog valid input signal Jogs the designated axis in the designated mode.Operation takes place while this signal is ON.

Level -1,

-1Output Jog valid output signal Outputs that the jog operation is entered.JOGM Input Jog mode input

(start No., end No.)Designates the jog mode.0/1/2/3/4 = Joint, XYZ, cylindrical, 3-axis XYZ, tool

Level -1(Start bit),-1(End bit),

-1(Start bit),-1(End bit)

Output Jog mode output(start No., end No.)

Outputs the current jog mode.

JOG+ Input Jog feed plus side for 8-axes(start No., end No.)

Designates the jog operation axis.JOINT jog mode: J1, J2, J3, J4, J5, J6, J7 and J8 axes from thestart number.XYZ jog mode: X, Y, Z, A, B, C, L1 and L2 axes from the start num-ber.CYLINDER jog mode: X, Éý, Z, A, B, C, L1 and L2 axes from thestart number.3-axis XYZ jog mode: X, Y, Z, J4, J5 and J6 axes from the startnumber.TOOL jog mode: X, Y, Z, A, B and C axes from the start number.

 jiku -1,Note3)

-1

Output - -

Page 394: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 394/457

  6External input/output functions

  Dedicated input/output   6-375

Parametername

Class Name FunctionSignallevelNote5)

Factory shipmentsignal number.Input, output

JOG- Input Jog feed minus side for8-axes

(start No., end No.)

Designates the jog operation axis.JOINT jog mode: J1, J2, J3, J4, J5, J6, J7 and J8 axes from the

start number.XYZ jog mode: X, Y, Z, A, B, C, L1 and L2 axes from the start num-ber.CYLINDER jog mode: X, Éý, Z, A, B, C, L1 and L2 axes from thestart number.3-axis XYZ jog mode: X, Y, Z, J4, J5 and J6 axes from the startnumber.TOOL jog mode: X, Y, Z, A, B and C axes from the start number.

Level -1,Note3)

-1

Output - -JOGNER 

(Operationright required)

Input Errors during jog opera-tionTemporarily ignoringinput signal

Temporarily ignores errors that cannot be reset during jog opera-tion.* This signal is applicable to only machine 1. The controller soft-ware version J2 or later.

Level -1,

-1Output Errors during jog opera-tion

Temporary ignoring out-put signal

Outputs that the error is being ignored temporarily.* This signal is applicable to only machine 1. The controller soft-

ware version J2 or later.

HNDCNTLn(n=1 to 3)

Input - -Output Mechanism n hand out-

put signal state(start No., end No.)

Outputs the hand output(n=1) 900 to 907 state.Outputs the hand output(n=2) 910 to 917 state.Outputs the hand output(n=3) 920 to 927 state.Example) To output the four points from 900 through 903 to gen-eral-purpose output signals 3, 4, 5 and 6, set the HNDCNTL1 to (3,6).

-1(Start bit),-1(End bit)

HNDSTSn(n=1 to 3)

Input - -Output Mechanism n hand input

signal state(start No., end No.)

Outputs the hand input(n=1) 900 to 907 state.Outputs the hand input(n=2) 910 to 917 state.Outputs the hand input(n=3) 920 to 927 state.Example) To output the four points from 900 through 903 to gen-eral-purpose output signals 3, 4, 5 and 6, set the HNDCNTL1 to (3,

6).

-1(Start bit),-1(End bit)

HNDERRn(n=1 to 3)

Input Mechanism n hand errorinput signal

Requests the hand error occurrence. A LOW level error (error number 30) will be generated.

Level -1,

-1Output Mechanism n hand erroroutput signal

Outputs that a hand error is occurring.

 AIRERRn(n=1 to 5)

Input Mechanism n pneumaticpressure error input sig-nal

Request the pneumatic pressure error occurrence. A LOW level error (error number 31) will be generated.

Level -1, -1

Output Mechanism n pneumaticerror output signal

Outputs that a pneumatic pressure error is occurring.

USRAREA

Refer to "5.8 About user-defined area"

on page 328

Input - --1(Start bit),-1(End bit)

Note4)

Output User-designated area 8-points(start No., end No.)

Outputs that the robot is in the user-designated area.The output is made sequentially for areas 1, 2 and 3, as designedfrom the one closest to the start number.The area is set with parameters AREA1P1, AREA1P2 to AREA8P1

and AREA8P2.Setting example)When USRAREA is used as an example:If only area 1 is used, USRAREA: 8, 8 Setting validIf only area 1,2 is used, USRAREA: 8, 9 Setting validUSRAREA:-1,-1 to Setting invalidUSRAREA: 8,-1 to Setting invalid(No Error)USRAREA:-1,8 to Setting invalid(No Error)USRAREA:9,8 to Setting invalid(Error L6643)

MnPTEXC 

(n=1 to 3)Input - - -1,(No meaning)Output Warning for mainte-

nance parts replace-ment time

This output notifies that the replacement time of maintenance partshas been reached.

Level -1

Page 395: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 395/457

6-376 Dedicated input/output 

6External input/output functions

Note 1) Set in the order of input start No., input end No., output start No. and output end No. When using as the input or output of an actual value, use from the start No. to the end No., andexpress as a binary. The start No. indicates the low-order bit, and the end No. indicates the high-orderbit. Set only the numbers required to express the value.For example, when using for program selection and only programs 1 to 6 are available, the expressioncan be created by setting 3 bits. Up to 16 bits can be set.

 Assignment examples are shown below.Example)To set the start input signal in general-purpose input 16, and the operating output signal in

general-purpose output 25. Parameter START ={16, 25}

Example)When setting 4 bits of numerical input to general-purpose inputs 6 to 9, and 5 bits of numeri-cal output to general-purpose outputs 6 to 10. Parameter IODATA = {6, 9, 6, 10}

Note 2) Set in the order of input start No., input end No., output start No. and output end No. When using as the actual jog mode, use from the start No. to the end No., and express as a binary.The start No. indicates the low-order bit, and the end No. indicates the high-order bit. Set only the num-bers required to express the value.For example, when using only the joint mode and XYZ mode, the expression can be created by setting2 bits. Up to 3 bits can be set.

Note 3) They are in the order of an input starting number and then an input end number. Specify the J1/X axisfor the input starting number and the J8/L2 axis for the input end number at its maximum. For example, when using a 6-axis robot, only 6 bits need to be set. Even if using a 4-axis robot, when using the XYZ mode, the C axis is required, so 6 bits must be set.Up to 8 bits can be set.

Note 4) Set in the order of output start No. and output end No. The start number specifies area 1, while the endnumber specifies area 8 in the largest configuration.For example, setting 2 bits will suffice if only two areas are used. A maximum of 8 bits can be set.

Note 5) The meanings of the signal level are explained below.Level: The designated function is validated when the signal is ON, and the function is invalidated

when the signal is OFF. Make sure the signal is turned ON for at least 30 ms.Edge: The designated function is validated when the signal changes from the OFF to ON state, and

the function maintains the original state even when the signal returns to the OFF state. .

Parametername

Class Name FunctionSignallevelNote5)

Factory shipmentsignal number.Input, output

MnWUPENA 

(n=1 to 3) 

(Operationright required)

Input Mechanism n warm-upoperation mode enable

input signal

Enables the warm-up operation mode of each mechanism. (n=1 to3)

 

Note: To switch the warm-up operation mode from enable to dis-able or vice versa using this input signal, it is necessary to enablethe warm-up operation mode with the WUPENA parameter, etc. Ifthe warm-up operation mode has been disabled with a parameter,inputting this input signal will not enable the mode.

Level -1,

Output Mechanism n warm-upoperation mode outputsignal

Outputs that the warm-up operation mode is currently enabled.(n=1 to 3)

-1

MnWUPMD 

(n=1 to 3)Input - - -1,(No meaning)Output Mechanism n warm-up

operation status outputsignal

Outputs that the status is the warm-up operation status, and thusthe robot will operate at a reduced speed. (n=1 to 3)

-1

Set an interval of at least 300 ms

IODATA

PRGSEL

START

Set an interval of at least 300 ms

Example)

Page 396: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 396/457

  6External input/output functions

  Enable/disable status of signals  6-377

6.4 Enable/disable status of signalsNote that depending on the input signal type, the function may not occur even if the target signal is inputdepending on the robot state at that time, such as during operation or when stop is input. The relation of the robot status to the input signal validity is shown below.

Table 6-6:Validity state of dedicated input signalsParameter

nameName Validity of symbol on left according to robot states.

SLOTINIT Program reset

These do not function in the operation state (when START output is ON).

SAFEPOS Safe point return input

OUTRESET General-purpose output s ignalreset

PRGSEL Program selection input

MnWUPENA Mechanism n warm-up operationmode enable input

STARTSnSTART(n=1 to 32)

Start input

These function only when the external input/output has the operation rights(when IOENA output is ON).

SLOTINIT Program resetSRVONMnSRVON(n=1 to 3)

Servo ON input

MELOCKMnMELOCK(n=1 to 3)

Machine lock input

SAFEPOS Safe point return input

PRGSEL Program selection input

OVRDSEL Override selection input

JOGENA Jog enable input

MnWUPENA Mechanism n warm-up operationmode enable input

START Start input These do not function in the stop input state (when STOPSTS is ON).SLOTINIT Program reset

SAFEPOS Safe point return input

JOGENA Jog enable input

SRVON Servo ON input This does not function in the servo OFF input state.

MELOCK Machine lock input This functions only in the program selection state (when SLOTINIT outputis ON).

Page 397: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 397/457

6-378 External signal timing chart 

6External input/output functions

6.5 External signal timing chart

6.5.1 Individual timing chart of each signal

(1) RCREADY (Controller's power ON completion output)

(2) ATEXTMD (Remote mode output)

(3) TEACHMD (Teach mode output) 

(4) ATTOPMD (Auto mode output) 

(5) IOENA (Operation right input signal/operation right output signal) 

(6) START (Start input/operating output) 

(7) STOP (Stop input/aborting output) 

(8) STOPSTS (Output during stop signal input) 

<Output>

Power ON (RCREADY) (Indicates the status in which the controller can receive signals.)

Remote mode output(ATEXTMD)

(Indicates when the key switch on the operation panel is "Auto (Ext)")

<Output>

Teach mode output

(TEACHMD)(Indicates when the key switch on the operation panel is "TEACH.")

<Output>

 Auto mode output(ATTOPMD)

(Indicates when the key switch on the operation panel is "Auto (Op.)")

<Output>

Operation right input (IOENA)

Operation right output (IOENA)

<Intput>

<Output>

Level

When the STOP signal, or the emergency stop or other signal was input, or after the completion of the CYCLE signal

Start input (START)

Operating output (START)

<Intput>

<Output>

30 ms or more

When the START, SnSTART or SLOTINIT signal was input

Stop input (STOP)

 Aborting output (STOP)

<Intput>

<Output>

30 ms or more

During stop signal input(STOPSTS)

(Indicates that the STOP is being input.)<Output>

Page 398: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 398/457

  6External input/output functions

  External signal timing chart   6-379

(9) SLOTINIT (Program reset input/program selectable output) 

(10) ERRRESET (Error reset input/output during error occurrence) 

(11) SRVON (Servo ON input/output during servo ON)) 

(12) SRVOFF (Servo OFF input/servo ON disable output) 

(13) AUTOENA (Auto operation input/auto operation enable output) 

(14) CYCLE (Cycle stop input/output during cycle stop operation) 

When the START or SnSTART signal was input

Program reset (SLOTINIT)

Program selectable output(SLOTINIT)

<Intput>

<Output>

30 ms or more

Error reset input (ERRRESET)

Output during error occurrence(ERRRESET)

<Intput>

<Output>

When the SRVOFF, SnSRVOFF or emergency stop signal was input

Servo ON input (SRVON)

Output during servo ON (SRVON)

<Intput>

<Output>

30 ms or more

Servo OFF input (SRVOFF)

Servo ON disable output (SRVOFF)

<Intput>

<Output>

30 ms or more

 Auto operation enable input(AUTOENA)

 Auto operation enable output(AUTOENA)

<Intput>

<Output>

When a cycle operation is finished

Cycle stop input (CYCLE)

Output during cycle stop operation(CYCLE)

<Intput>

<Output>

Page 399: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 399/457

6-380 External signal timing chart 

6External input/output functions

(15) MELOCK (Machine lock input/output during machine lock) 

(16) SAFEPOS (Return to retreat point input/output during return to retreat point) 

(17) BATERR (Low battery voltage output) 

(18) OUTRESET (General-purpose output signal reset request input) 

(19) HLVLERR (Output during high level error occurrence) 

(20) LLVLERR (Output during low level error occurrence)

(21) CLVLERR (Output during warning level error occurrence)

(22) EMGERR (Output during emergency stop)

(23) SnSTART (Slot n start input/output during slot n operation)

Machine lock input (MELOCK)

Output during machine lock

(MELOCK)

<Intput>

<Output>

When returning to retreat point is complete

Return to retreat point input(SAFEPOS)

Output during return to retreat point(SAFEPOS)

<Intput>

<Output>

30 ms or more

<Output>

Low battery voltage (BATERR) (Indicates that the battery voltage is low.)

<Intput>

General-purpose output signal reset(OUTRESET)

(Resets the general-purpose output signal.)

30 ms or more

<Output>

High level error output (HLVLERR) (Indicates that a high level error is occurring.)

<Output>

Low level error output (LLVLERR) (Indicates that a low level error is occurring.)

<Output>

Warning level error output(CLVLERR) (Indicates that a warning level error is occurring.)

<Output>

Emergency stop output (EMGERR) (Indicates that an emergency stop is occurring.)

When the STOP, SnSTOP or emergency stop signal was input

Slot n start input (SnSTART)

Output during slot n operation(SnSTART)

<Intput>

<Output>

Page 400: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 400/457

  6External input/output functions

  External signal timing chart   6-381

(24) SnSTOP (Slot n stop input/output during slot n aborting) 

(25) MnSRVOFF (Mechanical n servo OFF input/mechanical n servo ON disable output) 

(26) MnSRVON (Mechanical n servo ON input/output during mechanical n servo ON) 

(27) MnMELOCK (Mechanical n machine lock input/output during mechanical n machine lock) 

(28) PRGSEL (Program selection input) * This is used together with the numeric value input (IODATA).

When the START, SnSTART or SLOTINIT signal was input

Slot n stop input (SnSTOP)

Output during slot n aborting(SnSTOP)

<Intput>

<Output>

30 ms or more

When the SRVON, SnSRVON or SRVON signal was input

Mechanical n servo OFF input(MnSRVOFF)

Mechanical n servo ON disable output(MnSRVOFF)

<Intput>

<Output>

30 ms or more

When the SRVOFF, SnSRVOFF or emergency stop signal was input

Mechanical n servo ON input(MnSRVON)

Output during mechanical n servo ON(MnSRVON)

<Intput>

<Output>

30 ms or more

Mechanical n machine lock input(MnMELOCK)

Output during mechanical n machinelock (MnMELOCK)

<Intput>

<Output>

Program number 

When the output request of a line number, override value or error number was input

Program number output request(PRGOUT)

Outputting program number (PRGOUT)

<Intput>

<Output>

Numeric value output (IODATA)

30 ms or more

Page 401: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 401/457

6-382 External signal timing chart 

6External input/output functions

(29) OVRDSEL (Override selection input) * This is used together with the numeric value input (IODATA).

(30) IODATA (Numeric value input/numeric value output) 

* This is used together with PRGSEL, OVRDSEL, PRGOUT, LINEOUT, OVRDOUT or ERROUT. 

(31) PRGOUT (Program number output request input/outputting program number)  

* This is used together with the numeric value output (IODATA).

(32) LINEOUT (Line number output request input/outputting line number) 

* This is used together with the numeric value output (IODATA).

(33) OVRDOUT (Override value output request/outputting override value) * This is used together with the numeric value output (IODATA).

Override value

When the output request of a program number, line number or error number was input

Override value output request(OVRDOUT)

Override value output request(OVRDOUT)

<Intput>

<Output>

Numeric value output (IODATA)

30 ms or more

Program number 

When the output request of a line number, override value or error number was input

Program number output request(PRGOUT)

Outputting program number (PRGOUT)

<Intput>

<Output>

Numeric value output (IODATA)

30 ms or more

Line number 

When the output request of a program number, overridevalue or error number was input

Line number output request (LINEOUT)

Outputting line number (LINEOUT)

<Intput>

<Output>

Numeric value output (IODATA)

30 ms or more

Override value

When the output request of a program number, line number or error number was input

Override value output request(OVRDOUT)

Override value output request(OVRDOUT)

<Intput>

<Output>

Numeric value output (IODATA)

30 ms or more

Page 402: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 402/457

  6External input/output functions

  External signal timing chart   6-383

(34) ERROUT (Error number output request/outputting error number) 

* This is used together with the numeric value input (IODATA).

(35) JOGENA (Jog enable input/output during jog enabled)

(36) JOGM (Jog mode input/jog mode output)

(37) JOG+ (Input for 8 axes on jog feed plus side)

(38) JOG- (Input for 8 axes on jog feed minus side)

(39) HNDCNTLn (Mechanical n hand output signal status)

Error number 

When the output request of a program number, overridevalue or line number was input

Error number output request (ERROUT)

Outputting error number (ERROUT)

<Intput>

<Output>

Numeric value output (IODATA)

30 ms or more

Jog enable input (JOGENA)

Output during jog enabled (JOGENA)

<Intput>

<Output>

Jog mode

(Replies the setting value of the jog mode input signal with jog mode output.)

Jog mode input (JOGM)

Jog mode output (JOGM)

<Intput>

<Output>

30 ms or more

Jog mode

Jog operation axis8 axes on jog feed plus side (JOG+)

<Intput>

(Specify the axis that will perform jog operation in the plus direction.)

8 axes on jog feed minus side (JOG-) Jog operation axis

(Specify the axis that will perform jog operation in the minus direction.)

<Intput>

(Indicates the output signal status of the hand.)

Mechanical n hand output signal status(HNDCNTLn)

<Output>

Hand output signal status

Page 403: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 403/457

6-384 External signal timing chart 

6External input/output functions

(40) HNDSTSn (Mechanical n hand input signal status)

(41) HNDERRn (Mechanical n hand error input signal/output during mechanical n hand error occurrence)

(42) AIRERRn (Mechanical n pneumatic error input signal/outputting mechanical n pneumatic error) 

(43) USRAREA (User-specified area 8 points output)

(44) MnWUPENA (Mechanism n warm-up operation mode enable input signal/ Mechanism n warm-up opera-tion mode output signal)

(45) MnWUPMD (Mechanism n warm-up operation status output signal)

* If the mechanism n warm-up operation status output (MnWUPMD) is assigned together with the mecha-nism n warm-up operation mode enable input (MnWUPENA), the timing chart is as shown below.

(Indicates the input signal status of the hand.)

Mechanical n hand input signal status(HNDSTSn)

<Output>

Hand input signal status

Mechanical n hand error input(HNDERRn)

Output during mechanical n hand error occurrence (HNDERRn)

<Intput>

<Output>

Mechanical n pneumatic error input(AIRERRn)

Outputting mechanical n pneumaticerror (AIRERRn)

<Intput>

<Output>

Within the user 

specified areaUser-specified area 8 points(USRAREA)

<Output>

(Indicates that it is within the area specified by areas 1 though 8.)

<Input>Mechanism n warm-up operation mode enableinput signal (MnWUPENA)

<Output>Mechanism n warm-up operation modeoutput signal (MnWUPENA)

<Output>Mechanism n warm-up operation status outputsignal (MnWUPMD)

(Indicates the warm-up operation status.)

<Input>Mechanism n warm-up operation mode enableinput signal (MnWUPENA)

<Output>Mechanism n warm-up operation status outputsignal (MnWUPMD)

When the warm-up operation status is canceled whilethe warm-up operation mode is enabled

Page 404: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 404/457

  6External input/output functions

  External signal timing chart   6-385

6.5.2 Timing chart example

(1) External signal operation timing chart (Part 1)

Fig.6-2:Example of external operation timing chart (Part 1)

Program reset

Program selection input signal

Cycle stop input signal

<Input>

Numeric value input

Start input

Stop input

Operation rights input signal

Error reset input signal

Program number output request

<Output>

Numeric value output

Operating status output

Waiting status output

Program selection enabled output

Cycle stop operating status output signal

Error occurring status output signal

IODATA

PROGSEL

START

STOP

IOENA

SLOTINIT

CYCLE

ERRRESET

IOENA

IODATA

START

STOP

SLOTINIT

ERRRESET

PRGOUT

CYCLE

1 2 3

1 2 3

E r 

r or occur r i  n gst at us

P r o gr am sel  ect i  on

P r o gr am st ar t 

S t o p

R est ar t 

S t o p

P r o gr am r eset 

E r 

r or r eset 

C  ycl  est o p

P r o gr am

E N D 

Operation rights output signal

Program No. 2 Program No. 3

P r o gr am sel  ect i  on

P r o gr am st ar t 

E r 

r or occur r i  n g

R est ar t 

P r o gr am r eset 

S t o p

P r o gr am sel  ect i  on

P r o gr am st ar t 

Program No. 1

Page 405: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 405/457

6-386 External signal timing chart 

6External input/output functions

(2) External signal operation timing chart (Part 2) An example of timing chart the servo ON/OFF, selecting the program, selecting the override, starting andoutputting the line No., etc., with external signals is shown in Fig. 6-3.

Fig.6-3:Example of external operation timing chart (Part 2)

SRVON

Override selection input signal

Override value output request

Line number output request

Servo ON input signal

<Output>

IODATA

PROGSEL

PROGOUT

OVRDSEL

OVRDOUT

LINEOUT

START

SRVON

IODATA

IOENA

START

SLOTINIT

SRVOFF

IOENA

1 80 50 5

  80 50 0 1 5  5

Program No. 1 Program No. 5

O

 per at i  onr i   gh t sr e quest 

er voON 

er voOF F 

O

ver r i  d eout  put 

O

ver r i  d esel  ect i  on

r o gr am st ar t 

r o gr am sel  ect i  on

r o gr am N o. out  put 

O

ver r i  d esel  ect i  on

r o gr am E N D 

i  neN o. out  put 

r o gr am st ar t 

i  neN o. out  put 

r o gr am N o. out  put 

Program selection input signal

<Input>

Numeric value input

Program number output request

Operating status output

Program selection enabled output

Start input

Servo OFF input signal

Operation rights input signal

Numeric value output

Operation rights output signal

er voON 

r o gr am N o. out  put 

r o gr am sel  ect i  on

In servo ONIn servo OFF

Page 406: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 406/457

  6External input/output functions

  External signal timing chart   6-387

(3) Example of external operation timing chart (Part 3) An example of the timing chart for error reset, general-purpose output reset and program reset, etc., withexternal signals is shown output in Fig. 6-4.

Fig.6-4:Example of external operation timing chart (Part 3)

START

SRVON

SRVOFF

ERRRESET

OUTRESET

SLOTINIT

IOENA

IOENA

START

SLOTINIT

STOP

SRVON

ERRRESET

EMGERR

Start input

Servo ON input signal

Servo OFF input signal

Error reset input signal

General-purposeoutput signal reset

Program reset

Operation rights input signal

General-purpose output

<Input>

Operation rights output signal

Emergency stop output signal

O

 per at i  onr i   gh t sr e quest 

r o gr am st ar t 

r o gr am st ar t 

er voON 

er voOF F 

er voON 

er voON 

er voON 

est ar t 

est ar t 

mer  genc yst o pON 

r r or r eset 

r r or r eset 

r r or occur r ence

ener al  - pur  poseout  put r eset 

r o gr am r eset 

<Output>

Operating status output

Waiting status output

Program selection enabled output

In servo ONIn servo OFF

Error occurringstatus output signal

Output signal resetfollowing parameterORST

Page 407: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 407/457

6-388 External signal timing chart 

6External input/output functions

(4) Example of external operation timing chart (Part 4) An example of the timing chart for jog operation, safe point return and program reset, etc., with external sig-nals is shown in Fig. 6-5.

Fig.6-5:Example of external operation timing chart (Part 4)

<Input>

START

SLOTINIT

SRVON

IOENA

ERRRESET

JOGENA

JOGM

JOG+

JOG-

SAFEPOS

IOENA

START

SLOTINIT

STOP

SRVON

ERRRESET

EMGERR

JOGM

JOGENA

0 0

00 2

1 3

J1+ J2- Z+

Program reset

Jog enable output signal<Output>

Recovery work

In servo ON

Jog enable input signal

Jog mode input

Jog mode output

In servo OFF

O per at i  onr i   gh t sr e quest 

S er voON 

P r o gr am st ar t 

E r r or occur r ence

S er voON 

J o gcommand J 1 + 

J o gcommand J 2 -

J o gcommand end 

J o gcommand Z 

J o gcommand end 

S af  e poi  nt r et ur nst ar t 

S af  e poi  nt r et ur nend 

P r o gr am r eset 

P r o gr am st ar t 

Start input

Servo ON input signal

Error reset input signal

Operation rights input signal

Operation rights output signal

Emergency stop output signal

Operating status output

Waiting status output

Program selection enabled output

Error occurringstatus output signal

For 8 axes on the jog feed plus side

For 8 axes on the jog feed plus side

Safe point restoreinput signal

E r r or r eset 

Page 408: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 408/457

  6External input/output functions

  Emergency stop input   6-389

6.6 Emergency stop inputFor wiring and other aspects of the emergency stop input, refer to the separate document entitled"Controller setup, basic operation, and maintenance."

6.6.1 Robot Behavior upon Emergency Stop Input

When an emergency stop signal is input while the robot is operating, the servo power supply is cut off bymeans of hardware control. The robot's tip path and stopping position after the input of an emergency stopsignal cannot be specified. An overrun may occur depending on the robot speed or load condition of thetool.

Page 409: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 409/457

7-390 Movement 

7Q & A

7 Q & A

The following lists Q & A.

7.1 Movement

Q A Reference page

What are the features of this robot? The features include the optimumacceleration/deceleration control, opti-mum speed control, compliance func-tion, and multitask function.

Page 11, "2.3 Functions Related to Movementand Control"

I want to operate the robot tip in linearmotion.

It is possible using the MVS instruction. Page 62, "(2) Linear interpolation movement"Page 190, " MVS (Move S)"

I want to operate the robot tip in circu-lar motion.

It is possible using the MVR, MVR2,MVR3 and MVC instruction.

Page 184, " MVR (Move R)"Page 186, " MVR2 (Move R2)"Page 188, " MVR3 (Move R 3)"Page 183, " MVC (Move C)"

I want to operate the robot tip in arch

motion with ease.

It is possible using the DEF ARCH and

MVA instruction.

Page 149, " DEF ARCH (Define arch)"

Page 181, " MVA (Move Arch)"

I want to operate the robot in accor-dance with the direction of the hand.I want to move the robot tip based onrelative value.

It is possible by setting a proximity/departure distance using the MVSinstruction. It can be done via multipli-cation or addition of position variables.

Page 190, " MVS (Move S)"Page 84, "(2) Relative calculation of positiondata (multiplication)"Page 84, "(3) Relative calculation of positiondata (Addition)"

I want to skip the robot's singularpoints via linear interpolation.

It can be done via an 3-axes XYZspecification using the TYPE option ofthe MVS instruction. Although the 3-axes XYZ specification gives a linearpath, the tip posture becomes unstable.

Page 190, " MVS (Move S)"

I want to control the robot in a pliablemanner.

It can be done using the CMP TOOLinstruction, etc. Pliableness can bespecified by the hand orientation, inapplicable robot axis units, etc.

Page 134, " CMP TOOL (Composition Tool)"Page 130, " CMP JNT (Comp Joint)"Page 132, " CMP POS (Composition Posture)"Page 137, " CMPG (Composition Gain)"Page 136, " CMP OFF (Composition OFF)"

I want to turn the robot's tip axis multi-ple times.

It is possible using the JRC instruction.It is possible. However, the tip axis can-not be turned continuously. The axisstops after each turn.

Page 177, " JRC (Joint Roll Change)"

I want to set a control point at thehand tip.

It is possible to set using the TOOLinstruction or the parameter "MEXTL."If only one hand is used, setting via theparameter is recommended. Performthe necessary setting before perform-ing teaching.

Page 217, " TOOL (Tool)"Page 324, "5.6 Standard Tool Coordinates"

I want to stop the robot for a specified

period.

It is possible using the DLY instruction. Page 160, " DLY (Delay)"

I want to verify the positioning of therobot.

The stopping pulse range can be spec-ified using the FINE instruction. Posi-tioning can also be performed easilywith the DLY instruction.

Page 164, " FINE (Fine)"Page 160, " DLY (Delay)"

Page 410: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 410/457

  7Q & A

  Movement   7-391

I want to increase the robot's tact time. The execution time can be improved byusing the following methods.1) Perform continuous path operationusing the CNT instruction.2) Perform optimum acceleration/

deceleration control using the OADLinstruction.3) Perform optimum speed controlusing the SPD instruction.

<In the case of the RV-6S/12S series>In addition to items 1) through 3)above, the operation time can be short-ened by setting a larger value in theoptimum acceleration/decelerationadjustment rate parameter (JADL). Inthe RV-6S/12S series, the acceleration/deceleration speed is initialized to allowcontinuous operation Note1) with ashort wait time (setting of B in the figure

at right) Note2). This setting is suited forcontinuous operations that have a shorttact time, such as palletizing work.Conversely, if quick operations (shortoperation time) are required, such as L/UL work on machined parts, the accel-eration/deceleration speed can beincreased by initial setting (setting of Ain the figure at right). However, pleasenote that some setting values of accel-eration/deceleration speed tend tocause overload and overheat errors. Insuch a case, extend the wait time,reduce the acceleration/decelerationspeed, or decrease the operatingspeed.

Page 138, " CNT (Continuous)"Page 193, " OADL (Optimal Acceleration)"Page 213, " SPD (Speed)"

Refer to "JADL" in Page 306, "5 Functions set

with parameters"Page 257, "M_SETADL"

 An excessive speed error occurs evenin the optimum speed control mode.

 An excessive speed error may occurdepending on the posture and positionof the robot. In such a case, lower thespeed temporarily only in that segmentusing an OVRD instruction.

Page 184, "SPD" reference programPage 199, "OVRD (Override)"

I want to operate the robot withoutstopping at each point.

It is possible using the CNT instruction. Page 138, " CNT (Continuous)"

I want to change the acceleration timeand deceleration time.

Using the ACCEL instruction is possi-ble for set.

Page 119, " ACCEL (Accelerate)"

I want to execute an automatic returnto the safe point.

 A simple safe-point return can be exe-cuted using the parameter "JSAFE"and the SAFEPS input signal. The

robot may be moved along a specificsafe path while controlling the currentposition, using the user-defined areafunction and ZONE instruction.

Refer to "JSAFE" in Page 306, "5 Functions setwith parameters"Page 328, "5.8 About user-defined area"

Page 304, " ZONE"Page 305, " ZONE 2"

I want to improve the path accuracy. It may be improved by using a PRECinstruction.

Page 201, " PREC (Precision)"

I want to reduce the robot vibration. Vibration can be suppressed by settinga smaller acceleration/deceleration ratewith the ACCEL instruction.Vibrations may also be reduced byusing a PREC instruction.

Page 119, " ACCEL (Accelerate)"Page 201, " PREC (Precision)"

Q A Reference page

 

Increased acceleration/deceleration speedAcceleration/deceleration speed [m/sec2]

= optimum acceleration/deceleration speed [m/sec2]

x ACCEL instruction [%] x parameter JADL [%] Fig. Relationship between Acceleration/deceleration Speed and Tact Time

  (Conceptual Drawing)

Tact time/1

cycle Operation time

Wait time 

B

 A

Page 411: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 411/457

7-392 Movement 

7Q & A

 An overload error occurs. This error occurs when the motor oper-ates under severe conditions for morethan the sustainable period of time.Lower the operating speed, accelera-tion/deceleration time and so forth.

It is more effective to reduce the accel-eration/deceleration time than stop-ping the robot using the delay timer.

Page 199, "OVRD (Override)"Page 213, "SPD (Speed)"Page 119, "ACCEL (Accelerate)"Page 250, "M_LDFACT"Page 257, "M_SETADL"

I want to limit the movement range ofthe robot.

It can be done using the joint move-ment range parameter "MEJAR," XYZmovement range parameter "MEPAR,"free plane limit parameter, etc.

Refer to "MEJAR" and "MEPAR", etc. in Page306, "5 Functions set with parameters"

How to open and close the hand? The hand can be controlled using theHOPEN and HCLOSE instructions orM_IN (90n) and M_OUT (90n) signals.(n=0 to 7)

Page 171, " HOPEN / HCLOSE (Hand Open/Hand Close)"Page 248, " M_IN/M_INB/M_INW"Page 254, " M_OUT/M_OUTB/M_OUTW"

I want to limit the movement range onan arbitrary plane.

It can be done using the free plane limitfunction.

Page 329, "5.9 Free plane limit"

Is the impact detection functioninstalled?

Yes.It is installed in the RV-S/RH-S series.

Page 21, "3.2.9 Impact Detection during JogOperation"Page 141, " COLCHK (Col Check)"Refer to "COL" in Page 306, "5 Functions setwith parameters"

 An excessive difference error occurswhen the ambient temperature of therobot is low or when starting the robotafter it has been stopped over anextended period of time.

When starting the robot at a low tem-perature or after it has been stoppedover an extended period of time, anexcessive difference error may occurdue to a change in the viscosity ofgrease. In this case, operate the robotin actual production after performing arunning-in operation at low speed.Forthis purpose, the warm-up operationmode is provided in the controller'ssoftware version J8 or later. By usingthis function, errors may be resolvedalso.

Refer to Page 355, "5.19 Warm-Up OperationMode".

Note1) Continuous operation: A state in which the operation smoothly continues without overload and/oroverheat error(s).

Note2) The optimum acceleration/deceleration adjustment rate (the rate which is applied to theacceleration/deceleration speed calculated by optimum acceleration/deceleration control:parameter JADL) is set below 100%. The setting value varies with models. Please refer to "JADL"in Page 306, "Table 5-1: List Movement parameter".

Q A Reference page

Page 412: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 412/457

  7Q & A

  Program  7-393

7.2 Program

Q A Reference page

I want to speed up the execution pro-

cessing time of the program.

I want to speed up the execution pro-

cessing time of the program.

Page 345, "5.18 About ROM operation/high-

speed RAM operation function"I want to execute two or more robotprograms simultaneously.

It can be done using the multitask func-tion.

Page 86, "4.2 Multitask function"

What are the precautions when usingthe multitask function?

See the reference pages. Page 89, "4.2.4 Precautions for creating multi-task program"Page 90, "4.2.5 Precautions for using a multitaskprogram"

I want to call a program from withinanother program.

It is possible using the CALLP instruc-tion.

Page 125, " CALLP (Call P)"

I want to reference common positionsand variables from separate pro-grams.

External system variables can be used. Alternatively, a user base program canbe created to use user-defined externalvariables.

Program external variables can beadded in the controller's software ver-sion J1 or later. See the description ofthe PRGGBL parameter.

Page 104, "4.3.23 Program external variables"Page 105, "4.3.24 User-defined external vari-ables"

I want to calculate the palette position. It is possible using the DEF PLT andPLT instruction.

Page 157, " DEF PLT (Define pallet)"Page 200, " PLT (Pallet)"

I want to output and monitor signals,etc., while the robot is operating.

It is possible to use the DEF ACT or ACT instruction when multiple pathsare monitored, or using the WTH orWTHIF instruction when a single pathis monitored. The WTHIF allows forconditional judgment.

Page 146, " DEF ACT (Define act)"Page 121, " ACT (Act)"Page 221, " WTH (With)"Page 222, " WTHIF (With If)"

I want to monitor the robot to see if itis at a specified position and generatean error accordingly.

It can be done using the user-definedarea function or ZONE instruction. Auser error can be generated using theERROR instruction.

Page 262, " M_UAR"Page 304, " ZONE"Page 305, " ZONE 2"Page 162, " ERROR (error)"

I want to perform RS-232C communi-cation with an external PC, etc.

It is possible. Page 337, "5.15 About the communication set-ting"Page 198, " OPEN (Open)"Page 128, " CLOSE (Close)"Page 175, " INPUT (Input)"Page 202, " PRINT (Print)"Page 195, " ON COM GOSUB (ON Communica-tion Go Subroutine)"

I want to acquire the current positionof the robot.

The data can be referenced using theP_CURR or J_CURR variable.

Page 268, " P_CURR"Page 234, " J_CURR"

I want to measure the execution time. It can be measured in millisecondsusing the M_TIMER variable.10 M_TIMER (1) = 020 MOV P130 MVS P240 M1 = M_TIMER (1)50 HLTTo check the time in milliseconds, mon-itor the M1 variable after the program isstopped.

Page 260, " M_TIMER"

I want the program to generate anerror and stop.

 A user error can be generated usingthe ERROR instruction.

Page 162, " ERROR (error)"

I want to reset an error generated byanother task in a multitask program.

It is possible to set the start conditionfor the task slot to ALWAYS and issue aRESET ERR instruction.

Page 87, "4.2.3 Operation state of each slot"Page 206, " RESET ERR (Reset Error)"

Page 413: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 413/457

7-394 Operation

7Q & A

7.3 Operation

I want to use multi-task instructions,such as XRUN, in programs that areconstantly executed.

You will be able to use them by chang-ing the setting of the ALWENA parame-ter.

Refer to "ALWENA" in Page 318, "Table 5-4: ListProgram Execution Related Parameter"

I cannot directly execute the XRUN

instruction from the T/B, etc.

You will be able to use them by chang-

ing the setting of the ALWENA parame-ter.Controller's software version J1 orlater.

Refer to "ALWENA" in Page 318, "Table 5-4: List

Program Execution Related Parameter"

Q A Reference page

I want to edit programs that areconstantly executed.

To edit programs whose execution attribute isset to ALWAYS via the SLTn parameter, do soafter canceling the ALWAYS attribute. ALWAYSprograms cannot be edited since they areconstantly executed. Change ALWAYS toSTART in the SLTn parameter, then turn off thecontroller's power and turn it back on, to stop theprogram from being constantly executed.

Page 24, "3.5.1 Creating a program"Refer to "SLTn" in Page 306, "5 Functions setwith parameters"

I want to numerically correct the positionlearned via teaching.

It can be corrected on the T/B position screen. Page 32, "(8) Correcting the MDI (ManualData Input)"

I want to cancel the paused status of theprogram.

It can be done via a program-reset operation.This operation can be executed on the T/Boperation panel or using an I/O signal.

Page 41, "(6) Resetting the program"

I want to check the program line by line. It is possible to execute a step feed from the T/B. Page 35, "(1) Step feed"

I want to start with automatic operationand switch to step feed in the middle to

check the operation.

Use the HLT instruction to perform automaticoperation, then switch to step feed via a T/B

operation.

Page 38, "3.7 Automatic operation"Page 170, " HLT (Halt)"

Page 35, "(1) Step feed"

I want to move the robot to the positionlearned via teaching.

Position jump can be executed from the T/B. Page 30, "(6) Confirming the position data(Position jump )"

I want to copy, delete or rename theprogram.

They can be done on the T/B managementscreen.

Page 47, "(3) Copying programs"Page 49, "(5) Deleting a program"Page 48, "(4) Changing the program name(Renaming)"

I want to write-protect the program. They can be done on the T/B managementscreen.They can be done on the T/B managementscreen or Personal Computer Support Software.

Page 46, "(2) Program protection function"

I want to write-protect only the positiondata.

They can be done on the T/B managementscreen.

They can be done on the T/B managementscreen or Personal Computer Support Software.

Page 46, "(2) Program protection function"

I want to check the available memoryspace.

It can be confirmed on the T/B directory screen. Refer to T/B directory screen in Page 45,"3.11 Operating the program control screen"

I want to monitor the I/O statuses. It can be done on the T/B monitor screen.They can be done on the T/B managementscreen or Personal Computer Support Software.

Page 50, "(1) Input signal monitor"Page 51, "(2) Output signal monitor"

I want to monitor the contents ofvariables.

It can be done on the T/B monitor screen.They can be done on the T/B managementscreen or Personal Computer Support Software.

Page 52, "(3) Variable monitor"

I want to view the error history. It can be done on the T/B monitor screen.They can be done on the T/B managementscreen or Personal Computer Support Software.

Page 53, "(4) Error history"

I want to release the brake of the robot. It can be done on the T/B brake screen. Page 57, "(4) Releasing the brakes"

I want to view the current position of therobot.

It can be done on the T/B current positionscreen.

Page 29, "(5) Registering the current positiondata"

Q A Reference page

Page 414: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 414/457

  7Q & A

  Operation  7-395

I want to change the amount of fixed-dimension feed in jog operation.

It can be set using the parameters "JOGJSP,""JOGPSP" and "JOGSPMX."

Refer to "JOGJSP", "JOGPSP" and"JOGSPMX" in Page 306, "5 Functions setwith parameters"

I want to the program to operate

automatically upon turning on the power.

It can be done using the multitask function. Page 332, "5.11 Automatic execution of

program at power up"

I want to turn ON the servo forciblywhen the robot is outside the movementrange.

It can be done by canceling the LS. Page 44, "3.9 Error reset operation"

I want to retain the 5-digit LED displayon the operation panel even afterchanging over the key switch.

The OPDISP parameter can be used to switchthe display in the controller's software version J1or later.

Refer to "OPDISP" in Page 315, "Table 5-3:List Operation parameter"

Q A Reference page

Page 415: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 415/457

7-396 External input/output signal 

7Q & A

7.4 External input/output signal

Q A Reference page

I want to check if the robot controllerhas started

It can be checked using the dedicatedsignal "RCREADY."

Refer to "RCREADY" in Page 371, "6.3Dedicated input/output"

Is the operation right also needed tooperate external signals?

The operation right is also needed tocontrol the robot using external I/Osignals. It is also necessary whenoperating the command signals, suchas those used to "turn the servo ON"and "start." Safety-related signals, suchas those used for stopping theoperation and turning the servo OFFcan be executed without operationright.

I want to monitor the robot via externalsignals to see if it is at a specifiedposition and generate an error

accordingly.

It can be done using the user-definedarea function.

Page 328, "5.8 About user-defined area"Refer to "USRAREA" in Page 371, "6.3Dedicated input/output"

I want to select programs usingexternal signals.

It can be done using the dedicatedsignals "PRGSEL" and "IODATA." Setthe program number as a binary valuein the IODATA signal (multiple bits),and read it via the PRGSEL signal.

Refer to "PRGSEL" and "IODATA" in Page 371,"6.3 Dedicated input/output"

I want to monitor a low battery. It can be done using the dedicatedsignals "BATERR".Replace the batterywithout delay when this signal is turnedON.

Refer to "BATERR" in Page 371, "6.3 Dedicatedinput/output"

I want to execute a jog feed usingexternal signals.

It can be done using the dedicatedsignals "JOGENA", "JOGM", "JOG+"and "JOG-".

Refer to "JOGENA","JOGM", "JOG+" and "JOG-" in Page 371, "6.3 Dedicated input/output"

I want to check the operation of aprogram or signal without operatingthe robot.

It can be done using the dedicatedsignals "MLOCK". When the operationis started after this signal turned ON,the robot will not move physically. Onlythe program will run.

Refer to "MLOCK" in Page 371, "6.3 Dedicatedinput/output"

I want to cancel the paused status ofthe program.

It can be done using the dedicatedsignals "SLOTINIT".

Refer to "SLOTINIT" in Page 371, "6.3Dedicated input/output"

I want to use robot programs toimplement the PLC functions.

It can be done using the multitaskfunction.Use one program to perform operation-related programs.Use another program to operate signal-processing programs.

Use common system variables or user-defined external variables to exchangeinformation between the programs.

Page 91, "4.2.6 Example of using multitask"Page 104, "4.3.23 Program external variables"Page 105, "4.3.24 User-defined externalvariables"

I want to reset the L7730 errortemporarily. (Abnormalities in the CC-Link data link)

It is possible with the parameter E7730. Refer to "E7730" in Page 314, "Table 5-2: List

Signal parameter".

Page 416: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 416/457

  7Q & A

  Parameter   7-397

7.5 Parameter 

Q A Reference page

The parameter(s) I changed have not

been taken effect.

 After you change parameters, power

OFF and then ON again.I want to operate the robot continu-ously from the power-OFF state.

It can be done using the Continuityfunction.

Refer to "CTN" in Page 306, "5 Functions setwith parameters"

I want to set the hand mode thatbecomes effective when the power isturned ON.

It can be done using the parameters"HANDINIT" and "HANDTYPE."

Refer to "HANDINIT" and "HANDTYPE" in Page306, "5 Functions set with parameters"Page 333, "5.12 About the hand type"Page 334, "5.13 About default hand status"

I want to share the RS-232C portlocated on the front side of the con-troller between an external devicesuch as a PC or sensor on one handand PC support software on the other.

Some protocol-related limitations apply.See the reference page.

Page 337, "5.15 About the communication set-ting"

I want to cancel the triggered buzzer. It can be done using the parameters

"BZR".

Refer to "BZR" in Page 306, "5 Functions set

with parameters"

Page 417: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 417/457

8-398

8Collection of Techniques

8 Collection of Techniques

This chapter is intended to provide various sample programs for entry-level to advanced robot program-ming. This chapter mainly consists of three sections: Entry-Level Edition, Intermediate Edition, and AdvanceEdition. Each of these three sections describes the following items:

Item Page<Entry-Level Edition> This edition is intended for the novices of robot programming, and contains general information necessary

to write robot programs.

8.1.1Describing comprehensive programs 399

8.1.2Managing program versions 405

8.1.3Changing the operating speed in a program 405

8.1.4Detecting fallen works while transporting 406

8.1.5Positioning works accurately 407

8.1.6Awaiting signal ON/OFF during the specified number of seconds 408

8.1.7Interlocking by using external input signals 410

8.1.8Sharing data among programs 412

8.1.9Checking whether the current position and the commanded position are the same 413

8.1.10Shortening the cycle time (entry-level edition) 414<Intermediate Edition> This edition contains frequently used techniques and the specific information required for programming.

8.2.1How to quickly support for the addition of types 416

8.2.2Convenient ways to use the pallet instruction 417

8.2.3How to write communication programs 418

8.2.4How to reduce teaching points 421

8.2.5Using a P variable in a counter, etc. 423

8.2.6Getting position information when the sensor is on 424

<Advance Edition> This edition contains the information that is not used frequently, but is very helpful in advanced program-ming.

8.3.1Using the robot as a simplified PLC (sequencer) 426

8.3.2Implementing a mapping function 429

8.3.3Finding out executed lines 431

8.3.4Saving the status when an error has occurred 432

Page 418: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 418/457

8Collection of Techniques

  Entry-Level Edition  8-399

8.1 Entry-Level Edition8.1.1 Describing comprehensive programs

Since MELFA-BASIC IV inherits the specifications of the BASIC language, it is generally easy to under-stand. On the other hand, if large programs are written in MELFA-BASIC IV, they tend to be difficult tounderstand because all variables can be accessed from anywhere, and functions containing arguments

and/or return values cannot be described. Isn't there any technique for writing comprehensive programs?

[Technique]To describe comprehensive programs using a nonstructural language such as BASIC, follow rules (1)through (5) listed below. Writing programs according to these rules makes the programs easy to under-stand. However, these rules are just examples, so please modify them or add new rules according to yourenvironment.

(1) Clarify the structure of a program.(2) Set up a notation that is easy to read.(3) Define variables that are effective in a program.(4) Define arguments and return values in subroutines.(5) Define variables and labels that are only effective in subroutines.

Each of the above rules is described below in detail.

(1) Clarify the structure of a program As the first step to write a program, divide the program into multiple blocks as shown in the next page. Bystructuring the program like this, it not only makes the program comprehensive, but also makes it possibleto immediately identify the location of a problem in the event of problem occurrence since the program isclearly segmented. Additionally, because a series of operations are segmented into blocks, they can be eas-ily used in other programs.

Page 419: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 419/457

8-400 Entry-Level Edition

8Collection of Techniques

1000 ' Work loader (main program)1010 ' DATE:2002.04.01 VER 1.11020 ' (1)Change *** -> @@@1030 ' (2)Add $$$1040 '[Revision history]1050 ' 2002.03.01 VER 1.01060 ' 2002.02.01 VER 0.7

<Program version>This block describes the information nec-essary for version management. It is rec-ommended to use single-byte andalphanumeric characters so that the pro-gram version can also be checked by theTeaching pendant.

1070 ’=== Variable definition ===1080 DIM ML_DATA(3)1090 DEF IO X1_REQ=BYTE,8,&H0F1100 DEF IO Y1_ERR=BYTE,8,&H0F1110 DEF POS PL_PFRAM1120 DEF INTE ML_REQ

<Variable definition>This block describes variables such asarray variables (DIM), signal variables(DEF IO) and special-use variables (DEFCHAR/INTE/POS/etc.).

1130 '=== Initialization ===1140 PL_PFRAM=FRAM(PT001,PT002,PT003)1150 DEF ACT 1,X1_REQ<>0,GOSUB

*S50ACT11160 ACT 1=M_ON1170 OPEN "COM1:" AS #11180 ON COM(1) GOSUB *S60RECV1190 COM(1) ON

<Initialization>This block describes the initialization thatis performed only once when the pro-

gram is started, which includes settinginitial values in variables, interrupts, andcommunication ports.

1200 '=== Main routine ===1210 *MAIN1220 IF ML_REQ=1 THEN1230 P00TMP=P_ZERO1240 P00TMP.X=ML_DATA(1)1250 P00TMP.Y=ML_DATA(2)1260 P00TMP.Z=ML_DATA(3)

1270 MOV PL_FRAM * P00TMP1280 ENDIF1290 IF ML_REQ=&H0F THEN1300 MX99ERNO=91001310 GOSUB *S99ALARM1320 YL_ERR=MY99RET1330 IF M_CYS=M_ON THEN END1340 GOTO *MAIN

<Main routine>The main routine consists of a sectionthat is executed first as shown belowwhen the program is started. It corre-sponds to cycle stop on the "IF" line.  *MAIN  :

  IF M_CYS=M_ON THEN END  GOTO *MAINIn general, the program will be easier toread by calling subroutines created infunction units in order to make the pro-gram as short as possible.

1350 '=== Subroutine50 ===1360 *S50ACT11370 ML_REQ=X1_REQ1380 RETURN 0

1390 '=== Subroutine60 ===1400 *S60RECV1410 COM(1) STOP1420 INPUT #1,M60X,M60Y,M60Z1430 ML_DATA(1)=M60X1440 ML_DATA(2)=M60Y1450 ML_DATA(3)=M60Z1460 COM(1) ON1470 *L60END1480 RETURN 01490 '=== Subroutine99 ===1500 *S99ALARM1510 ERROR MX99ERNO

1520 MY99RET=MX99ERNO1530 *L99END1540 RETURN

<Subroutines> A subroutine is composed of a sectionbeginning with a label indicating a sub-routine name and ending with a

RETURN instruction; it is a program cre-ated in function units that unloads a workor analyzes received communicationstatements, for example.If a subroutineis called by a GOSUB instruction fromthe main routine or another subroutine, itreturns to the line following the calledline upon finishing processing.If a subroutine is called by an interrupt, itreturns to the line called by RETURN 0/1or to the line following the called line.

Page 420: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 420/457

8Collection of Techniques

  Entry-Level Edition  8-401

(2) Set up a notation that is easy to readBy giving some thought to a notation, easy-to-read programs can be created.

Indent Indent in a subroutine, FOR to NEXT loop, IF to ENDIF block. Etc.

 Allocate a blank column and a symbol column after a line number, and then describe textfollowing these columns. The symbol column denotes a column in which an * (asterisk) thatindicates a label or an ' (apostrophe) that indicates a comment is described. Also, indenttwo characters for IF, FOR, etc. Begin a line number with line 1000 for easier viewing with-out any character shift.

Label jump Jump by specifying a line number directly using GOTO or GOSUB

Line number jump is prohibited as it will interfere with the visibility of programs. Be sure to

 jump by providing labels.(Example)1150 DEF ACT 1,X1_REQ<>0,GOSUB *S50ACT11180 ON COM(1) GOSUB *S60RECV1340 GOTO *MAIN

Comment An explanatory statement that is described in a program using an REMinstruction or an ' (apostrophe)

Please enter a comment in a section that seems to be difficult to understand by just lookingat the program, such as the meaning of a program delimiter, the explanation about the inputand output of a subroutine, and the meaning of a complex calculating expression.(Example)1330 IF M_CYS=M_ON THEN END 'Ends if the cycle stop request is ON

1500 '=== Subroutine 30 ===1510 ' Move to the specified position.1520 ' Input : MX30POS (Moving destination position number)1530 ' Output : MY30RET (Normal end: 1, Abnormal end: 0)1540 *S30MVPOS

1000 *S50CALC

1010 MY50ANS=MX50CNT+1

1020 RETURN Indent

Symbol column

Space column

Line number

Page 421: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 421/457

8-402 Entry-Level Edition

8Collection of Techniques

(3) Define variables that are effective in a program Although the values of the local variables in MELFA-BASIC IV can be referenced or rewritten from any-where within a program, only the variables that conform to the following rules are defined as local variablesin using this convention.

Local variableseffective in aprogram

These variables can be used commonly between the main routine andsubroutines. They are used for the result of a frame instruction, the output resultof an interrupt function and so forth that can be referenced by anyone.

1st character: Indicates the variable type(M: numeric value, P: orthogonal position, J: joint position, C: character string, etc.).2nd character: Indicates that it is a local variable (L).3rd character: "_" (underscore)4th to 8th characters: Any character string (5 characters)(Example)1110 DEF POS PL_PFRAM1140 PL_PFRAM=FRAM(PT001,PT002,PT003)1270 MOV PL_FRAM * P00TMP

Variables forteaching

These variables are subjects of teaching from the Teaching Box, or used as datasuch as offset values. The values of these variables can be referenced fromanywhere in a program, but cannot be rewritten--i.e., reference only.

1st character: Indicates the variable type (P, J).2nd character: Indicates that it is a teaching/data variable (T or D).3rd to 8th characters: Any character string (up to 6 characters)(Example)PT001 -> For storing the teaching result

PD001 -> For storing the offset amount in relation to PT001

Variables forsignal I/O

These variables are used for reading and writing the signals defined by a DEF IOinstruction. There are variables for inputs and outputs; input signals arereference only, and output signals are write only.According to the MELFA-BASICIV specification, referencing output signal variables and writing to input signalvariables are not allowed.

1st character: Indicates the variable type (X: input signal, Y: output signal).2nd character: Indicates that it is a local variable (L).3rd character: "_" (underscore)4th to 8th characters: Any character string (up to 5 charac-

ters)(Example)1090 DEF IO X1_REQ=BYTE,8,&H0F1100 DEF IO Y1_ERR=BYTE,8,&H0F

Page 422: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 422/457

8Collection of Techniques

  Entry-Level Edition  8-403

(4) Define arguments and return values in subroutines.If GOSUB is used in MELFA-BASIC IV, it jumps to the specified label or line number, and then returns to the jump source location with a RETURN. In this convention explicit input and output (argument and returnvalue) are defined in a subroutine for use.However, recursive calls are not supported due to the language specification.

Subroutine names A subroutine has a unique number, which is also reflected in the subroutinename. In addition, this number is added to variable names and label names thatare effective in a subroutine.

1st character: Indicates a subroutine (S).2nd and 3rd characters: Subroutine number (01 to 99)4th to 8th characters: Any character string (up to 5 characters)* "* (asterisk)" must be attached to the beginning of a label.* The use of subroutine number 00 is not allowed since it is used by the main routine.* Be sure to describe the explanation on the function and I/O variables of each subroutine.(Example)

1360 *S50ACT11400 *S60RECV1490 *S99ALARM

 Arguments andreturn value of a

subroutine

These variables are used for reading and writing the signals defined by a DEF IOinstruction. There are variables for inputs and outputs; input signals arereference only, and output signals are write only.According to the MELFA-BASICIV specification, referencing output signal variables and writing to input signalvariables are not allowed.

1st character: Indicates the variable type (M, P, J, C, etc.).

2nd character: Indicates either an input or output (Input: X, output: Y).3rd and 4th characters: Indicates the subroutine number.5th to 8th characters: Any character string (up to 4 characters)(Example)1500 '=== Subroutine 30 ===1510 ' Explanation of subroutine1520 ' Input: MX30POS (explanation of input variable)1530 ' Output: MY30RET (explanation of output variable)1540 *S30MVPOS1550 MOV PTPOS(MX30POS)1560 MY30RET=MX30POS1570 RETURN

Page 423: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 423/457

8-404 Entry-Level Edition

8Collection of Techniques

(5) Define variables and labels that are only effective in subroutinesIn MELFA-BASIC IV it is generally possible to access all variables and labels from anywhere within a pro-gram. However, since they can be written from anywhere, on the other hand, it becomes unclear when andwhere a certain variable was set when it was referenced. Therefore, we have fostered an idea of variablesand labels that can only be used within a certain subroutine.However, since variables and labels can be accessed from anywhere in terms of the language specification,please consider this as a rule in creating programs.

Effective labels in asubroutine

Label names used within a subroutine; no duplicate label names are used sinceeach of them has a subroutine number.

1st character: Indicates a label (L).2nd and 3rd characters: Indicates a subroutine number.4th to 8th characters: Any character string (up to 5 characters)* "* (asterisk)" must be attached to the beginning of a label.(Example)1470 *L60END

1530 *L99END

Effective variables ina subroutine

Variable names used within a subroutine; no duplicate variable names are usedsince each of them has a subroutine number.

1st character: Indicates the variable type (M, P, J, C, etc.).2nd and 3rd characters: Indicates a subroutine number.4th to 8th characters: Any character string (up to 5 characters)(Example)1230 P00TMP=P_ZERO1420 INPUT #1,M60X,M60Y,M60Z

Page 424: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 424/457

8Collection of Techniques

  Entry-Level Edition  8-405

8.1.2 Managing program versions As we create programs, it's getting harder to distinguish between old and new programs as the number ofrevised programs increases. Isn't there any good technique to track program versions?

[Technique]In creating programs already created programs are often edited again in order to add specifications, modifyfunctions, fix bugs, etc. However, when the programs are edited several times, it is sometimes hard to trackwhich one is the latest program. Version management is thus necessary. There are several ways to manageversions. We will introduce comparatively general methods, and convenient methods when using the CRn-500 series.

(1) Writing the version in a commentWriting the program editing history in the corresponding program is the easiest way. In addition, it is ideal todescribe the version at the beginning of the program so that it can also be checked from the Teaching Box.The items that should be described include the program name, editing date, version and editing history out-line. The following shows an example of description:

(2) Writing the version in the USERMSG parameter Some robot systems may use multiple programs. In such a case, the entire robot system version is useful inaddition to the program version. The robot system version can be checked by using the USERMSG param-eter as long as there is a Teaching Box. This can be achieved by describing up to 64 single-byte characters

of information including the system name, version, and date of creation in the USERMSG parameter in thespecified format from the Maintenance Tool of the Personal Computer Support Software or from the Teach-ing Box.

8.1.3 Changing the operating speed in a programHow can we change the operating speed in a program when a work can be held more accurately if thespeed is decreased while holding and releasing the work, when a work may be damaged unless the speedis decreased because the work may slightly interfere while unloading and inserting, or when it is necessaryto perform a fine speed adjustment in order to shorten the cycle time?

[Technique]

Use the OVRD, JOVRD or SPD instruction.OVRD: Effective regardless of the movement type. The speed display on the operation panel does not

change.JOVRD:Effective during joint movement.SPD: Effective only during linear (circular, circular arc) movement.

1000 'Work loader (main program)1010 ' DATE:2002.04.01 VER 1.11020 ' (1)Change *** -> @@@1030 ' (2)Add $$$1040 '[Revision history]1050 ' 2002.03.01 VER 1.01060 ' 2002.02.01 VER 0.7

Page 425: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 425/457

8-406 Entry-Level Edition

8Collection of Techniques

8.1.4 Detecting fallen works while transportingThere are problems of fallen works in a robot system, which are caused by the decreased holding powerdue to air leak, incomplete holding due to an input of a damaged work, a drop of a work due to an interfer-ence with a peripheral device and so forth. How can we quickly detect any abnormality when such a prob-lem occurs while transporting a work and stop the robot?

[Technique] A conventional method uses interrupts to detect such events whose occurrences cannot be predicted. Aninterrupt is a method that monitors the status of signal or variables, and make a specific subroutine executewhen a change occurs. This technique is very useful as it can be used in various applications, not limited tothe detection of fallen works.The method introduced here monitors signals that change when an abnormality occurs while transporting awork, and then sets up interrupts. Next, it turns on an interrupt at a timing when an abnormality should bedetected, and turns off an interrupt at a timing when detection should be stopped.To use interrupts, specify the "interrupt condition" and the "call destination when the condition is met" byusing the DEF ACT instruction. It is advisable to declare interrupts at the beginning of a program unless alarge number of interrupts will be used.

[Implementation example]The following shows an example in which the robot is stopped immediately when a fallen work is detectedwhile transporting works using a suction hand, and notifies an error according to each operation.

Point list I/O signal list

PT01PT02PT03PT04PT99

:Holding point:Front of the holding position:Front of the mounting position:Mounting position:Retreat point

M_IN(8)M_IN(9)M_IN(901)

:Unloading allowed:Mounting allowed:Work detection sensor (holding when ON)

Page 426: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 426/457

8Collection of Techniques

  Entry-Level Edition  8-407

8.1.5 Positioning works accuratelyOne of the main purposes of using a robot is to accurately place works at the target position. It is enough to just place works at approximate positions if a system is equipped with a positioning device. However, con-sidering the cost, installation space and cycle time, in many cases, you just want to use a robot to accuratelyposition works. How can we just use the robot to accurately position works?

[Technique]For accurate positioning using just a robot, it is necessary for the robot to hold and release works at exactpositions. To achieve this, use the FINE instruction. If there is a margin in the cycle time, it is simple andeffective to insert the DLY instruction after the move instruction.

Program Comment

1000 DEF ACT 1,M_IN(901)=M_OFF GOTO *S50FALL,S 'Setting an interrupt for fallenworks.

 Attach "S" to the argument, so thatthe robot decelerates and stopswhen it drops a work.1010 '

1020 PL_ZON1=P99-(10,10,10,1,1,1,10,10)(0,0) Calculate in advance because com-

putation cannot be performed withinthe functions.

1030 PL_ZON2=P99+(10,10,10,1,1,1,10,10)(0,0)1040 ML_ZCHK=ZONE(P_CURR,PL_ZON1,PL_ZON2) 'Check on the retreat point.1050 IF ML_ZCHK=0 THEN MOV PT99 'If not there, move to the retreat point.1060 '1070 *MAIN10801090110011101120113011401150

  OVRD 100 'Move to the Front of the holding position  MOV PT02 'by increasing the speed.*L00WAITG

IF M_IN(8)=M_OFF THEN *L00WAITG 'Wait until unloading is allowed.  OVRD 30 'Move to the holding position  MVS PT01 'by reducing the speed.  HCLOSE 1 'Hold a work.  DLY 0.1 'Wait for a while.

In principle, set the operating speedto 100% in programs that placeimportance in speed, and lower thespeed only when necessary.

1160 ACT 1=M_ON 'Set the fallen work interrupt to ON. The interrupt becomes valid from

here.1170118011901200121012201230

  MVS PT02 'Set the fallen work interrupt to ON.  OVRD 100 'Move to the front of the mounting position  MOV PT03 'by increasing the speed.*L00WAITP

IF M_IN(9)=M_OFF THEN *L00WAITP 'Wait until mounting is allowed.  OVRD 30 'Move to the mounting position  MVS PT04 'by reducing the speed.

12401250126012701280

  ACT 1=M_OFF 'Set the fallen work interrupt to OFF.  HOPEN 1 'Release the work.  DLY 0.1 'Wait for a while.  OVRD 100 'Move to the front of the mounting position  MVS PT03 'by increasing the speed.

Disable the interrupt before releasingthe work.

12901300131013201330

  GOTO *MAIN 'Go to the next work.'*S50FALL  ERROR 9102 'Error output END

Page 427: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 427/457

8-408 Entry-Level Edition

8Collection of Techniques

8.1.6 Awaiting signal ON/OFF during the specified number of secondsIt takes some time until the holding confirmation signal to turn ON depending on the characteristics of thehand after the hold command is issued, for example. How can we check signal ON/OFF during only thespecified period of time?

[Technique]Since no special instruction is provided for this purpose, we will introduce a subroutine that can achieve thisfunction. By creating several subroutines that can be used for general purposes, the efficiency of program-ming can be improved, and easy-to-understand programs can be created.

[Implementation example]This example loads/unloads works, assuming the case in which the hold confirmation signal cannot beobtained immediately although the hand issues the hold command and/or the release command to the suc-tion sensor.

Point list I/O signal list

PT01 :Holding pointPT02 :Front of the holding positionPT03 :Front of the mounting positionPT04 :Mounting position

M_IN(901) :Vacuum pressure sensor (holding when ON)M_OUT(901) :Suction instruction (holding when ON)

Program Comment1000 *MAIN1010 OVRD 100 'Move to the front unloading position1020 MOV PT02 'by increasing the speed.1030 MVS PT01 'Move to the unloading position .1040 M_OUT(901)=M_ON 'Output the hold command.1050 MX50SIG=9011060 MX50SEC=3.01070 GOSUB *S50WON 'Wait for the holding confirmation signal to turn ON.

Set arguments for the subroutine.

1080 IF MY50SKP=1 THEN GOTO *L40ALARM 'An error for detecting timeout

1090 OVRD 10 'Move to the front unloading position1100 MVS PT02 'by reducing the speed.1110 '1120 OVRD 100 'Move to the front of the mounting position1130 MOV PT03 'by increasing the speed.1140 OVRD 10 'Move to the front of the mounting position1150 MVS PT04 'by reducing the speed.1160 M_OUT(901)=M_OFF 'Release the work.1170 MX51SIG=9011180 MX51SEC=3.01190 GOSUB *S51WOFF 'Wait for the holding confirmat ion signal to turn OFF.1200 IF MY51SKP=1 THEN GOTO *L40ALARM 'An error for detecting timeout1210 OVRD 100 'Move to the front of the mounting position1220 MVS PT03 'by increasing the speed.1230 GOTO *MAIN

1240 '1250 *L40ALARM 'Error handling1260 ERROR 91001270 END1280 '

Set arguments for the subroutine.

Page 428: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 428/457

8Collection of Techniques

  Entry-Level Edition  8-409

1290 '---------- Wait for signal ON for specified number of seconds ----------1300 ' IN:MX50SIG Monitor signal1310 ' MX50SEC No. of seconds to monitor (s)1320 'OUT:MY50SKP 0: normal end, 1: TIMEOUT1330 *S50WON1340 M_TIMER(1)=0 'Timer reset1350 MY50SKP=1 'Output value reset

1360 M50SEC=MX50SEC * 1000 'Seconds Milliseconds1370 *L50WON11380 IF M_TIMER(1)>M50SEC THEN *L50WON2 'End if timeout occurs.1390 IF M_IN(MX50SIG)=1 THEN MY50SKP=0 'Set an output value if the signal turns

ON.1400 IF MY50SKP=0 THEN *L50WON2 'End as signal ON was confirmed.1410 GOTO *L50WON1 '1420 *L50WON21430 RETURN1440 '

It is useful to write a title and I/O spec-ification in subroutines that are usedfor general purposes.

1450 '---------- Wait for signal OFF for specified number of seconds ----------1460 ' IN:MX51SIG Monitor signal No.1470 ' MX51SEC No. of seconds to monitor (s)1480 'OUT:MY51SKP 0: normal end, 1: TIMEOUT

1490 *S51WOFF1500 M_TIMER(1)=0 'Timer reset1510 MY51SKP=1 'Output value reset1520 M51SEC=MX51SEC * 1000 'Seconds Milliseconds1530 *L51WOF11540 IF M_TIMER(1)>M51SEC THEN *L51WOF2 'End if timeout occurs.1550 IF M_IN(MX51SIG)=0 THEN MY51SKP=0 'Set an output value if the signal turnsOFF.1560 IF MY51SKP=0 THEN *L51WOF2 'End as signal OFF was confirmed.1570 GOTO *L51WOF11580 *L51WOF21590 RETURN1590 RETURN

Page 429: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 429/457

8-410 Entry-Level Edition

8Collection of Techniques

8.1.7 Interlocking by using external input signals After a robot is incorporated into a system, the robot will be seldom operated by itself. How can we interlockthe robot with peripheral units?

[Technique]To achieve this, it is necessary to use the input and output of external signals. To simply turn ON/OFF I/Osignals, use M_IN and M_OUT. Also, it is useful to use the DEF IO instruction as it allows to handle multiplesignals together and name signals.

[Implementation example] A system as shown below is assumed in this example. Also refer to the timing chart. In this system, therobot unloads works supplied by the feeder unit when there is a mounting board in the unload unit, andmounts four works on each mounting board. Once the mounting of the four works is complete, the robot out-puts the work completion signal, and then the unload unit unloads the completed mounting board.

Point list I/O signal list

PTGETPTPUT

PT99PL_FRMPL_POS(4)

:Holding position:Calculated mounting position

:Retreat point:Board origin position:Mounting position on the board (relative coordinates)

M_IN(8)M_IN(9)

M_OUT(8)

:Sensor 1 (unloading from the feeder unit allowed):Sensor 2 (Mounting onto the board allowed)

:Work completed

 Feeder unit

Unload unit

Sensor 1

Sensor 2

Unloading allowed (sensor 1 input)

Unloading allowed (sensor 2 input)

Work completed (upper PLC output)

Mounting board

Page 430: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 430/457

8Collection of Techniques

  Entry-Level Edition  8-411

Program Comment

1000 DIM PL_POS(4)1010 DEF IO XL_GET=BIT,8 'Allow unloading signal1020 DEF IO XL_PUT=BIT,9 'Allow mounting signal1030 DEF IO YL_OUT=BIT,8 'Work completion signal

1040 PL_FRM=FRAM(PTO,PTX,PTY)1050 MOV PT99 'Return to the retreat point.1060 HOPEN 1 'Place the hand in the release state.1070 '1080 *MAIN1090 IF XL_PUT=M_OFF THEN *MAIN 'Wait for the completion of preparing the unload unit.1100 M00NUM=0 'Reset the number of parts mounted on the board.1110 WHILE M00NUM<4 'Loop until four works are mounted.1120 MOV PTGET,50 'Move to the front of the holding position.1130 *L00WAIT11140 IF XL_GET=M_OFF THEN *L00WAIT1 'Wait if a part has not been supplied.1150 MOV PTGET 'Move to the holding position.1160 HCLOSE 1 'Hold a work.1170 MOV PTGET,50 'Move to the front of the holding position.1180 PTPUT=PL_FRM*PL_POS(M00NUM+1) 'Calculate the mounting position.

1190 MOV PTPUT,50 'Move to the front of the mounting position.1200 MOV PTPUT 'Move to the mounting position.1210 HOPEN 1 'Release the work.1220 MOV PTPUT,50 'Move to the front of the mounting position.1230 M00NUM=M00NUM+1 'No. of mounted parts + 11240 WEND 'Move to the next part.1250 YL_OUT=M_ON 'Turn ON the work completion signal once 4 parts have been

mounted.1260 *L00WAIT21270 IF XL_PUT=M_ON THEN *L00WAIT2 'Wait until the completed board is unloaded.1280 YL_OUT=M_OFF 'Turn OFF the work completion signal.1290 GOTO *MAIN 'Move to the next board.

Make the program easy-to-understand by assigning thesignals to variables.

Wait until the allow mountingsignal to turn OFF.

Wait until the allow mountingsignal to turn OFF.

Turn ON the work completionsignal

Turn OFF the work completionsignal.

Page 431: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 431/457

8-412 Entry-Level Edition

8Collection of Techniques

8.1.8 Sharing data among programsIt is necessary to reference the same data when we want to execute two or more programs together in orderto obtain the results of calculations done by another program, or have another program retain position data.How can we accomplish this?

[Technique]Wen sharing data among programs, it is not possible to directly reference the data of another program.Therefore, data must be transferred via program external variables (see Section 4.3.23 on page 101) oruser-defined external variables (see Section 4.3.24 on page 102).

[Implementation example]This example transfers data PT001() retained by subprograms to the main program by using program exter-nal variables or user-defined external variables.

Program Comment

<Example of using system external variables>Main program1010 CALLP "SUB1" 'Execute subprogram (SUB1.PRG).

1020 MOV P_100(1)1030 MOV P_100(2)  :1010 CALLP "SUB2" 'Execute subprogram (SUB2.PRG).1020 MOV P_100(1)1030 MOV P_100(2)  :

Subprogram (SUB*.PRG)1000 DIM PT001(5)1010 FOR M01=1 TO 51020 M_100(M01)=PT001(M01) 'Copy own data into an external variable.1030 NEXT1040 END

The contents of position data

can be completely switched by just calling a subroutine.

Prepare the same programwith different position data.

<Example of using user external variables>Base program (BASE.PRG)1000 DIM POS P_POS(5)

Main program1000 DIM POS P_POS(5)1010 CALLP "SUB1" 'Execute subprogram (SUB1.PRG).1020 MOV P_POS(1)1030 MOV P_POS(2)  :1010 CALLP "SUB2" 'Execute subprogram (SUB2.PRG).1020 MOV P_POS(1)1030 MOV P_POS(2)  :

Subprogram (SUB*.PRG)1000 DIM POS P_POS(5)1010 DIM PT001(5)1020 FOR M01=1 TO 51030 M_POS(M01)=PT001(M01) 'Copy own data into an external variable.1040 NEXT1050 END

 After installation, set"BASE.PRG" in parameterPRGUSR, and reset the power.

Page 432: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 432/457

8Collection of Techniques

  Entry-Level Edition  8-413

8.1.9 Checking whether the current position and the commanded position are the sameThere are instances in which we want to determine whether the robot is located at the desired position, forexample, when the robot should be located at the initial position at startup, when we want to check whetherthe robot has reached the target position, or when we want to change the path to return to the retreat pointaccording to the position at startup. How can we determine this?

[Technique]Since there are several ways to check positions, select the most suitable one according to use.

(1) Use a user areaIt is the best way to use a user area to check the robot posture at startup, for instance, which is not changedfrequently, of which the check area is small, or which is likely to be changed later. Up to eight user areas canbe registered. This method have two advantages: it is constantly checked regardless of whether the pro-gram is started, and it can be changed easily by just changing parameters as it does not depend on the pro-gram. For more information, see Section 5.3, "About user-defined area" on page 280.

(2) Use the ZONE function and ZONE 2 functionUse these functions to check whether the robot is in the designated area in a program. ZONE checkswhether the robot is in a cube, and ZONE 2 checks whether the robot is in a spherical or cylindrical body.

(3) Use the DIST functionIf performing a simple check is sufficient--for example, checking whether the robot has reached the targetposition, it can be checked by calculating the distance between the target position and the current position(P_CURR) using the DIST function. However, be aware that angles are not considered. Also, to check the deviation between the target position and the current position when using the compliancefunction, it is convenient to reference M_CMPDST.

(4) Compare each component of position variablesTo check whether each position component is within the specified range, compare each component as inthe program shown below. For example, the following program checks that the value of PX52A is near

PX52B. The X component is +/-0.01mm, the Y component is +/-10.0mm, and the Z component is notchecked. When the A, B and C components are within the range of +/-1.0 degree, "1" is set in output valueMY52RET.Caution) The A, B and C components are output in radians when elements are taken out. Using the RAD

function, 1.0 degree is converted into radians and then used for checking.

Program1000 'PX52A 'Coordinate 1 to be checked1010 'PX52B 'Coordinate 2 to be checked1020 'MY52RET '1 when PX52A is near PX52B, 0 for others1030 *S52PSCHK 'A subroutine to check position change1040 MY52RET=0 'Initialize the return value.

1050 IF ABS(PX52B.X-PX52A.X)>0.01 THEN GOTO *L52END1060 IF ABS(PX52B.Y-PX52A.Y)>10.0 THEN GOTO *L52END1070 'No check is performed for Z components.1080 IF ABS(PX52B.A-PX52A.A)>RAD(1.0) THEN GOTO *L52END1090 IF ABS(PX52B.B-PX52A.B)>RAD(1.0) THEN GOTO *L52END1100 IF ABS(PX52B.C-PX52A.C)>RAD(1.0) THEN GOTO *L52END1110 MY52RET=1 'Set the return value again.1120 *L52END1130 RETURN

Page 433: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 433/457

8-414 Entry-Level Edition

8Collection of Techniques

8.1.10 Shortening the cycle time (entry-level edition)You wan to make the robot produce more. In many cases, it means to shorten the cycle time. What kinds ofmethods are available to easily reduce the cycle time?

[Technique]Here, we will introduce basic check items to reduce the cycle time.

(1) Check whether speed control is appropriate.Do you always revert the speed after decreasing it using the OVRD instruction and the SPD instruction? Inwriting programs, use the maximum operating speed in general, and decrease the speed only when neces-sary. If the speed is decreased, be sure to execute OVRD 100 and SPD M_NSPD (optimum speed controlmode) and revert the speed to the maximum speed.

(2) Set up or reduce relay points.In most cases when moving from one work point (for example, a holding position) to another work point (forexample, a mounting position), it will pass through relay points. Have these relay points been set up atappropriate locations? Relay points should be reduced and optimized so that the target position can bereached with as few operations as possible. There is also another method that sets up a relay point justbefore the target position, even if it is possible to move to the target position by a single instruction, so thatthe operation can be performed at the maximum position to the very limit.

(3) Review the operation path in order to perform smooth path connection as much as possible.Review the operation path currently in use or on the drawings. Use the CNT instruction if there is no interfer-ence with peripheral units when passing through relay points. This will prevent the speed at the relay pointsfrom decreasing; thus, improving the speed.

[Implementation example]Three programs that perform the identical operation are shown successively on the next page. All of theseprograms move the robot from the starting position (TP03) to the target position (PT01) by passing throughthe front position (PT02).

The second and third blocks employ a technique to reduce the cycle time.Block 1:Moves the robot from the starting position (TP03) to the target position (PT01) by passing

through the front position (PT02).Block 2:Moves the robot at the maximum speed to the very limit by providing a relay point in front of the

target position (PT01).Block 3:Moves the robot further by passing through inside relay points.

Each of the above three blocks measures the cycle time using the M_TIMER function, and stores the resultin the corresponding M01, M02 and M03 variables. Check the differences of each cycle time.

Point list I/O signal list

PT01PT01

PT01

: Target position: Front position

:Starting position

None

Page 434: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 434/457

8Collection of Techniques

  Entry-Level Edition  8-415

Program Comment

1000 MOV PT03 'Move to the starting position.1010 '=== Block 1 ===1020 M_TIMER(1)=0 'Timer reset1030 OVRD 100 'Move to the front position by

1040 MOV PT02 'increasing to the maximum speed.1050 OVRD 10 'Move to the target position by1060 MVS PT01 'reducing the speed.1070 DLY 0.1 '1080 OVRD 100 'Move to the front position by1090 MVS PT02 'increasing to the maximum speed.1100 MOV PT03 'Move to the starting position.1110 DLY 0.1 'Measure the time after stopping1120 M01=M_TIMER(1) 'completely.

Regular description method

1130 '=== Block 2 ===1140 M_TIMER(1)=0 'Timer reset1150 OVRD 100 'Move to the front position by1160 MOV PT02 'increasing to the maximum speed.1170 MVS P01,-10 'Move to the front of the front position.1180 OVRD 10 'Move to the target position by1190 MVS PT01 'reducing the speed.1200 DLY 0.1 '1210 OVRD 100 'Move to the front position by1220 MVS PT02 'increasing to the maximum speed.1230 MOV PT03 'Move to the starting position.1240 DLY 0.1 'Measure the time after stopping1250 M02=M_TIMER(1) 'completely.

Method that added the preced-ing position

1260 '=== Block 3 ===1270 M_TIMER(1)=0 'Timer reset1280 OVRD 100 'Pass through inside by increasing to1290 CNT 1 'the maximum speed (enabled).1300 MOV PT02 'Move to the front position.1310 CNT 0 'Pass through inside (disabled).1320 MVS PT01,-10 'Move to the front of the front position.

1330 OVRD 10 'Move to the target position by1340 MVS PT01 'reducing the speed.1350 DLY 0.1 '1360 OVRD 100 'Move to the front position by1370 MVS PT02 'increasing to the maximum speed.1380 MOV PT03 'Move to the starting position.1390 DLY 0.1 'Measure the time after stopping1400 M03=M_TIMER(1) 'Completely.

Method that added CNT

Page 435: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 435/457

8-416 Intermediate Edition

8Collection of Techniques

8.2 Intermediate Edition8.2.1 How to quickly support for the addition of types

There are not too many types and layers are not changed frequently, so it is not necessary to install a hostcomputer. But, it is troublesome to do teaching every time. Is there any good way to change and use posi-tion data?

[Technique]The program should be divided into the main program and data programs, and one data program should becreated for each type. This method allows to store data for each type or group in a separate program. Useexternal variables to transfer data between data programs and the main program. Each data program con-tains position data and a program that writes that position data into an external variable. Thus, by starting aspecific data program from the main program, the desired data can be written into an external variable.

[Implementation example]In this example, the data programs ("WK1.PRG" - "WK63.PRG) corresponding to the type numbersobtained from the external input signals are started, and position data is transferred from each of the dataprograms to the main program via system external variable (P_100()).

Program Comment

<Main program>100010101020

 DEF IO XL_SETNO=BIT,8 'Complete type number setting. DEF IO XL_PRGNO=BYTE,10,&H3F 'Receive type numbers 1 to 63.'

10301040105010601070

*MAIN  IF XL_SETNO=M_OFF THEN *MAIN 'Loop until the type numbers are received.  C00PRG$="WK"+STR$(XL_PRGNO) 'Generate a program name.  CALLP C00PRG$ 'Write data into an external variable.  '

108010901100

1110112011301140

  FOR M00WK=1 TO 10 'No, of work count  P00TMP=P_100(M00WK) 'Generate position data.  MOV P00TMP,50 'Move to the front of the target position.

  MOV P00TMP 'Move to the target position.  DLY 1  MOV P00TMP,50 'Move to the front of the target position.  NEXT M00WK 'Move to the next work.

1150 GOTO *MAIN 'Go to next layer data.1160 END

<Data programs: "WK1.PRG" - "WK63.PRG">10001010102010301040

 DIM PTDATA(10) 'Data storage area FOR M01=1 TO 10 'No. of work count  P_100(M01)=PTDATA(M01) 'Copy data into an external variable. NEXT M01 ' END

Page 436: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 436/457

8Collection of Techniques

  Intermediate Edition  8-417

8.2.2 Convenient ways to use the pallet instructionGenerally, the pallet instruction is associated with taking out parts from lattice-like parts boxes or stackingboxes on a distribution pallet, but it can be used in various ways. We will explain convenient ways to use thepallet instruction here.

[Technique](1) The pallet instruction can be used on a free plane.

The pallet instruction is associated with a lattice on a plane placed on ground from its name, but it can actu-ally be used on any flat planes.

The pallet instruction can define lattices as shown in the illustration above. This makes it possible, for exam-ple, to easily create coordinates such as the holding position and front position of works arranged in layers.Of course, it is possible to calculate these positions without using the pallet instruction, but using the palletinstruction can reduce the cycle time since calculations can be performed with a single instruction.

(2) The pallet instruction can be used in a row.

 As shown in the illustration above, it is not necessary to teach all works when holding works arranged in arow. By using the pallet instruction, the rest of works can be interpolated as long as teaching is performed onthe first and last works.

*For regular lattice-like pallets, see Page 71, "4.1.2 Pallet operation".

Define as palette 1.

Define as palette 2. Pull-out position

Moving posture

Unloading position

Page 437: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 437/457

8-418 Intermediate Edition

8Collection of Techniques

[Implementation example]In the case of "works arranged in layers," the program can be streamlined by defining the work unloadingposition and pull-out position as pallet 1, and the pull-out position and moving posture as pallet 2. Also, inthe case of "works arranged in a row," this can be accomplished by giving the same position variable twiceto the argument specified by the DEF PLT instruction.

8.2.3 How to write communication programsHow should we program to connect a robot with a personal computer and PLCs with a communication cablein order to issue work requests?

[Technique]There are several ways to program, and various specifications can be supported ranging from simply usingthe INPUT instruction to wait until some sort of command is received to reading by multi-tasking in advance.When classified broadly, the following three types of methods can be used. The features of these methodsare listed below.

Program Comment

<In the case of works arranged in layers>PT1:Bottom layer PT2:Top layer PT3:Front of the bottom layer PT4:Front of the top layer PT5:Moving posture of the bottom layer PT6:Moving posture of the top layer (for 5 layers)1000 DEF PLT 1,PT1,PT2,PT3,PT4,5,2,21010 DEF PLT 2,PT5,PT6,PT5,PT6,5,1,11020 PTMP1 = PLT 1,1 'Get the bottom layer position.1030 PTMP2 = PLT 1,5 'Get the top layer position.1040 PTMP3 = PLT 1,5+1 'Get the position in front of the bottom layer 1050 PTMP4 = PLT 1,5+5 'Get the position in front of the top layer.1060 PTMP5 = PLT 2,1 'Get the moving posture of the bottom layer.1070 PTMP6 = PLT 2,5 'Get the moving posture of the top layer.

<In the case of works arranged in a row>P1: 1st position, P2: Nth position (when 10 works are lined up)1000 DEF PLT 1,PT1,PT2,PT1,PT2,10,1,11010 PTMP1 = PLT 1, 1 'Get the 1st position.1020 PTMP2 = PLT 1,10 'Get the 10th position.

Degree ofprogramming

difficultyMethod Explanation

Low INPUT instruction only Programs can be written in an extremely simple manner. However, because theINPUT instruction does not end until something is received, the robot cannot doanything during that period. For more information about this method, see Page

337, "5.15 About the communication setting".Medium Communication inter-

ruptReception processing is performed only when some sort of work instruction isreceived. Thus, other work can be performed as long as there is no workinstruction. However, the robot operation will stop if a work instruction isreceived while in operation.

High Multi-tasking Because communication can be carried out concurrently with robot operation, itis possible to perform transport work while reading instructions in advance andanalyzing complicated text received. Thus, consecutively requested operationscan be executed one by one without stopping the robot.

Page 438: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 438/457

8Collection of Techniques

  Intermediate Edition  8-419

[Implementation example]Here, the following two types of methods are introduced among the three methods mentioned in Technique.Communication interrupt methodMulti-tasking method

(1) Communication interrupt methodThe following shows an example of a program that uses an communication interrupt. After receiving a com-mand ("GET" or "PUT" in this example) from communication line 1, this program performs correspondingprocessing, and sends a completion command ("FIN" in this example) upon completion of processing.

Communication interrupt method Comment

10001010102010301040105010601070

10801090110011101120113011401150116011701180

 OPEN "COM1:" AS #1 'Open communication line 1 with file No. 1 (#1). ON COM(1) GOSUB *S98COMRC 'Setting for communication interrupt' ML_REQ=0 'Clear the work request flag COM(1) ON 'Set to wait for communication.*MAIN 'Beginning of the main loop  GOSUB *S50CHECK 'Regular operation until reception  SELECT ML_REQ 'If a work request arrives

  CASE 1  GOSUB *S51GET 'Call a work routine  GOSUB *S99FIN 'Work completed  BREAK  CASE 2  GOSUB *S52PUT 'Call a work routine  GOSUB *S99FIN 'Work completed  BREAK  END SELECT  GOTO *MAIN'

119012001210

122012301240

*S50CHECK 'Regular operation  COM(1) ON 'Set to wait for communication.'Describe regular work.

  COM(1) STOP 'Stop waiting for communication. RETURN'

Enable a communication inter-rupt while in regular operation

125012601270128012901300131013201330134013501360

1370138013901400141014201430

*S51GET 'When "GET" is received ' Describe the work when "GET" is received. RETURN'*S52PUT 'When "PUT" is received ' Describe the work when "PUT" is received RETURN'*S98COMRC 'Communication interrupt callback  INPUT #1,C98CMD$ 'Load the character string received.  ML_REQ=0 'Clear the request reception flag.  IF C98CMD$="GET" THEN ML_REQ=1 'If "GET"

  IF C98CMD$="PUT" THEN ML_REQ=2 'If "PUT" RETURN 1'*S99FIN  PRINT #1,"FIN" 'Send a completion report.  ML_REQ=0 'Clear the work request flag. RETURN

Page 439: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 439/457

8-420 Intermediate Edition

8Collection of Techniques

(2) Multi-tasking methodThe following programs are examples of communication using multi-tasking. After receiving a command("GET" or "PUT" in this example) from communication line 1, these programs perform corresponding pro-cessing, and send a completion command ("FIN" in this example) upon completion of processing.First, the main program is started in task slot 1, and the communication program in task slot 2. The commu-nication program in task slot 2 is started with the startup condition = ALWAYS.Checking as to whether or not there is a reception by the communication program and transmissionrequests from the main program to the communication program are done by using external variables. Exter-nal variable M_100(10) is used to check whether or not there is a reception by the communication program,and external variable M_05 is used for transmission requests from the main program to the communicationprogram. Considering cases when the communication program would receive a command again before themain program completes post-reception processing, the communication program uses a maximum of 10reception buffers (external variable M_100(10)).

Multi-tasking method Comment

<Main program>10001010

102010301040105010601070108010901100111011201130114011501160

11701180119012001210

*MAIN  IF M_01 = M_02 THEN GOTO *MAIN 'If a queue is empty, nothing is performed.

M_01 = (M_01 MOD 10) + 1 'Read index + 1  SELECT M_100(M_01)  CASE 1  GOSUB *S51GET 'Call a work routine.  M_05=1 'Request to send the end of work.  BREAK  CASE 2  GOSUB *S52PUT 'Call a work routine.  M_05=1 'Request to send the end of work.  BREAK  END SELECT  GOTO *MAIN'*S51GET 'Perform work based on the command received.  ' Describe processing when "GET" is received.

 RETURN'*S52PUT 'Perform work based on the command received.  ' Describe processing when "PUT" is received. RETURN

Read the read index after add-ing 1 to it.

<Communication program>1000101010201030

 CLOSE #1 'Close communication line 1. OPEN "COM1:" AS #1 'Open communication line 1 with #1. ON COM(1) GOSUB *S98COMRC 'Set a communication interrupt.'

104010501060

 M_01=1 'Clear the read index M_02=1 'Clear the write index COM(1) ON 'Set to wait for communication.

 An index for using M_100() asa reception queue.

1070

108010901100

*MAIN 'Beginning of the main loop

  IF M_05=1 THEN GOSUB *S99FIN 'Wait for a send request GOTO *MAIN'

Check the send request

(M_05) from the main program.

1110112011301140

*S98COMRC '  INPUT #1,C98CMD$ 'Input the character string received.  IF C98CMD$="GET" THEN M_100(M_02)=1 ' IF "GET"  IF C98CMD$="PUT" THEN M_100(M_02)=2 ' IF "PUT"

Subroutine for communicationinterrupts

115011601170

  M_02=(M_02 MOD 10) + 1 'Write index + 1 RETURN 1'

 Add 1 to the write index afterwriting.

1180119012001210

*S99FIN  PRINT #1,"FIN" 'Send a completion report.  M_05=0 'Clear the work request flag. RETURN

Page 440: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 440/457

8Collection of Techniques

  Intermediate Edition  8-421

8.2.4 How to reduce teaching pointsI wrote a program for a teaching operation, but the operation cannot be carried out smoothly because thereare too many teaching points. Is there any way to reduce the number of teaching points?

[Technique]For the robot to handle works and access peripheral units or move to remote points in an appropriate man-ner, there must be positions for the robot to pass through. However, it is not always necessary to performteaching. In many cases, the number of teaching points can be reduced by setting relative positions* fromcertain positions and utilizing these positions.*In contrast, teaching points (positions from the OP of the robot) are called absolute positions.

Please look at the illustration above. Two methods are available for the robot to hold and lift a work:(1) Teach two points of the holding position and the retreat position.(2) Teach the holding point, and use the position multiplied by an offset as the retreat position.

Method (2) requires a calculation, but it only needs one teaching point. Furthermore, this method onlyrequires to teach one point of the holding position again, whereas method (1) requires two points to betaught when teaching again.

Robot coordinates

Offset

Retreat posi tion

Holding position

Page 441: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 441/457

8-422 Intermediate Edition

8Collection of Techniques

[Implementation example]In the following example, position calculations are performed using the "+" operator in order to lift in theupper air in the robot coordinate system. To obtain the retreat position in the tool coordinate system when a6-axial robot is used, for example, perform relative position calculations using the "*" operator, or performcalculations using the second argument (proximity distance) of the MOV or MVS instruction.

[Others]This is a special example, but when using an RC-1000GHW*C or similar double-hand robot, the amount ofteaching can be reduced by half if teaching is done for one hand instead of for both hands, and then both

hands are supported by correcting the Z component. Also, if a work position is located at constant intervals, the intermediate positions can be interpolated byusing the pallet instruction.

Program Comment

<Teaching method>1000 MOV PGET 'Move to the holding position (teaching).1010 MOV PAPR 'Move to the retreat position (teaching).1020 HLT

<Offset method (robot coordinate system)>1000 PAPR=PGET+POFS 'Calculate the retreat position.1010 MOV PGET 'Move to the holding position (teaching).1020 MOV PAPR 'Move to the retreat position (specifying a calculated value).1030 HLT

<Offset method (tool coordinate system)>1000 PAPR=PGET*POFS 'Calculate the retreat position.1010 MOV PGET 'Move to the holding position (teaching).1020 MOV PAPR 'Move to the retreat position (specifying a calculated value).1030 '1040 MOV PGET 'Move to the holding position (teaching).1050 MOV PGET,-50 'Move to the retreat position (specifying a proximity distance).1060 HLT

Note1)

Note1)Be careful as the directions of the tool coordinates are reversed between horizontal multi-jointrobots and vertical multi-joint robots.

Page 442: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 442/457

8Collection of Techniques

  Intermediate Edition  8-423

8.2.5 Using a P variable in a counter, etc.I want to initialize a program when it is installed on a controller. How can I initialize a counter that is not ini-tialized when the power is turned off or the program is restarted in daily operations?

[Technique]To achieve this, you can use an external variable, but an operation such as initializing the variable afterinstallation is required. Here, we will introduce a technique to achieve this by using a position variable. Posi-tion variables are normally used to store coordinate values, but information other than coordinate valuescan also be stored in each component of a position variable. Unlike numeric variables and string variables,position variables can be saved as a part of a program just like instruction lines. By utilizing this characteris-tic, it is possible to initialize programs when they are installed, and use them as counters that will not bereset thereafter.

[Implementation example]This example shows a program that counts how many times the power is turned on and off after installation.

(1) Add the following position data to the program. PDATA = (0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0)(0.0 , 0.0)

 

X component: Initialization flag, Y component: Counter value(2) Describe the following codes at the beginning or the program or in the initialization routine.

(3) Write "1" in PDATA.X, and save or back up the program in a batch. This clears the counter (PDATA.Y) to 0 once each time this program is loaded or restored, and thecounter is counted up each time the power is turned on and off thereafter. However, the counter iscounted up every time the beginning of the program is executed, so be sure not to return to thebeginning of the program.

Program Comment

<Main program>1000 IF PDATA.X=1 THEN1010 PDATA.Y=01020 PDATA.X=01030 ENDIF1040 PDATA.Y=PDATA.Y + 11050 '1060 '1070 *LOOP

1080 'Main routine1090 GOTO *LOOP

Page 443: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 443/457

8-424 Intermediate Edition

8Collection of Techniques

8.2.6 Getting position information when the sensor is onIs there any way to read the coordinates of a robot when the sensor is turned on and off without stopping therobot so that the coordinates can be used for compensation operations? Also, how can we increase accu-racy?

[Technique]If you can stop the robot when sensing, it is desirable to use an interrupt; if you don't want to stop the robot,it is desirable to use a multi-task. If you will be using an interrupt, refer to the description of the DEF IOinstruction for more information. Here, we will explain the method that uses a multi-task.Two key points for reading the coordinates of the robot at the timing when the sensor is turned on and offare as follows:

(1) Match the sensor ON timing and the timing to read position information as much as possible.  Even when the program detects the sensor being turned on, it is meaningless if the robot advancesbefore actually reading coordinates. The detection of sensor ON and the reading of coordinatesshould be carried out on the same line as much as possible. Because of this reason, reading thecoordinates inside a loop is much more effective than using an interrupt.

(2) Check the sensor at high speed as much as possible. 

It is obvious that more accurate data can be obtained by measuring 20 times than 10 times in a sec-ond. It is recommended to increase the priority of the sensing program as much as possible usingthe PRIORITY instruction at least during sensing.

Page 444: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 444/457

8Collection of Techniques

  Intermediate Edition  8-425

[Implementation example]In this example, the main program is started in task slot 1, and the sensing program is set as starting condi-tion = ALWAYS and started in task slot 2. For the instruction from the main program to the sensing program,an external variable (M_01) is used. A robot whose hand is equipped with two sensors (input signals 901 and 902) scans from PT01 to PT02 bya linear interpolation operation at 50 mm/sec, and reads the position coordinates where each of these twosensors are turned on. The current positions read are passed to the main program using external variables(P_01 and P_02). An error is issued if the robot finishes scanning with either of the sensors not turning on.

Program Comment

<Main program>1000 M_01=01010 MOV PT01 'Move to the front of the sensing position1020 SPD 50 'Reduce the speed to the sensing speed.1030 M_01=1 'Request to start sensing.1040 PRIORITY 1,1 'Status in which the sensing program is given priority1050 PRIORITY 10,21060 MVS PT02 'Move to the target position.1070 PRIORITY 1,1 'Status in which the sensing program is given priority

1080 PRIORITY 1,21090 IF M_01=1 THEN 'End sensing1100 M_01=0 'if sensing has not been completed.1110 ERROR 9100 'Generate an error.1120 ELSE1130 'Processing using P_01 and P_021140 PTMP = (P_01 + P_02) / 21150 MVS PTMP 'Move to a mid-point where the sensor was turned on.1160 HLT1170 ENDIF

<Sensing program>1000 WAIT M_01=1 'Wait for a sensing request.1010 MS1=01020 MS2=0

1030 *LOOP1040 IF MS1=0 AND M_IN(901) THEN P_01=P_CURR(1) 'Read the current position.1050 IF MS1=0 AND M_IN(901) THEN MS1=1 'Sensor 1 input completed1060 IF MS2=0 AND M_IN(902) THEN P_02=P_CURR(1) 'Read the current position.1070 IF MS2=0 AND M_IN(902) THEN MS2=1 'Sensor 1 input completed1080 IF (MS1=0 OR MS2=0) AND M_01=1 THEN *LOOP1090 M_01=01100 END

Execute sensor checking andcoordinate reading on thesame line.

Page 445: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 445/457

8-426  Advance Edition

8Collection of Techniques

8.3 Advance Edition8.3.1 Using the robot as a simplified PLC (sequencer)

Can the multi-task function of a robot be used to perform signal processing without using a PLC when con-figuring a robot system?

[Technique] Although it cannot be said that the multi-task function is totally equivalent to the PLC, it can be used for sim-ple processing such as controlling a conveyer or controlling lamp ON/OFF.If the number of standard external I/O points is insufficient, extend the number of signal points by using anoptional parallel I/O module.

[Implementation example]Create a program for processing signals, and start it with the ALWAYS attribute. The program will start at thesame time when the robot's power is turned on, which will not stop even if an error occurs externally. Do notmake any description to stop processing using the ERROR , HLT and/or WAIT instructions in this program.

 As an example, a palletized system as shown in the illustration below is assumed, where a work conveyer

and a palette conveyer are controlled by the robot. After thoroughly designing a signal processing program,program it in MELFA-BASIC IV.

Input signal list Output signal list

M_IN(8)M_IN(9)M_IN(10)M_IN(11)

:Work detection sensor :Palette detection sensor :Palette removing sensor :Palette removal request signal

M_OUT(8)M_OUT(9)M_OUT(10)M_OUT(11)M_OUT(12)M_OUT(13)M_OUT(14)M_OUT(15)

:Work conveyer ON/OFF:Work stopper ON/OFF:Work positioning unit ON/OFF:Palette input conveyer ON/OFF:Palette removal conveyer ON/OFF:Palette input stopper ON/OFF:Palette positioning stopper ON/OFF:Palette positioning unit ON/OFF

Work conveyer

Control stopper Work

detectionsensor

Positioning unit

Posit ioning unit

Palette conveyer

(IN)

Palette conveyer

(OUT)

Palette detection sensor 

Positioning stoppe

Palette removing

sensor 

Input stopper

Robot

Page 446: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 446/457

8Collection of Techniques

   Advance Edition  8-427

Work detectionsensorWork pusher

Work pusher Timer 1

Work detection

sensorWork stopper

Work detection

sensorWork conveyer

Removal requestIn removing

operationIn removing

operation Palette detectionsensor

Removing

sensor

In removing

operationRemoval

conveyerPalette detection

sensor

Palette pusher

Timer 1 (2 sec)

Palette

pusher

In removing

operation

Input stopper

In removing

operationWork detection

sensor

Input conveyer

Work detection

sensor

Positioning

stopper

Work detection

sensor

*1

*2

*3

*4

*5

*6

*7

*8

Page 447: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 447/457

8-428  Advance Edition

8Collection of Techniques

Program Comment

1000 MTMLOOP=100*1000 'No. of seconds per loop (100 seconds)1010 M_TIMER(1)=0 'Timer initialization1020 MTM01=0 'Timer variable initialization1030 MIN08=0 'A variable to retain the status of the work detection sensor 

1040 MIN09=0 'A variable to retain the status of the palette detection sensor 1050 MIN11=0 'A variable to retain the palette removal request signal1060 MPLTOUT=0 'A variable for in palette removing operation1070 '1080 *LOOP1090 'N-second timer creation1100 IF M_TIMER(1)>MTMLOOP THEN 'Clear the timer to 0 if the designated1110 M_TIMER(1)=0 'number of seconds has been exceeded.1120 IF MTM01+MTMLOOP>0 THEN MTM01=MTM01-MTMLOOP 'A timer variable1130 ENDIF1140 '1150 '##### Work conveyer #####1160 MUPPLS08=(M_IN(8) AND MIN08=0) 'Generate a rise of the detection sensor.1170 MIN08=M_IN(8)1180 '=== Ladder *1 ===

1190 IF MUPPLS08 THEN MTM01=M_TIMER(1) 'Reset the timer when a rising pulse is detected.1200 MTMOUT01=M_IN(8) AND (M_TIMER(1)-MTM01>2000) 'Set to ON after 2 seconds.1210 '=== Ladder *2 ===1220 IF MUPPLS08 OR (M_OUT(10) AND MTMOUT01=0) THEN M_OUT(10)=1 ELSE M_OUT(10)=01230 '=== Ladder *3, *4 ===1240 IF M_IN(8) THEN 'When the work detection sensor is ON1250 M_OUT(9)=1 'Stopper ON1260 M_OUT(8)=0 'Conveyer OFF1270 ELSE 'When the work detection sensor is ON1280 M_OUT(9)=0 ' Stopper OFF1290 M_OUT(8)=1 ' Conveyer ON1300 ENDIF1310 '1320 '##### Palette conveyer #####1330 MUPPLS09=(M_IN(9) AND MIN09=0) 'Generate a rise of the detection sensor.

1340 MIN09=M_IN(9)1350 MUPPLS11=(M_IN(11) AND MIN11=0) 'Generates a rise of a removal request.1360 MIN11=M_IN(11)1370 '=== Ladder *5 ===1380 IF MUPPLS11 OR (MPLTOUT AND (M_IN(9) OR M_IN(10))) THEN MPLTOUT=1 ELSE MPL-

TOUT=01390 '=== Ladder *6 ===1400 IF MPLTOUT THEN M_OUT(12)=1 ELSE M_OUT(12)=01410 '=== Ladder *7 ===1420 IF MUPPLS09 OR (M_OUT(15) AND MPLTOUT=0) THEN M_OUT(15)=1 ELSE M_OUT(15)=01430 '=== Ladder *8 ===1440 IF MPLTOUT=0 THEN 'When not in removing operation1450 IF M_IN(9) THEN 'When the palette detection sensor is ON1460 M_OUT(13)=1 'Input stopper ON1470 M_OUT(11)=0 'Input conveyer OFF1480 ELSE1490 M_OUT(13)=0 'Input stopper OFF1500 M_OUT(11)=1 'Input conveyer ON1510 ENDIF1520 M_OUT(14)=1 'Positioning stopper ON1530 ELSE1540 M_OUT(14)=0 'Positioning stopper OFF1550 ENDIF1560 GOTO *LOOP

Unit: msecBe aware ofduplications with timersused by other programs.

Set a 100-second loop foroverflow control of thetimer. Clear the timerwhen an overflow isdetected, and deduct thereference time from thetimer variable. A rising edge is detected.

Because the timer cannot

be described in one line,two lines are used.

Be sure to set either ONor OFF.

It is designed as a retain-ing circuit.

Page 448: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 448/457

8Collection of Techniques

   Advance Edition  8-429

8.3.2 Implementing a mapping functionThe robot moves to the designated location to fetch works, but sometimes operators process them or dam-aged works are removed in advance, so works are not always present. Although the robot can move to thenext work if no work is present when the robot tries to fetch one, this method will extend the cycle time. Howcan we detect the presence of works in advance?

[Technique]One available method is to detect the present of works in advance by installing an optical sensor at the tip ofthe robot's hand and scanning over works (this method is called mapping). However, in this case, becausethe processing speed of the robot controller will be limited, it may not be able to fetch works at the maximumspeed.

[Implementation example]It is desirable to use a multi-task and have the robot's operation performed by the main task and the readingfrom the sensor by the subtask. Try to write a program that can run at high speed by describing the sensorreading routine short and simple. Also, manipulate priority dynamically, and the priority of the subtaskshould be changed between normal operation and mapping execution.

In this example, the robot scans works lined up in a row using a non-contact sensor (using external inputsignal 901), checks whether each work is located where it should be (reference position), and only grabs awork if present (work holding processing not installed). For checking, whether or not works are present aredetermined by executing a calibration program once when all works are present at the time of system star-tup in order to obtain the reference position, and by comparing the reference position with the scan dataobtained by a mapping operation performed before the robot grabs a work. When the difference betweenthe reference data and the scan data is +/-10 mm or less, it is determined that a work is present.Please execute this program according to the following procedure:

(1) Start the sensing program in slot 2 with the ALWAYS attribute.(2) Start the calibration program when all works are present, and get the reference position.(3) Start the main program.

Specification I/O signal list

M_01 :Sensing requestM_100() :Work detection result storage destinationP_100() :Sensing result storage destinationP_101() :Reference value storage destination

M_IN(8) :Work request signalM_OUT(8) :Work completion signalM_IN(901) :Sensor input

  Sensor 

Work detection check area 

Sensor signal status 

Work detection status 

Page 449: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 449/457

8-430  Advance Edition

8Collection of Techniques

Program Comment

<Main program (start in slot 1)>1000 WAIT M_IN(8)=M_ON 'Wait for the work request signal to turn on.1010 MOV PT1 'Move to the sensing starting point.1020 M_01=M_ON 'Start sensing.

1030 SPD 30 'Reduce the speed to the sensing speed.1040 MVS PT2 'Move to the sensing end position.1050 DLY 0.1 'Wait until it stops completely.1060 M_01=M_OFF 'End sensing.

The same codes as those ofthe calibration program should

be used.

1070 SPD M_NSPD 'Revert the speed.1080 MVS PT1 'Return to the sensing starting point.1090 '1100 M01RANGE=10.0 'Work judgment range is 10 mm.1110 FOR M01=1 TO 10 'Compare with 10 reference data.1120 M_100(M01)=0 'Clear the detection flag.1130 FOR M00=1 TO 10 'Compare with 10 scan data.1140 M01DIST=DIST(P_101(M01),P_100(M00)) 'Determine that a work is present1150 IF M01DIST<M01RANGE THEN 'if within the distance range between the scan value

and reference value.1160 M_100(M01)=1 'A work is determined to be present.

1170 M00=10 'Exit from the FOR loop.1180 ENDIF1190 NEXT M001200 NEXT M011210 '1220 FOR M02=1 TO 10 'There should be 10 works.1230 IF M_100(M02)=0 THEN *L01SKIP 'Skip if there is no work.1240 ' GOSUB *S50WKGET 'Work holding processing (not installed)1250 *L01SKIP1260 NEXT1270 M_OUT(8)=M_ON 'Set the work completion signal to ON.1280 WAIT M_IN(8)=M_OFF 'Wait until the work request signal turns OFF.1290 M_OUT(8)=M_OFF 'Set the work completion signal to OFF.1300 END

<Sensing program (start in slot 2 with ALWAYS attribute)>1000 *S01SENS1010 PRIORITY 10,1 'Standard status1020 PRIORITY 1,21030 M_01=M_OFF 'Set the sensing request signal to OFF.1040 M01POS=1 'Clear the storage destination counter.1050 WAIT M_01=M_ON 'Wait until the sensing request signal turns ON.1060 PRIORITY 1,1 'Status in which the sensing program is given priority1070 PRIORITY 10,21080 *L01LOOP1090 IF M_01=M_OFF THEN *S01SENS 'End if the sensing request signal is OFF.1100 IF M_IN(901)=M_ON THEN 'Save the current position1110 P_100(M01POS)=P_CURR 'when the sensor turns ON.1120 M01POS=M01POS+1 'Storage destination counter + 1

1130 WAIT M_IN(901)=M_OFF 'Wait until the sensor turns OFF.1140 ENDIF1150 GOTO *L01LOOP

The current position is storedin a system external variable.

Use a user external variable ifmore than 10.

<Calibration program (start in slot 1)>1000 MOV PT1 'Move to the sensing starting point.1010 M_01=M_ON 'Start sensing.1020 SPD 30 'Reduce the speed to the sensing speed.1030 MVS PT2 'Move to the sensing end position.1040 DLY 0.1 'Wait until it stops completely.1050 M_01=M_OFF 'End sensing.1060 SPD M_NSPD 'Revert the speed.1070 MVS PT1 'Return to the sensing starting point.1080 '1090 FOR M01=1 TO 10 'Copy the sensing result to

1100 P_101(M01)=P_100(M01) 'calibration data.1110 NEXT M01 '1120 HLT

In some cases, it is desirable toscan several times and obtainthe average.

Page 450: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 450/457

8Collection of Techniques

   Advance Edition  8-431

8.3.3 Finding out executed linesI am debugging the programs I created, and want to know which lines were executed when an erroroccurred? Is there any good method to find that out?

[Technique]This controller employs the round-robin method by which all programs are executed one line at a time if thepriority of the programs has not been changed. So, by using this method, all of the currently executed linescan be obtained by a multi-task. Look at lines 1050 and 1060 in the following program.

1050 PRIORITY 1, 1 ' Execute 6 lines of this program while1060 PRIORITY 6, 2 ' executing one line of the main program.

This means that six lines of this program is executed in task slot 2 while one line of the main program is exe-cuted in task slot 1. These six lines correspond to lines 1070 through 1120.

[Implementation example]To execute this example program, start this program in task slot 2 with the ALWAYS attribute, and start themain program in task slot 1. If you are starting this program in other than task slot 2, also change the prioritysetting on line 1060. The logs of executed line in task slot 1 are stored in variable MLN (100), and are over-written from the beginning once the storage area becomes full.

Program Comment

1000 DIM MLN(100) 'Storage area for 100 lines1010 FOR M01=1 TO 100 'Clear the storage area.1020 MLN(M01)=-11030 NEXT1040 MIDX=11050 PRIORITY 1,1 'Execute 6 lines of this program while1060 PRIORITY 6,2 'executing 1 line of the main program.1070 *LOOP1080 MBF=MIDX 'Save the previous ID.1090 MIDX=(MIDX MOD 100)+1 'Ring buffer ID1100 MLN(MIDX)=M_LINE(1) 'Save the current line No.

1110 IF MLN(MBF)=MLN(MIDX) THEN MIDX=MBF 'Return if no line has been changed.1120 GOTO *LOOP

Page 451: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 451/457

8-432  Advance Edition

8Collection of Techniques

8.3.4 Saving the status when an error has occurredIs there any method to save the status when an error has occurred?

[Technique]Robot programs have startup attributes (START, ALWAYS, ERROR), and the startup condition can bechanged by using these attributes. In your case, you can create a program having the ERROR attribute thatis started when an error has occurred, and save the status at the time of error occurrence.

[Implementation example]Set the task slot that uses this program as follows:Startup condition = ERROR (executed when an error occurs)Operating mode = CYC (ends after executing one cycle.)(See the Page 318, " SLT*".) In this example, the information of past five errors is saved in variable PERINF ( , ). The following contentare saved:

1) Number of the error occurred2) Number of the line where an error occurred3) Remaining distance to the target position4) Position (orthogonal coordinates) of the robot when an error occurred

It is also possible to change the information to be saved depending on the error content (line 1110 and suc-ceeding lines).When using this program for the first time, verify that M_01 is "0." This clears the counter at the storage des-tination. Subsequently, every time an error occurs, this program is called and information is written into vari-able PERINF ( , ). The latest information is an element indicated by M_01, and is a ring buffer.

Program Comment

<Get error information program>1000 DIM PERINF(5,5) 'Allocate an area for saving past 5 errors.1010 IF M_01=0 THEN 'Clear only once.1020 M_01=1 'No. of error occurrences

1030 M_02=1 'Ring buffer ID1040 ENDIF1050 'Those independent of the error type1060 PERINF(M_02,1).X=M_01 'No. of error occurrences1070 PERINF(M_02,1).Y=M_ERRNO 'No. of the error occurred1080 PERINF(M_02,1).Z=M_LINE(1) 'No. of the line where an error occurred1090 PERINF(M_02,2).X=M_RDST 'Remaining distance to the target position1100 PERINF(M_02,3)=P_CURR 'Current position1110 'Change information to be saved depending on the error content.1120 SELECT M_ERRNO1130 CASE 28021140 'Write information to be acquired when error 2802 occurred into PERINF.1150 'PERINF(M_02,4).X=M_???1160 'PERINF(M_02,5)=P_???1170 BREAK

1180 CASE 91001190 'Write information to be acquired when error 9100 occurred into PERINF.1200 BREAK1210 DEFAULT1220 'Write information to be acquired when an unexpected error occurred into PERINF.1230 BREAK1240 END SELECT1250 '

It is possible to change infor-mation to be saved accordingto the error content.

1260 M_01=M_01+11270 M_02=(M_02 MOD 5)+1 'Generate an ID as a ring buffer.1280 END

Increase the count of the bufferindex.

Page 452: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 452/457

  9Appendix 

  Reference Material   9-433

9 Appendix

9.1 Reference Material9.1.1 About sink/source type of the standard external input and output

There are two types of external input/output circuit specifications: sink type and source type. The circuitspecification type specified by the customers at ordering is built into the product (sink type for general Japa-

nese/international products, and source type for CE mark products for Europe). The external input/outputcircuit built into the controller as standard is explained below, together with the two types of circuit specifica-tions mentioned above.

(1) Electrical specifications of input/output circuitThe external input circuit specification is shown in Table 9-1. The external output circuit specification isshown in Table 9-2.

Table 9-1:Electrical specifications of input circuit

Table 9-2:Electrical specifications of output circuit

Item Specifications Internal circuit

Type DC input  <Sink type>

 <Source type>

No. of input points 32 or 16 Note1)

Note1)The number of input points differ with robot type. Refer to the separate manual "Standardspecifications".

Insulation method Photo-coupler insulation

Rated input voltage DC12V/DC24V

Rated input current Approx. 3mA/approx. 7mA

Working voltage range 1 0.2VDC to 26.4VDC(ripple rate within 5%)

ON voltage/ON current 8VDC or more/2mA or more

OFF voltage/OFF current 4VDC or less/1 mA or less

Input resistance Approx. 3.3k ɹ

Response time OFF-ON 1 0ms or less(DC24V)

ON-OFF 1 0ms or less(DC24V)

Common method 8 points per common

External wire connection method Connector 

Item Specifications Internal circuit

Type Transistor output  <Sink type>

 <Source type>

No. of output points 32 or 16 Note1)

Note1)The number of output points differ with robot type. Refer to the separate manual "Standardspecifications".

Insulation method Photo-coupler insulation

Rated load voltage DC12V/DC24VRated load voltage range DC 1 0.2 Å`30V(peak voltage 30VDC)

Max. load current 0.1 A/point (1 00 Åì)

Leakage current at OFF 0.1 mA or less

Max. voltage drop at ON DC0.9V(TYP.)

Response time OFF-ON 2ms or less (hardware response time)

ON-OFF 2ms or less (Resistance load) (hardware responsetime)

Fuse rating Fuse 3.2A (one per common) Replacement not pos-sible

Common method 4 points per common (common terminal: 4 points)

External wire connection method Connector 

External power

supply

Voltage DC12/24V(DC10.2Å`30V)

Current 60mA (TYP. 24VDC per common) (base drive current)

3.3K Input

820

24V/12V(COM)

3.3K Input

820

0V(COM)

(24/12V)

Outline

(0V)Fuse

Fuse (24/12V)

Outline

(0V)

Page 453: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 453/457

9-434 Reference Material 

9Appendix 

(2) Connection exampleShows the connection example with a Mitsubishi PLC. The Fig. 9-1 is the sink type example, and the Fig. 9-2 is the source type example.

Fig.9-1:Connection with a Mitsubishi PLC (Example of sink type)*The input/output circuit external power supply (24 VDC) must be prepared by the customer.

Fig.9-2:Connection with a Mitsubishi PLC (Example of source type)*The input/output circuit external power supply (24 VDC) must be prepared by the customer.

 60mA(24/12V)

Output

Fuse(0V)

(COM)

AX41C(Mitsubishi programmablecontroller)

AY51C(Mitsubishi programmablecontroller)

+24V

24V

COM

X

Y

24V

   …   …

Input

 

Parallel I/O interface(Output)

(Input)

3.3K

CTL+

Output

Input

Externalpower supply

CTLG24G

COM

Externalpower supply

24G24V

   …   …

<Sink type>

 60mA(24/12V)

Output

Output

Fuse

(0V)

(COM)

AX81C

AY81C

+24V

24G

24V

COM

24G

Externalpower supply

X

Y

24V

24V

 

(Output)  

(Input)

3.3K

CTLG

CTL+

Externalpower supply

Input

Input

   …   …

   …   …

<Source type>

Page 454: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 454/457

  9Appendix 

  Reference Material   9-435

(3) Connector pin assignment A list of connector pin numbers and signal assignments of the external input/output card is shown below.In case of the CR1-571 controller, the assignments of pin numbers differ between the sink type and sourcetype. Table 9-3 and Table 9-4 show the connector pin assignments of the sink type and source type, respec-tively.For other controllers, the pin assignments are the same for the sink type and source type. Table 9-5 andTable 9-6 show the connector pin assignments of CN100 and CN300, respectively.

*For CR1 controller Table 9-3:Connector pin No. and signal assignment list (CR1 controller: sink type)

PinNo. Line color Note1)

Note1) "Line color" shows the line color of the external input/output cable 2A-CBL **.

Function namePinNo.

Line colorNote1)

Function name

General-purposeDedicated/power supply,

commonGeneral-purpose

Dedicated/power supply,common

1 Orange/Red A FG 26 Orange/Blue A FG2 Gray/Red A 0V:For pins 4-7 27 Gray/Blue A 0V:For pins 29-323 White/Red A 12V/24V:For pins 4-7 28 White/Blue A 12V/24V:For pins 29-324 Yellow/Red A General-purpose output 0 Running 29 Yellow/Blue A General-purpose output 45 Pink/Red A General-purpose output 1 Servo on 30 Pink/Blue A General-purpose output 56 Orange/Red B General-purpose output 2 Error 31 Orange/Blue B General-purpose output 67 Gray/Red B General-purpose output 3 Operation rights 32 Gray/Blue B General-purpose output 7

8 White/Red B 0V:For pins 10-13 33 White/Blue B 0V:For pins 35-389 Yellow/Red B 12V/24V:For pins 10-13 34 Yellow/Blue B 12V/24V:For pins 35-38

10 Pink/Red B General-purpose output 8 35 Pink/Blue B General-purpose output 1211 Orange/Red C General-purpose output 9 36 Orange/Blue C General-purpose output 1312 Gray/Red C General-purpose output 10 37 Gray/Blue C General-purpose output 1413 White/Red C General-purpose output 11 38 White/Blue C General-purpose output 1514 Yellow/Red C COM0:For pins 15-22 Note2)

Note2) Sink type:24V/12V(COM), Source type:0V(COM)

39 Yellow/Blue C COM1:For pins 40-47 Note1)

15 Pink/Red C General-purpose input 0 Stop(All slot) Note3)

Note3) The assignment of the dedicated input signal "STOP" is fixed.

40 Pink/Blue C General-purpose input 8

16 Orange/Red D General-purpose input 1 Servo off 41 Orange/Blue D General-purpose input 917 Gray/Red D General-purpose input 2 Error reset 42 Gray/Blue D General-purpose input 1018 White/Red D General-purpose input 3 Start 43 White/Blue D General-purpose input 1119 Yellow/Red D General-purpose input 4 Servo on 44 Yellow/Blue D General-purpose input 1220 Pink/Red D General-purpose input 5 Operation rights 45 Pink/Blue D General-purpose input 1321 Orange/Red E General-purpose input 6 46 Orange/Blue E General-purpose input 1422 Gray/Red E General-purpose input 7 47 Gray/Blue E General-purpose input 1523 White/Red E Reserved 48 White/Blue E Reserved

24 Yellow/Red E Reserved 49 Yellow/Blue E Reserved25 Pink/Red E Reserved 50 Pink/Blue E Reserved

Page 455: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 455/457

9-436 Reference Material 

9Appendix 

Table 9-4:Connector pin No. and signal assignment list (CR1 controller: source type type)

PinNo.

Line colorNote1)

Note1) "Line color" shows the line color of the external input/output cable 2A-CBL **.

Function namePinNo.

Line colorNote1)

Function name

General-purposeDedicated/power supply,

commonGeneral-purpose

Dedicated/power supply,common

1 Orange/Red A FG 26 Orange/Blue A FG2 Gray/Red A 0V:For pins 4-7, 10-13 27 Gray/Blue A 0V:For pins 29-32, 35-383 White/Red A 12V/24V:For pins 4-7, 10-13 28 White/Blue A 12V/24V:For pins 29-32,

35-384 Yellow/Red A General-purpose output 0 Running 29 Yellow/Blue A General-purpose output 45 Pink/Red A General-purpose output 1 Servo on 30 Pink/Blue A General-purpose output 56 Orange/Red B General-purpose output 2 Error 31 Orange/Blue B General-purpose output 67 Gray/Red B General-purpose output 3 Operation rights 32 Gray/Blue B General-purpose output 78 White/Red B Reserved 33 White/Blue B Reserved9 Yellow/Red B Reserved 34 Yellow/Blue B Reserved10 Pink/Red B General-purpose output 8 35 Pink/Blue B General-purpose output 1211 Orange/Red C General-purpose output 9 36 Orange/Blue C General-purpose output 1312 Gray/Red C General-purpose output 10 37 Gray/Blue C General-purpose output 1413 White/Red C General-purpose output 11 38 White/Blue C General-purpose output 1514 Yellow/Red C COM0:For pins 15-22 Note2)

Note2) Sink type:24V/12V(COM), Source type:0V(COM)

39 Yellow/Blue C COM1:For pins 40-47 Note1)

15 Pink/Red C General-purpose input 0 Stop(All slot) Note3)

Note3) The assignment of the dedicated input signal "STOP" is fixed.

40 Pink/Blue C General-purpose input 8

16 Orange/Red D General-purpose input 1 Servo off 41 Orange/Blue D General-purpose input 917 Gray/Red D General-purpose input 2 Error reset 42 Gray/Blue D General-purpose input 1018 White/Red D General-purpose input 3 Start 43 White/Blue D General-purpose input 11

19 Yellow/Red D General-purpose input 4 Servo on 44 Yellow/Blue D General-purpose input 1220 Pink/Red D General-purpose input 5 Operation rights 45 Pink/Blue D General-purpose input 1321 Orange/Red E General-purpose input 6 46 Orange/Blue E General-purpose input 1422 Gray/Red E General-purpose input 7 47 Gray/Blue E General-purpose input 1523 White/Red E Reserved 48 White/Blue E Reserved24 Yellow/Red E Reserved 49 Yellow/Blue E Reserved25 Pink/Red E Reserved 50 Pink/Blue E Reserved

Page 456: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 456/457

  9Appendix 

  Reference Material   9-437

*For CR2/CR3/CR4/CR7/CR8/CR9 controller Table 9-5:Connector CN100pin No. and signal assignment list (CR2/CR3/CR4/CR7/CR8/CR9 controller: sink and source common)

Table 9-6:Connector CN300pin No. and signal assignment list (CR2/CR3/CR4/CR7/CR8/CR9 controller: sink and source common)

PinNo.

Line colorNote1)

Note1) "Line color" shows the line color of the external input/output cable 2A-CBL **.

Function name PinNo.

Line colorNote1)

Function name

General-purposeDedicated/power supply,

commonGeneral-purpose

Dedicated/power supply,common

1 Orange/Red A FG 26 Orange/Blue A FG

2 Gray/Red A 0V:For pins 4-7 27 Gray/Blue A 0V:For pins 29-323 White/Red A 12V/24V:For pins 4-7 28 White/Blue A 12V/24V:For pins 29-32

4 Yellow/Red A General-purpose output 0 Running 29 Yellow/Blue A General-purpose output 4

5 Pink/Red A General-purpose output 1 Servo on 30 Pink/Blue A General-purpose output 5

6 Orange/Red B General-purpose output 2 Error 31 Orange/Blue B General-purpose output 6

7 Gray/Red B General-purpose output 3 Operation rights 32 Gray/Blue B General-purpose output 7

8 White/Red B 0V:For pins 10-13 33 White/Blue B 0V:For pins 35-38

9 Yellow/Red B 12V/24V:For pins 10-13 34 Yellow/Blue B 12V/24V:For pins 35-38

10 Pink/Red B General-purpose output 8 35 Pink/Blue B General-purpose output 12

11 Orange/Red C General-purpose output 9 36 Orange/Blue C General-purpose output 13

12 Gray/Red C General-purpose output 10 37 Gray/Blue C General-purpose output 14

13 White/Red C General-purpose output 11 38 White/Blue C General-purpose output 15

14 Yellow/Red C COM0:For pins 15-22 Note2)

Note2) Sink type:24V/12V(COM), Source type:0V(COM)

39 Yellow/Blue C COM1:For pins 40-47 Note1)

15 Pink/Red C General-purpose input 0 Stop(All slot) Note3)

Note3) The assignment of the dedicated input signal "STOP" is fixed.

40 Pink/Blue C General-purpose input 8

16 Orange/Red D General-purpose input 1 Servo off 41 Orange/Blue D General-purpose input 9

17 Gray/Red D General-purpose input 2 Error reset 42 Gray/Blue D General-purpose input 10

18 White/Red D General-purpose input 3 Start 43 White/Blue D General-purpose input 11

19 Yellow/Red D General-purpose input 4 Servo on 44 Yellow/Blue D General-purpose input 12

20 Pink/Red D General-purpose input 5 Operation rights 45 Pink/Blue D General-purpose input 13

21 Orange/Red E General-purpose input 6 46 Orange/Blue E General-purpose input 14

22 Gray/Red E General-purpose input 7 47 Gray/Blue E General-purpose input 15

23 White/Red E Reserved 48 White/Blue E Reserved

24 Yellow/Red E Reserved 49 Yellow/Blue E Reserved

25 Pink/Red E Reserved 50 Pink/Blue E Reserved

PinNo.

Line colorNote1)

Note1) "Line color" shows the line color of the external input/output cable 2A-CBL **.

Function namePinNo.

Line colorNote1)

Function name

General-purposeDedicated/power supply,

commonGeneral-purpose

Dedicated/power supply,common

1 Orange/Red A FG 26 Orange/Blue A FG

2 Gray/Red A 0V:For pins 4-7 27 Gray/Blue A 0V:For pins 29-32

3 White/Red A 12V/24V:For pins 4-7 28 White/Blue A 12V/24V:For pins 29-32

4 Yellow/Red A General-purpose output 16 29 Yellow/Blue A General-purpose output 20

5 Pink/Red A General-purpose output 17 30 Pink/Blue A General-purpose output 21

6 Orange/Red B General-purpose output 18 31 Orange/Blue B General-purpose output 22

7 Gray/Red B General-purpose output 19 32 Gray/Blue B General-purpose output 23

8 White/Red B 0V:For pins 10-13 33 White/Blue B 0V:For pins 35-38

9 Yellow/Red B 12V/24V:For pins 10-13 34 Yellow/Blue B 12V/24V:For pins 35-38

10 Pink/Red B General-purpose output 24 35 Pink/Blue B General-purpose output 28

11 Orange/Red C G eneral-purpose output 25 36 Orange/Blue C G eneral-purpose output 2912 Gray/Red C General-purpose output 26 37 Gray/Blue C General-purpose output 30

13 White/Red C General-purpose output 27 38 White/Blue C General-purpose output 31

14 Yellow/Red C COM0:For pins 15-22Note2)

Note2) Sink type:24V/12V(COM), Source type:0V(COM)

39 Yellow/Blue C COM1:For pins 40-47 Note1)

15 Pink/Red C General-purpose input 16 40 Pink/Blue C General-purpose input 24

16 Orange/Red D General-purpose input 17 41 Orange/Blue D General-purpose input 25

17 Gray/Red D General-purpose input 18 42 Gray/Blue D General-purpose input 26

18 White/Red D General-purpose input 19 43 White/Blue D General-purpose input 27

19 Yellow/Red D General-purpose input 20 44 Yellow/Blue D General-purpose input 28

20 Pink/Red D General-purpose input 21 45 Pink/Blue D General-purpose input 29

21 Orange/Red E General-purpose input 22 46 Orange/Blue E General-purpose input 30

22 Gray/Red E General-purpose input 23 47 Gray/Blue E General-purpose input 31

23 White/Red E Reserved 48 White/Blue E Reserved

24 Yellow/Red E Reserved 49 Yellow/Blue E Reserved

25 Pink/Red E Reserved 50 Pink/Blue E Reserved

Page 457: Mitsubishi Robot Englisch No Password

8/21/2019 Mitsubishi Robot Englisch No Password

http://slidepdf.com/reader/full/mitsubishi-robot-englisch-no-password 457/457