Page 1
Mitsubishi Industrial Robot CR1D/CR2D/CR3D Controller INSTRUCTION MANUAL Detailed explanations of functions and operations BFP-A8661-A...
Page 3
Safety Precautions Always read the following precautions and the separate "Safety Manual" before starting use of the robot to learn the required measures to be taken. CAUTION All teaching work must be carried out by an operator who has received special training. (This also applies to maintenance work with the power source turned ON.) Enforcement of safety training CAUTION...
Page 4
The points of the precautions given in the separate "Safety Manual" are given below. Refer to the actual "Safety Manual" for details. CAUTION Use the robot within the environment given in the specifications. Failure to do so could lead to a drop or reliability or faults. (Temperature, humidity, atmosphere, noise environment, etc.) CAUTION Transport the robot with the designated transportation posture.
Page 5
CAUTION Do not stop the robot or apply emergency stop by turning the robot controller's main power OFF. If the robot controller main power is turned OFF during automatic operation, the robot accuracy could be adversely affected.Moreover, it may interfere with the peripheral device by drop or move by inertia of the arm. CAUTION Do not turn off the main power to the robot controller while rewriting the internal information of the robot controller such as the program or parameters.
Page 6
C.Notes of the basic component are shown. (CR1D-700 series) 注意 Please install the earth leakage breaker in the primary side supply power supply of the controller because of leakage protection. Controller コントローラ earth leakage 漏電遮断器 breaker (NV) Cover 端子カバー Terminal 電源端子台...
Page 7
Revision history Date Specifications No. Details of revisions 2008-05-12 BFP-A8661 First print 2008-09-01 BFP-A8661-A ・ Command were added (Def Long, Fine J, Fine P, MvTune) ・ System variable was added (M_Uar32) ・ Signal-parameter were added (ROBOTERR, QMLTCPUN, QMLTCPUn, QMLTCPUS ) ・...
Page 1 Before starting use ..................................1-1 1.1 Using the instruction manuals ............................1-1 1.1.1 The details of each instruction manuals ......................1-1 1.1.2 Symbols used in instruction manual ........................1-1 1.2 Safety Precautions ................................1-3 1.2.1 Precautions given in the separate Safety Manual .................... 1-4 2 Explanation of functions ........................
Page 9
Contents Page 3.11 Operating the program control screen .................. 3-52 (1) Program list display ......................3-52 (2) Copying programs ..............................3-53 (3) Name change of the program (Rename) ......................3-54 (4) Deleting a program(Delete) ........................... 3-55 (5) Protection of the program (Protect) ........................ 3-56 3.12 Ooperation of operating screen ...........................
Page 10
Page (1) Input signals ......................... 4-111 (2) Output signals ......................4-111 4.1.5 Communication ....................... 4-112 4.1.6 Expressions and operations ................... 4-113 (1) List of operator ......................4-113 (2) Relative calculation of position data (multiplication) ............. 4-115 (3) Relative calculation of position data (Addition) ............. 4-115 4.1.7 Appended statement .......................
Page 11
Contents Page 4.3.13 Joint constants ......................4-133 (1) Axis data format and meanings ..................4-133 4.3.14 Angle value ........................4-134 4.3.15 Variables ........................4-134 4.3.16 Numeric value variables ....................4-135 4.3.17 Character string variables ..................... 4-135 4.3.18 Position variables ......................4-135 4.3.19 Joint variables .......................
Page 12
Page 5.12 About the hand type ......................5-372 5.13 About default hand status ....................5-373 5.14 About the output signal reset pattern .................. 5-374 5.15 About the communication setting ..................5-376 5.16 Hand and Workpiece Conditions (optimum acceleration/deceleration settings) ....5-377 5.17 About the singular point adjacent alarm ................
Page 13
*Introduction Thank you for purchasing the Mitsubishi industrial robot. This instruction manual explains the functions and operation methods of the controller (CR1D-700/CR2D- 700/CR3D-700 series) and teaching pendant (R32TB), and the functions and specifications of the MELFA- BASIC Ⅴ programming language.
1Before starting use 1 Before starting use This chapter explains the details and usage methods of the instruction manuals, the basic terminology and the safety precautions. 1.1 Using the instruction manuals 1.1.1 The details of each instruction manuals The contents and purposes of the documents enclosed with this product are shown below. Use these documents according to the application.
Page 15
1Before starting use Table 1-1 : Symbols in instruction manual Symbol Meaning Precaution indicating cases where there is a risk of operator fatality or DANGER serious injury if handling is mistaken. Always observe these precautions to safely use the robot. Precaution indicating cases where the operator could be subject to fatalities WARNING or serious injuries if handling is mistaken.
1Before starting use 1.2 Safety Precautions Always read the following precautions and the separate "Safety Manual" before starting use of the robot to learn the required measures to be taken. CAUTION All teaching work must be carried out by an operator who has received special training. (This also applies to maintenance work with the power source turned ON.) Enforcement of safety training CAUTION...
1Before starting use 1.2.1 Precautions given in the separate Safety Manual The points of the precautions given in the separate "Safety Manual" are given below. Refer to the actual "Safety Manual" for details. DANGER If the automatic operation of the robot is operated by two or more control equipment, design the right management of operation of each equipment of the customer.
Page 18
1Before starting use CAUTION Do not stop the robot or apply emergency stop by turning the robot controller's main power OFF. If the robot controller main power is turned OFF during automatic operation, the robot accuracy could be adversely affected. CAUTION Do not turn off the main power to the robot controller while rewriting the internal information of the robot controller such as the program or parameters.
2Explanation of functions 2 Explanation of functions 2.1 Operation panel (O/P) functions (1) Description of the operation panel button ⑪ ⑦ ① ⑤ ③ ④ ⑨ ⑩ ⑬ ⑫ ⑥ ⑧ ⑭ ② 図 2-1 : Operation panel ① START button........This executes the program and operates the robot. The program is run continuously. ②...
Page 20
2Explanation of functions (2) Description of the STATUS NUMBER 1) Display change of STATUS NUMBER The display of the display panel can be changed by [CHNG DISP], [ ↑ UP], and [ ↓ DOWN] key. Override Step number Program name The user message displays the character string (alphanumeric character of a maximum of the 32 characters) set as USERMEG.
Page 21
2Explanation of functions 2) The various status displays The various states are indicated by the character at left end. Battery Override Program name Temperature remaining time High level error Warning Low level error O/P operation If the operation panel has the right of operation, the upper left dot turns on.
2Explanation of functions 2.2 Teaching pendant (T/B) functions This chapter explains the functions of R32TB (optional). (1) F function of each key ② ④ ① ③ ⑤ ⑤ ⑥ ⑥ ⑧ ⑦ ⑨ ⑩ ⑪ ⑰ ⑫ ⑱ ⑬ ⑭ ⑲...
2Explanation of functions 2.2.1 Operation rights Only 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 limited device "has the operation rights".
2Explanation of functions 2.3 Functions Related to Movement and Control This controller has the following characteristic functions. Function Explanation Explanation page Optimum speed control This function prevents over-speed errors as much as possible by limiting Page 249, "Spd (Speed)" the 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 two points.
Page 25
2Explanation of functions Function Explanation Explanation page External device com- The following methods are available for communicating with the external munication function devices Refer to Page 282, "M_In/M_Inb/ For controlling the controller and for interlock within a program M_Inw", 1) Via input/output signals Page 288, "M_Out/M_Outb/ M_Outw".
3Explanation of operation methods (2) Input of the number/character Each time the [CHARACTER] key is pressed, the number input mode and the character input mode change. The current input mode is displayed in the center under the screen, and the display of "123" shows that the number input mode and "ABC"...
<TITLE> screen is displayed. 1.FILE/EDIT 2.RUN RV-6SDL The <MENU> screen will appear. 3.PARAM. 4.ORIGIN/BRK 5.SET/INIT. COPYRIGHT (C) 2008 MITSUBISHI ELEC TRIC CORPORATION ALL RIGHTS RESE RVED 123 CLOSE *Press the number key method 1) Press the [1] key. The <Management/edit> <MENU> ...
Page 31
3Explanation of operation methods ◇◆◇ Using the T/B ◇◆◇ Unless the controller [MODE] switch is set to "MANUAL", operations other than specific operations (cur- rent position display on JOG screen, changing of override, monitoring of input/output, error history) can- not be carried out from the T/B. ◇◆◇...
3Explanation of operation methods 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 as an example. The axes are config- ured differently depending on the type of robot.
3Explanation of operation methods screen together with the sound of buzzer to warn the operator. It is possible to set this function valid or invalid by parameter MESNGLSW. (Refer to Page 343, "5 Functions set with parameters".) Please refer to Page 379, "5.17 About the singular point adjacent alarm"...
3Explanation of operation methods 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 in angle units.
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 way as 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).
3Explanation of operation methods 3.2.8 Switching Tool Data Set the tool data you want to use in the MEXTL1 to 4 parameters, and select the number of the tool you want to use according to the following operation. 1) Push the [ENABLE] switch of T/B and enable T/B. MODE Up :DISABLE MANUAL...
3Explanation of operation methods 3.2.9 Impact Detection during Jog Operation This function can be enabled and disabled with a parameter. If the controller detects an impact, an error numbered 101n will be generated (the least significant digit, n, is the axis number). This function can also be enabled during jog operation;...
3Explanation of operation methods (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 is required, adjust the COLLVLJG parameter before use. Also, be sure to set the HNDDAT0 and WRKDAT0 parameters correctly before use.
3Explanation of operation methods 3.3 Opening/Closing the Hands The open/close operation of the hands attached to on the robot is explained below. Hands 1 to 6 can be opened and closed with the T/B. <HAND> ±C : HAND1 ±Z : HAND4 ±B : HAND2 ±Y : HAND5 ±A : HAND3...
3Explanation of operation methods 3.4 Aligning the Hand The 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 set at the closest values in units of 90 degrees.
Page 41
3Explanation of operation methods CAUTION If any posture components (A, B and C) become 180 degrees as a result of aligning the hand, the component values can be either +180 degrees or -180 degrees even if the posture is the same. This is due to internal operation errors, and there is no con- sistency in which sign is employed.
3Explanation of operation methods 3.5 Programming MELFA-BASIC Ⅴ used with this controller allows advanced work to be described with ample operation functions. The programming methods using the T/B are explained in this section. The functions shown in Table 3-4 are used to input one line. (Refer to Page 152, "4.11 Detailed explanation of command words"...
3Explanation of operation methods (2) Creating a program The key operation in the case of inputting the program of the following and the three steps is shown. 1 Mov P1 2 Mov P2 3 End 1) Press the function key ([F3]) corresponding to "insertion" in the command edit screen. <PROGRAM>...
Page 44
3Explanation of operation methods 5) Registration of Step 1 Press the [EXE] key and register the step 1. <PROGRAM> 1 <PROGRAM> 1 1Mov P1 1MOV P1 _ ⇒ DELETE CLOSE EDIT INSERT TEACH Registration of Step 1 [EXE] 6) Hereafter, input Steps 2 and 3 in the same way. <PROGRAM>...
3Explanation of operation methods (3) Completion of program creation and saving programs If the function key which corresponds for "closing" is pressed, the program will be saved and creation will be finished. If the "close" is not indicated, press the [FUNCTION] key, and display it. <PROGRAM>...
3Explanation of operation methods (4) Correcting a program Before correcting a program, refer to Page 29, "3.5.1 Creating a program" "(1)Opening the program edit screen", and open the program edit screen. An example, change " 5 Mov P5" to " 5 Mvs P5" . <PROGRAM>...
Page 47
3Explanation of operation methods ◇◆◇ Select and correct the line. ◇◆◇ [ ↑ ] By the [ ↓ ] key, the cursor can be moved to Step 5, and the function key corresponding to "edit" can also be pressed and corrected to it. ◇◆◇...
3Explanation of operation methods (5) Registering the current position data Teach the position variable which moves the robot to the movement position by jog operation etc., and is using the position by the program (registration). It is overwritten if already taught (correction). There are the teaching in the command edit screen and the teaching in the position edit screen.
Page 49
3Explanation of operation methods (b)Teaching in the position edit screen The operating procedure in the case of teaching the current position to the below to the position variable P5 is shown. Move the robot to the movement position by jog operation etc. beforehand. 1) Teaching in the position edit screen Press the function key ([F2]) corresponding to "the change", and display the position edit screen.
Page 50
3Explanation of operation methods ◇◆◇ Change of the command edit screen and the position edit screen ◇◆◇ If the function key corresponding to "the change" is pressed, the command edit screen and the position edit screen can be changed each other. If the "change"...
3Explanation of operation methods (6) Deletion of the position variable The operating procedure which deletes the position variable is shown. Restrict to the variable which is not used by the program and it can delete. 1) Display the position edit screen . Press the function key corresponding to "Cange", and display the position edit screen .
3Explanation of operation methods (7) Confirming the position data (Position jump ) Move the robot to the registered position data place. The robot can be moved with the "joint mode" or "XYZ mode" method. Perform a servo ON operation while lightly holding the deadman switch before moving positions. Table 3-5:Moving to designated position data Name Movement method...
3Explanation of operation methods (8) Correcting the MDI (Manual Data Input) MDI is the method of inputting the numerical value into each axial element data of position data directly, and registering into it. This is a good registration method for registration of the position variable which adds position data and is used as an amount of relative displacement from a reference position (difference), if it tunes registered position data finely.
3Explanation of operation methods 3.6 Debugging Debugging refers to testing that the created program operates correctly, and to correcting an errors if an abnormality 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.
3Explanation of operation methods ◇◆◇ 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 alarm, turn the servo ON, and start step operation. ・...
3Explanation of operation methods ◇◆◇ 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 alarm, turn the servo ON, and start step operation. ・...
3Explanation of operation methods Display the inputted program of the slot number. (The following example specifies the slot 2) <CHECK> SLOT 2 <CHECK> 1 Mov P1 SLOT ( 2 Mvs P2 3 Dly 0.5 4 Mvs P1 Jump SLOT ⇒...
Page 58
3Explanation of operation methods Step 5 can be called even if it moves the cursor to Step 5 by the [ ↑ ] , [ ↓ ] key. 2) Execution of step feed If the function key corresponding to "FWD" is pressed, step feed can be done from Step 5. <PROGRAM>...
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 CHNG DISP 1) Press the controller [CHNG DISP] switch...
3Explanation of operation methods (3) Starting automatic operation CAUTION Before starting automatic operation, always confirm the following item. Starting automatic operation without confirming these items could lead to property damage or physical injury. ・ Make sure that there are no operators near the robot. ・...
3Explanation of operation methods (4) Stopping The running program is immediately stopped, and the moving robot is decelerated to a stop. *Operating with the controller STO P 1) Press the [STOP] switch. Stop *Operating with the T/B 1) Press the [STOP] key. STOP Stop Operation rights not required...
3Explanation of operation methods (6) Resetting the program The 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] switch to "DISABLE". Up :DISABLE Down:ENABLE *Lighting Rear of T/B T/B disable MODE 2) Set the controller [MODE] switch to "AUTO-...
3Explanation of operation methods 3.8 Turning the servo ON/OFF For safety purposes, the servo power can be turned ON during the teaching mode only while the enable switch on the back of the T/B is lightly pressed. Carry out this operation with the T/B while lightly pressing the deadman switch.
3Explanation of operation methods 3.9 Error reset operation *Error reset operation from the operation panel Cancel errors 1) Press the [ RESET] key. If the error by the side of T/B is not reset, do reset operation from T/B. Error reset [RESET] *Error reset operation from the T/B Cancel errors 1) Press the [ RESET] key.
3Explanation of operation methods 3.11 Operating the program control screen Here, explain the operation method of the following related with program management. (1) Program list display (2) Copying programs ( C opy) (3) Name change of the program (Renaming). (4) Deleting a program (Dele). (5) Protection of the program (Protect).
3Explanation of operation methods Copying programs 1) Select the copy menu Press the function key corresponding to the "copy" by program list display. Display the copy screen. <PROGRAM COPY> <FILE/EDIT> 1/20 136320 08-04-24 17:20:32 22490 SRC.NAME ( 1 08-04-24 14:56:08 08-04-24 13:05:54 2208...
3Explanation of operation methods Name change of the program (Rename) 1) Select the rename menu Press the function key corresponding to the "Rename" by program list display. Display the rename screenIf the "renaming" menu is not displayed, press and display the [FUNCTION] key. <PROGRAM RENAME> ...
3Explanation of operation methods Deleting a program Delete 1) Select the delete menu Press the function key corresponding to the "Delete" by program list display. Display the delete screen. If the "Delete" menu is not displayed, press and display the [FUNCTION] key <FILE/EDIT> ...
3Explanation of operation methods (5) Protection of the program (Protect) 1) Select the protect menu Press the function key corresponding to the "Protect" by program list display. Display the protect screen. If the "Protect" menu is not displayed, press and display the [FUNCTION] key <FILE/EDIT> ...
Page 70
3Explanation of operation methods ◇◆◇ About command protection ◇◆◇ It is the function which protects deletion of the program, name change, and change of the command from the operation mistake. ・ Protection information is not copied in copy operation. ・ In initialization operation, protection information is disregarded and execute initialization. ◇◆◇...
3Explanation of operation methods 3.12 Ooperation of operating screen (1)Display of the execution line ..1.Confirmation: Display the executing program line, or execute step feed (2)Display of the test execution line2.Test execution: Display the name of the program selected, and the executing step number.
Page 72
3Explanation of operation methods ◇◆◇ About 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. Execution of the End command or the Hlt command will not step feed any more.
Page 73
3Explanation of operation methods ◇◆◇ 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 alarm, turn the servo ON, and start step operation. ・...
3Explanation of operation methods (3) Step jump It is possible to change the currently displayed step or line. The operation in the case of doing step operation from Step 5 as an example is shown. 1) Call Step 5. Press the function key corresponding to "JUMP", and press the [5], [EXE] key. The cursor moves to Step 5. <PROGRAM>...
3Explanation of operation methods 3.12.2 Test operation (1) Select the test operation 1) Press the [2] key in the menu screen, and display the operation menu screen. <MENU> <RUN> 1.FILE/EDIT 2.RUN 1.CHECK 2.TEST RUN 3.PARAM. 4.ORIGIN/BRK 5.SET/INIT. 123 CLOSE CLOSE ...
3Explanation of operation methods 3.13 Operating the monitor screen Here, explain the operation method of the following functions. (1)Input signal monitor ....1.Input : Parallel input signal monitor (2)Output signal monitor .....2.Output : Parallel output signal monitor . Setup of ON/OFF (3)Input register monitor.....3.Input register:...
Page 77
3Explanation of operation methods 3) Display the ON/OFF state of the 32 points at the head for the input signal No. 8. Black painting indicates ON and white indicates OFF. <INPUT> <INPUT> Next [F3] 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 23 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 55 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0...
3Explanation of operation methods (2) Output signal monitor There are the function which always makes the ON/OFF state of the output signal the monitor, and the function outputted compulsorily. 1) Press the [2] key in the monitor menu screen, and display the output signal screen. The output signal of the 32 points can be monitored on the one screen.
Page 79
3Explanation of operation methods 3) The compulsive output of the output signal. In the following, the operation method in the case of turning off the output signal No. 8 compulsorily is shown. Press the function key corresponding to "Number". Set "8" as the start number. "...
3Explanation of operation methods 7) Press the function key corresponding to "Close" in monitor menu screen is pressed, finish the monitor, and return to the original screen. <MONITOR> <FILE/EDIT> 1/20 136320 08-04-24 17:20:32 22490 1.INPUT 2.OUTPUT 08-04-24 14:56:08 3.INPUT REG. 4.OUTPUT REG.
3Explanation of operation methods (5) Variable monitor It is the function to display or change the details of the variable currently used by the program. 1) Press the [5] key in the monitor menu screen, and display the variable monitor screen. <MONITOR> ...
Page 85
3Explanation of operation methods 5) Change the variable value. The value of the variable currently displayed can be changed. Move the cursor to the variable name changed by the arrow key, and press the function key corresponding to the "Value." Although the current value (data) is displayed, it can input and change.
3Explanation of operation methods (6) Error history Display the error history. Please use reference at the time of trouble occurrence. 1) Press the [6] key in the monitor menu screen, and display the error history. <MONITOR> <ERROR LOG> o-0001 H0120 1.INPUT 2.OUTPUT...
3Explanation of operation methods 3.14 Operation of maintenance screen The parallel I/O designated input/output settings and settings for the tool length, etc., are registered as parameters. The robot moves based on the values set in each parameter. This function allows each parameter setting value to be displayed and registered.
Page 88
3Explanation of operation methods <PARAMETER> NAME(MEXTL ELE(3 ) DATA (100.00 ) [F3] <PARAMETER> NAME(MEXTL1 Prev Next CLOSE DATA ELE( ) DATA (0.00,0.00,0.00,0.00,0.00,0.00 ) <PARAMETER> NAME(MEXTL Prev Next CLOSE DATA ELE( ) DATA [F2] (0.00,0.00,100.00,0.00,0.00,0.00 ) Prev Next DATA CLOSE The value can be changed also in this state. Press the function key corresponding to the "Data", make it move to the position of the element number which changes the cursor by the arrow key, and input the new preset value.
3Explanation of operation methods 3.15 Operation of the origin and the brake screen origin (1) O If 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 &...
Page 90
3Explanation of operation methods 3) Input "1" into the axis which release the brake. <BRAKE> <BRAKE> J1:( )J2:( )J3:( J1:( )J2:( )J3:( J4:( )J5:( )J6:( J4:( )J5:( )J6:( J7:( )J8:( J7:( )J8:( REL. CLOSE REL. CLOSE CAUTION Due to the robot configuration, when the brakes are released, the robot arm will drop with its own weight depending on the released axis.
3Explanation of operation methods 3.16 Operation of setup / initialization screen Here, explain the operation method of the following functions. Initialization ......1. Programs : Delete all the programs 2. Parameter: Return the parameter to the setup at the time of shipment. 3.
3Explanation of operation methods 4) Press the function key corresponding to "Close", and return to the set/initial screen. <INITIALIZE> <SET/INITIALIZE> 1.INITIALIZE 2.POWER 1.DATA 2.PARAMETER 3.CLOCK 4.VERSION 3.BATTERY CLOSE CLOSE ◇◆◇ Executed even when protected ◇◆◇ The program will be initialized even if the program protection or variable protection is set to ON. (2) Initialize the parameter Return the parameter to the setup at the time of shipment.
3Explanation of operation methods 4) Press the function key corresponding to "Close", and return to the set/initial screen. <SET/INITIALIZE> <INITIALIZE> 1.INITIALIZE 2.POWER 3.CLOCK 4.VERSION 1.DATA 2.PARAMETER 3.BATTERY CLOSE CLOSE (3) Initialize the battery Reset the expended hours of the battery 1) Press the [1] key in the set/initial screen, and display the initial menu screen.
3Explanation of operation methods ◇◆◇ Always initialize after battery replacement ◇◆◇ The battery usage time is calculated in the controller, and a caution message is displayed when the battery is spent. Always initialize the battery consumption time after replacing the battery to ensure that the caution message is displayed correctly.
3Explanation of operation methods 3) Press the function key corresponding to "Close", and return to the set/initial screen. <CLOCK> <SET/INITIALIZE> 1.INITIALIZE 2.POWER DATE 08-05-07 3.CLOCK 4.VERSION TIME 16:35:20 CLOSE CLOSE (6) Version Display the software version of the controller and the teaching pendant 1) Press the [4] key in the set/initial screen, and display the version screen.
3Explanation of operation methods 3.17 Operation of the initial-setting screen There is the function of initial setting shown in the following. (1)Setup of the display language The character displayed on the T/B can be set to either Japanese or English. (2)Adjustment of contrast .....
Page 97
7) T/B starts in the language set up when the [EXE] key was pressed. 1.Configuration MELFA RV-12SQ-SZ Ver. 1.0 2.Com.Information CRnQ-7xx COPYRIGHT (C) 2007 MITSUBISHI ELEC TRIC CORPORATION ALL RIGHTS RESE RVED <1> <2> Rset Operation of the initial-setting screen...
3Explanation of operation methods (2) Adjustment of contrast The brightness of the screen of T/B can be adjusted in the 16 steps. 1) Press the [F1] key in the initial-setting screen, and select "1.Configuration" 1.Configuration 1.Default Language 2.Com.Information 2.Contrast <1> <2> Rset <1>...
Page 99
8) T/B starts in the contrast set up when the [EXE] key was pressed. 1.Configuration MELFA RV-12SQ-SZ Ver. 1.0 CRnQ-7xx 2.Com.Information COPYRIGHT (C) 2007 MITSUBISHI ELEC TRIC CORPORATION ALL RIGHTS RESE RVED <1> <2> Rset Operation of the initial-setting screen...
4MELFA-BASIC V 4 MELFA-BASIC V In this chapter, the functions and the detailed language specification of the programming language "MELFA- BASIC Ⅴ " are explained. 4.1 MELFA-BASIC V functions The outline of the programming language "MELFA-BASIC Ⅴ " is explained in this section. The basic move- ment of the robot, signal input/output, and conditional branching methods are described.
4MELFA-BASIC V 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 Command word Explanation The robot moves to the designated position with joint interpolation.
4MELFA-BASIC V (2) Linear interpolation movement The end of the hand is moved with linear interpolation to the designated position. *Command word Command word Explanation The robot moves to the designated position with linear interpolation. It is possible to specify the interpolation form using the TYPE instruction.
4MELFA-BASIC V (3) Circular interpolation movement The 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 move to the start point with linear operation and then begin circular interpolation. *Command word Command word Explanation...
Page 104
4MELFA-BASIC V •Program example Program Explanation Mvr P1, P2, P3 Wth M_Out(18) = 1 Moves between P1 - P2 - P3 as an arc. The robot current position before movement is separated from the start point, so first the robot will move with linear operation to the start point. (P1) output signal bit 18 turns ON simultaneously with the start of circular movement.
4MELFA-BASIC V (4) Continuous movement The 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 can be changed even during continuous movement. *Command word Command word Explanation...
4MELFA-BASIC V (5) Acceleration/deceleration time and speed control The percentage of the acceleration/deceleration in respect to the maximum acceleration/deceleration, and the movement speed can be designated. *Command word Command word Explanation Designates the acceleration during movement and the deceleration as a percentage (%) in Accel respect to the maximum acceleration/deceleration speed.
Page 107
4MELFA-BASIC V •Program example Program Explanation Ovrd 100 ' Sets the movement speed applied on the entire program to the maximum speed. Mvs P1 Moves at maximum speed to P1. Mvs P2, -50 *1) Moves at maximum speed from P2 to position retracted 50mm in hand direction. Ovrd 50 ' Sets the movement speed applied on the entire program to half of the maximum speed.
4MELFA-BASIC V (6) Confirming that the target position is reached The positioning finish conditions can be designated with as No. of pulses. (Fine instruction) This designation is invalid when using continuous movement. *Command word Command word Explanation Fine Designates the positioning finish conditions with a No. of pulses. Specify a small number of pulses to allow more accurate positioning.
4MELFA-BASIC V (7) High path accuracy control It is possible to improve the motion path tracking when moving the robot. This function is limited to certain types of robot. Currently, the Prec instruction is available for vertical multi-joint type 5-axis and 6-axis robots. *Command word Command word Explanation...
4MELFA-BASIC V (8) Hand and tool control The hand open/close state and tool shape can be designated. *Command word 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 Statement example Explanation...
4MELFA-BASIC V 4.1.2 Pallet operation When 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 of the reference workpiece, and obtain the other positions with operations. *Command word Command word Explanation...
Page 112
4MELFA-BASIC V <Precautions on the posture of position data in a pallet definition> CAUTION Please read "*Explanation" below if you use position data whose posture components (A, B and C) are approximately +/- 180 degrees as the start point, end points A and B, or the diagonal point.
Page 113
4MELFA-BASIC V CAUTION The value of the start point of the pallet definition is employed for the structure flag of grid points (FL1 of position data) calculated by pallet operation (Plt instruction). For this reason, if position data with different structure flags are used for each point of the pallet definition, the desired pallet operation cannot be obtained.
Page 114
4MELFA-BASIC V •Program example 1 The hand direction is the same in all grid points of a pallet (values of the A, B and C axes are identical) Program Explanation 1 P3.A=P2.A ’Assigns the posture component (A) of P2 to the posture component (A) of P3. 2 P3.B=P2.B ’Assigns the posture component (B) of P2 to the posture component (B) of P3.
Page 115
4MELFA-BASIC V •Program example 2 Correction when posture components are close to +/-180 degrees Program Explanation 1 If Deg(P2.C)<0 Then GoTo *MINUS ’Checks the sign of the posture component (C) of P2 and, if it is - (negative), jump to the label MINUS line. 2 If Deg(P3.C)<-178 Then P3.C=P3.C+Rad(+360) ’If the posture component (C) of P3 is close to -180 degrees, adds 360 degrees to correct it to a positive value.
Page 116
4MELFA-BASIC V *Related functions Function Explanation page Substitute, operation ..............Page 113, "4.1.6 Expressions and operations" Condition branching ..............Page 104, "(1) Unconditional branching, conditional branching, waiting" 4-103 MELFA-BASIC V functions...
4MELFA-BASIC V 4.1.3 Program control The program flow can be controlled with branching, interrupting, subroutine call, and stopping, etc. (1) Unconditional branching, conditional branching, waiting The flow of the program to a specified step can be set as unconditional or conditional branching. *Command word Command word Explanation...
Page 118
4MELFA-BASIC V *Related functions Function Explanation page Repetition ................... Page 106, "(2) Repetition" Interrupt....................Page 107, "(3) Interrupt" Subroutine..................Page 108, "(4) Subroutine" External signal input................Page 111, "(1) Input signals" 4-105 MELFA-BASIC V functions...
4MELFA-BASIC V (2) Repetition Multiple command statements can be repeatedly executed according to the designated conditions. *Command word 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 are satisfied.
4MELFA-BASIC V (3) Interrupt Once the designated conditions are established, the command statement being executed can be interrupted and a designated step branched to. *Command word Command word Explanation Def Act Defines the interrupt conditions and process for generating interrupt. Designates the validity of the interrupt.
4MELFA-BASIC V (4) Subroutine Subroutine 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 Command word Explanation...
4MELFA-BASIC V (5) Timer The program can be delayed by the designated time, and the output signal can be output with pulses at a designated time width. *Command word Command word Explanation Functions as a designated-time timer. *Statement example Statement example Explanation Dly 0.05 ................
4MELFA-BASIC V (6) Stopping The program execution can be stopped. The moving robot will decelerate to a stop. *Command word Command word Explanation This instruction stops the robot and pauses the execution of the program. When the program is started, it is executed from the next step. This instruction defines the end of one cycle of a program.
4MELFA-BASIC V 4.1.4 Inputting and outputting external signals This section explains the general methods for signal control when controlling the robot via an external device (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 140, "4.3.26 Robot sta- tus variables"...
4MELFA-BASIC V 4.1.5 Communication Data can be exchanged with an external device, such as a personal computer. *Command word 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.
4MELFA-BASIC V 4.1.6 Expressions and operations The following table shows the operators that can be used, their meanings, and statement examples. (1) List of operator Operato Class Meaning Statement example Substituti The right side is P1=P2 ’Substitute P2 in position variable P1. substituted in the left P5=P_Curr ’Substitute the current coordinate value in current position variable P5.
Page 127
4MELFA-BASIC V Operato Class Meaning Statement example Logical Logical AND operation M1=M_Inb(1) And &H0F ’Convert the input signal bit 1 to 4 status and substitute in numeric operation variable M1. (Input signal bits 5 to 8 remain OFF.) Logical OR operation M_Outb(20)=M1 Or &H80 ’Output the numeric variable M1 value to output signal bit 20 to 27.
4MELFA-BASIC V (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 is explained using simple examples. An example of relative calculation (multiplication) 1 P2=(10,5,0,0,0,0)(0,0) M ultip lication b etween P variab les...
4MELFA-BASIC V 4.1.7 Appended statement A process can be added to a movement command. *Appended statement Appended statement Explanation Unconditionally adds a process to the movement command. WthIf Conditionally adds a process to the movement command. *Statement example Statement example Explanation Mov P1 Wth M_Out(20)=1..........
4MELFA-BASIC IV 4.2 Multitask function 4.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 control of peripheral devices with the robot program. Multitasking is executed by placing the programs, to be run in parallel, in the items called "slots"...
4MELFA-BASIC IV 4.2.2 Executing a multitask Table 4-2:The multitask can be executed with the following three methods. Types of execution Explanation Execution from a program This method starts parallel operation of the programs from a random position in the program using a MELFA-BASIC IV command. The pro- grams to be run in parallel can be designated, and a program running in parallel can be stopped.
Page 132
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, operation mode, start condition, and priority for each of the 32 task slots (set to 8 slots at the factory default setting). Please refer to Page 343, "5 Functions set with parameters"...
Page 133
4MELFA-BASIC IV 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.
4MELFA-BASIC IV the flag's status. (This consideration is not necessary for task programs whose operation mode is set to CYC (1 cycle operation) because they are executed only once.) Mechanism 1 is assigned to slot 1 In 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).
4MELFA-BASIC IV 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.
4MELFA-BASIC IV *Procedure 4: Starting Start the program 1 and program 2 operation by starting from the operation panel. 4.2.7 Program capacity There are 3 types of areas that handle robot programs; save, edit and execution. Refer to "Table 4- 3Capacity of each program area"...
Page 138
4MELFA-BASIC IV Program save area Program edit area (file system) Total: 220 KB 179KB * Capacity in the case of standard memory Program execution area Total: 184KB 4-125 Multitask function...
4MELFA-BASIC IV 4.3 Detailed specifications of MELFA-BASIC V In this section, detailed explanations of the MELFA-BASIC Ⅴ format and syntax such as configuration are given, as well as details on the functions of each command word. The following explains the components that constitute a statement.
4MELFA-BASIC IV (3) Variable The following types of variables can be used in a program. ・・・・Required data can be saved. Variable ・・・・This is predetermined by the variable name and saved data. System variable Note 1) System control variable ・・・・This can only be referred to with the program. Example) P_CURR: The robot's current position is always saved.
4MELFA-BASIC IV 4.3.1 Statement A statement is the minimum unit that configures a program, and is configured of a command word and data issued to the word. Example) Command word Data Command statement 4.3.2 Appended statement Command words can be connected with an appended statement, but this is limited to movement com- mands.
4MELFA-BASIC IV 4.3.6 Types of characters that can be used in program The character which can be used within the program is shown in Table 4-4. However, there are restrictions on the characters that can be used in the program name, variable name and label name. The characters that can be used are indicated by O, those that cannot be used are indicated by X, and those that can be used with restrictions are indicated by Table 4-4:List of characters that can be used...
4MELFA-BASIC IV 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 as an external variable between programs.
4MELFA-BASIC IV 4.3.8 Data type In MELFA BASIC Ⅴ it is possible to use four data types: numerical values, positions, joints, and character strings. Each of these is called a "data type." The numerical value data type is further classified into real numbers and integers.
4MELFA-BASIC IV 4.3.12 Position constants The syntax for position constants is as shown below. Variables cannot be described within position con- stants. ( 100, 100, 300, 180, 180, 0, 0 ) ( 7, 0 ) structure flag 2 (multi-rotation data) structure flag 1 (posture data) L2 axis (additional axis 2) L1 axis (additional axis 1)
4MELFA-BASIC IV Value of multiple rotation data -900 -540 -180 Angle of each axis Value of multiple .... rotation data The wrist tip axis value in the XYZ coordinates (J6 axis in a vertical multi-joint type robot) is the same after one rotation (360 degrees).
4MELFA-BASIC IV Use of variables in joint element data The axis data is called the joint element data. A variable cannot be contained in the joint constant data that configures the joint constant. 4.3.14 Angle value The 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.
4MELFA-BASIC IV 4.3.16 Numeric value variables Variables whose names begin with a character other than P, J, or C are considered numeric value variables. In MELFA-BASIC Ⅴ , it is often specified that a variable is an numeric value variable by placing an M at the head.
4MELFA-BASIC IV 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 to spec- ify a name beginning with a character other than J. It is possible to reference individual coordinate data of joint variables. In this case, add "."...
4MELFA-BASIC IV 4.3.22 External variables External variables have a "_" (underscore' for the second character of the identifier ( variable name). (It is necessary to register user-defined external variables in the user base program.) The value is valid over mul- tiple programs.
4MELFA-BASIC IV 4.3.24 User-defined external variables If the number of program external variables listed above is insufficient or it is desired to define variables with unique names, the user can define program external variables using a user base program. Procedure before using user-defined external variables 1) First, write a user base program.
4MELFA-BASIC IV 4.3.25 Creating User Base Programs Note) What is a user base program? A user base program is used when user-defined external variables are used to define such variables, but it is not necessary to actually execute the program. Simply create a program containing the necessary declaration lines and register it in the "PRGUSR"...
4MELFA-BASIC IV 4.3.26 Robot status variables The available robot status variables are shown in Table 4-8. As shown in the table, the variable name and application are predetermined. The robot status can be checked and changed by using these variables. Table 4-8:Robot status variables Array designation Attribute...
Page 154
4MELFA-BASIC IV Array designation Attribute Variable Details Data type, Unit Page name Note1) Note2) 28 M_Spd Slot No.(1to 32) Current specified speed (valid only for linear/ Single-precision circular interpolation) real number type, mm/s 29 M_NSpd Slot No.(1to 32) System default value (default value of M_Spd) Single-precision (mm/s) real number type,...
Page 155
4MELFA-BASIC IV Array designation Attribute Variable Details Data type, Unit Page name Note1) Note2) 52 M_Uar32 Mechanism No.(1 to 3) Bit data. Integer type (1: Within user specified area, 0: Outside user specified area) (Bit 0:area 1 to Bit 31:area 32) 53 M_In Input No.(0 to 32767) Use this variable when inputting external input...
Page 156
4MELFA-BASIC IV Array designation Attribute Variable Details Data type, Unit Page name Note1) Note2) 75 M_G None Specific gravity constant (9.80665) Double-precision real number type 76 M_On None 1 is always set Integer type 77 M_Off None 0 is always set Integer type 78 M_Mode None...
4MELFA-BASIC IV 4.4 Logic numbers Logic 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 is assigned.
Page 158
4MELFA-BASIC IV Class Function name (format) Functions Result Page Trigonometric Cos(<Numeric expression>) Calculates the cosine Unit: radian Numeric functions Definition range: Numeric value range, Value range: -1 to +1 value Sin(<Numeric expression>) Calculates the sine Unit: radian Definition range: Numeric value range, Value range: -1 to +1 Tan(<Numeric expression>) Calculates the tangent.
Page 159
4MELFA-BASIC IV Class Function name (format) Functions Result Page Position vari- Zone2 Checks whether position 1 is within the space (cylinder) created by Numeric ables ( <Position 1>,<Position 2>,<Position 3> the position 2 and position 3 points. value < Numeric value 1>, < Numeric value 2>, Outside the range=0, Within the range=1 <...
4MELFA-BASIC IV 4.6 List of Instructions A list of pages with description of each instruction is shown below. They are listed in the order of presumed usage frequency. (1) Instructions related to movement control Command Explanation Page Mov (Move) Joint interpolation Mvs (Move S) Linear interpolation Mvr (Move R)
4MELFA-BASIC IV Command Explanation Page On ... GoSub (ON Go Subroutine) Subroutine jump according to the value On ... GoTo (On Go To) Jump according to the value For - Next (For-next) Repeat While-WEnd (While End) Conditional repeat Open (Open) Opens a file or communication line Print (Print) Outputs data...
4MELFA-BASIC IV (5) Others Command Explanation Page ChrSrch (Character search) Searches the character string out of the character array. Get Pos (Get Position) Reserved. 4-149 List of Instructions...
4MELFA-BASIC IV 4.7 Operators The 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-11.) The operation result data type is as follows according to the combination of the left argument and right argument data types.
4MELFA-BASIC IV [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.
4MELFA-BASIC IV 4.11 Detailed explanation of command words 4.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.
4MELFA-BASIC IV 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 time calculated when using an Oadl instruction, which takes account of the value of the M_SetAdl variable. [Format] Accel[] [<Acceleration rate>] [, <Deceleration rate>] ,[<Acceleration rate when moving upward>], [<Deceleration rate when moving upward>]...
Page 167
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.
Page 168
4MELFA-BASIC IV Act (Act) [Function] This instruction specifies whether to allow or prohibit interrupt processing caused by signals, etc. during operation. [Format] Act[]<Priority No.> = <1/0> [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.
Page 169
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.>...
Page 170
4MELFA-BASIC IV 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.
Page 171
4MELFA-BASIC IV CallP (Call P) [Function] This instruction executes the specified program (by calling the program in a manner similar to using GoSub to call a subroutine). The execution returns to the main program when the End instruction or the final step in the sub program is reached.
Page 172
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 there is no End instruction, the execution is returned to the main program when the final step of the sub program is reached.
Page 173
4MELFA-BASIC IV ChrSrch (Character search) [Function] Searches the character string out of the character array. [Format] ChrSrch[]<Character string array variable>,<Character string>,<Search result storage destination> [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>...
Page 174
4MELFA-BASIC IV Close (Close) [Function] Closes the designated file.(including communication lines) [Format] Close[] [[#]<File No.>[, [[#]<File No.> ...] [Terminology] <File No.> Specify the number of the file to be closed (1 to 8). Only a numerical constant is allowed. If this argument is omitted, all open files are closed. [Reference Program] 1 Open "COM1:"...
Page 175
4MELFA-BASIC IV Clr (Clear) [Function] This instruction clears general-purpose output signals, local numerical variables in a program, and numeri- cal external variables. [Format] Clr[]<Type> [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.
Page 176
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. Refer to "[Available robot type]". [Format] Cmp[]JNT, <Axis designation> [Terminology] <Axis designation>...
Page 177
4MELFA-BASIC IV pulse of the target position, and will wait indefinitely for the completion of the operation instruction. As a result, the program execution comes to a halt. Do not use the compliance mode and the Fine instruction at the same time. CAUTION The compliance mode is in effect continuously until the Cmp Off instruction is exe- cuted, or the power is turned off.
Page 178
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 types for this instruction are limited. Refer to "[Available robot type]". [Format] Cmp[]Pos, <Axis designation> [Terminology] <Axis designation>...
Page 179
4MELFA-BASIC IV (13) If a positioning completion condition is specified using the Fine instruction while the compliance mode is activated, depending on the operation the robot may be unable to reach the positioning completion pulse of the target position, and will wait indefinitely for the completion of the operation instruction. As a result, the program execution comes to a halt.
Page 180
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 types for this instruction are limited. Refer to "[Available robot type]". [Format] Cmp[]Tool, <Axis designation> [Terminology] <Axis designation>...
Page 181
4MELFA-BASIC IV cuting 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. (14) The compliance mode is valid only for the robot arm axes. It is not valid for additional axes, even if specified.
Page 182
4MELFA-BASIC IV Cmp Off (Composition OFF) [Function] Release the soft control mode (compliance mode). Note) The available robot types for this instruction are limited. Refer to "[Available robot type]". [Format] Cmp[]Off [Reference Program] 1 Mov P1 ' Moves to in front of the part insertion position. 2 CmpG 0.5, 0.5, 1.0, 0.5, 0.5, , , ' Set softness.
Page 183
4MELFA-BASIC IV CmpG (Composition Gain) [Function] Specify the softness of robot control. Note) The available robot types for this instruction are limited. Refer to "[Available robot type]". [Format] Cmp Pos, Cmp Tool CmpG[] [<X axis gain>], [<Y axis gain>], [<Z axis gain>], [<A axis gain>], [<B axis gain>], [<C axis gain>], , Cmp Jnt CmpG[] [<J1 axis gain>], [<J2 axis gain>], [<J3 axis gain>], [<J4 axis gain>],...
Page 184
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] Cnt[] <Continuous movement mode/acceleration/deceleration movement mode>] [, <Numeric value 1>] [, <Numeric value 2>] [Terminology] <1/0>...
Page 185
4MELFA-BASIC IV [Explanation] (1) The interpolation (40 step to 80 step 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.
Page 186
4MELFA-BASIC IV (6) If the specifications of numerical value 1 and numerical value 2 are different, continuous operation will be performed 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.
Page 187
4MELFA-BASIC IV ColChk (Col Check) [Function] Set to enable/disable the impact detection function in automatic operation. 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 peripheral devices.
Page 188
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 difference between the estimated torque and the actual torque exceeds the tolerance, and immediately stops the robot.
Page 189
4MELFA-BASIC IV (12) The impact detection function may not work properly if the hand weight (HNDDATn parameter) and workpiece weight (WRKDATn parameter) are not set correctly. Be sure to set these parameters correctly before using. (13) If the impact detection function is enabled by this instruction, the execution time (tact time) may become long for some programs.
Page 190
4MELFA-BASIC IV ColLvl (Col Level) [Function] Set the detection level of the impact detection function in automatic operation. The impact detection function can only be used in certain models (Refer to "[Available robot type]".). [Format] ColLvl[] [<J1 axis>],[<J2 axis>],[<J3 axis>],[<J4 axis>],[<J5 axis>],[<J6 axis>],, [Terminology] <J1 to J6 axis>...
Page 191
4MELFA-BASIC IV 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] Com[(<Communication Line No.>)][]On Com[(<Communication Line No.>)][]Off...
Page 192
4MELFA-BASIC IV Def Act (Define act) [Function] This instruction defines the interrupt conditions for monitoring signals concurrently and performing interrupt processing during program execution, as well as the processing that will take place when an interrupt occurs. [Format] Def[]Act[]<Priority No.>, <Expression>[]<Process> [, <Type>] [Terminology] <Priority No.>...
Page 193
4MELFA-BASIC IV [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>...
Page 194
4MELFA-BASIC IV Table 4-15 shows conceptual diagrams that illustrate the effects of the 3 types of program execution stop commands when the interrupt conditions are met while the robot is moving according to a movement instruction. Table 4-15:Conceptual diagram showing the effects of different stop commands External override 100% (maximum speed) External override 50% Stop type 1...
Page 195
4MELFA-BASIC IV Def Arch (Define arch) [Function] This instruction defines an arch shape for the arch motion movement corresponding to the Mva instruction. [Format]. Def[]Arch[]<Arch number>, [<upward movement increment>][<downward movement increment >], [<Upward evasion increment>], [<downward evasion increment>], [<interpolation type>], [<interpolation type 1>, <interpolation type 2> ] [Terminology] <Arch number>...
Page 196
4MELFA-BASIC IV 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.
Page 197
4MELFA-BASIC IV Def FN (Define function) [Function] Defines a function and gives it name. [Format] Def[]FN <Identification character><Name> [(<Dummy Argument> [, <Dummy Argument>]...)] = <Function Definition Expression> [Terminology] <Identification character> The identification character has the following four type. Numeric value type:M Character string type:C Position type:P Joint type:J...
Page 198
4MELFA-BASIC IV Def Inte/Def Long/Def Float/Def Double (Define Integer/Long/Float/Double) [Function] Use this instruction to declare numerical values. INTE stands for integer, FLOAT stands for single-precision real number, and DOUBLE stands for double-precision real number. [Format] Def[]Inte[] <Numeric value variable name> [, <Numeric value variable name>]... Def[] Long[] <Numeric value variable name>...
Page 199
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 are used 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.
Page 200
4MELFA-BASIC IV [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.
Page 201
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 that begins with a character other than "J." It is not necessary to declare variables whose names begin with the character "J"...
Page 202
4MELFA-BASIC IV Def Plt (Define pallet) [Function] Defines the pallet. (3-point pallet, 4-point pallet) [Format] Def[]Plt[] <Pallet No.>, <Start Point>, <End Point A>, <End Point B>, [<Diagonal Point>], <Quantity A>, <Quantity B>, <Pallet Pattern> [Terminology] <Pallet No.> This is the selection No. of the set pallet. (Constants from 1 to 8 only). <Start Point>...
Page 203
4MELFA-BASIC IV (6) If the hand is facing downward, the sign of the A, B and C axis coordinates at the start point, end point A, end point B and diagonal point must match. If the hand is facing downward, A = 180 (or -180), B = 0, and C = 180 (or -180).
Page 204
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 that begins with a character other than "P." It is not necessary to declare variables whose names begin with the character "P"...
Page 205
4MELFA-BASIC IV Dim (Dim) [Function] Declares the quantity of elements in the array variable. (Arrays up to the third dimension are possible.) [Format] Dim[]<Variable name> (<Eelement Value> [, <Eelement Value> [, <Eelement Value>]]) [, <Variable name> (<Eelement Value> [, <Eelement Value>[, <Eelement Value>]])]... [Terminology] <Variable name>...
Page 206
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 Dly[]<Time>...
Page 207
4MELFA-BASIC IV End (End) [Function] This instruction defines the final step 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 program called up by the CallP instruction, the control is returned to the main program when the End instruction is executed.
Page 208
4MELFA-BASIC IV Error (error) [Function] This instruction makes a program generate an error (9000s number). [Format] Error[]<Error No.> [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.
Page 209
4MELFA-BASIC IV Fine (Fine) [Function] This instruction specifies completion conditions of the robot's positioning. It is invalid during the smooth movement control (Cnt 1). Depending on the type of robot (RP series), positioning using the Dly instruction may be more effective than using the Fine instruction.
Page 210
4MELFA-BASIC IV CAUTION The RH-A/RH-S series and the RV-SD/RH-SDH series robots use different encoder resolutions (number of pulses) for joint axes. If the value of <No. of pulses> of the Fine instruction is the same, the RV-S/RH-S series, which normally has higher encoder resolution (number of pulses), takes longer to complete posi- tioning.
Page 211
4MELFA-BASIC IV Fine J (Fine Joint) [Function] Specifies the robot positioning complete conditions with a joint axis value. The Fine J command will be disabled during continuous operation control (Cnt 1). The Fine command or Fine P command will be disabled for all axes when the Fine J command is executed. [Format] Fine[]<Positioning Width>, J [, <Axis No.>] [Terminology]...
Page 212
4MELFA-BASIC IV Fine P (Fine Pause) [Function] Specifies the robot positioning complete conditions with a linear distance. The Fine P command will be disabled during continuous operation control (Cnt 1). The Fine command or Fine J command will be disabled for all axes when the Fine P command is executed. [Format] Fine[]<Linear Distance>, P [Terminology]...
Page 213
4MELFA-BASIC IV For - Next (For-next) [Function] Repeatedly executes the program between the For statement and Next statement until the end conditions are satisfied. [Format] For[]<Counter> = <Default value> To <End Value> [Step <Increment>] Next[] [<Counter 1>] [Terminology] <Counter> Describe the numerical variable that represents the counter for the number of repetitions. Same for <Counter 1>...
Page 214
4MELFA-BASIC IV FPrm (FPRM) [Function] Defines the order of the arguments, the type, and number for the main program that uses arguments in a sub program (i.e., when the host program uses another program with CALL P). [Format] FPrm[]<Dummy Argument> [,<Dummy Argument>] ... [Terminology] <Dummy Argument>...
Page 215
4MELFA-BASIC IV GetM (Get Mechanism) [Function] This instruction is used to control the robot by a program other than the slot 1 program when a multi-task is used, or to control a multi-mechanism by setting an additional axis as a user-defined mechanism. Control right is acquired by specifying the mechanism number of the robot to be controlled.
Page 216
4MELFA-BASIC IV GoSub (Return)(Go Subroutine) [Function] Calls up the subroutine at the designated step label. Be sure to return from the jump destination using the Return instruction. [Format] GoSub[]<Call Destination> [Terminology] <Call Destination> Describe the step label name. [Reference Program] 1 GoSub *LBL 2 End 20 *LBL...
4MELFA-BASIC IV GoTo (Go To) [Function] This instruction makes a program branch to the specified label step unconditionally. [Format] GoTo[]<Branch Destination> [Terminology] <Branch Destination> Describe the label name. [Reference Program] 10 GoTo *LBL ' Branches to the label *LBL. 100 *LBL 101 Mov P1 [Explanation] (1) If a branch destination or label does not exist, an error will occur during execution.
Page 218
4MELFA-BASIC IV Hlt (Halt) [Function] Interrupts the execution of the program and movement of the robot, and stops. The program which was being executed at this time becomes standby status. [Format] [Reference Program] (1) Stop the robot without condition during program execution. 15 Hlt ' Stop the program without condition.
Page 219
4MELFA-BASIC IV HOpen / HClose (Hand Open/Hand Close) [Function] Commands the hand to open or close. [Format] HOpen[]<Hand No.> [, <Starting grasp force>, <Holding grasp force>, <Starting grasp force holding time>] HClose[]<Hand No.> [Terminology] <Hand No.> Select a numeric value between 1 and 8. Specify this argument using a constant or a variable.
Page 220
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, HANDINIT Refer to Page 369, "5.10 Automatic return setting after jog feed at pause"and, Page 373, "5.13 About default hand status".
Page 221
4MELFA-BASIC IV If...Then...Else...EndIf (If Then Else) [Function] A process is selected and executed according to the results of an expression. [Format] If[]<Expression>[]Then[]<Process>[][Else <Process>] If[]<Expression>[]Then <Process> <Process> Break [Else] <Process> <Process> Break EndIf [Terminology] <Expression> Describe the expression targeted for comparison as a comparison operation expression or logic operation expression.
Page 222
4MELFA-BASIC IV Input (Input) [Function] Inputs data into a file . Only AscII character data can be received. (including communication lines) Please refer to Page 376, "5.15 About the communication setting", which lists related parameters. [Format] Input[]#<File No.>, <Input data name> [, <Input data name>] ... [Terminology] <File No.>...
Page 223
4MELFA-BASIC IV JOvrd (J Override) [Function] Designates the override that is valid only during the robot's joint movements. [Format] JOvrd[]<Designated override> [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] 1 JOvrd 50 2 Mov P1...
Page 224
4MELFA-BASIC IV 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. •...
Page 225
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 not leave the movement range when the command is executed.
Page 226
4MELFA-BASIC IV Loadset (Load Set) [Function] This instruction specifies the condition of the hand/workpiece at execution of the Oadl instruction. [Format] LoadSet[]<Hand condition No.>, <Workpiece condition No.> [Terminology] <Hand condition No.> 1 to 8.Designate the hand condition (HNDDAT 1 to 8) No. for which the weight and size are designated.
Page 227
4MELFA-BASIC IV Mov (Move) [Function] Using joint interpolation operation, moves from the current position to the destination position. [Format] Mov[]<Target Position> [, <Close Distance>] [[]Type[]<Constants 1>, <Constants 2>][] [<Appended conditions>] [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.
Page 228
4MELFA-BASIC IV Mva (Move Arch) [Function] This instruction moves the robot from the current position to the target position with an arch movement (arch interpolation). [Format]. Mva[]<Target Position> [, <Arch number>] [Terminology] <Target Position> Final position of interpolation movement. This position may be specified using a position type variable and constant, or a joint variable.
Page 229
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 arch motion movement is performed with one instruction. (2) If the Mva instruction is executed without the Def Arch instruction, the robot moves with the arch shape configuration set in the parameters.
Page 230
4MELFA-BASIC IV 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] Mvc[]<Start point>,<Transit point 1>,<Transit point 2>[][<Additional condition>] [Terminology] <Start point> The start point and end point for a circle. Describe a position operation expression or joint operation expression.
Page 231
4MELFA-BASIC IV Mvr (Move R) [Function] Carries out 3-dimensional circular interpolation movement from the start point to the end point via transit points. [Format] Mvr[]<Start Point>, <Transit Point>, <End Point> [[]TYPE[]<Constants 1>, <Constants 2>][] [<Appended Condition>] [Terminology] <Start Point> Start point for the arc. Describe a position operation expression or joint operation expression.
Page 232
4MELFA-BASIC IV [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.
Page 233
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] Mvr2[]<Start Point>, <End Point>, <Reference point>...
Page 234
4MELFA-BASIC IV [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.
Page 235
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 arc composed of the center point, start point and end point. [Format] Mvr3[]<Start Point>, <End Point>, <Center Point> [[]Type[]<Constants 1>ÅC<Constants 2>][] [<Appended Condition>] [Terminology] <Start Point>...
Page 236
4MELFA-BASIC IV [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.
Page 237
4MELFA-BASIC IV Mvs (Move S) [Function] Carries out linear interpolation movement from the current position to the movement target position. [Format 1] Mvs[]<Movement Target Position> [, <Close Distance>] [[]Type[]<Constants 1>,<Constants 2>][][<Appended Condition>] [Format 2] Mvs[], <Separation Distance> [[]Type[]<Constants 1>,<Constants 2>][][<Appended Condition>] [Terminology] <Movement Target Position>...
Page 238
4MELFA-BASIC IV [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>...
Page 239
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 can- About singular points of vertical 6-axis robots not be performed using the normal linear interpolation (Mvs). 1) Posture A This limitation applies only when J4 axis is at zero degrees at all the postures A, B, and C.
Page 240
4MELFA-BASIC IV Mv Tune (Move Tune) [Function] Select the robot operating characteristics from one of the following three modes. The robot operating performance will improve by selecting the optimum operating characteristics based on the application. Operating characteristics are optimized based on the hands and workpieces specified with the LoadSet command. Set the correct weight, shape and barycentric position of hands and workpieces actually used.
Page 241
4MELFA-BASIC IV (6) If optimum acceleration/deceleration control (specified with the Oadl command or ACCMODE parameter) is disabled, it is automatically enabled by executing the MvTune command. Furthermore, if OadleOff is executed after executing the MvTune command, optimum acceleration/deceleration control only will be disabled. (The operating mode will not change.) (7) Depending on the robot model or program, there may be times when the effect is not clear even after changing the operating characteristics mode.
Page 242
4MELFA-BASIC IV Oadl (Optimal Acceleration) [Function] Automatically sets the optimum acceleration/deceleration according to the robot hand's load state (Optimum acceleration/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 the following equation: Acceleration/deceleration speed (sec) = Optimum acceleration/deceleration speed (sec) x Accel instruction (%) x M_SetAdl (%)
Page 243
4MELFA-BASIC IV OADL ON Time Time Fig.4-17: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 Detailed explanation of command words 4-230...
Page 244
4MELFA-BASIC IV 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] On[]Com[][(<File No.>)][]GoSub[]<Call Destination> [Terminology] <File No.> Describe a number between 1 and 3 assigned to the communication line. <Call Destination>...
Page 245
4MELFA-BASIC IV On ... GoSub (ON Go Subroutine) [Function] Calls up the subroutine at the step label corresponding to the value. [Format] On[]<Terminology>[]GoSub[][<Expression>] [, [<Call Destination>]] ... [Terminology] <Terminology> Designate the step label on the step to branch to with a numeric operation expression. <Call Destination>...
Page 246
4MELFA-BASIC IV On ... GoTo (On Go To) [Function] Branches to the step with the step label that corresponds to the designated value. [Format] On[]<Expression>[]GoTo[][<Branch Destination>] [, [<Branch Destination>]] ... [Terminology] <Expression> Designate the step label on the line to branch to with a numeric operation expression. <Call Destination>...
Page 247
4MELFA-BASIC IV Open (Open) [Function] Open the file or communication lines. [Format] Open[] "<File Descriptor>" [][For <Mode>][]AS[] [#] <File No.> [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>"...
Page 248
4MELFA-BASIC IV Ovrd (Override) [Function] This instruction specifies the speed of the robot movement as a value in the range from 1 to 100%. This is the override applied to the entire program. [Format] Ovrd[]<Override> Ovrd[]<Override> [, <Override when moving upward> [, <Override when moving downward>] ] [Terminology] <Override>...
Page 249
4MELFA-BASIC IV Plt (Pallet) [Function] Calculates the position of grid in the pallet. [Format] Plt[]<Pallet No.> , <Grid No.> [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.
Page 250
4MELFA-BASIC IV Prec (Precision) [Function] This instruction is used to improve the motion path tracking. It switches between enabling and disabling the high accuracy mode. Note) The available robot types for this instruction are limited. Refer to "[Available robot type]". [Format].
Page 251
4MELFA-BASIC IV Print (Print) [Function] Outputs data into a file . All data uses the AscII format. (including communication lines) [Format] Print[]#<File No.>[] [, [<Expression> ; ] ...[<Expression>[ ; ]]] [Terminology] <File No.> Described with numbers 1 to 8. Corresponds to the control No. assigned by the Open command. <Expression>...
Page 252
4MELFA-BASIC IV Priority (Priority) [Function] In multitask program operation, multiple program lines are executed in sequence (one by one line according to the default setting). This instruction specifies the priority (number of lines executed in priority) when pro- grams are executed in multitask operation. [Format].
Page 253
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] RelM [Reference Program] (1) Start the task slot 2 from the task slot 1, and control the mechanism 1 in the task slot 2. Task slot 1 1 RelM ' Releases the mechanism in order to control mechanism 1 using slot 2.
Page 254
4MELFA-BASIC IV Rem (Remarks) [Function] Uses the following character strings as comments. [Format] Rem[][<Comment>] [Terminology] <Comment> Describe a user-selected character string. Descriptions can be made in the range of position steps. [Reference Program] 1 Rem ***MAIN PROGRAM*** 2 ' ***MAIN PROGRAM*** 3 Mov P1 ' Move to P1.
Page 255
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 the initial status. If an error other than warnings occurs, normal programs other than constantly executed pro- grams cannot be operated.
4MELFA-BASIC IV Return (Return) [Function] (1) When returning from a normal subroutine returns to the next step after the GoSub. (2) When returning from an interrupt processing subroutine, returns either to the step where the interrupt was generated, or to the next step. [Format] (1) When returning from a normal subroutine: Return...
Page 257
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.
Page 258
4MELFA-BASIC IV Select Case (Select Case) [Function] Executes one of multiple statement blocks according to the condition expression value. [Format] Select[] <Condition> Case[]<Expression> [<Process>] Bresk Case[]<Expression> [<Process>] Break Default [<Process>] Break End[]Select [Terminology] <Condition> Describe a numeric operation expression. <Expression> Describe an expression using the following format.
Page 259
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 is described, that block will be executed.
Page 260
4MELFA-BASIC IV Servo (Servo) [Function] Controls the ON and OFF of the servo motor power. [Format] (1) The usual program Servo[]<On / Off> (2) The program of always (ALWAYS) execution. Servo[]<On / Off> , <Mechanism No.> [Terminology] <On / Off> On : When turning the servo motor power on.
Page 261
4MELFA-BASIC IV Skip (Skip) [Function] Transfers control of the program to the next step. [Format] Skip [Reference Program] 1 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 this command, and execute the next step.
Page 262
4MELFA-BASIC IV 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] Spd[]<Designated Speed Spd[]M_NSpd (Optimum speed control mode) [Terminology] <Designated Speed> Designate the speed as a real number. Unit: [mm/s] [Reference Program] 1 Spd 100 2 Mvs P1...
Page 263
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. [Format] Title[]"<Character String>" [Terminology] <Character String>...
Page 264
4MELFA-BASIC IV Tool(Tool) [Function] Designates the tool conversion data. This instruction specifies the length, position of the control point from the mechanical interface, and posture of the tools (hands). [Format] Tool[]<Tool Conversion Data> [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.
Page 265
4MELFA-BASIC IV Torq (Torque) [Function] Designates the torque limit for each axis. By specifying the torque limit, an excessive load (overload) on works and so froth can be avoided. An excessive error is generated if the torque limit value ratio is exceeded.
Page 266
4MELFA-BASIC IV Wait (Wait) [Function] Waits for the variable to reach the designated value. [Format] Wait[]<Numeric variable>=<Numeric constant> [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 1 Wait M_In(1)=1...
Page 267
4MELFA-BASIC IV While-WEnd (While End) [Function] The program between the While statement and WEnd statement is repeated until the loop conditions are satisfied. [Format] While[]<Loop Condition> WEnd [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 step after WEnd statement if range is exceeded.
Page 268
4MELFA-BASIC IV Wth (With) [Function] A process is added to the interpolation motion. [Format] Example) MOV P1 Wth[]<Process> [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] 1 Mov P1 Wth M_Out(17)=1 Dly M1+2...
Page 269
4MELFA-BASIC IV WthIf (With If) [Function] A process is conditionally added to the interpolation motion command. [Format] WthIf[]<Additional Condition>, <Process> [Terminology] <Additional Condition> Describe the condition for adding the process. (Same as Act condition expres- sion) <Process> Describe the process to be added when the additional conditions are estab- lished.
Page 270
4MELFA-BASIC IV XClr (X Clear) [Function] This instruction cancels the program selection status of the specified task slot from within a program. It is used during multitask operation. [Format] XClr[]<Slot No.> [Terminology] <Slot No.> Specify a slot number in the range from 1 to 32 as a constant or variable. [Reference Program] 1 XRun 2,"1"...
Page 271
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] XLoad[]<Slot No.> <Program Name> [Terminology] <Slot No.> Specify a slot number in the range from 1 to 32 as a constant or variable. <Program Name>...
Page 272
4MELFA-BASIC IV XRst (X Reset) [Function] This instruction returns the program control to the first step if the program of the specified task slot is paused by a command within the program (program reset). It is used during multitask operation. [Format] XRst[]<Slot No.>...
Page 273
4MELFA-BASIC IV XRun (X Run) [Function] This instruction executes concurrently the specified programs from within a program.It is used during multitask operation. [Format] XRun[]<Slot No.> [, ["<Program Name>"] [, <Operation Mode>] ] [Terminology] <Slot No.> Specify a slot number in the range from 1 to 32 as a constant or variable. <Program Name>...
Page 274
4MELFA-BASIC IV XStp (X Stop) [Function] This instruction pauses the execution of the program in the specified task slot from within a program. If the robot is being operated by the program in the specified task slot, the robot stops. It is used in multitask oper- ation.
Page 275
4MELFA-BASIC IV Substitute [Function] The results of an operation are substituted in a variable or array variable. [Format] <Variable Name> = <Expression 1> For pulse substitution <Variable Name> = <Expression 1> Dly <Expression 2> [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>...
Page 276
4MELFA-BASIC IV (Label) [Function] This indicates the jump site. [Format] *<Label Name> *<Label Name> [:<Command line>] [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>...
4MELFA-BASIC IV 4.12 Detailed explanation of Robot Status Variable 4.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 well as in reference and assignment statements.
Page 278
4MELFA-BASIC IV C_Date [Function] This variable returns the current date in the format of year/month/date. [Format] Example) <Character String Variable >=C_Date [Reference Program] 1 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...
Page 279
4MELFA-BASIC IV C_Mecha [Function] This variable returns the name of the mechanism to be used. [Format] Example) <Character String Variable >=C_Mecha[(<Mechanism Number>)] [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.
Page 280
4MELFA-BASIC IV C_Time [Function] This variable returns the current time in the format of time:minute:second (24 hours notation). [Format] Example) <Character String Variable >=C_Time [Reference Program] 1 C1$=C_Time ' "01/05/20" is assigned to C1$. [Explanation] (1) The current clock is assigned. (2) This variable only reads the data.
Page 281
4MELFA-BASIC IV J_Curr [Function] Returns the joint type data at the current position. [Format] Example) <Joint Type Variable>=J_Curr [(<Mechanism Number>)] [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.
Page 282
4MELFA-BASIC IV J_ColMxl [Function] Return the maximum value of the differences between the estimated torque and actual torque while the impact detection function is being enabled. The impact detection function can only be used in certain models (Refer to "[Available robot type]".). [Format] Example) <Joint Type Variable>=J_ColMxl [(<Mechanism Number>)] [Terminology]...
Page 283
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. Torque COLLVL Actual torque Estimated torque COLMXL Time (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.
Page 284
4MELFA-BASIC IV 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] Example) <Joint Type Variable>=J_Fbc [(<Mechanism Number>)] Example) <Joint Type Variable>=J_AmpFbc [(<Mechanism Number>)] [Terminology] <Joint Type Variable>...
Page 285
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.
Page 286
4MELFA-BASIC IV 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] Example) <Numeric Variable>=M_BrkCq [(<Equation>)] [Terminology] <Numeric Variable> Specifies the numerical variable to assign. <Equation>...
Page 287
4MELFA-BASIC IV M_CmpDst [Function] Returns the amount of difference (in mm) between the command value and the actual value from the robot when executing the compliance function. [Format] Example)<Numeric Variable>=M_CmpDst [(<Mechanism Number>)] [Terminology] <Numeric Variable> Specifies the numerical variable to assign. <Mechanism Number>...
Page 288
4MELFA-BASIC IV M_CmpLmt [Function] Returns whether or not the command value when the compliance function is being executed is about to exceed various limits. 1: The command value is about to exceed a limit. 0: The command value is not about to exceed a limit. [Format] Example) Def Act 1, M_CmpLmt [(<Mechanism Number>)]=1 GoTo *Lmt [Terminology]...
Page 289
4MELFA-BASIC IV M_ColSts [Function] Return the impact detection status.. 1: Detecting an impact 0: No impact has been detected The impact detection function can only be used in certain models (Refer to "[Available robot type]".). [Format] Example) Def Act 1, M_ColSts [(<Mechanism Number>)]=1 GoTo *LCOL,S [Terminology] <Mechanism Number>...
Page 290
4MELFA-BASIC IV M_Cstp [Function] Returns the status of whether or not a program is on cycle stop 1: 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] Example)<Numeric Variable>=M_Cstp...
Page 291
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] Example)<Numeric Variable>=M_DIn (<Equation 1>) Example)<Numeric Variable>=M_DOut (<Equation 2>) [Terminology] <Numeric Variable>...
Page 292
4MELFA-BASIC IV 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.
Page 293
4MELFA-BASIC IV M_Fbd [Function] Returns the difference between the command position and the feedback position. [Format] Example) <Numeric Variable>=M_Fbd[(<Mechanism Number>)] [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] 1 Def Act 1,M_Fbd>10 GoTo *SUB1,S ' Generate an interrupt when the difference between the...
Page 294
4MELFA-BASIC IV [Function] Returns gravitational constant (9.80665). [Format] Example) <Numeric Variable>=M_G [Terminology] <Numeric Variable> Specifies the numerical variable to assign. [Reference Program] 1 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.
Page 295
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] Example) <Numeric Variable>=M_In(<Equation>) Example) <Numeric Variable>=M_Inb(<Equation>) Example) <Numeric Variable>=M_Inw(<Equation>) [Terminology] <Numeric Variable>...
Page 296
4MELFA-BASIC IV 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%).
Page 297
4MELFA-BASIC IV M_LdFact [Function] The load ratio for each joint axis can be referenced. [Format] Example)<Numeric Variable>=M_LdFact(<Axis Number>) [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] 1 Accel 100,100 ' Lower the overall deceleration time to 50%.
Page 298
4MELFA-BASIC IV M_Line [Function] Returns the line number that is being executed. [Format] Example)<Numeric Variable>=M_Line [(<Equation>)] [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.
Page 299
4MELFA-BASIC IV M_On/M_Off [Function] Always returns 1 (M_On) or 0 (M_Off). [Format] Example)<Numeric Variable>=M_On Example)<Numeric Variable>=M_Off [Terminology] <Numeric Variable> Specifies the numerical variable to assign. [Reference Program] 1 M1=M_On ' 1 is assigned to M1. 2 M2=M_Off ' 0 is assigned to M2. [Explanation] (1) Always returns 1 or 0.
Page 300
0: Unconnected (CTS signal is OFF) (This can be used only when the RTS signal of other -1: Undefined file number (not end is enabled using the Mitsubishi genuine cable opened) specification.) *Refer to separate manual "Ethernet Interface INSTRUCTION MANUAL" when using the ethernet.
Page 301
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] Example)M_Out(<Equation>)=<Numeric Variable> Example)M_Outb(<Equation>)=<Numeric Variable> Example)M_Outw(<Equation>)=<Numeric Variable> Example)M_Outw(<Equation>)=<Numeric Variable> Dly <Time> [Terminology] <Numeric Variable> Specifies the numerical variable to assign. <Equation>...
Page 302
4MELFA-BASIC IV 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] Example)<Numeric Variable>=M_Psa [(<Equation>)] [Terminology] <Numeric Variable> Specifies the numerical variable to assign. <Equation>...
Page 303
4MELFA-BASIC IV M_RDst [Function] Returns the remaining distance to the target position (in mm) while the robot is moving. [Format] Example)<Numeric Variable>=M_RDst [(<Equation>)] [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.
Page 304
4MELFA-BASIC IV 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.
Page 305
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] Example)<Numeric Variable>=M_SkipCq [(<Equation>)] [Terminology] <Numeric Variable> Specifies the numerical variable to assign. <Equation>...
Page 306
4MELFA-BASIC IV 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] Example)<Numeric Variable>=M_Spd [(<Equation>)] Example)<Numeric Variable>=M_NSpd [(<Equation>)] Example)<Numeric Variable>=M_RSpd [(<Equation>)] [Terminology] <Numeric Variable>...
Page 307
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] Example)<Numeric Variable>=M_Timer (<Equation>) [Terminology] <Numeric Variable> Specifies the numerical variable to assign. <Equation>...
Page 308
4MELFA-BASIC IV 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 set in the MEXTL parameter. The current tool number can also be read. [Format] Example)<Numeric Variable>=M_Tool [(<Mechanism Number>)]'Referencing the Current Tool Number Example)M_Tool [(<Mechanism Number>)] = [(<Equation>)] 'Set a tool number.
Page 309
4MELFA-BASIC IV M_Uar [Function] Returns whether the robot is in the user-defined area. Bits 0 through 7 correspond to areas 1 to 8 and each bit displays the following information. 1 : Within user-defined area 0 : Outside user-defined area [Format] Example)<Numeric Variable>=M_Uar [(<Mechanism Number>)] [Terminology]...
Page 310
4MELFA-BASIC IV M_Uar32 [Function] Returns whether contained in the user-defined area. Bits 0 to 31 correspond to areas 1 to 32, with the respective bits displaying the information below. 1: Within user-defined area 2: Outside user-defined area [Format] Example) <Numeric Variable> = M_Uar32 [(<Mechanism Number>)] [Terminology] <Numeric Variable>...
Page 311
4MELFA-BASIC IV 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] Example)<Numeric Variable>=M_Wai [(<Equation>)] [Terminology] <Numeric Variable>...
Page 312
4MELFA-BASIC IV M_Wupov [Function] Returns the value of an override (warm-up operation override, unit: %) to be applied to the command speed in order to reduce the operation speed when in the warm-up operation status. Note: For more information about the warm-up operation mode, see Page 390, "5.19 Warm-Up Operation Mode"...
Page 313
4MELFA-BASIC IV M_Wuprt [Function] Returns the time (sec) during which a target axis must operate to cancel the warm-up operation status. Note: For more information about the warm-up operation mode, see Page 390, "5.19 Warm-Up Operation Mode" for detail. [Format] Example)<Numeric Variable>...
Page 314
4MELFA-BASIC IV M_Wupst [Function] Returns the time (sec) until the warm-up operation status is set again after it has been canceled. Note: For more information about the warm-up operation mode, see Page 390, "5.19 Warm-Up Operation Mode" for detail. [Format] Example)<Numeric Variable>...
Page 315
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] Example)<Position Variables>=P_Base [(<Mechanism Number>)] Example)<Position Variables>=P_NBase [Terminology] <Position Variables>...
Page 316
4MELFA-BASIC IV 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]".). [Format] Example)<Position Variables>=P_ColDir [(<Mechanism Number>)] [Terminology] <Position Variables> Specifies the position variable to assign.
Page 317
4MELFA-BASIC IV P_Curr [Function] Returns the current position (X, Y, Z, A, B, C,L1,L2) (FL1, FL2). [Format] Example)<Position Variables>=P_Curr [(<Mechanism Number>)] [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.
Page 318
4MELFA-BASIC IV 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] Example)<Position Variables>=P_Fbc [(<Mechanism Number>)] [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.
Page 319
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] Example)<Position Variables>=P_Tool [(<Mechanism Number>)] Example)<Position Variables>=P_NTool [Terminology] <Position Variables> Specifies the position variable to assign. <Mechanism Number>...
4MELFA-BASIC IV 4.13 Detailed Explanation of Functions 4.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.
Page 321
4MELFA-BASIC IV [Function] Returns the absolute value of a given value. [Format] <Numeric Variable>=Abs(<Equation>) [Reference Program] 1 P2.C=Abs(P1.C) ' P2.C will contain the value of P1.C without the sign. 2 Mov P2 3 M2=-100 4 M1=Abs(M2) ' 100 is assigned to M1. [Explanation] (1) Returns the absolute value (Value with the positive sign) of a given value.
Page 322
4MELFA-BASIC IV 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] <Position Variables>=Align(<Position>) [Reference Program]...
Page 323
4MELFA-BASIC IV [Function] Returns the character code of the first character in the string. [Format] <Numeric Variable>=Asc(<Character String Expression>) [Reference Program] 1 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.
Page 324
4MELFA-BASIC IV Bin$ [Function] Value is converted to a binary string. [Format] <Character String Variable >=Bin$(<Equation>) [Reference Program] 1 M1=&B11111111 2 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.
Page 325
4MELFA-BASIC IV CalArc [Function] Provides information regarding the arc that contains the three specified points. [Format] <Numeric Variable 4> = CalArc(<Position 1>, <Position 2>, <Position 3>, <Numeric Variable 1>, <Numeric Variable 2>, <Numeric Variable 3>, <Position Variables 1>) [Terminology] <Position 1> Specifies the starting point of the arc.
Page 326
4MELFA-BASIC IV Chr$ [Function] Returns the character that has the character code obtained from the specified equation. [Format] <Character String Variable >=Chr$(<Equation>) [Reference Program] 1 M1=&H40 2 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.
Page 327
4MELFA-BASIC IV CkSum [Function] Calculates the checksum of the string. [Format] <Numeric Variable>=CkSum(<Character String>, <Equation 1>, <Equation 2>) [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.
Page 328
4MELFA-BASIC IV [Function] Converts the character codes of the first two characters of a string into an integer. [Format] <Numeric Variable>=Cvi(<Character String Expression>) [Reference Program] 1 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.
Page 329
4MELFA-BASIC IV [Function] Converts the character codes of the first eight characters of a string into a double precision real number. [Format] <Numeric Variable>=Cvd(<Character String Expression>) [Reference Program] 1 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.
Page 330
4MELFA-BASIC IV Dist [Function] Calculates the distance between two points (position variables). [Format] <Numeric Variable>=Dist(<Position 1>, <Position 2>) [Reference Program] 1 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;...
Page 331
4MELFA-BASIC IV [Function] Returns the integral portion of the equation. [Format] <Numeric Variable>=Fix(<Equation>) [Reference Program] 1 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.
Page 332
4MELFA-BASIC IV 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] <Numeric Variable 4>=Fram(<Numeric Variable 1>, <Numeric Variable 2>, <Numeric Variable 3>) [Terminology] <Numeric Variable 1>...
Page 333
4MELFA-BASIC IV Hex$ [Function] Converts the value of an equation (Between -32768 to 32767) into hexadecimal string. [Format] <Character String Variable >=Hex$(<Equation> [, <Number of output characters>]) [Reference Program] 1 C1$=Hex$(&H41FF) ' "41FF" is assigned to C1$. 2 C2$=Hex$(&H41FF,2) ' "FF" is assigned to C2$. [Explanation] (1) Converts the value of an equation into hexadecimal string.
Page 334
4MELFA-BASIC IV [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] <Position Variables>=Inv(<Position Variables>) [Reference Program] 1 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.
Page 335
4MELFA-BASIC IV Left$ [Function] Obtains a string of the specified length starting from the left end. [Format] <Character String Variable >=Left$(<Character String>, <Equation>) [Reference Program] 1 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.
Page 336
4MELFA-BASIC IV [Function] Returns the natural logarithm. (Base e.) [Format] <Numeric Variable>=Ln(<Equation>) [Reference Program] 1 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, [Function]...
Page 337
4MELFA-BASIC IV [Function] Obtains the maximum value. [Format] <Numeric Variable>=Max(<Equation 1>, <Equation 2>, ...) [Reference Program] 1 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).
Page 338
4MELFA-BASIC IV [Function] Obtains the minimum value. [Format] <Numeric Variable>=Min(<Equation 1>, <Equation 2>, ..) [Reference Program] 1 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).
Page 339
4MELFA-BASIC IV Mki$ [Function] Converts the value of an equation (integer) into a two-byte string. [Format] <Character String Variable >=Mki$(<Equation>) [Reference Program] 1 C1$=Mki$(20299) ' "OK" is assigned to C1$. 2 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.
Page 340
4MELFA-BASIC IV Mkd$ [Function] Converts the value of an equation (double-precision real number) into a eight-byte string. [Format] <Character String Variable >=Mkd$(<Equation>) [Reference Program] 1 C1$=Mkd$(10000.1) 2 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.
Page 341
4MELFA-BASIC IV PosMid [Function] Obtain the middle position data when a linear interpolation is performed between two given points. [Format] <Position Variables>=PosMid(<Position Variables 1>, <Position Variables 2>,<Equation 1>, <Equation 2>) [Reference Program] 1 P1=PosMid(P2,P3,0,0) ' The position data (including posture) of the middle point between P2 and P3 will be assigned to P1.
Page 342
4MELFA-BASIC IV [Function] Converts the unit of angle measurement from degrees (deg) into radians (rad). [Format] <Numeric Variable>=Rad(<Equation>) [Reference Program] 1 P1=P_Curr 2 P1.C=Rad(90) 3 Mov P1 ' Moves to P1, which is obtained by changing the C axis of the current position to 90 degrees.
Page 343
4MELFA-BASIC IV Rdfl 2 [Function] Returns the multiple rotation information of the specified joint axis. [Format] <Numeric Variable>=Rdfl2(<Position Variables>, <Equation>) [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] 1 P1=(100,0,100,180,0,180)(7,&H00100000) '...
Page 344
4MELFA-BASIC IV [Function] Generates a random number. [Format] <Numeric Variable>=Rnd(<Equation>) [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>...
Page 345
4MELFA-BASIC IV Setfl 1 [Function] Changes the structure flag of the specified position using a string (such as "RAN"). [Format] <Position Variables>=Setfl1(<Position Variables>, <Character String>) [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"...
Page 346
4MELFA-BASIC IV Setfl 2 [Function] Changes the multiple rotation data of the specified position. [Format] <Position Variables>=Setfl2(<Position Variables>, <Equation 1>, <Equation 2>) [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.
Page 347
4MELFA-BASIC IV SetJnt [Function] Sets the value to the joint variable. [Format] <<Joint Variable>>=SetJnt(<J1 Axis>[,<J2 Axis>[,<J3 Axis>[,<J4 Axis> [,<J5 Axis>[,<J6 Axis>[,<J7 Axis>[,<J8 Axis>]]]]]]]) [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] 1 J1=J_Curr 2 For M1=0 to 60 SETP 10...
Page 348
4MELFA-BASIC IV SetPos [Function] Sets the value to the Position variable [Format] <<Position Variable>>=SetPos(<X Axis>[,<Y Axis>[,<Z Axis> [,<A Axis>[,<B Axis>[,<C Axis>[,<L1 Axis>[,<L2 Axis>]]]]]]]) [Terminology] <Position Variable> Sets the value to the Position variable. <X Axis>-<Z Axis> The unit is mm. <A Axis>-<C Axis>...
Page 349
4MELFA-BASIC IV [Function] Checks the sign of the equation. [Format] <Numeric Variable>=Sgn(<Equation>) [Reference Program] 1 M1=-12 2 M2=Sgn(M1) ' -1 is assigned to M2. [Explanation] (1) Checks the sign of the equation and returns the following value. Positive value 1 Negative value -1 [Function] Calculates the sine.
Page 350
4MELFA-BASIC IV [Function] Calculates the square root of an equation value. [Format] <Numeric Variable>=Sqr(<Equation>) [Reference Program] 1 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.
Page 351
4MELFA-BASIC IV Str$ [Function] Converts the value of the equation into a decimal string. [Format] <Character String Variable >=Str$(<Equation>) [Reference Program] 1 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.
Page 352
4MELFA-BASIC IV [Function] Converts the value in the string into a numerical value. [Format] <Numeric Variable>=Val(<Character String Expression>) [Reference Program] 1 M1=Val("15") 2 M2=Val("&B1111") 3 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).
Page 353
4MELFA-BASIC IV Zone [Function] Checks if the specified position is within the specified area (a rectangular solid defined by two points). [Format] <Numeric Variable>=Zone(<Position 1>, <Position 2>, <Position 3>) [Terminology] <Position 1> The position to be checked. <Position 2> The position of the first point that specifies the area. <Position 3>...
Page 354
4MELFA-BASIC IV Zone 2 [Function] Checks if the specified position is within the specified area (Cylindrical area defined by two points). [Format] <Numeric Variable>=Zone2(<Position 1>, <Position 2>, <Position 3>, <Equation>) [Terminology] <Position 1> The position to be checked. <Position 2> The position of the first point that specifies the area.
Page 355
4MELFA-BASIC IV Zone3 [Function] Checks if the specified position is within the specified area (The cube which consists of the three points). [Format] < Numeric Variable >= Z o n e 3 ( <Position 1>, <Position 2>, <Position 3>, <Position 4 >, <...
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 and default settings by changing the parameter settings. Classification Content Reference Movement parameter These parameters set the movement range, coordinate system and the items Page 343 pertaining to the hand of the robot.
Page 357
5Functions set with parameters Parameter No. of arrays Parameter Details explanation Factory setting No. of characters name Tool coordinate 4 MEXTL4 Real value 6 If the M_Tool variable is substituted by 4, the tool data can be (X,Y,Z,A,B,C) = Refer to switched using this parameter value.
Page 358
5Functions set with parameters Parameter No. of arrays Parameter Details explanation Factory setting No. of characters name User-designated USERORG Real value 8 Designate the user-designated origin position. This normally does (J1,J2,J3,J4,J5,J6, origin not need to be set. J7,J8)= (J1,J2,J3,J4,J5,J6,J7,J8) Unit:deg 0.0,0.0,0.0,0.0,0.0,0 .0,0.0,0.0 Select the function...
Page 359
5Functions set with parameters Parameter No. of arrays Parameter Details explanation Factory setting No. of characters name The gravity direc- MEGDIR Real value 4 This parameter specifies the direction and magnitude of gravita- 0.0, 0.0, 0.0, 0.0 tion tional acceleration that acts on the robot according to the installa- tion posture for the X, Y, and Z axes of the robot coordinate system, respectively (unit: mm/second2).
Page 360
5Functions set with parameters Parameter No. of arrays Parameter Details explanation Factory setting No. of characters name Hand and work- Set the hand conditions and work conditions for when Oadl ON is piece conditions set with the program. (Used in optimum Up to eight conditions can be set.
Page 361
5Functions set with parameters Parameter No. of arrays Parameter Details explanation Factory setting No. of characters name Optimum JADL Real value 8 Set the initial value (value at power ON) of the acceleration/deceleration RV-3SD/3SDJ/ acceleration/ adjustment rate (%) during optimum acceleration/deceleration. It is the 3SDB/3SDJB series deceleration rate applied to the acceleration/deceleration speed calculated by optimum...
Page 362
5Functions set with parameters Parameter No. of arrays Parameter Details explanation Factory setting No. of characters name Selection of wrist Integer 1 2 (general angle Switch the control and display method of the wrist rotation angle rotation angle (axis method) (axis A of the XYZ coordinates system) of a vertical 5-axis type A) coordinate robot.
Page 363
5Functions set with parameters Parameter No. of arrays Parameter Details explanation Factory setting No. of characters name Warm-up operation WUPOvrd Integer 2 70, 50 Perform settings pertaining to the speed in the warm-up operation override status. (Initial value, ratio of value constant time) Unit: % 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.
5Functions set with parameters 5.2 Signal parameter These parameters set the items pertaining to signals Table 5-2:List Signal parameter Parameter No. of arrays Parameter Details explanation Factory setting No. of characters name Dedicated I/O For the parameters of the dedicated I/O signal, refer to Page 416, "6.3 signal Dedicated...
Page 365
5Functions set with parameters Parameter No. of arrays Parameter Details explanation Factory setting No. of characters name Output signal Set the operation to be taken when the general-purpose output signal reset pattern for the Clr command or dedicated input (OUTRESET) is reset. Sig- nals are output in the pattern set here even when the power is turned Refer to "5.14About the...
Page 366
5Functions set with parameters Parameter No. of arrays Parameter Details explanation Factory setting No. of characters name Multi CPU input QMLTCPUS Integer 1 At the CRnQ controller, set the robot input signal offset for the multi offset CPU. (CRnQ-700 only) Specify an offset from G10000 in 1K word units, and read as an R/C input from the specified shared memory.
5Functions set with parameters 5.2.1 About multi CPU input offsets (CRnQ-700 controller only) Case (A) When using no offset for input (Parameter: when QMLTCPUS = -1) Table 5-3:CPU shared memory and robot I/O signal compatibility Sequencer (word device) Robot (bit device) Robot CPU ...
5Functions set with parameters (2) Case (B) When using an offset for input (Parameter: when QMLTCPUS = 0 to 14) ( * 1) = (Robot CPU No.1 QMLTCPUS) * 1024 ( * 2) = (Robot CPU No.2 QMLTCPUS) * 1024 ( * 3) = (Robot CPU No.3 QMLTCPUS) * 1024 Table 5-4:CPU shared memory and robot I/O signal compatibility Sequencer (word device)
5Functions set with parameters 5.3 Operation parameter These parameters set the items pertaining to the operations of the controller, T/B and so forth. Table 5-5:List Operation parameter Parameter No. of arrays Parameter Details explanation Factory setting name No. of characters Buzzer ON/ Integer 1 Specifies the on/off of the buzzer sound that can be heard when an...
Page 370
5Functions set with parameters Parameter No. of arrays Parameter Details explanation Factory setting No. of characters name Restore the RESTORE Character Restore the program, the parameter, the common variable, and the FLROM->SRAM information on string 1 error log to the RAM from the ROM. (unchangeable) the ROM to the RAM.
Page 371
5Functions set with parameters Parameter No. of arrays Parameter Details explanation Factory setting No. of characters name Position DJNT Real value 8 It varies with models. The OP correction data obtained by the Position Restoration Restoration Support tool is input. Do not change it with any tool other than the Support Position Restoration Support tool.
5Functions set with parameters 5.4 Command parameter This parameter sets the items pertaining to the program execution and robot language. Table 5-6: List Program Execution Related Parameter Parameter No. of arrays Parameter Details explanation Factory setting No. of characters name No.
Page 373
5Functions set with parameters Parameter No. of arrays Parameter Details explanation Factory setting No. of characters name Program selec- SLOTON Integer 1 This parameter specifies whether or not to store the program name in 1(Valid) tion save the SLT1 parameter at program selection, as well as whether or not to maintain the program selection status at the end of cycle operation.
Page 374
5Functions set with parameters Parameter No. of arrays Parameter Details explanation Factory setting No. of characters name Continue func- Integer 1 For only the program execution slot 1, the state when the power is 0(Invalid) tion turned OFF is held, and the operation can be continued from the saved state when the power is turned ON next.
Page 375
5Functions set with parameters Parameter No. of arrays Parameter Details explanation Factory setting No. of characters name Set the delay HANDDLY Integer 1 The delay time of hand open/close in MOVEMASTER command is the time of the GC/ time specified by GP command. (Default value is 0.3 sec.) GO command The delay time of hand open/close can be specified by this parameter.
5Functions set with parameters 5.5 Communication parameter These parameters set the items pertaining to communications Table 5-7:List Communication parameter Parameter No. of arrays Parameter Details explanation Factory setting No. of characters name Communication Communication environment is set for RS-232C in the front of the robot setting controller.
5Functions set with parameters 5.6 Standard Tool Coordinates Tools data must be set if the robot's control point is to be set at the hand tip when the hand is installed on the robot. The setting can be done in the following three manners. 1) Set in the MEXTL parameter.
Page 378
5Functions set with parameters <A case for a horizontal 4-axis robot> A case for a horizontal 4-axis robot 1) Sample parameter setting Parameter name: MEXTL Value: 0, 0, -10, 0, 0, 0 2) Sample Tool instruction setting 1 Tool (0,0,-10,0,0,0) Horizontal 4-axis robots can basically offset using parallel shifting.
5Functions set with parameters 5.7 About Standard Base Coordinates When 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 two points.
5Functions set with parameters 5.8 About user-defined area When operation is performed together with peripheral devices, work area may have to be shared. Under such circumstances, one device must let the other know when it is within the shared area. For this purpose, a AREA1P2 AREA1P1 AREA2P1...
5Functions set with parameters ±0° 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.
5Functions set with parameters 5.10 Automatic return setting after jog feed at pause This specifies the path behavior that takes place when the robot is paused during automatic operation or during 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.
Page 383
5Functions set with parameters Move to target position Move to target position Interrupt here Interrupt here Jog feed Jog feed Resum e the Resum e the autom atic autom atic execution execution RETPATH=1 or 2 RETPATH=0 Automatic return setting after jog feed at pause 5-370...
5Functions set with parameters 5.11 Automatic execution of program at power up The 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 this function.
5Functions set with parameters 5.12 About the hand type The factory default setting assumes that the double-solenoid type hand will be used. If the single-solenoid type is used or if a general-purpose signal is to be used to control the robot, the HANDTYPE parameter must be set as described below.
5Functions set with parameters 5.13 About default hand status The factory default setting is shown below. Status of output signal number Hand type Status Mechanism #1 Mechanism #2 Mechanism #3 When pneumatic hand inter- Hand 1 = Open 900=1 910=1 920=1 face is installed (double-sole- 901=0...
5Functions set with parameters 5.14 About the output signal reset pattern The 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 that this 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.
Page 388
5Functions set with parameters Parameter name Value (Values are all set to 0 at the factory default setting.) ORST10000 信号番号 10000---10007 10008---10015 10016---10023 10024---10031 00000000、 00000000、 00000000、 00000000 ORST10032 10032---10039 10040---10047 10048---10055 10056---10063 00000000、 00000000、 00000000、 00000000 ORST10064 00000000、 00000000、 00000000、 00000000 ORST10096 00000000、...
5Functions set with parameters 5.15 About the communication setting (1) Overview The controller of CRnD series has RS-232 of the one port as standard. Although it usually connects with the personal computer and the standard RS-232 port is used for transmis- sion of the robot program, and debugging using RT-ToolBox of the option, it sets the parameter and can use it for communication of the data with external equipment.
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 by LoadSet and Oadl instructions automatically in response to the load at the robot tip. The following parame- ters must be set correctly in order to obtain the optimum acceleration/deceleration.
Page 391
5Functions set with parameters *Vertical type 6-axis type Definitions of Coordinate Axes The 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, Y and Z elements of the size must be set.
5Functions set with parameters 5.17 About the singular point adjacent alarm When 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 unless operation is suspended.
5Functions set with parameters 5.18 About ROM operation/high-speed RAM operation function Because the ROM operation / function has some restrictions on high-speed RAM program 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) during a file access operation, or changes or deletion of the programs and position data due to an erroneous oper-...
Page 394
5Functions set with parameters Table 5-13:ROM operation/high-speed RAM operation function image File System ・Target of executable programs. Power ON ・Programs to be backed up. ・Changing parameters. ・Saving error logs. ・Reading programs. ROM Area SRAM Area ・Editing (writing) programs. ・Copying, moving and renaming programs. ・Files to be access by the OPEN instruction.
Page 395
5Functions set with parameters Precautions * About variables Variables 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 lists the handling of variables during the ROM operation. In high-speed RAM Note1) Variable...
Page 396
5Functions set with parameters * About backup During the ROM operation, programs are backed up from the ROM area, and parameters and error log files are backed up from the RAM area. * About direct execution While in the ROM operation, local variables cannot be rewritten by direct execution. * About the continue function While in the ROM operation, the continue function is disabled even if it is set.
Page 397
5Functions set with parameters (3) Switching to the ROM operation Use 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. File system of the controller The programs created before the RAM operation was switched to the ROM operation are saved in the RAM area of the file sys- tem of the controller.
Page 398
5Functions set with parameters [2] Execute a copy operation by manipulating the operation panel. Power ON at Power ON after a write norm al operation operation into the ROM area The com pletion of writing into the ROM area is Power Power displayed.
Page 399
5Functions set with parameters (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. In ROM operation In RAM operation STATUS NUMBER STATUS NUMBER During override display STATUS NUMBER STATUS NUMBER...
Page 400
5Functions set with parameters (6) Switching to the RAM operation Use 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. File system of the controller Write the programs and parameters written into the ROM area when the RAM operation was switched to the ROM operation ROM area...
Page 401
5Functions set with parameters [2] Execute a restore operation by manipulating the operation panel Power ON at Power ON after a write norm al operation restoring into the ROM area The com pletion of restoring into the RAM area is displayed. This display varies depending on whether or Power ON Power ON...
Page 402
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). <PARAMETER> NAME(ROMDRV Change the value of the ROMDRV parameter from 0 to 2. ELE( ) DATA (0 ...
5.19 Warm-Up Operation Mode (1) Functional Overview The acceleration/deceleration speed and servo system of Mitsubishi robots are adjusted so that they can be used 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 performance due 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.
Page 404
5Functions set with parameters CAUTION In the warm-up operation status, because the robot operates at a speed lower than the originally specified speed, be sure to apply an interlock with peripheral units. CAUTION 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.
Page 405
5Functions set with parameters (2) Function Details 1)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 operation mode. Refer to Page 343, "5.1 Movement parameter"...
Page 406
5Functions set with parameters 2) To Use the Warm-Up Operation Mode To use the warm-up operation mode, enable its function with parameters. The function can also be enabled or disabled with a dedicated input signal. *Specifying with a Parameter To enable the warm-up operation mode with a parameter, set 1 in the WUPENA parameter. After changing the parameter, the warm-up operation mode is enabled by powering on the controller again.
Page 407
5Functions set with parameters *Methods to Check the Warm-Up Operation Status Whether the current status is the warm-up operation status or normal status can be checked in the following three methods: • Checking with STATUS NUMBER on the controller's front panel The current status can be checked by setting STATUS NUMBER to override display.
Page 408
5Functions set with parameters The following Fig. 5-6 shows an example of a timing chart for switching from the normal status to the warm- up operation status. Time Operating Target axis operation Stopping Accumulated value of target axis operation time Valid time Because the accumulated operation time reaches the valid...
Page 409
5Functions set with parameters 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 •...
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 in the XYZ coordinates system. In the case of a vertical 6-axis robot, for example, the position data is expressed 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.
Page 411
5Functions set with parameters *Operation when the singular point passage function is valid When the singular point passage function is made valid, the robot can move from position A to position C via position B (the position of a singular point) and vice versa through XYZ jog and linear interpolation opera- tion.
Page 412
5Functions set with parameters *How to use the singular point passage function In 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.
Page 413
5Functions set with parameters (4) Singular point passage function in automatic operation In order to use the singular point passage function in automatic operation, make the function valid in the TYPE specification for each target interpolation instruction. TYPE (Type) [Function] Specify the singular point passage function in the TYPE specification of an interpolation instruction.
Page 414
5Functions set with parameters The structure flag changes from NonFlip to The structure flag remains NonFlip as the Flip as the robot passes a singular point robot does not pass a singular point Singular point Singular point Pause NonFlip NonFlip Resume (8) If the singular point passage function is specified, the operation speed may be lowered compared to nor- mal linear interpolation, etc.
5Functions set with parameters 5.21 About the impact detection function (1) Overview of the function When the robot is operated to perform various tasks, it may interfere with workpieces and peripheral devices due to operation mistakes of operators, errors in operation programs and so on. Conventionally, in such cases, the robot would be stopped by protection functions (such as excessive error detection) of servos that control the motor drive of the robot to prevent damage to the robot hands and arms, workpieces and periph- eral devices.
5Functions set with parameters (2) Applicable models The impact detection function is available for the following models. Table 5-17:Models available with impact detection function Available models RV-3SD/3SJD/6SD/6SDL/12SD/12SDL series RH-6SDH/12SDH/18SDH seies (3) Related parameters The following parameters are related to the impact detection function. Refer to Page 343, "5.1 Movement parameter"...
5Functions set with parameters (4) How to use the impact detection function To use the impact detection function, first specify "Enable (1)" for element 1 of the COL parameter and turn on the power supply to the control again. Next, make settings for the impact detection function (specify to enable/disable the function and the detection level) for jog operation and program operation, respectively.
Page 418
5Functions set with parameters 2)How to use the function at program operation The initial state of the impact detection function at program operation is specified by a parameter. In prac- tice, however, the function is used by changing the setting in a program using a MELFA-BASIC V instruc- tion.
Page 419
5Functions set with parameters Point If the impact detection function is enabled, the execution time (tact time) may become longer depending on the program. In order to reduce influence on the tact time, use the impact detection function only for operations that may cause interference, rather than enabling the function for the entire program.
Page 420
5Functions set with parameters *Program example This program moves the robot to a retreat position by interrupt processing if an interference is detected. 10 Def Act 1,M_ColSts(1)=1 GoTo *HOME,S ' Define processing to be executed if an interference is detected by interruption.
6External input/output functions 6 External input/output functions 6.1 Types (1) Dedicated input/output....These are I/O signals that indicate the status of remote commands such as robot program execution and stoppage, information during execution and the servo power status and so on. Assign functions to each I/O signal.
6External input/output functions 6.2 Sequencer link I/O function This function is only valid on the CRnQ-700 Series drive unit. The QnUD(H)CPU (hereafter referred to as sequencer CPU) and Q172DRCPU (hereafter referred to as robot CPU) use shared memory between CPUs, and communication via a system ladder program.
Page 423
6External input/output functions Factory Parameter name Details setting QMLTCPUn Multi CPUn high-speed communication area setting (n = 1 to 4) 1,0,1,1 n = 1 to 4 At the multi CPU system, set the number of points performing transmission and receipt between each CPU unit for the high speed communication function between multi CPU nos.
6External input/output functions 6.2.2 CPU shared memory and robot I/O signal compatibility At the sequencer CPU, the CPU shared memory is accessed like U3E0\G10000. The robot CPU No.n CPU shared memory accesses like U3En\G10000. (n = 1 to 3, Up to a maximum of three robot CPUs can be used.) The robot CPU I/O signal numbers are all from 10000 to 18191.
Page 425
6External input/output functions Stop input Robot numerical value input Under the waiting Robot numerical value output Opera- Complete Operation rights tion rights of control- input button ler power (robot) Operation Complete Operation of control- rights is robot rights ler power Fig.6-1:Sequence ladder example Sequencer link I/O function 6-412...
6External input/output functions 6.2.4 Assignment of the dedicated I/O signal. (at factory shipping) Assignment of the dedicated I/O signal at factory shipments is shown in Table 6-5. Table 6-5:Assignment of the dedicated I/O signal. (at factory shipping) G device Parameter Input signal name Output signal name...
Page 427
6External input/output functions G device Parameter Input signal name Output signal name Input Output Note1) name (*: Operation rights is necessity) IODATA 10036 10036 Numeric value input Numeric value output 10037 10037 Numeric value input Numeric value output 10038 10038 Numeric value input Numeric value output 10039...
6External input/output functions 6.2.5 Comparison of the I/O point of the CRnQ700 and the CRn500 series Comparison of the I/O point with the CRn500 series (our company previous series) is shown in Table 6-6. Table 6-6:Comparison of the I/O point CRnQ700 series CRn500 series Item...
6External input/output functions Dedicated input/output The functions shown in Table 6-7 are available for the dedicated input/output signals. These are used by the parallel 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 each parameter.
Page 430
6External input/output functions Factory shipment signal number. Signal Parameter Input, output Class Name Function level name Note1) CRnQ CRnD STOP Input Stop input This input stops the program being executed. Level 10000 0(Cannot (This does not apply to slots whose starting change), ( 変更不可...
Page 431
6External input/output functions Factory shipment signal number. Signal Parameter Input, output Class Name Function level name Note1) CRnQ CRnD SRVOFF Input Servo OFF input signal This input turns OFF the servo power supply Level 10011, for the robot.(Applicable to all mechanisms) The servo cannot be turned ON while this sig- nal is being input.
Page 432
6External input/output functions Factory shipment signal number. Signal Parameter Input, output Class Name Function level name Note1) CRnQ CRnD SnSTART Input Slot n start input Starts each slot. n=1 to 32 Edge -1, (n=1 to 32) Output Slot n in operation out- Outputs the operating state for each slot.
Page 433
6External input/output functions Factory shipment signal number. Signal Parameter Input, output Class Name Function level name Note1) CRnQ CRnD PRGOUT Input Program No. output The program number for task slot 1 is output to Edge 10022, request the numerical output (IODATA). After the start of inputting this signal to the robot, wait at least 30 ms before reading the numerical output (IODATA) signal.
Page 434
6External input/output functions Factory shipment signal number. Signal Parameter Input, output Class Name Function level name Note1) CRnQ CRnD JOGNER Input Errors during jog opera- Temporarily ignores errors that cannot be reset Level -1, (Operation tion during jog operation. right required) Temporarily ignoring input signal Output Errors during jog opera-...
Page 435
6External input/output functions Factory shipment signal number. Signal Parameter Input, output Class Name Function level name Note1) CRnQ CRnD MnWUPMD Input -1( No meaning ), -1( No meaning ), (n=1 to 3) Output Mechanism n warm-up Outputs that the status is the warm-up opera- operation status output tion status, and thus the robot will operate at a signal...
6External input/output functions 6.4 Enable/disable status of signals Note that depending on the input signal type, the function may not occur even if the target signal is input depending 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.
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) <Output> Power ON (RCREADY) (Indicates the status in which the controller can receive signals.) (2) ATEXTMD (Remote mode output) <Output>...
Page 438
6External input/output functions (9) SLOTINIT (Program reset input/program selectable output) 30 ms or more <Intput> Program reset (SLOTINIT) <Output> Program selectable output (SLOTINIT) When the START or SnSTART signal was input (10) ERRRESET (Error reset input/output during error occurrence) <Intput> Error reset input (ERRRESET) <Output>...
Page 439
6External input/output functions (15) MELOCK (Machine lock input/output during machine lock) <Intput> Machine lock input (MELOCK) <Output> Output during machine lock (MELOCK) (16) SAFEPOS (Return to retreat point input/output during return to retreat point) 30 ms or more <Intput> Return to retreat point input (SAFEPOS) <Output>...
Page 440
6External input/output functions (24) SnSTOP (Slot n stop input/output during slot n aborting) 30 ms or more <Intput> Slot n stop input (SnSTOP) <Output> Output during slot n aborting (SnSTOP) When the START, SnSTART or SLOTINIT signal was input (25) MnSRVOFF (Mechanical n servo OFF input/mechanical n servo ON disable output) 30 ms or more <Intput>...
Page 441
6External input/output functions (29) OvrdSEL (Override selection input) * This is used together with the numeric value input (IODATA). 30 ms or more <Intput> Override value output request (OVRDOUT) <Output> Override value output request (OVRDOUT) When the output request of a program number, line number or error number was input Override value Numeric value output (IODATA)
Page 442
6External input/output functions (34) ERROUT (Error number output request/outputting error number) * This is used together with the numeric value input (IODATA). 30 ms or more <Intput> Error number output request (ERROUT) <Output> Outputting error number (ERROUT) When the output request of a program number, override value or line number was input Error number Numeric value output (IODATA)
Page 443
6External input/output functions (40) HNDstSn (Mechanical n hand input signal status) <Output> Mechanical n hand input signal status Hand input signal status (HNDSTSn) (Indicates the input signal status of the hand.) (41) HNDERRn (Mechanical n hand error input signal/output during mechanical n hand error occurrence) <Intput>...
6External input/output functions 6.5.2 Timing chart example (1) External signal operation timing chart (Part 1) <Input> IODATA Numeric value input Program selection input signal PRGSEL START Start input STOP Stop input Operation rights input signal IOENA Program reset SLOTINIT CYCLE Cycle stop input signal Error reset input signal ERRRESET...
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 and outputting the line No., etc., with external signals is shown in Fig. 6-3. <Input>...
6External input/output functions (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., with external signals is shown output in Fig. 6-4. <Input> START Start input SRVON Servo ON input signal SRVOFF...
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. <Input> Start input START Program reset SLOTINIT...
6External input/output functions 6.6 Emergency stop input For 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 by means of hardware control.
6External input/output functions 6.7 Display unit (GOT1000 Series) connection (reference) By directly connecting the GOT1000 Series (GT15) display unit and CRnD-700 controller with an Ethernet cable, I/O control (256 inputs, 256 outputs) from the GOT to the robot controller is possible. Refer to the respective operation manuals for details on how to use the GOT1000 Series and GT Designer2 image creation software.
6External input/output functions (3) Connection Connect GOT by the Ethernet cable CR1n-700 series GOT1000 series + Ethernet communication unit (GT15-J71E71-100) LAN1 100BASE-T LAN cable Cross cable for direct connection Straight cable for hub course CR2n-700 series GOT1000 series + Ethernet communication unit (GT15-J71E71-100) LAN1 100BASE-T LAN cable...
6External input/output functions (4) Settings 1) Creating new projects with image creation software Start up the GT Designer2 image creation software at the computer. Select [Project] ? [New] from the menu and perform settings in accordance with the messages displayed at the new project creation wizard. Set “MELSEC-QnU, Q17nD/NC/DR, CRnD-700”...
Page 452
6External input/output functions Robot I/O and GOT assignment R obot GOT1000 Installing slot of Station no. setting (rotary switch) of Station controller I/O XY devices as viewed from Parallel I/O interface parallel I/O unit 0 Option slot 1 0 0 to 31 X00-X1F / Y00-Y1F 1...
7Appendix 7 Appendix 7.1 Configuration flag The configuration flag indicates the robot posture. For the 6-axis type robot, the robot hand end is saved with the position data configured of X, Y, Z, A, B and C. However, even with the same position data, there are several postures that the robot can change to. The posture is expressed by this configuration flag, and the posture is saved with FL1 in the position constant (X, Y, Z, A, B, C) (FL1, FL2).
Page 454
7Appendix (3) NONFLIP/FLIP (6-axis robot only.) This means in which side the J6 axis is in comparison with the plane through both the J4 and the J5 axis. J4 axis FL1(Flag1) FLIP &B 0 0 0 0 0 0 0 0 ↑...
Page 455
7Appendix *For horizontal multi-joint type robot (1) Right/Left Indicates the location of the end axis relative to the line that passes through both the rotational center of the J1 axis and the rotational center of the J2 axis. FL1(Flag1) &B 0 0 0 0 0 0 0 0 ↑...
Page 458
HEAD OFFICE: TOKYO BUILDING, 2-7-3, MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN NAGOYA WORKS: 5-1-14, YADA-MINAMI, HIGASHI-KU, NAGOYA 461-8670, JAPAN Aug..2008 MEE Printed in Japan on recycled paper. Specifications are subject to change without notice.
Need help?
Do you have a question about the MELFA CR1D and is the answer not in the manual?
Questions and answers