Mitsubishi Electric MELDAS 60 Series Programming Manual

Plc programming
Hide thumbs Also See for MELDAS 60 Series:
Table of Contents

Advertisement

Advertisement

Table of Contents
loading

Summary of Contents for Mitsubishi Electric MELDAS 60 Series

  • Page 2 MELSEC is registered trademark of Mitsubishi Electric Corporation. Other company and product names that appear in this manual are trademarks or registered trademarks of the respective company.
  • Page 3 Introduction These specifications are the programming manual used when creating the sequence program for the MELDAS 60/60S Series with the onboard PLC development tool or PLC development software. The PLC (Programmable Logic Controller) is largely divided into the basic commands, function commands and exclusive commands, and ample command types are available.
  • Page 4 Precautions for Safety Always read the specifications issued by the machine tool builder, this manual, related manuals and attached documents before installation, operation, programming, maintenance or inspection to ensure correct use. Understand this numerical controller, safety items and cautions before using the unit. This manual ranks the safety precautions into "DANGER", "WARNING"...
  • Page 5: Table Of Contents

    CONTENTS 1. System Configuration ..................1 1.1 System Configuration for PLC Development ..........1 1.2 User PLC (Ladder) Development Procedure..........2 2. PLC Processing Program ................. 3 2.1 PLC Processing Program Level and Operation .......... 3 2.2 User Memory Area Configuration ............... 3 3.
  • Page 6 8. Function Commands (=, >, <, +, –, *, /, BCD, BIN, MOV ..) .............. 69 9. Exclusive Commands..................186 9.1 ATC Exclusive Command................187 9.1.1 Outline of ATC Control............... 187 9.1.2 ATC Operation................... 187 9.1.3 Explanation of Terminology ............... 187 9.1.4 Relationship between Tool Registration Screen and Magazines ..
  • Page 7 9.7 CC-Link ...................... 248 9.7.1 Input output signal ................249 9.7.2 Communication data flow..............250 9.7.2.1 Remote input and remote output (Master station ← local station/remote device station/remote I/O station) ..252 9.7.2.2 Remote output and remote input (Master station →...
  • Page 8 11.3 PLC Interface ................... 292 11.3.1 S.DDBS Function Command ............292 11.3.2 Control Information Data..............293 11.3.3 Control Information Data Details............294 11.3.3.1 Commands ................294 11.3.3.2 Status ..................295 11.3.3.3 Alarm No.................. 302 11.3.3.4 Control Signals (PLC axis control information data) ....303 11.3.3.5 Axis Designation..............
  • Page 9: System Configuration

    1. System Configuration 1. System Configuration 1.1 System Configuration for PLC Development The system configuration for PLC development is shown below. Communication terminal The ladder is developed using the setting and display unit. (Onboard development) Ladder editing, ladder monitor and PLC RUN/STOP, etc. Control unit A new development is possible with the personal computer.
  • Page 10: User Plc (Ladder) Development Procedure

    1. System Configuration 1.2 User PLC (Ladder) Development Procedure The procedure for creating the user PLC, used to control the control target (machine) built into the control unit, is shown below. Procedure Personal Computer Onboard (actual machine) Start Decision of machine Decision of CNC, PLC specification Decision of No.
  • Page 11: Plc Processing Program

    2. PLC Processing Program 2. PLC Processing Program 2.1 PLC Processing Program Level and Operation Table 2.1-1 explains the contents of users PLC processing level and Fig. 2.1-1 shows the timing chart. Table 2.1-1 PLC processing level Program name Description (frequency, level, etc.) High-speed processing This program starts periodically with a time interval of 7.1ms.
  • Page 12: Input/Output Signals

    3. Input/Output Signals 3. Input/Output Signals 3.1 Input/Output Signal Types and Processing The input/output signals handled in user PLC are as follows: (1) Input/output from/to controller (2) Input/output from/to operation board (Note 1) (3) Input/output from/to machine The user PLC does not directly input or output these signals from or to hardware or controller; it inputs or outputs the signals from or to input/output image memory.
  • Page 13: Handling Of Input Signals Designated For High-Speed Input

    3. Input/Output Signals Table 3.1-1 lists whether or not high-speed input/output, interrupt input and initial processing can be performed. Table 3.1-1 Whether or not high-speed input/output, interrupt input and initial can be performed High-speed input High-speed output specification specification Input signal from control unit Output signal to control unit (2-byte units) Input signal from machine...
  • Page 14: High-Speed Input/Output Designation Method

    3. Input/Output Signals 3.3 High-Speed Input/output Designation Method High-speed input/output is designated by setting the corresponding bit of the bit selection parameter as shown below. (1) High-speed input designation (2) High-speed output designation · As listed above, one bit corresponds to two bytes (16 points). ·...
  • Page 15: Parameters

    4. Parameters 4. Parameters 4.1 PLC Constants The parameters that can be used in user PLC include PLC constants set in the data type. Set up data is stored in a file register and is backed up. In contrast, if data is stored in the file register corresponding to PLC constant by using sequence program MOV instruction, etc., it is backed up.
  • Page 16: Bit Selection Parameters

    4. Parameters 4.2 Bit Selection Parameters The parameters that can be used in user PLC include bit selection parameters set in the bit type. Set up data is stored in a file register and is backed up. For use in bit operation in a sequence program, the file register contents are transferred to temporary memory (M) using the MOV command.
  • Page 17 4. Parameters Bit selection screen - 9 -...
  • Page 18 4. Parameters Contents of bit selection parameters #6449~#6496 Symbol name Setting and #6449 Control unit Integrating display unit Counter C PLC counter PLC timer thermal timer T R2924 L thermal retention program on program on alarm on retention mgmt on External #6450 Alarm/...
  • Page 19 4. Parameters Symbol name #6465 R2932 L #6466 R2932 H #6467 R2933 L #6468 R2933 H #6469 NC alarm 4 Standard PLC R2934 L parameter output off #6470 R2934 H #6471 R2935 L #6472 R2935 H #6473 R2936 L #6474 R2936 H #6475 R2937 L...
  • Page 20: Explanation Of Devices

    5. Explanation of Devices 5. Explanation of Devices 5.1 Devices and Device Numbers The devices are address symbols to identify signals handled in PLC. The device numbers are serial numbers assigned to the devices. The device numbers of devices X, Y and H are represented in hexadecimal notation.
  • Page 21: Detailed Explanation Of Devices

    5. Explanation of Devices 5.3 Detailed Explanation of Devices 5.3.1 Input/output X, Y Input/output X and Y are a window for executing communication with the PLC and external device or CNC. Input X (a) This issued commands or data from an external device such as a push-button, changeover switch, limit switch or digital switch to the PLC.
  • Page 22: Internal Relays M And F, Latch Relay L

    5. Explanation of Devices 5.3.2 Internal Relays M and F, Latch Relay L The internal relay and latch relay are auxiliary relays in the PLC that cannot directly output to an external source. Internal relays M (a) These relays are cleared when the power is turned OFF. (b) There is no limit to the No.
  • Page 23: Timer T

    5. Explanation of Devices 5.3.4 Timer T (1) The 100ms timer, 10ms timer and 100ms integrated timer are available for this count-up type timer. 100ms Timer T (a) When the input conditions are set, the count starts. When the set value is counted, that timer contact will turn ON.
  • Page 24 5. Explanation of Devices 100ms integrated timer T (a) When the input conditions are set, the count starts. When the set value is counted, that timer contact will turn ON. (b) Even the input conditions are turned OFF, the 100ms integrated timer current value (count value) will be held, and the contact state will not change.
  • Page 25: Counter C

    5. Explanation of Devices 5.3.5 Counter C (1) The counter counts up and detects the rising edge of the input conditions. Thus, the count will not take place when the input conditions are ON. Counter C (a) The value is set with a decimal, and can be designated from 1 to 32767. The data register (D) data can also be used as the setting value.
  • Page 26: File Register R

    5. Explanation of Devices 5.3.7 File Register R (1) As with the data registers, the file registers are memories used to store data. However, there are some that have fixed applications, and those that are released. (2) The file register has a 1-point 16-bit configuration, and can be read and written in 16-bit units. To handle 32-bit data, two points must be used.
  • Page 27: Index Registers Z

    5. Explanation of Devices 5.3.8 Index Registers Z (1) The index registers are used as ornaments for the device (T, C, D, R). D5Z0 Indicates D (5+Z) = D8 MOV K4X0 D5Z0 (2) The index register has a 1-point 16-bit configuration, and can be read and written in 16-bit units. (3) The data stored in the index register is cleared when the power is turned OFF.
  • Page 28: Nesting N

    5. Explanation of Devices 5.3.9 Nesting N (1) This indicates the master control nesting structure. (2) The master control nesting (N) is used in order from smallest number. Execute when A conditions are set. Execute when A,B conditions are set. Execute when A,B,C conditions are set.
  • Page 29: Pointer P

    5. Explanation of Devices 5.3.10 Pointer P (1) The pointer indicates the branch command (CJ, CALL) jump destination. The pointer No. assigned at the jump destination head is called the label. (2) Pointers P0 to P159, P251, P252, P255, P300 to P511 (for C language module call) are user release pointers.
  • Page 30: Decimal Constant K

    5. Explanation of Devices 5.3.11 Decimal Constant K (1) The decimal constant can be used in the following ways. (a) Timer counter setting value: Designate in the range of 1 to 32767. (b) Pointer No.: 0 to 159 (c) Bit device digit designation: 1 to 8 (d) Basic command, function command, exclusive command value setting ·...
  • Page 31: Explanation Of Commands

    6. Explanation of Commands 6. Explanation of Commands 6.1 Command List 6.1.1 Basic Commands Process Command Class Process details Page Symbol unit sign steps Start of logic operation (A contact operation start) Start of logic denial operation (B contact operation start) Logical AND (A contact serial connection) Logical AND denial...
  • Page 32: Function Commands

    6. Explanation of Commands 6.1.2 Function Commands (1) Comparison commands Process Command Class Process details Page Symbol unit sign steps S1 S2 16-bit Continuity state when (S1) = (S2) AND= S1 S2 Non-continuity state when (S1) =/ (S2) S1 S2 LDD= S1 S2 Continuity state when...
  • Page 33 6. Explanation of Commands (2) Arithmetic operation commands Process Command Class Symbol Process details Page unit sign steps S2 D (S1) + (S2) 16-bit S2 D (S1+1, S1) + (S2+1, S2) (D+1, D) 32-bit S2 D (S1) – (S2) 16-bit –...
  • Page 34 6. Explanation of Commands (4) Data transmission commands Process Command Class Symbol Process details Page unit sign step ⋅ (S) 16-bit Trans- mission ⋅ (S+1,S) DMOV S (D+1,D) DMOV 32-bit ⋅ (D1) D1 D2 (D2) 16-bit Conversion ⋅ (D1+1,D1) DXCH D1 D2 (D2+1,D2) DXCH 32-bit...
  • Page 35 6. Explanation of Commands (6) Logical operation commands Process Comman Class Symbol Process details Page unit d sign step WAND WAND S1 S2 (S1) ^ (S2) 16-bit Logical AND DAND DAND (D + 1, D) ^ (S + 1, S) (D + 1, D) 32-bit WOR S1...
  • Page 36 6. Explanation of Commands (7) Rotation commands Process Command Class Symbol Process details Page unit sign step SM12 ROR D Rotate n bits right. 16-bit SM12 RCR D Right Rotate n bits right. rotation (D+1) ~ b15 ~ SM12 DROR DROR Rotate n bits right.
  • Page 37 6. Explanation of Commands (8) Data processing commands Process Command Class Symbol Process details Page unit sign step (S2) (S1) Search 16-bit SER S1 S2 :Match No. (D+1) :Number of match data pieces Number of bits set to 1 16-bit Number of bits set to 1.
  • Page 38: Exclusive Commands

    6. Explanation of Commands 6.1.3 Exclusive commands Command Process Class Symbol Process details Page unit sign step K1: Tool number search K2: Tool number AND search K3: Tool change K4: Random position tool change K5: Forward rotation of pointer S.ATC Kn Rn Rm Mn K6: Reverse rotation of pointer S.ATC —...
  • Page 39: Command Formats

    6. Explanation of Commands 6.2 Command Formats 6.2.1 How to Read the Command Table The basic command and function command explanations are shown below. Example of D+ command The command signal is indicated. D+ …… BIN 32-bit addition Usable device Digit No.
  • Page 40: Of Steps

    6. Explanation of Commands 6.2.2 No. of Steps The basic No. of steps in the sequence command includes step 1 to step 6. Main examples of each step are shown below. Basic No. Command (mnemonic) Circuit display of steps LD, ANI, ANB, ORB, Step 1 STC, CLC, FEND, RET, P** FEND...
  • Page 41: End Command

    6. Explanation of Commands 6.2.3 END Command With the END command, both the circuit mode and the list mode are automatically created, so programming is not necessary. 6.2.4 Index Ornament (1) The index ornament is used to add an index (Z0, Z1) to a device, add the details of the directly designated device No.
  • Page 42: Digit Designation

    6. Explanation of Commands 6.2.5 Digit Designation A digit may need to be designated for the bit device (X, Y, M, L, SM, F) when using the function command. How many points of 4-point unit bit devices are to be used with the 16-bit or 32-bit command is selected with this digit designation.
  • Page 43 6. Explanation of Commands (1) When a digit is designated on the source (S) side, the values that can be handled as source data will be as shown below. Table of digit designations and values that can be handled For 16-bit command For 32-bit command K1 (4 points) 0~15...
  • Page 44 6. Explanation of Commands (2) When a digit is designated on the destination (D) side, the No. of points designated by the digit will be the target of the destination side. Circuit side Process When source data (S) is a value H1234 0 0 0 1 0 0 1 0 0 0 1 1 MOV H1234 K2M0...
  • Page 45: Basic Commands (Ld, Ldi, And, Ani, Or, Ori, Anb, Orb

    7. Basic Commands 7. Basic Commands These commands are the basis for the sequence programs. The sequence program cannot be created without these commands. The circuit can be created (programmed) with the same image as creating a circuit by combining the actual relay A contacts and B contacts as done conventionally.
  • Page 46 LD, LDI LD, LDI ... Operation start Usable device Digit No. of Con- desig- Bit device Word device Index Pointer Level steps stant nation L SM F Device No. Function LD is the A contact operation start command and LDI is the B contact operation start command. The ON/OFF information of the designated device is read in as the operation results.
  • Page 47 LD, LDI Program example (1) Program used at head of circuit block. Coding No. of Com- Device steps mand (2) Program used at head of circuit block connected with ANB. Coding No. of Com- Device steps mand Circuit block connected with ANB. (3) Program used at head of circuit block connected with ORB.
  • Page 48 AND, ANI AND, ANI ... Serial connection of contact Usable device Digit No. of Con- desig- Bit device Word device Index Pointer Level steps stant nation L SM F Device No. Function AND is the A contact serial connection command, and ANI is the B contact serial connection command.
  • Page 49 AND, ANI Program example (1) Program used after LD, LDI, AND or ANI, etc. Coding No. of Com- Device steps mand (2) Program used to connect contact in parallel with coil. Coding No. of Com- Device steps mand - 41 -...
  • Page 50 OR, ORI OR, ORI ... Parallel connection of one contact Usable device Digit No. of Con- desig- Bit device Word device Index Pointer Level steps stant nation L SM F Device No. Function OR is the one A contact parallel connection command, and ORI is the one B contact parallel connection operation command.
  • Page 51 OR, ORI Program example (1) Program used at head of circuit block. Coding No. of Com- Device steps mand (2) Program used in circuit. Coding No. of Com- Device steps mand M111 M113 M105 M111 M113 M105 - 43 -...
  • Page 52 ANB ... Serial connection of circuit block Usable device Digit No. of Con- desig- Bit device Word device Index Pointer Level steps stant nation L SM F A block B block Function (1) AND operation of the A block and B block is executed, and the operation results are obtained. (2) The ANB symbol is a connection symbol instead of a contact symbol.
  • Page 53 Program example Program that serially connects continuous circuit blocks. Coding No. of Com- Device steps mand - 45 -...
  • Page 54 ORB ... Parallel connection of blocks Usable device Digit No. of Con- desig- Bit device Word device Index Pointer Level steps stant nation L SM F A block B block OR or ORI is used for the one contact parallel connection. Function (1) OR operation of the A block and B block is executed, and the operation results are obtained.
  • Page 55 Program example Program that connects continuous circuit blocks in parallel. Coding No. of Com- Device steps mand - 47 -...
  • Page 56 OUT (Y, M, L, SM, F) OUT (Y, M, L, SM, F) ... Output (Y, M, L, SM, F) Usable device Digit No. of Con- desig- Bit device Word device Index Pointer Level steps stant nation L SM F Device No. Function The operation results before the OUT command are output to the designated device.
  • Page 57 OUT (Y, M, L, SM, F) Program example (1) Program output to output unit. Coding No. of Com- Device steps mand (2) Program that turns internal relay or latch relay ON/OFF. Coding No. of Com- Device steps mand - 49 -...
  • Page 58 OUT T OUT T ... Timer output Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Device Settin value Setting value (1 to 32767 is valid) T0 K50 Device No.(T0 to 255) Setting value (1 to 32767 is valid for T0 D10...
  • Page 59 OUT T Execution condition This is executed per scan regardless of the operation results before the OUT command. Program example (1) Program to turn ON Y10 and Y14 ten seconds after X0 turns ON. Coding No. of Com- Device T1 K100 steps mand K100...
  • Page 60 OUT C OUT C ... Counter output Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Device Settin value Setting value (1 to 32767 is valid) C0 K50 Device No.(C0 to 127) Setting value (1 to 32767 is valid for C1 D10...
  • Page 61 OUT C Program example (1) Program to turn Y30 ON when X0 turns ON ten times, and to turn Y30 OFF when X1 turns ON. Coding No. of Com- Device steps mand C10 K10 C10 K10 RST C10 (2) Program to set C10 setting value to 10 when X0 turns ON, and to 20 when X1 turns ON. 10 is stored in D0 when X0 turns ON.
  • Page 62 SET ... Device setting (ON) Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting command Setting data Device N0. to be set (ON) Function (1) The designated device turns ON when the SET input turns ON. (2) The device turned ON remains ON even if the SET input turns OFF.
  • Page 63 Program example (1) Program to set Y8B (ON) when X8 turns ON, and reset Y8B (OFF) when X9 turns ON. Coding No. of Com- Device steps mand X8 (SET input) X9 (RST input) Operation of SET and RST commands - 55 -...
  • Page 64 RST ... Device resetting Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Reset command Setting data Device No. to be reset Function (1) The designated device will change as explained below when the RST input turns ON. Device Status Y, M, L, SM, F The coil and contact are turned OFF.
  • Page 65 Program example (1) Program to reset 100ms integrated timer and counter. When T96 is set for the integrated timer, T96 K18000 T96 will turn ON when the X4 ON time is 30 min. The No. of times that T96 turns ON is counted. T96 is reset when T96 turns ON.
  • Page 66 MC, MCR MC, MCR ... Master control set/reset Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F MC ON/OFF command Setting data Nesting device (N0 to 7) Device No. to Nesting (N0 to 7) be turned ON Function...
  • Page 67 MC, MCR (1) This is the master control cancel command, and indicates the end of the master control range. (2) The designated nesting (N) No. and following nests will be canceled. N3 to N7 master control is canceled. Program example (1) Program to turn MC ON when X9 is ON and turn MC OFF when OFF.
  • Page 68 PLS, PLF PLS, PLF ... Pulse (1 scan ON) Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F PLS command Setting data Device No. to be pulse coded PLF command Function (1) The designated device is turned ON for one scan when the PLS command changes from OFF to ON and is turned OFF in all other cases.
  • Page 69 PLS, PLF Program example (1) Program to execute PLS command when X9 turns ON. Coding No. of Com- Device steps mand X9 OFF M9 OFF 1 scan (2) Program to execute PLF command when X9 turns OFF. Coding No. of Com- Device steps...
  • Page 70 SFT ... Device shift Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F SFT command Setting data Device No. to be shifted Function (1) The device that designates the ON/OFF state of the device that is one number smaller than the device designated with D (destination) is shifted, and the device that is one number smaller is turned OFF.
  • Page 71 Execution condition The execution conditions for the SFT command are as shown below. SFT input SFT command Executed per scan Executed per scan Program example (1) Program to shift Y57 to 5B when X8 turns ON. PLS M0 (pules coding) Shifting is executed when M0 turns ON.
  • Page 72 MPS, MRD, MPP MPS, MRD, MPP ... Registering, reading and clearing of operation results Usable device Digit No. of Con- desig- Bit device Word device Index Pointer Level steps stant nation L SM F MPS, MRD and MPP are not displayed. Function (1) The operation results (ON/OFF) just before the MPS command are registered.
  • Page 73 MPS, MRD, MPP Point (1) The circuits when MPS, MRD and MPP are used and not used are as follow. Circuit using MPS, MRD and MPP Circuit not using MPS, MRD and MPP (1) Program using MPS, MRD and MPP. Coding No.
  • Page 74 DEFR DEFR ... Pulses in regard to operation results Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F DEFR command (Note) Setting data Operation memory for generating one scan worth of pulses (Note) In programming with the MELSEC PLC development tool (GX Developer), "AND"...
  • Page 75 DEFR Program example (1) Program to turn Y0 ON for one scan when X9 turns ON. Coding No. of Com- Device steps mand ANDP X9 OFF Y0 OFF 1 scan (2) Program to execute MOV command once when X9 turns ON. Coding No.
  • Page 76 - 68 -...
  • Page 77: Function Commands (=, >, <, +, -, *, /, Bcd, Bin, Mov

    8. Function Commands 8. Function Commands Recent sequence programs that require more advanced control cannot provide sufficient control only with basic commands and thus need four-rule operation and comparison, etc. Many function commands have been prepared for this. There are approx. 76 types of function commands.
  • Page 78 LD=, AND=, OR= LD=, AND=, OR= ..Comparison of 16-bit data (=) Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data Comparison data or No. of device where AND= comparison data is stored.
  • Page 79 LD=, AND=, OR= Program example (1) Program to compare the X0 to F data and D3 data. Coding No. of Com- Device steps mand K4X0 K4X0 D3 (2) Program to compare the BCD value 100 and D3 data. Coding No. of Com- Device steps...
  • Page 80 LDD=, ANDD=, ORD= LDD=, ANDD=, ORD= ... Comparison of 32-bit data (=) Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F LDD= Setting data Comparison data or head No. of device ANDD= where comparison data is stored.
  • Page 81 LDD=, ANDD=, ORD= Program example (1) Program to compare the X0 to 1F data, D3 and D4 data. Coding No. of Com- Device steps mand K8X0 LDD= K8X0 (2) Program to compare the BCD value 18000, D3 and D4 data. Coding No.
  • Page 82 LD>, AND>, OR> LD>, AND>, OR> ..Comparison of 16-bit data (>) Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F > LD> Setting data Comparison data or > AND>...
  • Page 83 LD>, AND>, OR> Program example (1) Program to compare the X0 to F data and D3 data. Coding No. of Com- Device steps mand > K4X0 LD> K4X0 (2) Program to compare the BCD value 100 and D3 data. Coding No.
  • Page 84 LDD>, ANDD>, ORD> LDD>, ANDD>, ORD> ... Comparison of 32-bit data (>) Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F D> LDD> Setting data Comparison data or head No. of device D>...
  • Page 85 LDD>, ANDD>, ORD> Program example (1) Program to compare the X0 to 1F data, D3 and D4 data. Coding No. of Com- Device steps mand K8X0 D> LDD> K8X0 (2) Program to compare the BCD value 18000, D3 and D4 data. Coding No.
  • Page 86 LD<, AND<, OR< LD<, AND<, OR< ..Comparison of 16-bit data (<) Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F < LD< Setting data Comparison data or < AND<...
  • Page 87 LD<, AND<, OR< Program example (1) Program to compare the X0 to F data and D3 data. Coding No. of Com- Device steps mand < K4X0 LD< K4X0 (2) Program to compare the BCD value 100 and D3 data. Coding No.
  • Page 88 LDD<, ANDD<, ORD< LDD<, ANDD<, ORD< ... Comparison of 32-bit data (<) Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F D< LDD< Setting data Comparison data or head No. of device D<...
  • Page 89 LDD<, ANDD<, ORD< Program example (1) Program to compare the X0 to 1F data, D3 and D4 data. Coding No. of Com- Device steps mand K8X0 D< LDD< K8X0 (2) Program to compare the BCD value 18000, D3 and D4 data. Coding No.
  • Page 90 + ... BIN 16-bit addition Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data Addition data or No. of device Addition command where addition data is stored. Addition data or No.
  • Page 91 Execution conditions The execution conditions for + are as shown below. Addition command OFF Executed per scan Executed per scan Program example (1) Program to add the D0 BIN data and D10 BIN data and output to D20. Coding No. of Com- Device steps...
  • Page 92 D+ ... BIN 32-bit addition Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data Addition data or head No. of device Addition command where addition data is stored. Addition data or head No.
  • Page 93 Execution conditions The execution conditions for D+ are as shown below. Addition command OFF Executed per scan Executed per scan Program example (1) Program to add the D0, 1 data and D9, 10 data when X0 turns ON, and output the results to D20, Coding No.
  • Page 94 – – ... BIN 16-bit subtraction Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data Subtraction data or No. of device Subtraction command where subtraction data is stored. Subtraction data or No.
  • Page 95 – Execution conditions The execution conditions for - are as shown below. Subtraction command OFF Executed per scan Executed per scan Program example (1) Program to subtract the BIN data D10 from D3 and output to D20. Coding No. of Com- Device steps...
  • Page 96 D– D– ... BIN 32-bit subtraction Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data Subtraction data or head No. of device Subtraction command where subtraction data is stored. Subtraction data or head No.
  • Page 97 D– Execution conditions The execution conditions for D- are as shown below. Subtraction command OFF Executed per scan Executed per scan Program example (1) Program to subtract the D0, 1 data from the D10, 11 data when X1 turns ON, and output the results to D99, 100.
  • Page 98 * ... BIN 16-bit multiplication Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data Multiplication data or No. of device Multiplication command where multiplication data is stored. Multiplication data or No.
  • Page 99 Execution conditions The execution conditions for * are as shown below. Multiplication command Executed per scan Executed per scan Program example (1) Program to multiply the D0 data and BIN 5678 when X5 turns ON and output the results to D3, 4. Coding No.
  • Page 100 D* ... BIN 32-bit multiplication Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data Multiplication data or head No. of device Multiplication command where multiplication data is stored. Multiplication data or head No.
  • Page 101 Execution conditions The execution conditions for D* are as shown below. Multiplication command Executed per scan Executed per scan Program example (1) Program to multiply the D7, 8 BIN data and D18, 19 BIN data when X5 turns ON, and output the results to D1 to 4.
  • Page 102 / ... BIN 16-bit division Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data Division data or No. of device where division data is stored. Division command Division data or No.
  • Page 103 Execution conditions The execution conditions for / are as shown below. Division command Executed per scan Executed per scan Program example (1) Program to divide the D10 data by 3.14 when X3 turns ON, and output the value (quotient) to D5. Coding No.
  • Page 104 D/ ... BIN 32-bit division Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data Division data or head No. of device where division data is stored. Division command Division data or head No.
  • Page 105 Execution conditions The execution conditions for D/ are as shown below. Division command Executed per scan Executed per scan Program example (1) Program to multiply the D10 data by 3.14 when X3 turns ON, and output the worth of low-order 16-bit of the results to Y30 to 3F.
  • Page 106 INC ... (16-bit BIN data) +1 Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data INC command No. of device to be INCed IN C IN C (+1) Function (1) The device (16-bit data) designated with D is incremented by one.
  • Page 107 Program example (1) Example of addition counter program Set D8 to 0 when X7 turns ON. INCP D8 Execute D8+1 at X8 OFF to ON when M38 is OFF. K100 M38 turns ON when D8 = 100. Coding No. of Com- Device steps...
  • Page 108 DINC DINC ... (32-bit BIN data) +1 Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F DINC command Setting data Head No. of device to be DINC DINC DINCed (+1) Function (1) The device (32-bit data) designated with D is incremented by one.
  • Page 109 DINC Program example (1) Program to increment the D0, 1 data by one when M0 turns ON. Coding No. of Com- Device steps mand DINC (Pulse coding) DINC (2) Program to increment X10 to 27 data by one when M0 turns ON, and to store the results in D3, 4. Coding No.
  • Page 110 DEC ... (16-bit BIN data) –1 Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data DEC command No. of device to be DECed (-1) Function (1) The device (16-bit data) designated with D is decremented by one. B15……………………………B0 B15……………………………B0 5677 (BIN)
  • Page 111 Program example (1) Example of subtraction counter program K100 D8 Set D8 to 100 when X7 turns ON. DECP D8 Execute D8-1 at X8 OFF to ON when M38 turns OFF. M38 turns ON when D8 = 0. Coding No. of Com- Device steps...
  • Page 112 DDEC DDEC ... (32-bit BIN data) –1 Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data DDEC command Head No. of device to be DDEC DDEC DDECed (-1) Function (1) The device (32-bit data) designated with D is decremented by one.
  • Page 113 DDEC Program example (1) Program to decrement the D0, 1 data by one when M0 turns ON. Coding No. of Com- Device steps mand DDEC (pulse coding) DDEC (2) Program to decrement X10 to 27 data by one when M0 turns ON, and to store the results in D3, Coding No.
  • Page 114 BCD ... BIN BCD conversion (16-bit) Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data BCD conversion command BIN data or No. of device where BIN data is stored. No.
  • Page 115 Program example (1) Program to output C4 current value from Y20 to 2F to BCD display. Coding No. of Com- Device steps mand (ON) K4Y20 K4Y20 - 107 -...
  • Page 116 DBCD DBCD ... BIN BCD conversion (32-bit) Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data BIN data or head No. of DBCD conversion command device where BIN data is stored.
  • Page 117 DBCD Execution conditions The execution conditions for DBCD are as follow. DBCD command OFF DBCD Executed per scan Executed per scan Program example (1) Program to output the current timer value of which the setting value exceeds 9999 to Y1C to 2F. Coding No.
  • Page 118 BIN ... BCD BIN conversion (16-bit) Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data BIN conversion command BCD data or No. of device where BCD data is stored. No.
  • Page 119 Program example (1) Program to BIN convert the X10 to 1B BCD data when X8 turns On, and store in D8. Digital switch BCD Can be used for other purposes DI card Coding No. of Com- Device steps mand K3X10 K3X10 D8 - 111 -...
  • Page 120 DBIN DBIN ... BCD BIN conversion (32-bit) Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data DBIN conversion command BCD data or head No. of device where BCD data is stored.
  • Page 121 DBIN Execution conditions The execution conditions for DBIN are as follow. DBIN command OFF DBIN Executed per scan Executed per scan Program example (1) Program to BIN convert the X10 to 23 BCD data when X0 turns ON, and to store in D14, 15. Coding No.
  • Page 122 MOV ... 16-bit data transmission Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F : MOV from a bit device (word device) to Z is not possible. (MOV from a constant to Z is possible.) Z cannot be independently placed on the source side, but can be used on the source side as ornaments for D and R.
  • Page 123 Program example (1) Program to store input X0 to B data in D8. No. of Com- Device steps mand K3X0 (ON) K3X0 (2) Program to store 155 in D8 as binary value when X8 turns ON. No. of Com- Device steps mand K155...
  • Page 124 DMOV DMOV ... 32-bit data transmission Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F *1 DMOV from a bit device to a bit device is not possible. *2 DMOV to device X can be programmed, but this is a command for testing by Mitsubishi. Do not use it.
  • Page 125 DMOV Program example (1) Program to store D10, D11 data in D0, D1. No. of Com- Device DMOV steps mand (ON) DMOV D10 (2) Program to store X0 to 1F data in D0, D1. No. of Com- Device steps mand DMOV K8X0 (ON)
  • Page 126 XCH ... 16-bit data exchange Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data Conversion command No. of device where D1 D2 data to be exchanged is stored. Function The D1 and D2 16-bit data are exchanged.
  • Page 127 Program example (1) Program to exchange T0 current value with D0 details when M8 turns ON. No. of Com- Device steps mand (pulse coding) (2) Program to exchange D0 details with M16 to M31 data when M10 turns ON. No. of Com- Device K4M16...
  • Page 128 DXCH DXCH ... 32-bit data exchange Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data Conversion command Head No. of device where data to be DXCH DXCH D1 D2 exchanged is stored.
  • Page 129 DXCH Program example (1) Program to exchange T0 and T1 current values with D0, 1 details when M8 turns ON. Coding No. of Com- Device DXCH steps mand (Pulse coding) DXCH (2) Program to exchange D0, 1 details with M16 to M47 data when M10 turns ON. Coding No.
  • Page 130 BMOV BMOV ... Block transmission of 16-bit data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data Head No. of device where data to be transmitted is Transmission command stored.
  • Page 131 BMOV Program example (1) Program to transmit the current values of T33 to 48 to D908 to 923. Coding No. of Com- Device steps mand BMOV D908 BMOV D908 Before execution After execution (Transmission source) (Transmission destinasion) D906 0000 0100 D907 0010 03FF...
  • Page 132 FMOV FMOV ... Batch transmission of same 16-bit data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data No. of device where data Transmission command to be transmitted is stored. Head No.
  • Page 133 FMOV Program example (1) Program to reset (clear) D8 to 23 when XA turns ON. 16 data items Transmission Resetting of data registers with FMOV command Coding No. of Com- Device steps mand FMOV FMOV - 125 -...
  • Page 134 CJ ... Conditional jump Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Jump command Setting data Jump designation pointer No. (P0 to P159) Function (1) The program of the designated pointer No. is executed when the jump command turns ON. (2) The program of the next step is executed when the jump command is OFF.
  • Page 135 Point (a) After the timer coil is turned ON, even if the timer that is turning the coil ON with the CJ command is jumped, the timer count will continue. (b) The scan time will be shortened if jumping is done after the CJ command. (c) The CJ command can be used to jump to a previous step.
  • Page 136 FEND FEND ... Program end Usable device Digit No. of Con- desig- Bit device Word device steps Index Pointer Level stant nation L SM F FEND Function The sequence program is ended. Operation when CJ command CALL P** Sequence program is not executed.
  • Page 137 FEND Program example Program when using CJ command When XB turns ON, the program jumps to the P23 label, and the step following P23 is executed. Execute when XB is OFF. When XB turns OFF, the end of the FEND sequence program is indicated.
  • Page 138 CALL, RET CALL, RET ... Call/return of sub-routine program Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Call of sub-routine program Sub-routine execution command CALL CALL Setting data Head pointer No.
  • Page 139 CALL, RET (1) The end of the sub-routine program is indicated. (2) When the RET command is executed, the sequence program in the step after the CALL command will be executed. Execution conditions The execution conditions of the CALL command are as shown below. Sub-routine execution command OFF CALL Executed per scan...
  • Page 140 WAND WAND ... Logical AND of 16-bit data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data Operation command S1 Data to be logical ANDed or No. of device WAND where data is stored.
  • Page 141 WAND Execution conditions The execution conditions for WAND are as follow. Operation command OFF WAND Executed per scan Executed per scan Program example (1) Program that executes logical AND of the D10 data and D20 data when XA turns ON, and stores the results in D33.
  • Page 142 DAND DAND ... Logical AND of 32-bit data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data Data to be logical ANDed Operation command or head No. of device where data is stored.
  • Page 143 DAND Program example (1) Program that executes logical AND of the X30 to 47 24-bit data and D99, 100 data when X8 turns ON, and transmit the results to M80 to 103. Logical AND the X30 to 47 data and D99, 100 DAND K6X30 data, and store the results in D99 to 100.
  • Page 144 WOR ... Logical OR of 16-bit data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data Operation command S1 Data to be logical ORed or No. of device where data is stored.
  • Page 145 Program example (1) Program that executes logical OR of the D10 data and D20 data when XA turns ON, and stores the results in D33. Coding No. of Com- Device steps mand (2) Program that executes logical OR of the X10 to 1B data and D33 data when XA turns ON, and outputs the results in D100.
  • Page 146 DOR ... Logical OR of 32-bit data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data Data to be logical ORed Operation command or head No. of device where data is stored.
  • Page 147 Program example (1) Program that executes logical OR of the X0 to 1F 32-bit data and the F0FF hexadecimal when XB turns ON, and stores the results in R66, 67. Store the F0FF hexadecimal in R66, 67. DMOV HF0FF Logical OR the X0 to 1F 32-bit data and R66, 67 K8X0 32-bit data, and store the results in R66, 67.
  • Page 148 WXOR WXOR ... Exclusive OR of 16-bit data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data Operation command Data to be exclusive ORed or No. of device where WXOR WXOR data is stored.
  • Page 149 WXOR Program example (1) Program that executes exclusive OR of the D10 data and D20 data when XA turns ON, and stores the results in D33. Coding No. of Com- Device steps mand WXOR WXOR D10 (2) Program that executes exclusive OR of the X10 to 1B data and D33 data when XA turns ON, and outputs the results to D100.
  • Page 150 DXOR DXOR ... Exclusive OR of 32-bit data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data Operation command Data to be exclusive ORed or head No. of device where DXOR data is stored.
  • Page 151 DXOR Program example (1) Program that compares the X20 to 3F 32-bit data and the D9, 10 data when X6 turns ON, and stores the differing No. of bits in D16. Exclusive OR the X20 to 3F 32-bit data DXOR K8X20 and D9, 10 data.
  • Page 152 NEG ... Complement of 2 (BIN 16-bit data) Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Complement of 2 execution command Setting data No. of device where data to be complemented by 2 is stored.
  • Page 153 Program example (1) Program to calculate D10 - D20 when XA turns ON and obtain an absolute value when the results are negative. < M3 turns ON when D10 < D20 D10-D20 is executed. NEG D10 The absolute value (complement of 2) when M3 turns ON is obtalned.
  • Page 154 ROR ... Right rotation of 16-bit data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Right rotation command Setting data No. of device where right ratation data is stored. Times (0 to 15) Function The 16-bit data designated with D is rotated n bits to the right excluding the carry flag.
  • Page 155 Program example Program to rotate the D10 details 3 bits to the right when M0 turns ON. Coding No. of Com- Device steps mand (Pulse coding) B15 B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0 To B15 D10 before execution Carry flag...
  • Page 156 RCR ... Right rotation of 16-bit data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Right rotation command Setting data No. of device where right rotation data is stored. Times (0 to 15) Function The 16-bit data designated with D is rotated n bits to the right including the carry flag.
  • Page 157 Program example Program to rotate the D10 details 3 bits to the right when M0 turns ON. Coding No. of Com- Device steps mand (pulse coding) Carry flag (SM12) B15 B14 B13B12 B11B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0 D10 before execution B0 before To carry flag...
  • Page 158 DROR DROR ... Right rotation of 32-bit data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Right rotation command DROR DROR Setting data Head No. of device where right rotation data is stored.
  • Page 159 DROR Program example Program to rotate the D10, 11 details 3 bits to the right when M0 turns ON. Coding No. of Com- Device DMOV steps mand DMOV K1 DROR (pulse coding) DROR B31B30B29 B28B27 B5 B4 B3 B2 B1 B0 Before execution 0 0 0 0 0 0 0 0 0 0...
  • Page 160 DRCR DRCR ... Right rotation of 32-bit data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Right rotation command DRCR DRCR Setting data Head No. of device where right rotation data is stored.
  • Page 161 DRCR Program example Program to rotate the D10, 11 details 3 bits to the right when M0 turns ON. Coding No. of Com- Device DMOV steps mand DMOV K1 DRCR (pulse coding) DRCR Carry flag (SM12) B31B30B29 B28B27 B5 B4 B3 B2 B1 B0 Before execution 0 0 0 0 0...
  • Page 162 ROL ... Left rotation of 16-bit data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Left rotation command Setting data No.of device where left rotation data is stored. Times (0 to 15) Function The 16-bit data designated with D is rotated n bits to the left excluding the carry flag.
  • Page 163 Program example Program to rotate the D10 details 3 bits to the left when M0 turns ON. Coding No. of Com- Device steps mand (pulse coding) Carry flag (SM12) B15 B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0 D10 before execution B15 details To B0...
  • Page 164 RCL ... Left rotation of 16-bit data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Left rotation command Setting data No. of device where left rotation datais stored. Times (0 to 15) Function The 16-bit data designated with D is rotated n bits to the left including the carry flag.
  • Page 165 Program example Program to rotate the D10 details 3 bits to the left when M0 turns ON. Coding No. of Com- Device steps mand (pulse coding) Carry flag (SM12) B15 B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0 D10 before execution To carry flag (n=1)
  • Page 166 DROL DROL ... Left rotation of 32-bit data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Left rotation command DROL DROL Setting data Head No. of device where left rotation data is stored Tim es (0 to 31) Function...
  • Page 167 DROL Program example Program to rotate the D10, 11 details 3 bits to the left when M0 turns ON. Coding No. of Com- Device H80000000 DMOV steps mand DMOV H80000000 DROL (pulse coding) DROL D10 B31B30B29 B28B27 B5 B4 B3 B2 B1 B0 Before execution To B0...
  • Page 168 DRCL DRCL ... Left rotation of 32-bit data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Left rotation command DRCL DRCL Setting data Head No. of device where left rotation data is stored Times (0 to 31) Function...
  • Page 169 DRCL Program example Program to rotate the D10, 11 details 3 bits to the left when M0 turns ON. Coding No. of Com- Device DMOV H80000000 steps mand DMOV H80000000 DRCL (Pulse coding) DRCL D10 Carry flag (SM12) B31B30B29 B28B27 B5 B4 B3 B2 B1 B0 Before execution...
  • Page 170 SFR ... Right shift of 16-bit data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Shift command Setting data No. of device where shift data is stored. No. of shifts Function (1) The 16-bit data of the device designated with D is shifted n bits to the right.
  • Page 171 Program example Program that shifts the details of D8 5 bits to the right when M10 turns ON. Coding No. of Com- Device steps mand (Pulse coding) B15 B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0 Before execution Carry flag (SM12)
  • Page 172 DSFR DSFR ... Right shift of word device in batch Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Shift command DSFR DSFR Setting data Head No. of device to be shifted Shift range Function...
  • Page 173 DSFR Program example (1) Program to shift the details of D683 to 689 to the right when M10 turns ON. Coding No. of Com- Device steps mand DSFR D683 (Pulse coding) DSFR D683 Designation range of DSFR command D689 D688 D687 D686 D685...
  • Page 174 SFL ... Left shift of 16-bit data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Shift command Setting data No. of device where shift data is stored. No. of shifts Function (1) The 16-bit data of the device designated with D is shifted n bits to the left.
  • Page 175 Execution conditions The execution conditions for SFL are as shown below. Left shift command OFF Executed per scan Executed per scan Program example (1) Program that shifts the details of D8 5 bits to the left when M10 turns ON. Coding No.
  • Page 176 DSFL DSFL ... Left shift of word device in batch Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Shift command DSFL DSFL Setting data Head No. of device to be shifted Shift range Function...
  • Page 177 DSFL Program example (1) Program to shift the details of D683 to 689 to the left when M10 turns ON. Coding No. of Com- Device steps mand DSFL D683 (pulse coding) DSFL D683 Designation range of DSFL command D689 D688 D687 D686 D685...
  • Page 178 SER ... Search of 16-bit data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Setting data No. of device where search data is stored. Search command Head No. of device to be searched Head No.
  • Page 179 Program example Program to compare the data in D883 to D887 with 123 when XB turns ON. Coding No. of Com- Device steps mand D883 D883 Search head No. Search data D882 D883 D0 details Search results D884 Search range Matched data D885 (5 data items)
  • Page 180 SUM ... Count of No. of 16-bit data items set to 1 Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Operation command Setting data No. of device to count the total No.
  • Page 181 Program example Program to obtain the No. of D10 data bits that are set to ON (1) when XB turns ON. Coding No. of Com- Device steps mand Counter data B15……………………………………………B0 The total No. of bits set to "1" is stored in D20 Counting with SUM command - 173 -...
  • Page 182 DECO DECO ... 8 256 bit decoding Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Decode command DECO DECO Setting data No. of device where data to be decoded is set.
  • Page 183 DECO Program example (1) Program to decode the three bits 0 to 2 of R20, and turn the bits corresponding in D100 ON. Coding No. of Com- Device D100 DECO steps mand DECO D100 B15B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0 0 0 0 0 When bit 0 to 2 data is binary and 6.
  • Page 184 SEG ... Decoding to 7-segment display data Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Decode command Setting data Decode data or No. of device where decode data is stored.
  • Page 185 7-segment decode table Configuration of Display 7-segment Hexa- data Bit pattern B7 B6 B5 B4 B3 B2 B1 B0 decimal 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Lowest-order bit of word device Program example Program to convert D7 data into 7-segment display data when X0 turns ON, and output to D8.
  • Page 186 S.AVE S.AVE ... Calculation of average value Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F Average value command S.AVE Setting data Head No. of device where data to be averaged is stored. Device No.
  • Page 187 S.AVE Execution conditions The execution conditions for S.AVE are as shown below. Average value command OFF S . AVE Executed per scan Executed per scan Program example (1) Program to average the details of D882 to D888 when XB turns ON, and to output the results to Coding No.
  • Page 188 S.STC, S.CLC S.STC, S.CLC ... Setting/resetting of carry flag Usable device Digit No. of Con- desig- Bit device Word device steps Index Pointer Level stant nation L SM F Input of carry flag set S.STC (Setting of carry S.STC flag) Input of carry flag reset S.CLC S.CLC...
  • Page 189 S.STC, S.CLC Program example In this program, the positive value data D2 and D0 are added upon M0's turning ON, and the carry flag (SM12) is turned ON if the results exceed 32767. The carry flag is turned OFF if the results are 32767 or less.
  • Page 190 LDBIT, ANDBIT, ORBIT LDBIT, ANDBIT, ORBIT ... Bit test of "A" contact handling Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F < = LDBIT (Note) Setting data No. of device to <...
  • Page 191 LDBIT, ANDBIT, ORBIT Program example (1) Program to test bit 3 of D10. Coding No. of Com- Device steps mand < = LD<= (LDBIT) (2) Program to test bit 15 of D10. Coding No. of Com- Device steps mand < = (ANDBIT) AND<= (3) Program to test bit 15 of D10.
  • Page 192 LDBII, ANDBII, ORBII LDBII, ANDBII, ORBII ... Bit test of "B" contact handling Usable device Digit No. of Con- desig- Bit device Word device Pointer Level steps Index stant nation L SM F < > LDBII (Note) Setting data No. of device to execute bit test ANDBII <...
  • Page 193 LDBII, ANDBII, ORBII Program example (1) Program to test bit 3 of D10. Coding No. of Com- Device steps mand < > LD<> (LDBII) (2) Program to test bit 15 of D10. Coding No. of Com- Device steps mand < > (ANDBII) AND<>...
  • Page 194: Exclusive Commands

    9. Exclusive Commands 9. Exclusive Commands Although the basic and functional commands are not used only for specific purposes, some commands may be efficient if command applications such as data transfer between under PLC and controller and controller display screen are limited. Then, the M300 series provides a number of exclusive commands which are explained below.
  • Page 195: Atc Exclusive Command

    9. Exclusive Commands 9.1 ATC Exclusive Command 9.1.1 Outline of ATC Control The ATC (Automatic Tool Change) can be controlled in the following two ways: (1) Mechanical random control With the information of magazine position from the machine, and T command, the control system determines the direction of magazine rotation, number of steps required, etc.
  • Page 196: Relationship Between Tool Registration Screen And Magazines

    9. Exclusive Commands 9.1.4 Relationship between Tool Registration Screen and Magazines When the floating pointer system or tool table rotation system is selected on the tool registration screen, correspondence display between the magazines and tools changes each time the magazine rotates;...
  • Page 197: Use Of Atc And Rot Commands

    9. Exclusive Commands 9.1.5 Use of ATC and ROT Commands The use order of the ATC and ROT commands during the T command or tool change command is shown below: T command Tool number search Register number of data searched ATC K1 No.
  • Page 198: Basic Format Of Atc Exclusive Command

    9. Exclusive Commands (1) Index tool number 8 in the situation shown in the drawing. (a) In the tool table rotation system, the tool number search command outputs 3. (b) In the floating pointer system, the tool number search command outputs 7. (2) The tool number search command output result is used by the rotary body indexing command to find the rotation direction, the number of steps, etc.
  • Page 199: Command List

    9. Exclusive Commands 9.1.7 Command List Command Description S.ATC Tool No. search S.ATC Tool No. logical product search S.ATC Tool change S.ATC Random position tool change S.ATC Pointer forward rotation S.ATC Pointer reverse rotation S.ATC Tool table forward rotation S.ATC Tool table reverse rotation S.ATC Tool data read...
  • Page 200: File Register (R Register) Assignment And Parameters

    9. Exclusive Commands 9.1.9 File Register (R Register) Assignment and Parameters (1) File registers for ATC control The file registers used with the ATC are as shown below. Corresponding file (R) register No. 1 No. 2 No. 3 Magazine Remarks magazine magazine magazine...
  • Page 201 9. Exclusive Commands (2) Control parameter contents R2950 0:T 4-digit 1:T 8-digit Max. number of standby displayed: 4 0:Magazine starts from "1". 1:Magazine starts from "0". For details on the control parameters, refer to 9.1.12 Examples of Tool Registration Screen. - 193 -...
  • Page 202: Details Of Each Command

    9. Exclusive Commands 9.1.10 Details of Each Command (1) Tool No. search This command is used to search for tool No. stored in the tool data table. When the command tool No. is found, number of searched data and its location are output. If two or more tool No.
  • Page 203 9. Exclusive Commands (2) Tool No. logical product (AND) search Tool number AND search is the same as the tool number search command (ATC K1) in function: search data and in-magazine tool number and AND data are ANDed together for a search. S.ATC K2 R500 R2960...
  • Page 204 9. Exclusive Commands (3) Tool change When a spindle tool and a magazine index tool are exchanged by the ATC arm, etc., the contents in the memory (R register) must be updated correspondingly. S.ATC K3 R500 R2960 R500 2970 Register No. to specify the position of tool change R501 Tool data (tool to be changed, usually tool in spindle)
  • Page 205 9. Exclusive Commands (4) Random position tool change In tool change, a spindle tool is usually exchanged with a magazine index tool. It may often occur, however, that tool change must be performed at a station other than the usual tool change position (tool change at auxiliary tool change position, for example).
  • Page 206 9. Exclusive Commands (5) Pointer "FWD" rotation In the ATC control with floating pointer, pointer count is controlled so that it coincides with the actually indexed magazine position when the magazine rotates in "FWD" direction for index. S.ATC K5 R2965 R2960 R2965 Pointer is incremented.
  • Page 207 9. Exclusive Commands (7) Tool table "FWD" rotation The tool table rotates in "FWD" direction in accordance with the magazine rotation. S.ATC K7 R2960 R2960 R3000 1000 R3001 1001 : : : : R3010 1010 (Note 1) In this control mode, pointer always indicates "0" (tool table head).
  • Page 208 9. Exclusive Commands (9) Tool data read This command is used to call a specific tool No. in the magazine. S.ATC K9 R500 R2960 R500 Register No. to specify magazine No. to be read Register No. to specify position to which R501 read data output R502...
  • Page 209 9. Exclusive Commands (10) Tool data write Instead of setting tool No. through the setting and display unit, the tool No. is entered to each magazine No. set through PLC program. S.ATC K10 R500 R2960 Register No. having magazine No. to which data is written R500 Register No.
  • Page 210 9. Exclusive Commands (11) Automatic tool data write All tool Nos. are written (entered) in batch. This command is used for initialization, etc. The data are written one after another for each tool, starting from the default value. S.ATC K11 R500 R2960 R500...
  • Page 211: Precautions For Using Atc Exclusive Instructions

    9. Exclusive Commands 9.1.11 Precautions for Using ATC Exclusive Instructions (1) When tool data is rewritten by ATC or other than ATC command, tool registration screen display is not updated. The following processing is required: · Turn on special relay SM64 by using the SET command. Program example) ・...
  • Page 212 9. Exclusive Commands (1) Comment display part Comment in the comment display part is prepared by the user who uses the comment display function described in the PLC Development Software Manual (BNP-B2252). (2) Spindle tool, standby tool display part The number of display items can be changed according to the control parameter value. Control parameter (R2950) 00: Only spindle tool is displayed.
  • Page 213: Display Of Spindle Tool And Standby Tool

    9. Exclusive Commands 9.1.13 Display of Spindle Tool and Standby Tool The tool mounted on the spindle or the tool to be mounted next on the spindle (standby tool) and tool No. in the magazine are set and displayed on the tool registration screen. However, the spindle and standby tool Nos.
  • Page 214: S.rot Commands

    9. Exclusive Commands 9.2 S.ROT Commands ROT commands are prepared as functions such as rotary body target position, rotation direction and ring counter. The commands can be used to determine the direction of rotation and number of steps with the data resulting from ATC exclusive command tool No. search processing. 9.2.1 Command List Command Description...
  • Page 215 9. Exclusive Commands (1) Rotary body indexing Direction of rotation and number of steps of ATC magazine (or turret) are determined automatically. Parameter setting R No. Rn+1 Indirect Current position R No. designation Rn+2 Target position R No. Rn+3 Output R No. S.ROT 0: Direction of rotation CW 1: Direction of rotation CCW...
  • Page 216 9. Exclusive Commands (a) Example of rotary body index by ROT K1 instruction Conditions: (i) The number of rotary body index cycles is 6. (ii) The target position is specified by a T command. (Note) Normally the target position must be a binary, but in this example, the number of rotary body index cycles is 1 to 6, and there is no difference between the binary and BCD.
  • Page 217 9. Exclusive Commands File register (R) map S.ROT Top of control data buffer (Note 5) (R500 in this example) 0:CW 1~6 (BCD) T command 1:CCW (from CNC) R number to specify rotary body index cycles (R511 in this example) ~ ~ ~...
  • Page 218 9. Exclusive Commands (Note 1) Either M202 or M203 can be used for a stop signal. (Note 2) The devices (X, Y, and R) are used in this example for no special purpose. Use any device within the available range. (Note 3) If a number from 1 to 6 has not been specified for current position data (R512) before the ROT command is activated, an error results.
  • Page 219 9. Exclusive Commands (2) Ring counter (Up/down counter) This command is used to control position of rotary body (or turret). S.ROT K3 R m Mm (Pulse coding) Completion ("1" for error) Cycles of index for rotary body Ring counter command are apecified.
  • Page 220: Tool Life Management Exclusive Command

    9. Exclusive Commands 9.3 Tool Life Management Exclusive Command (When BASE SPEC parameter #1037 cmdtype is set to 1 or 2.) The following command is provided only for tool life management. (It is used for the machining centers.) Spare tool selection ... TSRH S.TSRH Data output completion R number of top of spare tool data output...
  • Page 221: Spare Tool Selection System

    9. Exclusive Commands 9.3.3 Spare Tool Selection System One of the following two can be selected by using a parameter for the spare tool selection system of the spare tool selection command in tool life management II: (1) Selection in tool registration order (When BASE SPEC parameter #1105 T-Sel2 is set to 0.) Spare tool is selected among the used tools of a single group in the registration number order.
  • Page 222: User Plc Processing When The Tool Life Management Function Is Selected

    9. Exclusive Commands 9.3.5 User PLC Processing When the Tool Life Management Function Is Selected A PLC processing example when tool change is made by the T command is given below: START Does T command exist? Is life management The control system varies depending on selected? whether or not life management is selected.
  • Page 223 9. Exclusive Commands (1) Procedure when tool command is executed (a) Tool life management I 1) When tool command (T command) is given, the controller outputs T code data and start signal (TF). (Note) The T code data (BCD) is binary converted and then used. 2) The user PLC checks the tool command.
  • Page 224 9. Exclusive Commands <When tool is changed> When tool is changed, the spindle tool number is set in R3720, R3721. (User PLC) Spindle tool number Tool data file (Controller internal data) (R3720-R3721) Standby tool number (R3722-R3723) When the spindle tool number changes, the controller assumes that the spindle tool is changed, and searches the tool data file for the tool data of the new tool.
  • Page 225 9. Exclusive Commands (3) Tool data flow - 217 -...
  • Page 226 9. Exclusive Commands (4) Tool data The tool data is tool management data such as the group number, tool number, and tool status. The details are given below: Tool data Explanation Data range name Group number Number to manage tools of the same type 1 - 99999999 (form and dimensions) in a group.
  • Page 227 9. Exclusive Commands (5) Tool data flag and tool status The tool data flag and tool status contents are shown below: Correspondence with tool life management data screen Tool data flag ..Bits 0~7 of file register Rn (such as R3728) Explanation bit 0 Length compensation data format...
  • Page 228 9. Exclusive Commands 1) Spare tool compensation system Tool compensation corresponding to the spindle tool can be made in tool life management II. One of the following three types of length and compensation can be selected by setting tool data: i) Compensation umber system (0 is set on the tool data registration screen.) Compensation data in tool data is handled as the compensation number.
  • Page 229 9. Exclusive Commands (c) Tool status ..Bits 8~F of file register Rn (such as R3728) Explanation Tool status (numeric data 0~4) bit 8 0: Unused tool bit 9 1: Used tool 2: Normal life tool bit A 3: Tool error 1 tool bit B 4: Tool error 2 tool bit C...
  • Page 230: Examples Of Tool Life Management Screen

    9. Exclusive Commands 9.3.6 Examples of Tool Life Management Screen Tool life management screen examples are given below. For operation, refer to the Operation Manual. Tool life management screen example on type 9 setting and display unit - 222 -...
  • Page 231: Ddb (Direct Data Bus)

    9. Exclusive Commands 9.4 DDB (Direct Data Bus) ... Asynchronous DDB The DDB function is used for PLC to directly read/write various pieces of data that controller has. PLC can read specified data into buffer or write specified data into controller by storing necessary information for read/write and calling the DDB function.
  • Page 232 9. Exclusive Commands (1) Control signals (Rn), (Dn) 0: Read designation Warning output 1: Write designation Set by PLC during 0: Direct input Error during chopping execution of 1: Addition input (not used) DDB command No option 0: Decimal point invalid Size over 1: Decimal point value No.
  • Page 233 9. Exclusive Commands (6) Read/write data (Rn+6, Rn+7), (Dn+6, Dn+7) (LOW) (HIGH) (LOW) (HIGH) When data is read, the controller outputs data specified by PLC. When data is written, PLC sets the data to be written. 1-byte data 2-byte data 4-byte data Rn+6 Rn+6...
  • Page 234: External Search

    9. Exclusive Commands 9.5 External Search 9.5.1 Function When PLC specifies the program number, sequence number, and block number of a work program for the controller, the external search function searches memory or tape for the program number, sequence number, and block number. 9.5.2 Interface PLC sets data except the status.
  • Page 235 9. Exclusive Commands (2) Status The search state is indicated. The status is set by the controller and is used by PLC for completion check, etc. 2 1 0 External Search processing search No option Search completion <Error cause> Data specification error Search error completion The status is cleared by the controller when the search start instruction execution condition is off.
  • Page 236: Search Start Instruction

    9. Exclusive Commands 9.5.3 Search Start Instruction After interface data between the controller and PLC is prepared, search is started by using the following instruction: (Rn is any file register that S.DDBS can be used by the user.) (Start condition) 9.5.4 Timing Charts and Error Causes (1) Normal completion Search start instruction...
  • Page 237 9. Exclusive Commands (3) Search error completion (Data specification error) Search start instruction condition <Error cause> ・ Program number and sequence number are not specified. Search processing ・ Program number or sequence number is specified beyond the range. Search completion Search error completion Data specification error - 229 -...
  • Page 238: Sequence Program Example

    9. Exclusive Commands 9.5.5 Sequence Program Example Search start memo External search status MOV Rn+1 K4M00 is transferred to M00 ~ M15. Search start memo Data specification error Search start memo Search error completion Automatic Search start button operation Search start memo TAPE Search start memo Search start memo...
  • Page 239: Chopping

    9. Exclusive Commands 9.6 Chopping With this function, the chopping axis constantly moves back and forth independently of the program operation during executing the program. By applying chopping, higher surface accuracy can be achieved than that of abrasive grain. The chopping operation is started/stopped by the "Chopping" signal from the PLC. When the chopping operation is commanded from the machining program, use the auxiliary instruction (M or B) codes.
  • Page 240: Chopping Operation Start

    9. Exclusive Commands 9.6.1 Chopping operation start The chopping mode is entered at the rising edge of the "Chopping" signal (Y1E8), and the chopping operation is started based on the position determined with the program, etc. The chopping control sequence is the following. •...
  • Page 241 9. Exclusive Commands (2) In manual mode In the jog and step mode, when the chopping axis is not moving, the chopping operation is started at the rising edge of the "Chopping" signal. If the "Chopping" signal is turned ON when the chopping axis is moving, the OPERATION ALARM 0154 will occur, and the chopping will not be started.
  • Page 242: Chopping Operation Stop

    9. Exclusive Commands 9.6.2 Chopping operation stop The chopping operation is stopped at the falling edge of the "Chopping" signal from the PLC. The chopping axis moves to the basic position with the rapid traverse after executing the chopping operation to the upper dead center point. The chopping axis once moves to the bottom dead center point even while moving from the upper dead center point to the bottom dead center point.
  • Page 243: Chopping Compensation

    9. Exclusive Commands 9.6.3 Chopping compensation Because this function involves high-speed repetitive motions, the positioning method allowing compensation based on the calculation from the machinery operation (feedback position of the motor end) is adopted, rather than the method using in-position check. Compensation amount used for positioning is calculated every 4 cycles from the start of chopping operation, based on the difference between the commanded position and feedback position.
  • Page 244 9. Exclusive Commands (1) Compensation value sequential update method Every chopping command starts with "0" compensation amount. Compensation amount is calculated every 4-cycle chopping operation, and the compensation is carried out. (2) Compensation value fixed method Compensation value fixed method includes the record mode and the playback mode. <Record mode>...
  • Page 245 9. Exclusive Commands Chopping start Record mode? No (Playback mode) Set the initial Set the compensation data compensation amount to in the record area as the "0". initial compensation amount. Perform chopping Perform chopping operation using the initial operation using the initial compensation amount.
  • Page 246: Chopping Interface

    9. Exclusive Commands 9.6.4 Chopping interface (1) PLC→NC Device No. Abbreviation Signal name Y1E8 W068 CHPS Chopping (2) NC→PLC In chopping start, intervals during chopping and chopping mode are output. Device No. Abbreviation Signal name X260 U0E0 CHOP In chopping start X261 U0E1 CHP1...
  • Page 247: Parameters (Ddb Function Instructions From Plc)

    9. Exclusive Commands 9.6.5 Parameters (DDB function instructions from PLC) Parameters for chopping functions (DDB function instructions from PLC) are as follows. <Compensation value sequential update method> • Rapid traverse override valid/invalid selection • Chopping axis • Upper dead center point position L1 (increment from the basic position) •...
  • Page 248 9. Exclusive Commands (2) Control data Data to be used differs depending on whether the compensation value sequential update method is applied or compensation amount fixed method is applied. Update : Specify with the compensation value sequential update method Fixed : Specify with the compensation value fixed method Control status (Rn) Update...
  • Page 249 9. Exclusive Commands (Note) If an alarm occurs when the chopping parameter valid signal is turned ON, Rn bit is turned ON. Alarm details is output to the chopping error No. (R554), as well. Rn bit Error Cause There is no specification for chopping. BITA Option error BITF...
  • Page 250 9. Exclusive Commands (3) Compensation amount record area (Dedicated for compensation value fixed method) Rm is specified with the parameter (#1324 chop_R). Error status (in playback mode) (Rm) bit0 : This is turned ON when the difference between the commanded stroke and the actual stroke has exceeded the tolerance set with the parameter (#2080 chwid).
  • Page 251 9. Exclusive Commands (4) Setting example for the compensation value sequential update method The following parameters are set using R2000 to R2011 as DDB buffer. Parameter Decimal Setting details Rapid traverse override valid/invalid 0001 Valid Chopping axis designation 0004 1st part system Z axis (3rd axis) Upper dead center point (increment -10000 FFFFD8F0...
  • Page 252 9. Exclusive Commands (5) Setting example for the compensation value fixed method The following parameters are set using R2000 to R2011 as DDB buffer. R2100 (#1324 chop_R = 2100) is used for the compensation amount record area. Parameter Decimal Setting details Rapid traverse override valid/invalid 0001 Valid...
  • Page 253: Example Of Chopping Control By Program Command

    9. Exclusive Commands 9.6.6 Example of chopping control by program command In the example given below, the upper dead center point (increment from the basic position), bottom dead center point (increment from the upper dead center point), and number of cycles (times/min) are set using G code macro.
  • Page 254 9. Exclusive Commands (2) Set the local variables of (1) for chopping parameters by using DDB function, and start the chopping operation. The following is its sequence example. (Compensation value sequential update method) X230 Chopping start memo = H10 R20 X230 Chopping stop memo = H11 R20...
  • Page 255 9. Exclusive Commands Sequence example timing chart M code data (R20):10 :Other Chopping start memo Chopping start pulse Chopping stop memo In chopping (Note 1) Chopping axis cannot be specified as a synchronous control axis. (Note 2) Chopping function can be applied to only one axis per part system. - 247 -...
  • Page 256 9. Exclusive Commands 9.7 CC-Link NC unit can be directly connected to the network to serve as the master/local station of the MELSEC CC-Link. To enable this connection, the CC-Link master/local units (HR576) must be installed in the expansion slot. When using this function, the user PLC ladder type must be the DX Developer type.
  • Page 257 9. Exclusive Commands 9.7.1 Input output signal Details of input/output signals are shown below. NC ← Master/local unit (HR576) NC → Master/local unit (HR576) Usability Usability Output Input No. Signal name Signal name Master Local Master Local station station station station X480 Unit error...
  • Page 258 9. Exclusive Commands - 250 -...
  • Page 259 9. Exclusive Commands (1) By executing a link scan, data in the remote device station's remote input (RX) and in the local station's remote output (RY) is transmitted to the master station's remote input (RX) and the local station's remote output (RY). (2) By executing a link scan, data in the master station's remote output (RY) is transmitted to the remote I/O station and remote device station's remote output (RY) and the local station's remote input (RX).
  • Page 260 9. Exclusive Commands - 252 -...
  • Page 261 9. Exclusive Commands - 253 -...
  • Page 262 9. Exclusive Commands 9.7.3 Automatic Refresh Data is automatically transmitted between the CC-Link master/local unit (HR576) and NC built-in PLC device. The transmission size and destination device are set with the parameters using GX Developer. For the master station, parameters for station information must be set. Parameters cannot be set with the PLC program.
  • Page 263 9. Exclusive Commands (2) Example of station information designation Item Details Station type When connecting NC or MELSEC sequencer as a local station, connect with the intelligent device station. Exclusive station count Sets the number of occupied stations specified with the condition setting switch.
  • Page 264 9. Exclusive Commands 9.7.4 Occupied number of stations of the system and settable range of the device The device range allocated for CC-Link remote I/O (RX, RY) and remote register (RWw, RWr) varies depending on the number of occupied stations (actual number of link points) set per system. In order to operation NC and CC-Link, set within the designated range.
  • Page 265 9. Exclusive Commands 9.7.5 Transient function With transient function, data is not transmitted constantly but is only written and read as required among arbitrary stations. The other stations must be compatible with the transient function. With NC, only RIRD instruction and RIWT instruction are compatible. Enter the following ladder from the GX Developer only when the ladder program area corresponds to CC-Link.
  • Page 266 9. Exclusive Commands (3) Access code Specify the reading source (or writing destination) device with the following access codes when executing the transient instruction (RIRD instruction/RIWT instruction). Low-order 8-bit: Always specify 05H. (If other than 05H is specified, an error occurs.) High-order 8-bit: Specify a device corresponding to purpose as shown in the table below.
  • Page 267 9. Exclusive Commands 9.7.5.2 Transient Instructions (RIWT instruction) Usable device Digit Con- desig- Bit device Word device Pointer Index stant nation L SM T G.RIWT Un S1 S2 D G.RIWT (1) Setting data G. RIWT Device Details Un (Note 1) Head input/output No.
  • Page 268 9. Exclusive Commands 9.7.5.3 Transient instruction program example and error (1) Program example (Example 1) This is the program where 16 points of data from Y100 device of the station No.1 intelligent device station connected to the master station (NC) is stored in D100 and after of the master station when M0 is turned ON.
  • Page 269 9. Exclusive Commands 9.7.6 Others (1) Backup of CC-Link related parameters CC-Link related parameters are the network parameters to be written from GX Developer. These parameters are stored in the ladder program area within NC, which is a different area than that of regular NC parameters.
  • Page 270 10. PLC Help Function 10. PLC Help Function To help the user PLC, an exclusive interface is provided between the user PLC and controller or PLC basic. The function and interface are explained below. PLC help function examples: · Alarm message display ·...
  • Page 271 10. PLC Help Function 10.1 Alarm Message Display There are two types of alarm message, which can be selected with a parameter (described later) Format Alarm message External alarm message Max. No. of messages 256 messages 256 messages Max. data length 32 bytes per message 128 bytes per message Number of...
  • Page 272 10. PLC Help Function (2) R type interface This interface applies to file registers R158~R161. The numeric value (binary) contained in each of the R registers indicates the position of the message to be displayed in the message table. The message is cleared by setting the R register to 0. Message processing module First message of message table is displayed (dn R158...
  • Page 273 10. PLC Help Function 10.1.2 Screen Display Screen Display depends on the message type as described below. (1) Alarm message type Message length is up to 32 characters. Alarm messages corresponding to four classification Nos. can be displayed. Display example of type 9 setting and display unit <NC ALARM>...
  • Page 274 10. PLC Help Function Note that the number of displayed external alarm messages depends on their number of characters. Number of External alarm message characters 0 to 32 characters 33 to 64 characters 4 messages displayed 2 messages displayed ... . . A l a r m m e s s a g e 1 s t a r t s .
  • Page 275 10. PLC Help Function (a) Input with text data format 1) Format of the text file Format of the message text is shown below. ↓ JPN01 96-12-01 (i) Version data ↓ 256 * 16,0 (ii) Number of characters / messages and language designation (iii) Character string of PLC alarm message Language No.
  • Page 276 10. PLC Help Function (Note 1) Always add a return code (CR + LF) in each Even if version data is not necessary, return code is needed. When a message text file without a return code is used, “E86 INPUT DATA ERR” error will occur.
  • Page 277 10. PLC Help Function 10.1.4 Parameters (1) PLC alarm message selection parameter [Bit selection parameter screen] # (6450) Data ( 0 0: PLC alarm message display in user PLC Use number 6450. 1: External alarm message display The operation is as the following depending on the bit state of the bit selection #6450. Bit 6 = 0 The PLC alarm message in the user PLC is displayed as usual.
  • Page 278 10. PLC Help Function (3) F or R Type Selection Parameter Set the parameter on the bit selection screen of PLC parameter (setup para). [Bit selection parameter screen] # (6450) Data ( 0 0: Alarm message invalid. 1: Alarm message valid. Use number 6450.
  • Page 279 10. PLC Help Function 10.2 Operator Message Display When a condition to inform the operator of a message occurs, an operator message can be displayed independently of an alarm message. A maximum of 60 characters can be displayed for the operator message on the alarm diagnosis screen.
  • Page 280 10. PLC Help Function 10.2.2 Operator Message Preparation Create messages by using PLC development software (GX Developer). (Note1) According to the description format, set the number of characters for one message and the number of messages to be prepared, then prepare message data. The maximum length of an operator message is 60 characters.
  • Page 281 10. PLC Help Function 10.3 PLC Switches Similar function to machine operation switches can be provided by using the controller setting and display unit. The number of switch points is 32. The switch names can be given as desired. 10.3.1 Explanation of Screen The screen is explained below.
  • Page 282 10. PLC Help Function 10.3.2 Explanation of Operation To turn on or off a switch, set the number of the switch to be turned on or off in the parentheses of INPUT setting part # ( ) and press the key.
  • Page 283 10. PLC Help Function The table below shows the message displayed during operation on the PLC switch screen. Message Explanation Remedy A number outside the allowable SETTING Specify a valid number within the setting range from 1 to 32 is ERROR range.
  • Page 284 10. PLC Help Function The following shows an example of operation of special relay SM from the user PLC. (1) Two-point switch (Example) When two opposite switches, chip conveyer manual and chip conveyer automatic, are provided; X14E X14F Y16E Chip conveyer manual X14E X14F SM94...
  • Page 285 10. PLC Help Function (2) Three-point switch (Example) When three opposite switches 17, 18, and 19 are provided; X150 X151 X152 Y170 X152 X150 X151 SM96 When SM96 turns on, X150 turns off. X150 X151 X152 X150 X151 X152 Y171 X150 X151 X152 SM97 When SM97 turns on,...
  • Page 286 10. PLC Help Function (3) External switch and PLC switch (Example 1) When an external optional stop switch (X14) is provided; X14 X143 X14 X143 X14 X143 X14 X143 SM83 X143 Y163 Under sequence control in the above example, the switch marks on the PLC switch screen can be operated from both external and PLC switches.
  • Page 287 10. PLC Help Function 10.3.4 Switch Name Preparation Prepare PLC switch names by using PLC development software (GX Developer). (Note1) According to the description format, set the number of characters for one switch name and the number of switch names to be prepared, then prepare switch name data. The maximum length of a switch name is 14 characters.
  • Page 288 10. PLC Help Function 10.4 Key Operation by User PLC The same operation as if the operator performed key operation can be performed by operating key data by user PLC. 10.4.1 Key Data Flow For monitor User PLC R112 Valid key data processing (CNC) (a) Key data is set in file registers R16 and R112 at the top of the user PLC main.
  • Page 289 10. PLC Help Function 10.4.3 Key Data Processing Timing Key data is processed at the timing shown below. Set data in R112 only when it is necessary. Normal key operation by the operator is made impossible. 100ms or longer (100 300ms is adequate.) R112 NULL...
  • Page 290 10. PLC Help Function 10.4.4 Layout of Keys on Communication Terminal There are two types of layouts for the keys on the communication terminal used with this controller as shown below. The layouts of the alphabetic keys differ. (1) Key layout for communication terminal CT100 (This also applies to the separated type FCUA-CR10+KB10) Alphabetic character, numerical character,...
  • Page 291 10. PLC Help Function 10.4.5 List of Key Codes (1) For communication terminal CT100, KB10 (M series) Code Code Code Code Key symbol Key symbol Key symbol Key symbol (HEX) (HEX) (HEX) (HEX) MONITOR 0B(F8) – (+) 2D(2B) O (A) 4F(41) TOOL/PARAM 0A(F7)
  • Page 292 10. PLC Help Function (2) For communication terminal CT120 (L series) Code Code Code Code Key symbol Key symbol Key symbol Key symbol (HEX) (HEX) (HEX) (HEX) MONITOR 0B(F8) – (+) 2D(2B) O (A) 4F(41) TOOL/PARAM 0A(F7) • (, ) 2E(2C) N (B) 4E(42)
  • Page 293 10. PLC Help Function 10.5 Load Meter Display The load meter can be displayed by setting a value in the designated file register (R) with the ladder program. The spindle load, Z axis load, etc. characters and scale are created with comments in the PLC development software (GX Developer) message function.
  • Page 294 10. PLC Help Function File register (R) for load meter display For $1 For $2 Numerical display R152 R352 Load meter 1 Bar graph display R153 R353 Numerical display R154 R354 Load meter 2 Bar graph display R155 R355 (Note 1) Use $1 for models not having a system. Display example of type 9 setting and display unit (Note) This screen consists of 80 characters wide x 18 lines long.
  • Page 295 10. PLC Help Function 10.6 External Machine Coordinate System Compensation External machine coordinate system compensation is executed by setting compensation data (absolute amount) in the PLC file register (R) for each axis. Thus, the compensation timing is when PLC rewrites file register (R) compensation data. Necessary condition, timing, etc., are set by user PLC.
  • Page 296 10. PLC Help Function 10.7 User PLC Version Display The user PLC version can be displayed together with the controller software version on the DIAGN/IN/OUT menu changeover configuration (menu) screen of the setting and display unit (communication terminal). (Note) The user PLC must be controlled by the user. 10.7.1 Interface Data corresponding to the characters to be displayed on the corresponding file register (R) is set.
  • Page 297 10. PLC Help Function (2) To display a 3-digit version code Program example) - 289 -...
  • Page 298 11. PLC Axis Control 11. PLC Axis Control 11.1 Outline This function allows an independent axis to be controlled with commands from the PLC, separately from the NC control axis. 11.2 Specifications 11.2.1 Basic Specifications Item Details No. of control axes Max.
  • Page 299 11. PLC Axis Control 11.2.2 Other Restrictions (1) There is no mirror image, external deceleration or machine lock function. (2) Rapid feed override, cutting override and dry run control are not possible. (3) Automatic operation start, automatic operation stop, reset and interlock NC controls are invalid for PLC control axes.
  • Page 300 11. PLC Axis Control 11.3 PLC Interface The interface between the PLC and NC is carried out by setting the control information data in the (Note 1) R-register with the PLC, and calling the DDBS function. 11.3.1 S.DDBS Function Command (Note 1) S.DDBS When ACT is set to 1, the PLC axis control process is carried out with the control information data...
  • Page 301 11. PLC Axis Control 11.3.2 Control Information Data Set the control information data in the R-register before calling the DDBS function command. The following is a list of control information data. 2 bytes Command 2 bytes Status 2 bytes Alarm details 2 bytes Control signal 2 bytes...
  • Page 302 11. PLC Axis Control 11.3.3 Control Information Data Details 11.3.3.1 Commands Commands consist of main commands and sub-commands. Sub-commands Main commands Main commands: The types of DBBS main commands are as follows. 1: Search 2: PLC axis control Sub-commands: The PLC axis control sub-command is as follows. 0: Movement data output and control signal output (Note 1) "Input"...
  • Page 303 11. PLC Axis Control 11.3.3.2 Status The status is set by the NC to indicate the execution status of this function command and the status of the axis being controlled. F E D C B A 9 8 7 6 5 4 3 2 1 0 bit 0: busy Command processing bit 8 : oper...
  • Page 304 11. PLC Axis Control bit 8: oper Option error This bit turns ON when an attempt is made to execute PLC axis control when there is no PLC axis control option. bit E: ALM2 Axis in control alarm This bit turns ON when an alarm occurs (such as a servo alarm) during execution of axis control. Axis control cannot be executed while this bit is ON.
  • Page 305 11. PLC Axis Control Timing chart (1) For rapid traverse and cutting feed mode Start busy move Speed (2) For jog feed mode Start busy move Speed (Note) The axis moves by jog feed only during start ON. - 297 -...
  • Page 306 11. PLC Axis Control (3) For reference point return feed mode (3-1) Dog-type reference point return Start busy move (G1 mode) Speed (Note 1) The axis moves by reference point return feed only during start ON. Turn the start OFF after confirming that the reference point has been reached.
  • Page 307 11. PLC Axis Control (4) For handle feed mode Start busy move Handle Speed (Note) Handle feed is possible only during start ON. - 299 -...
  • Page 308 11. PLC Axis Control (5) When the interlock signal is ON (= 1) Start Interlock busy move Speed (6) When the reset signal is ON (= 1) Start Reset busy move Speed - 300 -...
  • Page 309 11. PLC Axis Control (7) When the servo OFF signal is ON (= 1) Start Servo OFF busy move svon Speed (8) When the ACT signal is OFF (= 0) Start busy move Speed - 301 -...
  • Page 310 11. PLC Axis Control 11.3.3.3 Alarm No. The alarm Nos. of status ALM1 and ALM2 are set. ALM1 Alarm No. ALM2 Alarm No. The details of each alarm No. are shown below. (1) ALM1 (Control information data designation alarm) Alarm No. Details Control signal illegal (A signal other than a registered control signal has been commanded.)
  • Page 311 11. PLC Axis Control 11.3.3.4 Control Signals (PLC axis control information data) Control signals such as start, interlock, reset, axis removal and axis removal 2 are designated for the PLC axis. F E D C B A 9 8 7 6 5 4 3 2 1 0 bit 0: Start bit 8 : Absolute value command 1: Interlock...
  • Page 312 11. PLC Axis Control bit 5: Axis removal 2 The axis will execute a deceleration stop, and a servo OFF/ready OFF status will result, when the axis removal 2 signal turns ON. A servo ON/ready ON status will result for the stopped PLC axis when the axis removal 2 signal turns OFF (is canceled).
  • Page 313 11. PLC Axis Control 11.3.3.5 Axis Designation The axis No. of the PLC axis is designated. Axis designation 0: 1st axis 1: 2nd axis 11.3.3.6 Operation Mode The operation mode for the PLC axis is designated. For example, in the handle mode, Rn+5=6 (DATA) is set. Operation mode 0: Rapid traverse (G0) 1: Cutting feed (G1)
  • Page 314 11. PLC Axis Control 11.3.3.7 Feedrate When the operation mode is cutting feed or jog feed (Rn + 5 = 1 to 3), the PLC axis feedrate is designated with a binary code. Feedrate Designation value 1 to 1000000 mm/min. (0.1 inch/min.) (Note 1) The feedrate designated in the parameters is used for the rapid traverse mode and reference point return mode.
  • Page 315 11. PLC Axis Control 11.3.3.9 Machine Position The machine position output to the machine system is expressed. The machine position becomes the rfp (reference point) when the reference point is reached. + 10 Machine position (input unit) 11.3.3.10 Remaining Distance The remaining distance of the movement data output to the machine system is expressed.
  • Page 316 11. PLC Axis Control 11.3.4 Reference Point Return Near Point Detection Set the near point dog signal of the PLC axis reference point return for the following devices in the PLC. Device No. Signal name PLC axis PLC axis near point detect Y2E0 *PCD1 1st axis...
  • Page 317 11. PLC Axis Control 11.3.5 Handle Feed Axis Selection The axis is designated for the following devices when handle feed is carried out with a PLC axis. Device No. Signal name Y2E0 Y2E1 Y2E2 Y2E3 Y2E4 PCH1 PLC axis 1st handle valid Y2E5 PCH2 PLC axis 2nd handle valid...
  • Page 318 12. Appendix 12. Appendix 12.1 Example of Faulty Circuit Wrong configurations of circuits are shown below. Correct the circuitry, if any. Faulty circuit producing errors Correct circuit (1) Circuit containing OR (2) Rounding circuit Necessity Whether or not the Y10 condition includes X3, X4 and X2 is unknown.
  • Page 319 Revision History Date of revision Manual No. Revision details Aug. 2002 BNP-B2269C First edition created. Nov. 2005 BNP-B2269D Contents were revised to correspond to the system software version C6. The following sections were added. ・9.6 Chopping ・9.7 CC-Link Addition/deletion/revision was made according to the specifications.
  • Page 320 TEL: +886-4-2359-0688 FAX: +886-4-2359-0689 Tainan CNC Service Satellite TEL: +886-4-2359-0688 FAX: +886-4-2359-0689 Korean FA Center (MITSUBISHI ELECTRIC AUTOMATION KOREA CO., LTD.) Korea CNC Service Center DONGSEO GAME CHANNEL BLDG. 2F. 660-11, DEUNGCHON-DONG KANGSEO-KU SEOUL, 157-030 KOREA TEL: +82-2-3660-9607 FAX: +82-2-3663-0475...
  • Page 321 Every effort has been made to keep up with software and hardware revisions in the contents described in this manual. However, please understand that in some unavoidable cases simultaneous revision is not possible. Please contact your Mitsubishi Electric dealer with any questions or comments regarding the use of this product. Duplication Prohibited This manual may not be reproduced in any form, in part or in whole, without written permission from Mitsubishi Electric Corporation.

Table of Contents