Mitsubishi Electric M60/M60S Series PLC Programming Manual

Add to my manuals
288 Pages

advertisement

Mitsubishi Electric M60/M60S Series PLC Programming Manual | Manualzz

CNC

60/60S Series

PLC PROGRAMMING MANUAL

(LADDER SECTION)

BNP-B2212*(ENG)

MELDASMAGIC is a 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.

Introduction

These specifications are the programming manual used when creating the sequence program 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.

The commands can be used according to the purpose and application such as the PLC support function used when supporting the user PLCs.

This Instruction Manual does not explain the operation procedures for programming the sequence program with onboard or PLC development software. Refer to the related material listed below for details.

(1) M64 Series

MELDAS 64 PLC Onboard Instruction Manual ..... BNP-B2213

MELDAS 64 PLC Program Development Manual

(Personal

MELDAS 64 PLC Interface Manual

(2) MELDASMAGIC 64 Series

..... BNP-B2211

MELDASMAGIC 64 PLC Onboard Instruction Manual ..... BNP-B2213

MELDASMAGIC 64 PLC Program Development Manual

(Personal

MELDASMAGIC 64 PLC Interface Manual ..... BNP-B2211

The "Controller" and "Control Unit" in this Instruction Manual are equivalent to the "NC

Card" in the MELDASMAGIC 64 Series.

CONTENTS

1. System Configuration ....................................................................................

1

1.1 System Configuration for PLC Development ............................................. 1

1.2 User PLC (Ladder) Development Procedure.............................................. 3

2. PLC Processing Program ..............................................................................

4

2.1 PLC Processing Program Level and Operation ......................................... 4

2.2 User Memory Area Configuration .............................................................. 4

3. Input/Output Signals ......................................................................................

5

3.1 Input/Output Signal Types and Processing ............................................... 5

3.2 Handling of Input Signals Designated for High Speed Input ...................... 6

3.3 High Speed Input/output Designation Method ........................................... 8

3.4 Limits for Using High Speed Processing Program .................................... 9

3.4.1 Separation of Main Processing and High Speed Processing

Operation Areas ....................................................................... 9

3.4.2 Separation of Remote I/O Output .................................................. 10

4. Parameters ...................................................................................................... 12

4.1 PLC Constants .......................................................................................... 12

4.2 Bit Selection Parameters ........................................................................... 14

5. Explanation of Devices .................................................................................. 18

5.1 Devices and Device Numbers ................................................................... 18

5.2 Device List ................................................................................................. 18

5.3 Detailed Explanation of Devices ................................................................ 19

5.3.1 Input/output X, Y, U, W .................................................................. 19

5.3.2 Internal Relays M , G and F, Latch Relay L ................................... 20

5.3.3 Special Relays E ........................................................................... 20

5.3.4 Timer T, Q ..................................................................................... 21

5.3.5 Counter C, B .................................................................................. 23

5.3.6 Data Register D ............................................................................. 23

5.3.7 File Register R ............................................................................... 24

5.3.8 Accumulator A ............................................................................... 25

5.3.9 Index Registers Z and V ................................................................ 25

5.3.10 Nesting N ....................................................................................... 26

5.3.11 Pointer P ........................................................................................ 26

5.3.12 Decimal Constant K ....................................................................... 27

5.3.13 Hexadecimal Constant H ............................................................... 27

i

of Commands ............................................................................ 28

6.1 Command List ........................................................................................... 28

6.1.1 Basic Commands ............................................................................ 28

6.1.2 Function Commands ....................................................................... 29

6.1.3 Exclusive commands ...................................................................... 35

6.2 Command Formats ................................................................................... 36

6.2.1 How to Read the Command Table .................................................. 36

6.2.2 No. of Steps .................................................................................... 37

6.2.3 END Command ............................................................................... 37

6.2.4 Index Ornament .............................................................................. 38

6.2.5 Digit Designation ............................................................................. 39

7. Basic Commands

(LD, LDI, AND, ANI, OR, ORI, ANB, ORB .....) ............................................... 42

8. Function Commands

(=, >, <, +, –, *, /, BCD, BIN, MOV .....) ............................................................ 73

9. Exclusive Commands .................................................................................... 190

9.1 ATC Exclusive Command ......................................................................... 191

9.1.1 Outline of ATC Control .................................................................. 191

9.1.2 ATC Operation .............................................................................. 191

9.1.3 Explanation of Terminology ........................................................... 191

9.1.4 Relationship between Tool Registration Screen and Magazines ... 192

9.1.5 Use of ATC and ROT Commands ................................................. 193

9.1.6 Basic Format of ATC Exclusive Command .................................... 194

9.1.7 Command List ............................................................................... 195

9.1.8 Control Data Buffer Contents ........................................................ 195

9.1.9 File Register (R Register) Assignment and Parameters ................ 196

9.1.10 Details of Each Command (ATC K1~ATC K11) ............................ 198

9.1.11 Precautions for Using ATC Exclusive Instructions ......................... 207

9.1.12 Examples of Tool Registration Screen .......................................... 207

9.1.13 Display of Spindle Tool and Standby Tool ..................................... 209

9.2 Rot Commands ......................................................................................... 210

9.2.1 Command List (ROT K1, ROT K3) ................................................ 210

9.3 Tool Life Management Exclusive Command ............................................. 216

9.3.1 Tool Life Management System ...................................................... 216

9.3.2 Tool Command System ................................................................. 216

9.3.3 Spare Tool Selection System ........................................................ 217

9.3.4 Interface ........................................................................................ 217

9.3.5 User PLC Processing When the Tool Life Management Function

Selected ..................................................................................... 218

9.3.6 Examples of Tool Life Management Screen .................................. 226

9.4 DDB (Direct Data Bus) ... Asynchronous DDB .......................................... 227

9.4.1 Basic Format of Command ............................................................ 227

9.4.2 Basic Format of Control Data ........................................................ 227

ii

9.5 External Search ......................................................................................... 230

9.5.1 Function ......................................................................................... 230

9.5.2 Interface ........................................................................................ 230

9.5.3 Search Start Instruction ................................................................. 232

9.5.4 Timing Charts and Error Causes ................................................... 232

9.5.5 Sequence Program Example ......................................................... 234

10. PLC Help Function .......................................................................................... 235

10.1 Alarm Message Display ........................................................................... 236

10.1.1 Interface ........................................................................................ 236

10.1.2 Message Creation ......................................................................... 237

10.1.3 F or R Type Selection Parameter .................................................. 238

10.2 Operator Message Display ...................................................................... 239

10.2.1 Interface ........................................................................................ 239

10.2.2 Operator Message Preparation ..................................................... 240

10.2.3 Operator Message Display Validity Parameter .............................. 240

10.3 PLC Switches .......................................................................................... 241

10.3.1 Explanation of CRT Screen ........................................................... 241

10.3.2 Explanation of Operation ............................................................... 242

10.3.3 Signal Processing .......................................................................... 243

10.3.4 Switch Name Preparation .............................................................. 247

10.4 Key Operation by User PLC

(This cannot be used with the MELDASMAGIC 64 Series.) .................... 248

10.4.1 Key Data Flow ............................................................................... 248

10.4.2 Key Operations That Can Be Performed ....................................... 248

10.4.3 Key Data Processing Timing ......................................................... 249

10.4.4 Layout of Keys on Communication Terminal ................................. 250

10.4.5 List of Key Codes .......................................................................... 251

10.5 Load Meter Display ................................................................................. 253

10.5.1 Interface ........................................................................................ 253

10.6 External Machine Coordinate System Compensation ............................. 255

10.7 User PLC Version Display ....................................................................... 256

10.7.1 Interface ........................................................................................ 256

11. PLC Axis Control ............................................................................................ 258

11.1 Outline ..................................................................................................... 258

11.2 Specifications .......................................................................................... 258

11.2.1 Basic Specifications ....................................................................... 258

11.2.2 Other Restrictions .......................................................................... 259

11.3 PLC Interface .......................................................................................... 260

11.3.1 DDBS Function Command ............................................................ 260

11.3.2 Control Information Data ............................................................... 261

11.3.3 Control Information Data Details ................................................... 262

11.3.3.1 Commands .................................................................................. 262

11.3.3.2 Status .......................................................................................... 263

11.3.3.3 Alarm No. .................................................................................... 270

11.3.3.4 Control Signals (PLC axis control information data) .................... 271

11.3.3.5 Axis Designation .......................................................................... 273

iii

11.3.3.6 Operation Mode .......................................................................... 273

11.3.3.7 Feedrate ...................................................................................... 274

11.3.3.8 Movement Data ........................................................................... 274

11.3.3.9 Machine Position ......................................................................... 275

11.3.3.10 Remaining Distance .................................................................. 275

11.3.4 Reference Point Return near Point Detection ................................... 276

11.3.5 Handle Feed Axis Selection .............................................................. 277

12. Appendix ....................................................................................................... 278

12.1 Example of Faulty Circuit ..................................................................... 278

iv

1. System Configuration

1. System Configuration

1.1 System Configuration for PLC Development

(1)

The system configuration for PLC development is shown below.

Communication terminal

Ladder development using the communication terminal.

(Onboard development)

Program development, ladder monitor and

PLC RUN/STOP, etc.

To AUX 1 connector

M64 Control unit

Base I/O unit

To RS-232-C connector

RS-232-C

Up/downloading is executed with the controller’s maintenance function.

RS-232-C

Personal computer

Development and saving of data

(Hard disk or floppy disk)

Commercially available printer

(Example : PC-PR201GS)

Note) Refer to the "PLC Onboard Instruction Manual" for development using the communication terminal (onboard development), and the "PLC Program Development Manual (Personal

Computer Section)" for development using the personal computer.

- 1 -

(2) MELDASMAGIC 64 Series

MELDASMAGIC Monitor

(software) PLC development software

1. System Configuration

Ladder development and signal operation monitoring are carried out from the MELDASMAGIC

Monitor using the NC onboard function.

By using the optional PLC development software, the ladder can be development without the NC card.

Base I/O unit

PLC ladder area

NC card built-in RAM

16K step

128Kbytes

MELDASMAGIC

Monitor

* Refer to the MELDASMAGIC Monitor

Operation Manual for information on the

MELDASMAGIC Monitor.

Note) Refer to the "PLC Onboard Instruction Manual (BNP-B2130)" for development using the onboard PLC development tool, and the "PLC Programming Manual (Personal Computer

Section) (BN-B2132)" for development using the PLC development software.

- 2 -

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 Desktop Personal computer

Start

Decision of machine

Decision of control unit

Decision of program size

Decision of No. of input/output points

(remote I/O)

Assignment of input/output signals

Decide how many of which remote I/O units to order for the MELDAS 64 Series

(MELDAS MAGIC 64

Series).

Device No. Signal name

X0 - - - - - -

X1

X2

- - - - - -

- - - - - -

Creation of ladder diagram

Assignment of internal relays

Programming

Debugging

(ROM operation)

When created with a personal computer, the program must be converted with the conversion software before it is serially transmitted.

Run the ROM.

(Run the RAM for the

MELDASMAGIC 64 Series.)

ROM

(RAM for

MELDASMAGIC

64 Series)

No

Debugging completed?

Yes

Ladder monitor

Serial transmission

(Bus transmission for the

MELDASMAGIC 64 Series)

Convert the PLC with the conversion software installed in the personal computer.

(Note 1)

Note that the PLC cannot be changed after conversion.

If changes are required, change the non-converted PLC, and then convert again. Using the control unit's maintenance function and transmission software installed in the personal computer, serially transmitted the converted PLC.

(Personal computer

→ control unit)

(MMI Software for MELDASMAGIC

64 Series)

Print output

When created onboard (with actual machine), print output is not possible. When created with a personal computer, print out the non-converted PLC.)

Back up data on floppy disk

End

Using the maintenance function, transmit and save data on 3.5 FD or in personal computer.

Save on personal computer's hard disk or floppy disk.

- 3 -

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

High-speed processing program

Main processing program (ladder)

Description (frequency, level, etc.)

This program starts periodically with a time interval of 7.1ms.

This program has the highest level as a program that starts periodically.

It is used in signal processing where high speed processing is required.

Processing time of this program shall not exceed 0.5ms.

Application example:

Position count control of turret and ATC magazine

This program runs constantly. When one ladder has been executed from the head to END, the cycle starts again at the head.

1) The section from the END command to the next scan is done immediately as shown with the X section. Note that the min. scan time will be 14.2msec.

Fig. 2.1-1 PLC processing program operation timing chart

2.2 User Memory Area Configuration

The user memory area approximate configuration and size are shown below.

Control information

Control table indicating the user PLC configuration

(The table is automatically generated.) <1280 bytes>

P251 High speed processing program

P252

Main processing program

Message data

Max. 32 Kbyte from control information to messages.

High-speed processing program

The program does not need to be a high speed processing program.

PLC main process

<16 Kbyte together with high speed process>

Message data for alarm messages, PLC switches, etc.

<32 Kbyte-main process-high speed process-control information>

- 4 -

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. For the reading and writing with the hardware or controller, the controller will perform the input/output according to the level of the main process or high speed process.

Controller

Operation

board

Machine

Controller

Input/output image memory

(device X, Y)

User PLC

1) The operation board here refers to when the remote I/O is installed on the communication terminal. (This cannot be used with the MELDASMAGIC 64 Series.)

Fig. 3.1-1 Concept of input/output processing

High speed processing

input/output

Main processing

input/output

The controller reads the high speed input designation input, and sets in the image memory.

P251

User PLC high speed processing

The controller outputs the high speed output designation output from the image memory to the machine.

The controller reads the input other than the high speed input designation, and sets in the image memory.

P252

User PLC main high speed processing

The controller outputs the output other than the high speed output desig- nation from the image memory to the machine.

Fig. 3.1-2 Input/output processing conforming to program level

- 5 -

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

specification

High speed output

specification

Input signal from control unit x x

Output signal to control unit

Input signal from machine

x x

(2-byte units) x

Output signal to machine

Input signal from operation board (Cannot be used with the

MELDASMAGIC 64 Series)

Output signal to operation board

(Cannot be used with the

MELDASMAGIC 64 Series)

x

Input signal from MELSEC when connected to MELSEC

(Cannot be used with the

MELDASMAGIC 64 Series)

x

x

x

x

x

Output signal to MELSEC when connected to MELSEC

(Cannot be used with the

MELDASMAGIC 64 Series)

: Possible x : Not possible

x

x

The operation board in Table 3.1-1 is applied when control is performed by operation board input/output card that can be added as NC option.

3.2 Handling of Input Signals Designated for High Speed Input

The input/output signals used in user PLC are input/output for each program level as shown in

Fig. 3.1-2.

In high speed processing, input/output signal for which high speed input or output designation

(parameter) is made is input or output each time the high speed processing program runs. In main processing, signals other than interrupt input signals or high speed input/output designation are input/output.

When high speed input designation signal is used in main processing, the input signal may change within one scan because high speed processing whose level is higher than main processing interrupts. Input signal which must not change within one scan should be saved in temporary memory

(M), etc., at the head of main processing and the temporary memory should be used in the main program, for example.

- 6 -

3. Input/Output Signals

The hatched area is high speed input designation part. Whenever the high speed processing program runs, data is reset in the hatched area. Thus, the signal in the hatched area may change in main processing (A) and (B) because the high speed process re-reads the input signal in the hatched area.

- 7 -

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).

· Input or output in which 1 is set in the table is not performed at the main processing program level.

· Although the number of bits set to 1 is not limited, set only necessary ones from viewpoint of overhead.

· High speed input/output designation corresponds to the bit selection parameter and can be set in the parameter. However, it is recommended to set in a sequence program to prevent a parameter setting error, etc.

Example: —[MOV H3 R2928]— ..... To designate X00~X0F, X10~X1F

Bits 0 and 1

- 8 -

3. Input/Output Signals

3.4 Limits for Using High Speed Processing Program

3.4.1 Separation of Main Processing and High Speed Processing Bit Operation Areas

(1) Bit operation area

When using high speed processing, the bit operation range such as the temporary memory is separated from the main process.

1) When using the same M or G code, the bit operation area for high speed processing and the bit operation area for main processing are separated by 64 points or more and used.

For example, the following is used

M0 to M4735 for main processing Separate by 64 points or more

M4800 to M5120 for high speed processing (M4736 to M4799 are not used) speed processing temporary memory. and R.

2) These limits apply not only to the OUT command, but also to the PLF, PLS, SET, RST and MOV command, etc., outputs. The devices apply to all devices including M, G, F, E,

T and Q.

- 9 -

3. Input/Output Signals

(2)

Even with commands that handle data (numerical values) during the MOV command, etc., the bit area must be separated by 64 points or more and the data register (D) and file register (R) separated by four registers or more.

Example) Use D0 to D896 for main processing

Use D900 to D1023 for high speed processing

Separate by four registers or more

3.4.2 Separation of Remote I/O Output

When handling high speed output during the high speed process, the main processing output and high speed processing output cannot be used together in the same remote I/O unit (32 points in channel No. setting rotary switch). A separate 32 points for high speed processing output or a

16-point remote I/O unit will be required.

MOV commands, etc., that extend over differing remote I/O units must not be enforced during either main processing or high speed processing. If these must be enforced, the channel No. setting rotary switch for the output unit used in the main processing and the output unit used for the high speed processing must be raised 1 or more.

- 10 -

3. Input/Output Signals

(Usage example 1) Avoid interference with the main process by assigning 7 (last channel) for the channel No. rotary switch for high speed processing output.

For example, use YE0 to YFF (for 32-point DO-L) or YE0 to YEF (for 16-point

DO-R) as the high speed processing output.

(Refer to <Usage examples 1-1, 1-2 and 1-3> below.)

(Usage example 2) Assign Y0 to Y1F (32-point) for high speed processing, and use Y20 and following for the main process.

(Refer to <Usage example 2> below.)

(Usage example 3) Assign the device after the device used for main processing for the high speed process.

For example, if the devices up to Y2D are used for the main process, use Y40 to

Y5F (channel No. setting rotary switch No.: 2) for the high speed process.

(Refer to <Usage example 3> below.)

Relation of channel No. setting switch and device No.

<Usage example 1-1>

(Devices are YE0 and following)

<Usage example 1-2>

Usage examples 1-2 show the assignment for the 16-point unit as the No. of high speed output points is relatively low.

DX35*/45* DX100

<Usage example 2>

DX35*/45* DX110/120

<Usage example 3>

DX35*/45* DX100 DX100

/120

DX35*/45* DX100

- 11 -

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.

However, display remains unchanged. Display another screen once and then select the screen again.

48 PLC constants are set (the setting range is ±8 digits). (Signed 4-byte binary data)

The correspondence between the PLC constants and file registers is listed below. The setting and display screens are also shown.

Corresponding file registers Corresponding file registers Corresponding file registers

#

High order Low order

#

High order Low order

#

High order Low order

6301 R2801 R2800 6321 R2841 R2840 6341 R2881 R2880

6302 R2803 R2802 6322 R2843 R2842 6342 R2883 R2882

6303 R2805 R2804 6323 R2845 R2844 6343 R2885 R2884

6304 R2807 R2806 6324 R2847 R2846 6344 R2887 R2886

6305 R2809 R2808 6325 R2849 R2848 6345 R2889 R2888

6306 R2811 R2810 6326 R2851 R2850 6346 R2891 R2890

6307 R2813 R2812 6327 R2853 R2852 6347 R2893 R2892

6308 R2815 R1814 6328 R2855 R2854 6348 R2895 R2894

6309 R2817 R2816 6329 R2857 R2856

6310 R2819 R2818 6330 R2859 R2858

6311 R2821 R2820 6331 R2861 R2860

6312 R2823 R2822 6322 R2863 R2862

6313 R2825 R2824 6333 R2865 R2864

6314 R2827 R2826 6334 R2867 R2866

6315 R2829 R2828 6335 R2869 R2868

6316 R2831 R2830 6336 R2871 R2870

6317 R2833 R2832 6337 R2873 R2872

6318 R2835 R2834 6338 R2875 R2874

6319 R2837 R2836 6339 R2877 R2876

6320 R2839 R2838 6340 R2879 R2878

- 12 -

PLC constant screen

4. Parameters

- 13 -

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, G) using the MOV command. In contrast, if data is stored in the file register corresponding to bit selection by using the MOV command etc., it is backed up. However, display remains unchanged. Once display another screen and again select screen.

The corresponding between the bit selection parameters and file registers is listed below. The setting and display screens are also shown.

6401 R2900-LOW 6433 R2916-LOW 6449 R2924-LOW 6481 R2940-LOW

6402 R2900-HIGH 6434 R2916-HIGH 6450 R2924-HIGH 6482 R2940-HIGH

6403 R2901-L 6435 R2917-L 6451 R2925-L 6483 R2941-L

6404 R2901-H

6405 R2902-L

6406 R2902-H

6407 R2903-L

6436 R2917-H

6437 R2918-L

6438 R2918-H

6439 R2919-L

6452 R2925-H

6453 R2926-L

6454 R2926-H

6455 R2927-L

6484 R2941-H

6485 R2942-L

6486 R2942-H

6487 R2943-L

6408 R2903-H

6409 R2904-L

6410 R2904-H

6411 R2905-L

6412 R2905-H

6413 R2906-L

6414 R2906-H

6415 R2907-L

6416 R2907-H

6417 R2908-L

6418 R2908-H

6419 R2909-L

6420 R2909-H

6421 R2910-L

6422 R2910-H

6440 R2919-H

6441 R2920-L

6442 R2920-H

6443 R2921-L

6444 R2921-H

6445 R2922-L

6446 R2922-H

6447 R2923-L

6448 R2923-H

Use bit selection parameters

#6401~#6448 freely.

6456 R2927-H

6457 R2928-L

6458 R2928-H

6459 R2929-L

6460 R2929-H

6461 R2930-L

6462 R2930-H

6463 R2931-L

6464 R2931-H

6465 R2932-L

6466 R2932-H

6467 R2933-L

6468 R2933-H

6469 R2934-L

6470 R2934-H

6488 R2943-H

6489 R2944-L

6490 R2944-H

6491 R2945-L

6492 R2945-H

6493 R2946-L

6494 R2946-H

6495 R2947-L

6496 R2947-H

Bit selection parameter

#6449~#6496 are PLC operation selection parameters used by the machine manufacturer and MITSUBISHI. The contents are fixed.

6423 R2911-L

6424 R2911-H

6425 R2912-L

6426 R2912-H

6427 R2913-L

6428 R2913-H

6429 R2914-L

6430 R2914-H

6431 R2915-L

6432 R2915-H

6471 R2935-L

6472 R2935-H

6473 R2936-L

6474 R2936-H

6475 R2937-L

6476 R2937-H

6477 R2938-L

6478 R2938-H

6479 R2939-L

6480 R2939-H

- 14 -

Bit selection screen

4. Parameters

- 15 -

4. Parameters

Contents of bit selection parameters #6449~#6496

0

Symbol name

Bit selection

#6449

R2924L

1 #6450

R2924H

2 #6451

R2925L

7

Control unit thermal alarm valid

6

5 4

CRT thermal alarm valid

(Note 4)

Alarm/ operator changeover

Message full screen display

3 #6452

R2925H

4 #6453

R2926L

5 #6454

R2926H

6 #6455

R2927L

7 #6456

R2927H

8 #6457

R2928L

9 #6458

R2928H

A #6459

R2929L

B #6460

R2929H

C #6461

R2930L

D #6462

R2930H

E #6463

R2931L

F #6464

R2931H

(Reserved)

(Reserved)

(Reserved)

(Reserved)

— —

— hold

3

— hold (V)

Message Language change

code

— timer T hold

2

Operator message timer Q hold (V)

High speed input designation 1

High speed input designation 2

High speed input designation 3

High speed input designation 4

High speed output designation 1

High speed output designation 2

High speed output designation 3

High speed output designation 4

1

PLC counter program valid

R mode

L mode message valid

Onboard valid

— —

0

PLC timer program valid

- 16 -

4. Parameters

Symbol name 7 6 5 4 3 2 1 0

R2935H

8 #6473

R2936L

9 #6474

R2936H

A #6475

R2937L

B #6476

R2937H

C #6477

R2938L

D #6478

R2938H

E #6479

R2939L

F #6480

0 #6465

R2932L

1 #6466

R2932H

2 #6467

R2933L

3 #6468

R2933H

4 #6469

R2934L

5 #6470

R2934H

6 #6471

R2935L

7 #6472

— — — — — — — —

— — — — — — — —

— — — — — — — —

— — — — — — — —

Standard PLC parameter

NC alarm

4 output disabled

— — — — — — — —

— — — — — — — —

— —

R2939H

_

(Note 2) Parameters #6481~#6496 are not used. They are for debugging at MITSUBISHI.

(Note 3) For the parameter meanings, refer to the PLC Onboard Manual.

(Note 4) These cannot be used with the MELDASMAGIC 64 Series.

- 17 -

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, U, W, and H are represented in hexadecimal notation. The device numbers of other devices are represented in decimal notation.

5.2 Device List

Unit Details

X*

Y*

U*

W*

M

G

F

X0~X4BF (1216 points)

Y0~Y53F

U0~U178

F0~F127

(1344 points)

(384 points)

W0~W1FF (512 points)

M0~M5119 (5120 points)

G0~G3071 (3072 points)

(128 points)

1 bit

1 bit

1 bit

1 bit

1 bit

1 bit

1 bit

Input signal to PLC. Machine input, etc.

Output signal from PLC.

Machine output, etc.

Input signal to PLC for second system.

Signal for No.2 system.

Output signal from PLC for second system.

Signal for No.2 system.

Temporary memory

Temporary memory

Temporary memory, alarm message interface

L L0~L255 (256 points)

E* E0~E127 (128 points)

T T0~T15

T16~T95

(16 points)

(80 points)

1 bit

1 bit

Latch relay (backup memory)

Special relay

1 bit or 16 bits 10ms unit timer

1 bit or 16 bits 100ms unit timer

Q

T96~T103 (8 points)

Q0~Q39 (40 points)

Q40~Q135 (96 points)

Q136~Q151 (16 points)

1 bit or 16 bits 100ms unit integrating timer

1 bit or 16 bits 10ms unit timer (fixed)

1 bit or 16 bits 100ms unit timer (fixed)

1 bit or 16 bits 100ms unit integrating timer (fixed)

C

B

C0~C23 (24 points) 1 bit or 16 bits Counter

B0~B103 (104 points) 1 bit or 16 bits Counter (Fixed counter)

D D0~D1023 (1024 points) 16 bits or 32 bits Data register for arithmetic operation

R* R0~R8191 (8192 points) 16 bits or 32 bits File register. R500 to R549 and R1900 to

R2799 are released to the user for interface between the PLC and controller. R1900 to

R2799 are backed up by the battery.

A

Z

V

N

P* P0~P255 (256 points)

K

A0, A1

N0~N7

(2 points)

(1 point)

(1 point)

(8 points)

K-32768~K32767

K-2147483648~

K2147483647

16 bits or 32 bits Accumulator

16 bits Index of D or R address (±n)

16 bits

Index of D or R address (±n)

Master control nesting level

Label for conditional jump and subroutine call commands

Decimal constant for 16-bit command

Decimal constant for 32-bit command

H H0~HFFFF — Hexadecimal constant for 16-bit command

H0~HFFFFFFFF — Hexadecimal constant for 32-bit command

1) The applications of the devices having a * in the device column are separately determined. Do not use the undefined device Nos., even if they are open.

- 18 -

5. Explanation of Devices

5.3 Detailed Explanation of Devices

The devices used with the PLC are described below.

5.3.1 Input/output X, Y, U, W

Input/output X, Y, U and W are a window for executing communication with the PLC and external device or controller.

Input X, U

(1) This issued commands or data from an external device such as a push-button, changeover switch, limit switch or digital switch to the PLC.

(2) Assuming that there is a hypothetical relay Xn built-in the PLC per input point, the program uses the a contact and b contact of that Xn.

(3) There is no limit to the No. of a contacts and b contacts of the input Xn that can be used in the program.

(4) The input No. is expressed with a hexadecimal.

Output Y, W

(1) This outputs the results of the program control to the solenoid, magnetic switch, signal lamp or digital indicator, etc.

(2) The output (Y) can be retrieved with the equivalent of 1a contact.

(3) There is no limit to the No. of a contacts and b contacts of the output Yn that can be used in the program.

(4) The output No. is expressed with a hexadecimal.

- 19 -

5. Explanation of Devices

5.3.2 Internal Relays M , G 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 and G

(1) These relays are cleared when the power is turned OFF.

(2) There is no limit to the No. of a contacts and b contacts of the input relays that can be used in the program.

(3) The internal relay No. is expressed with a decimal.

Internal relay F

Internal relay F is an interface for the alarm message display.

Use the bit selection parameter to determine whether to use this relay for the alarm message

interface. The target will be F0 to F127. This internal relay can be used in the same manner as the

internal relay M when not used as the alarm message interface.

Latch relay L

(1) The original state is held even when the power is turned OFF.

(2) There is no limit to the No. of a contacts and b contacts of the latch relay that can be used in the program.

(3) The latch No. is expressed with a decimal.

5.3.3 Special Relays E

The special relays are relays having fixed applications such as the carrier flag for operation results and the display request signal to the CRT setting and display unit. Even the relays of E0 to E127 that are not currently used must not be used as temporary memory.

Special relays E

(1) These relays are cleared when the power is turned OFF.

(2) There is no limit to the No. of a contacts and b contacts of the special relays that can be used in the program.

(3) The special relay No. is expressed with a decimal.

- 20 -

5. Explanation of Devices

5.3.4 Timer T, Q

(1) The 100ms timer, 10ms timer and 100ms timer cumulative timer are available for this count-up type timer.

100ms Timer T, Q

(1) When the input conditions are set, the count starts. When the set value is counted, that timer contact will turn ON.

(2) If the input conditions are turned OFF, the 100ms timer count value will be set to 0, and the contact will turn OFF.

(3) The value is set with a decimal, and can be designated from 1 to 32767 (0.1 to 3276.7 sec.).

The data register (D) data can also be used as the setting value. File register (R) cannot be used.

10ms Timer T, Q

(1) When the input conditions are set, the count starts. When the set value is counted, that timer contact will turn ON.

(2) If the input conditions are turned OFF, the 10ms timer count value will be set to 0, and the contact will turn OFF.

(3) The value is set with a decimal, and can be designated from 1 to 32767 (0.01 to 327.67 sec.).

The data register (D) data can also be used as the setting value. File register (R) cannot be used.

- 21 -

5. Explanation of Devices

100ms Cumulative timer T, Q

(1) When the input conditions are set, the count starts. When the set value is counted, that timer contact will turn ON.

(2) Even the input conditions are turned OFF, the 100ms cumulative timer current value (count value) will be held, and the contact state will not change.

(3) The 100ms cumulative timer count value will be set to 0 and the contact will turn OFF when the RST command is executed.

(4) The value is set with a decimal, and can be designated from 1 to 32767 (0.1 to 3267.7 sec.). The data register (D) data can also be used as the setting value. File register (R) cannot be used.

(5) When the bit selection parameter is set, the 100ms cumulative timer current value (count value) will be held even when the power is turned OFF.

(2) Setting of timer setting value from CRT setting and display unit

The timer setting value can be set with the CRT setting and display unit using device T. (Variable timer)

Whether the setting value (Kn) programmed with the sequence program or the setting value set from the CRT setting and display unit is valid is selected with the bit selection parameters. The changeover is made in a group for T0 to T103. Even when set from the CRT setting and display unit, the setting value (Kn) program will be required in the sequence program. However, the Kn value will be ignored. When the data register (D) is used for the setting value, the data register

(D) details will be used as the setting value regardless of the parameter.

Note) The setting value for device Q of the timer T, Q cannot be set from the CRT setting and display unit.

- 22 -

5. Explanation of Devices

5.3.5 Counter C, B

(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, B

(1) 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. File register (R) cannot be used.

(2) The counter count value will not be cleared even if the input conditions turn OFF. The counter count value must be cleared with the RST command.

(3) When the bit selection parameter is set, the counter current value (count value) will be held even when the power is turned OFF.

(2) Setting of counter setting value from CRT setting and display unit

The counter setting value can be set with the CRT setting and display unit using device C.

(Variable counter)

Whether the setting value (Kn) programmed with the sequence program or the setting value set from the CRT setting and display unit is valid is selected with the bit selection parameters. The changeover is made in a group for C0 to C23. Even when set from the CRT setting and display unit, the setting value (Kn) program will be required in the sequence program. However, the Kn value will be ignored. When the data register (D) is used for the setting value, the data register

(D) details will be used as the setting value regardless of the parameter.

Note) The setting value for device B of counter C, B cannot be set from the CRT setting and display unit.

5.3.6 Data Register D

(1) The data register is the memory that stores the data in the PLC.

(2) The data 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. The data register No. designated with the 32-bit command will be the low-order 16-bit, and the designated data register No. +1 will be the high-order 16-bit.

(Example) Use of the DMOV command is shown below.

(3) The data that is stored once in the sequence program is held until other data is stored.

(4) The data stored in the data register is cleared when the power is turned OFF.

(5) Values that can be stored: Decimal -32768 to 32767 } For 16-bit command (Using Dn)

Hexadecimal 0 to FFFF

Hexadecimal 0 to FFFFFFFF

(6) Data registers D0 to D1023 are all user release data registers.

(Using Dn+1, Dn)

- 23 -

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. The file register No. designated with the 32-bit command will be the low-order 16-bit, and the designated file register No. +1 will be the high-order 16-bit.

(Example) Use of the DMOV command is shown below.

(3) The data that is stored once in the sequence program is held until other data is stored.

(4) The data stored in the file registers R500 to R549 and R1900 to R2799 and the user release registers R1900 to R2799 is not cleared when the power is turned OFF.

The other file registers have fixed applications such as interface of the PLC and controller, parameter interface, etc.

(5) Values that can be stored: Decimal -32768 to 32767 } For 16-bit command (Using Rn)

Hexadecimal 0 to FFFF

Hexadecimal 0 to FFFFFFFF

(Using Rn+1, Rn)

- 24 -

5. Explanation of Devices

5.3.8 Accumulator A

(1) The accumulator is a data register that stores the results of the function command operation and the function commands where the operation results are stored are as follow.

Commands

SER, SUM, ROR, DROR, RCR, DRCR, ROL, DROL, RCL, DRCL

(2) When using commands other than those above, the accumulator can be used in the sequence program with the equivalent registers as the data registers.

(3) The accumulator has a 1-point 16-bit configuration, and can be read and written in 16-bit units.

(4) The accumulator has two points (A0, A1). With the 32-bit command, A0 will be the low-order

16-bit, and A1 will be the high-order 16-bit. Thus, A1 cannot be designated with a 32-bit command.

(5) The data stored in the accumulator is cleared when the power is turned OFF.

(6) Values that can be stored: Decimal -32768 to 32767 } For 16-bit command (Using A1 or A0)

Hexadecimal 0 to FFFF

Decimal -2147483648 to 2147483647 } For 32-bit command

Hexadecimal 0 to FFFFFFFF (Using A1 or A0)

5.3.9 Index Registers Z and V

(1) Z and V index registers are available.

(2) The index registers are used as ornaments for the device (T, C, D, R).

(3) The index register has a 1-point 16-bit configuration, and can be read and written in 16-bit units.

(4) The data stored in the index register is cleared when the power is turned OFF.

(5) Values that can be stored: Decimal -32768 to 32767

Hexadecimal 0 to FFFF

Note) The CRT display of the index registers Z and V is as shown below.

- 25 -

5. Explanation of Devices

5.3.10 Nesting N

(1) This indicates the master control nesting structure.

(2) The master control nesting (N) is used in order from smallest number.

(1) The conditions for each master control to turn ON are as follow.

MC N0 M15 .......... ON when condition A is ON

MC N2 M16 .......... ON when conditions A, B are ON

MC N2 M17 .......... ON when conditions A, B, C are ON

(2) The timer and counter when the master control is OFF is as follows.

· 100ms timer, 10ms timer: The count value is set to 0.

· 100ms cumulative timer : The current count value is retained.

· Counter: The current counter value is retained.

· OUT command: All turn OFF.

5.3.11 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 and P255 are user release pointers.

(3) P255 always indicates END.

(P255 can be used as a device such as a CJ command, but cannot be used as a label. This cannot be used for the CALL command device.)

- 26 -

5. Explanation of Devices

(4) The special usages of the pointers other than P255 are shown below.

P251: Label for starting PLC high speed processing program.

P252: Label for starting PLC main (ladder) processing program.

This can be omitted when there is only a PLC main (ladder) processing program.

P128 to P159: Label for page return when printing out ladder diagram.

P128 to P159 are the head label of the return page. These can also be used as the normal CJ and CALL commands.

1) P251 and P252 cannot be used as CJ or CALL command devices.

(Note

jumped to from the PLC main processing program.

(Note

The PLC will not operate correctly if Notes 1 to 3 are not observed.

5.3.12 Decimal Constant K

(1) The decimal constant can be used in the following ways.

1) Timer counter setting value: Designate in the range of 1 to 32767.

2) Pointer No.: 0 to 159

3) Bit device digit designation: 1 to 8

4) Basic command, function command, exclusive command value setting

· 16-bit command: -32768 to 32767

· 32-bit command: -2147483648 to 2147483647

(2) The decimal constant is stored in the BIN value (binary) in the PLC.

5.3.13 Hexadecimal Constant H

(1) The hexadecimal constant is used to designate the basic command, function command and exclusive command values.

· 16-bit command: 0 to FFFF

· 32-bit command: 0 to FFFFFFFF

- 27 -

6. Explanation of Commands

6. Explanation of Commands

6.1 Command List

6.1.1 Basic Commands

Class

Pro-

cess

unit

Symbol

L D

LDI

AND

ANI

O R

ORI

Basic command

Bit

ANB

ORB

OUT

SET

RST

M C

MCR

PLS

PLF

SFT

MPS

MRD

MPP

DEFR

- 28 -

No.

of

steps

Page

1 39

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

(B contact serial connection)

Logical OR

(A contact parallel connection)

Logical OR denial

(B contact parallel connection)

AND between logical blocks (Serial connection between blocks)

OR between logical blocks

(Parallel connection between blocks)

1 39

1 41

1 41

1 43

1 43

1 45

1 47

Device output

Device set

2 55

Device reset

2 57

Master control start

3 59

Master control release

2 59

Generate one cycle worth of pulses at rising edge of input signal

2 61

Generate one cycle worth of pulses at falling edge of input signal

2 61

2 63

Device 1-bit shift

Registration of logical operation 1 65

Read of operation results registered in MPS 1 65

Reading and resetting of operation results registered in MPS

1 65

Generate one cycle worth of pulses to oper-ation results at rising edge of input signal

1 67

6.1.2 Function Commands

(1)

Class

Pro-

cess

unit

LD =

16-bit

AND =

=

OR =

LDD =

32-bit

ANDD=

ORD =

LD >

16-bit

AND >

>

OR >

LDD >

32-bit

ANDD>

ORD >

LD <

16-bit

AND <

<

OR <

LDD <

32-bit

ANDD<

ORD <

6. Explanation of Commands

Symbol

No.

of

steps

Page

Continuity state when (S1) = (S2)

Non-continuity state when (S1) =/ (S2)

Continuity state when

(S1+1, S1)=(S2+1, S2)

Non-continuity state when

(S1+1, S1) = (S2+1, S2)

Continuity state when (S1) > (S2)

Non-continuity state when (S1) <= (S2)

Continuity state when

(S1+1, S1) > (S2+1, S2)

Non-continuity state when

(S1+1, S1) <= (S2+1, S2)

Continuity state when (S1) < (S2)

Non-continuity state when (S1) >= (S2)

Continuity state when

(S1+1, S1) < (S2+1, S2)

Non-continuity state when

(S1+1, S1) >= (S2+1, S2)

3 70

3 70

3~4 72

3~4 72

3~4 72

3 74

3 74

3 74

3~4 76

3~4 76

3~4 76

3 78

3 78

3 78

3~4 80

3~4 80

3~4 80

- 29 -

6. Explanation of Commands

(2) Arithmetic operation commands

Class

Pro-

cess

unit

Symbol

+

+

16-bit

32-bit

D+

16-bit

32-bit

D–

*

16-bit

32-bit

*

D*

/

16-bit

32-bit

/

D/

+1

16-bit

32-bit

INC

DINC

16-bit

–1

32-bit

(3)

Class

Pro-

cess

unit

16-bit

BCD

32-bit

16-bit

BIN

32-bit

DEC

DDEC

BCD

DBCD

BIN

DBIN

Symbol

(S1) + (S2) (D)

(S1+1, S1) + (S2+1, S2) (D+1, D)

(S1) – (S2) (D)

(S1+1, S1) – (S2+1, S2) (D+1, D)

(S1) x (S2) (D+1, D)

(S1+1, S1) x (S2+1, S2)

(D+3, D+2, D+1, D)

(S1)

.

=

(S2) (D)

Quotient (D) Remainder (D+1)

(S1+1, S1)

.

=

(S2+1, S2)

Quotient (D+1,D) Remainder (D+3, D+2)

(D) + 1 (D)

(D+1, D) + 1 (D + 1, D)

(D) – 1 (D)

(D + 1, D) – 1 (D + 1, D)

No.

of

steps

Page

4 82

4~5 84

4 86

4~5 88

4 90

4~5 92

4 94

4~5 96

2 98

(S)

BCD conversion

BIN (0~9999)

(D)

BCD conversion

(D+1, D)

BIN (0~99999999)

(S)

BIN conversion

BCD (0~9999)

(D)

BIN conversion

(D+1, D)

BCD (0~99999999)

No.

of

step

Page

- 30 -

6. Explanation of Commands

(4) Data transmission commands

Class

Pro-

cess

unit

Symbol

16-bit

MOV

32-bit

Con- ver- sion

16-bit

32-bit

Batch transmis-si on

16-bit

DMOV

XCH

DXCH

BMOV

Batch trans- mission of same data

16-bit

FMOV

(5) Program branch commands

Class

Pro-

cess

unit

Symbol

Jump — CJ

Pro-gr am end

Sub-r ou-tin e call

Re-tur n

FEND

CALL

RET

No.

of

step

Page

(S) (D)

(S+1, S) (D+1, D)

(D1) (D2)

(D1 + 1, D1) (D2 + 1, D2)

3~4 116

4 122

4 124

No.

of

step

Page

Jump to P** after input conditions are set 2

126

End process during sequence program 1 128

Execute P** sub-routine program after input conditions are set

Return to main program from subroutine program

2

130

- 31 -

6. Explanation of Commands

(6) Logical operation commands

Class

Pro-

cess

unit

Symbol

Logical

AND

16-bit

32-bit

16-bit

Logical

OR

32-bit

WAND

DAND

WOR

DOR

Exclu-si ve OR

16-bit

32-bit

Com-ple ment of

2

16-bit

WXOR

DXOR

NEG

No.

of

step

Page

(S1) ^ (S2) (D)

(D + 1, D) ^ (S + 1, S) (D + 1, D)

(S1) V (S2) (D)

(D + 1, D) V (S + 1, S) (D + 1, D)

(S1) V– (S2) (D)

(D + 1, D) (S + 1, S) (D + 1, D)

(D) + 1 (D)

3~4 134

3~4 138

3~4 142

2 144

- 32 -

Left rotation

16-bit

32-bit

Right shift

16-bit

Devic

16-bit

Left shift

Devic

(7)

Class

Pro-

cess

unit

16-bit

Right rotation

32-bit

ROR

RCR

DROR

DRCR

ROL

RCL

DROL

DRCL

SFR

DSFR

SFL

DSFL

Symbol

6. Explanation of Commands

No.

of

step

Page

2 146

2 148

2 150

2 152

2 154

2 156

2 158

2 160

3 162

3 164

3 166

3 168

- 33 -

6. Explanation of Commands

(8) Data processing commands

Class

Search

Pro-

cess

unit

16-bit

SER

Symbol

Number of bits set to 1

16-bit

Decode

2n-bit

16-bit

SUM

DECO

SEG

Average value

16-bit AVE

(9) Other function commands

Class

Pro-

cess

unit

Carry flag set

— STC

Carry flag reset

CLC

LDBIT

Symbol

ANDBIT

BIT

ORBIT

LDBII

ANDBII

ORBII

Process details

16-bit data average value

1 n a

∑ i = 1

(S + i )

→ (D)

No.

of

step

Page

4 170

2 172

4 174

3 176

4 178

Carry flag contact (E12) is turned on.

Carry flag contact (E12) is turned off.

Bit test (a contact operation start handling)

Bit test (a contact series connection handling)

Bit test (a contact parallel connection handling)

Bit test (b contact operation start handling)

Bit test (b contact series connection handling)

Bit test (b contact parallel connection handling)

No.

of

step

Page

1 180

1 180

- 34 -

6.1.3 Exclusive commands

Class

Pro-

cess

unit

ATC —

ATC

ROT — ROT

TSRH —

TSRH

DDB —

DDBA

(Asynchro- nous)

DDBS

(Synchro- nous)

6. Explanation of Commands

Symbol

K1: Tool number search

K2: Tool number AND search

K3: Tool change

K4: Random position tool change

K5: Forward rotation of pointer

K6: Reverse rotation of pointer

K7: Normal rotation of tool table

K8: Reverse rotation of tool table

K9: Tool data read

K10: Tool data write

K11: Automatic write of tool data

K1: Rotary body index

K3: Ring counter

Spare tool selection in tool life management

Data designated after Rn is read/written.

No.

of

step

Page

194

195

196

197

198

4

198

199

199

200

201

202

4

207

210

3 211

2 222

Data designated after Rn is read/written.

2 225

- 35 -

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 as follow.

Example) Explanation of D+ command

D+ ... BIN 32-bit addition The command sign is indicated.

Usable device

Bit device Word (16-bit) device

Con-st ant

Pointer

X Y M L E F T C D R A0 A1 Z V K H P

Digit designation

No. of steps

Index

S1

S2 4/5

D

Expressed

with T.

Same applies

for Q.

A circle is indicated if digit designation of the bit device is possible.

Same applies for B.

Same applies for G.

Same applies for W, J and S.

Same applies for U, I and S.

The devices that can be used with the D+ command are circled.

The No. of steps of the D+ command is indicated. 4/5 steps indicate that for the 32-bit command, two steps are required for the constant.

In the example for the D+ com-mand, if S2 is the word device and step 4 is the constant, the No. of steps will be 5 steps

The commands that can use an index (Z, V) are circled.

Setting

The D+ command circuit display format is indicated.

The functions, execution conditions and program examples of each command are explained on the following pages.

- 36 -

6. Explanation of Commands

6.2.2 No. of Steps

The basic No. of steps in the sequence command includes step 1 to step 5.

Main examples of each step are shown below.

Basic No.

of steps

Command

display

LD, ANI, ANB, ORB,

STC, CLC, FEND, RET, P**

INC, DEC, SET, RST,

OUT T, CJ, CALL, DDB

MOV, =, BCD, XCH

DMOV, +, -, ATC

D+, D-, D*, D/

As shown above, the command code, source and destination in basic No. of steps for the command are equivalent to one step each. Only the 32-bit command constant K or H uses two steps.

(Note) If the constant value in the DMOV or D* command, etc., is small, a display in which there is a space equivalent to one step will occur between the source (S) and destination (D) or between the source (S2) and destination (D). (Section marked with * in diagram. v

*

*

6.2.3 END Command

When programming a sequence program with a circuit mode, the END command is automatically created.

- 37 -

6. Explanation of Commands

6.2.4 Index Ornament

(1) The index ornament is used to add an index (Z, V) to a device, add the details of the directly designated device No. and index register, and designate the device No.

(2) The index (Z, V) can be set between -32768 to 32767 with a sign added.

(3) The index ornament is used only for the MOV command. (It cannot be used for DMOV.)

(4) The usable command format is shown below.

1) Transmission of data to Z, V

1) After circuit conversion, the display will change to Z0 and V0. However, this must be input as "Z" and "V".

2) Possible device combinations of MOV command with index ornament

Constant

Kn or Hn

MOV K100 D0Z

Example) D0, R1900

(Word device)

⋅ Z

Example) D0Z, R500V

(Word device)

⋅ Z

Example) D0Z, R500V

(Word device)

⋅ Z

Example) D0V, D1Z

MOV D0 D100V

MOV D0Z D20Z

(Word device)

⋅ Z

Example) D0Z, D1V

Bit designation

Example) K2Y20

MOV D0Z K2M10

Example) K2M00

(Word device)

⋅ Z

Example) D0Z, R1900V

MOV K2M10 D0Z

2) The word device refers to T, C, D, R, A0 and A1.

3) The CRT display of the circuit with index ornament is as shown below.

- 38 -

6. Explanation of Commands

6.2.5 Digit Designation

A digit may need to be designated for the bit device (X, Y, M, L, E, 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.

Use device K when designating the digit. The designation range is as shown below. A random bit device can be set for the bit device.

(a) 16-bit command: K1 to 4 (4 to 16 points)

(Example) Setting range with digit designation of X0 to F 16-bit data

(b) 32-bit command: K1 to 8 (4 to 32 points)

(Example) Setting range with digit designation of X0 to 1F 32-bit data.

- 39 -

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.

K1 (4 points)

Table of digit designations and values that can be handled

For 16-bit command For 32-bit command

0~15 0~15

K2 (8 points)

K3 (12 points)

0~255

0~4095

0~255

0~4095

K4 (16 points)

K5 (20 points)

K6 (24 points)

K7 (28 points)

K8 (32 points)

-32768~32767

0~65535

0~1048575

0~167772165

0~268435455

-2147483648~2147483647

For 16-bit command

Process

For 32-bit command

- 40 -

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.

When source data (S) is a value

Process

When source (S) data is a bit device

When source (S) data is a word device

(Note) The CRT display of the circuit having a digit designation will be as follows.

- 41 -

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.

- 42 -

LD, LDI

LD, LDI ... Operation start

Usable device

Bit device Word (16-bit) device

Con-sta nt

Pointer

Level

X Y M L E F T C D R A0 A1 Z V K H P N

Digit designation

No. of steps Index

1

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.

Execution conditions

This is executed per scan regardless of the device ON/OFF setting.

- 43 -

LD, LDI

Program example

(1) Program used at head of circuit block.

Coding

No. of

steps

Com-

mand

Device

0 LD M32

1 OUT Y10

2 LDI M32

3 OUT Y11

(2) Program used at head of circuit block connected with ANB.

Coding

No. of

steps

Com-

mand

Device

99 LD X0

100 LD M9

101 AND M13

102 ORI M35

104 OUT Y99

(3) Program used at head of circuit block connected with ORB.

Coding

No. of

steps

Com-

mand

Device

93 LD X8

94 AND M1

95 LD X12

96 ANI M60

98 OUT M99

- 44 -

AND, ANI

AND, ANI ... Serial connection of contact

Usable device

Bit device Word (16-bit) device

Con-sta nt

Pointer

Level

X Y M L E F T C D R A0 A1 Z V K H P N

Digit designation

No. of steps Index

1

Function

AND is the a contact serial connection command, and ANI is the b contact serial connection command. The ON/OFF information of the designated device is read in, and the AND operation with the operation results up to that point is executed. The result is the operation result.

Execution conditions

This is executed per scan regardless of the operation results before the AND, ANI commands.

- 45 -

AND, ANI

Program example

(1) Program used after LD, LDI, AND or ANI, etc.

Coding

No. of

steps

Com-

mand

Device

0 LD X3

1 AND M6

2 LDI X4

3 ANI M7

5 ANI M9

6 OUT Y33

7 LD X5

8 LD M8

9 OR M9

11 ANI M11

12 OUT Y34

(2) Program used to connect contact in parallel with coil.

Coding

No. of

steps

Com-

mand

Device

93 LD X5

94 OUT Y35

95 AND X8

96 OUT Y36

97 ANI X9

98 OUT Y37

- 46 -

OR, ORI

OR, ORI ... Parallel connection of one contact

Usable device

Bit device Word (16-bit) device

Con-sta nt

Pointer

Level

X Y M L E F T C D R A0 A1 Z V K H P N

Digit designation

No. of steps Index

1

Function

OR is the one a contact parallel connection command, and ORI is the one b contact parallel connection operation command. The ON/OFF information of the designated device is read in, and the

OR operation with the operation results up to that point is executed. The result is the operation result.

Execution conditions

This is executed per scan regardless of the operation results before the OR, ORI commands.

- 47 -

Program example

(1) Program used at head of circuit block.

(2) Program used in circuit.

OR, ORI

Coding

No. of

steps

Com-

mand

Device

0 LD X3

1 OR X4

2 OR X5

3 OUT Y33

4 LD X5

5 AND M11

6 ORI X6

7 OUT Y34

Coding

No. of

steps

Com-

mand

Device

93

94

95

96

97

98

99

103

104

105

- 48 -

ANB

ANB ... Serial connection of circuit block

Usable device

Bit device Word (16-bit) device

Con-sta nt

Pointer

Level

X Y M L E F T C D R A0 A1 Z V K H P N

Digit designation

No. of steps Index

1

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.

(3) When consecutively writing ANB, a max. of 7 commands (8 blocks) can be written. The PC cannot execute a correct operation if 8 or more commands are written consecutively.

- 49 -

Program example

Program that serially connects continuous circuit blocks.

ANB

Coding

No. of

steps

Com-

mand

Device

0 LD X0

1 OR X1

2 LD X2

3 OR X3

5 LD X4

6 OR X5

8 LD X6

9 OR X7

11 LD X8

12 OR X9

14 OUT M7

- 50 -

ORB

ORB ... Parallel connection of blocks

Usable device

Bit device Word (16-bit) device

Con-sta nt

Pointer

Level

X Y M L E F T C D R A0 A1 Z V K H P N

Digit designation

No. of steps Index

1

Function

(1) OR operation of the A block and B block is executed, and the operation results are obtained.

(2) ORB connects circuit blocks with two or more contacts in parallel. Use OR or ORI to connect circuit blocks with only one contact in parallel.

Coding

No. of

steps

Com-

mand

Device

0 LD X0

1 AND X1

2 LD X2

3 AND X3

5 ORI X4

6 OUT Y10

(3) The ORB symbol is a connection symbol instead of a contact symbol.

(4) When consecutively writing ORB, a max. of 7 commands (8 blocks) can be written. The PC cannot execute a correct operation if 8 or more commands are written consecutively.

- 51 -

ORB

Program example

Program that connects continuous circuit blocks in parallel.

Coding

No. of

steps

Com-

mand

Device

0 LD X0

1 AND X1

2 LD X2

3 AND X3

5 LD X4

6 AND X5

8 LD X6

9 AND X7

11 OUT M7

- 52 -

OUT (Y, M, G, L, E, F)

OUT (Y, M, G, L, E, F) ... Output (Y, M, G, L, E, F)

Usable device

Bit device Word (16-bit) device

Con-sta nt

Pointer

Level

X Y M L E F T C D R A0 A1 Z V K H P N

Digit designation

No. of steps Index

1

Function

The operation results before the OUT command are output to the designated device.

Operation

results Coil

Contact

a

contact

Execution condition

This is executed per scan regardless of the operation results before the OUT command.

- 53 -

OUT (Y, M, G, L, E, F)

Program example

(1) Program output to output unit.

Coding

No. of

steps

Com-

mand

Device

0 LD X5

1 OUT Y33

2 LD X6

3 OUT Y34

4 OUT Y35

(2) Program that turns internal relay or latch relay ON/OFF.

Coding

No. of

steps

Com-

mand

Device

93 LD X5

94 OUT M15

95 LDI X5

96 OUT L19

97 OUT M90

98 LD X7

99 AND X8

100 OUT F0

- 54 -

OUT T, Q

OUT T, Q ... Timer output

Usable device

Bit device Word (16-bit) device

Con-st ant

Pointer

X Y M L E F T C D R A0 A1 Z V K H P

Level

N

Digit designation

No. of steps Index

Device

Setting

value

2

Function

(1) When the operation results before the OUT command are ON, the timer coil will turn ON and count to the set value. When the time is counted up (count value ³ set value), the contacts will change as shown below.

a contact Continuity

b contact Non-continuity

(2) If the operation results before the OUT command turn ON to OFF, the following will occur.

Timer

Timer coil

Timer current

value

Before time up After time up

a contact b contact a contact b contact

100ms timer

OFF

10ms timer

100ms cumulative timer

0

Non-conti nuity

Non-conti nuity

Continuity Continuity Non-conti nuity

Continuity Continuity Non-conti nuity

(3) The state of the cumulative timer contact after time up will not change until the RST command is executed.

- 55 -

OUT T, Q

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

steps

Com-

mand

Device

0 LD X0

1 OUT T1 K100

3 LD T1

4 OUT Y10

5 OUT Y14

(2) Program to use X10 to 1F BCD data as timer setting value.

Coding

No. of

steps

Com-

mand

Device

1 BIN K4X10 D10

5 OUT T2 D10

- 56 -

OUT C, B

OUT C, B ... Counter output

Usable device

Bit device Word (16-bit) device

Con-st ant

Pointer

X Y M L E F T C D R A0 A1 Z V K H P

Level

N

Digit designation

No. of steps Index

Device

Setting

value

2

Function

(1) If the operation results before the OUT command change from OFF to ON, the current value

(count value) will be incremented by one. When the value is counted up (current value ³ setting value), the contacts will change as shown below.

a contact Continuity

b contact Non-continuity

(2) The value will not be counted when the operation results are ON. (A pulse change is not required to input the count.)

(3) If the operation results change from OFF to ON after the current value >= setting value is established, the contact state will remain the same and the current value will not be counted up.

Execution condition

This is executed per scan regardless of the operation results before the OUT command.

- 57 -

OUT C, B

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

steps

Com-

mand

Device

0 LD X0

1 OUT C10 K10

3 LD C10

4 OUT Y30

5 LD X1

6 RST C10

(2) Program to set C10 setting value to 10 when X0 turns ON, and to 20 when X1 turns ON.

Coding

No. of

steps

Com-

mand

Device

0 LD X0

1 MOV K10 D0

4 LD X1

5 MOV K20 D0

8 LD X3

9 OUT C10 D0

11 LD C10

12 OUT Y30

- 58 -

SET

SET ... Device setting (ON)

D

Usable device

Bit device Word (16-bit) device

Con-st ant

Pointer

Level

X Y M L E F T C D R A0 A1 Z V K H P N

Digit designation

No. of steps Index

2

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. The device can be turned

OFF with the RST command.

(3) If the SET input is OFF, the state of the device will not change.

Execution condition

The execution conditions for the SET command are as shown below.

- 59 -

SET

Program example

(1) Program to set Y8B (ON) when X8 turns ON, and reset Y8B (OFF) when X9 turns ON.

Coding

No. of

steps

Com-

mand

Device

0 LD X9

1 RST Y8B

3 LD X8

4 SET Y8B

Operation of SET and RST commands

- 60 -

RST

RST ... Device resetting

D

Usable device

Bit device Word (16-bit) device

Con-st ant

Pointer

Level

X Y M L E F T C D R A0 A1 Z V K H P N

Digit designation

No. of steps Index

2

Function

(1) The designated device will change as explained below when the RST input turns ON.

Device Status

Y, M, E, F, L

W, J, S, G

The coil and contact are turned OFF.

T, C, Q, B 0 is set for the current value, and the coil and contact are turned OFF.

(2) If the RST input is OFF, the state of the device will not change.

Execution condition

The execution conditions for the RST command are as shown below.

- 61 -

Program example

(1) Program to reset 100ms cumulative timer and counter.

RST

Coding

No. of

steps

Com-

mand

Device

0 LD X4

1 OUT T96 K18000

3 LD T96

4 OUT C23 K16

6 RST T96

8 LD C23

9 OUT Y55

10 LD X5

11 RST C23

- 62 -

MC, MCR

MC, MCR ... Master control set/reset

n

D

Usable device

Bit device Word (16-bit) device

Con-st ant

Pointer

Level

X Y M L E F T C D R A0 A1 Z V K H P N

Digit designation

No. of steps Index

2/3

Function

MC

(1) If the MC ON/OFF command is ON when the master control starts, the operation results between

MC and MCR will remain the same.

(2) If the MC ON/OFF command is OFF, the operation results between MC and MCR will be as follows.

10ms

timer

Count value is set to 0

Current count value is held

All become

OFF

SET/RST SFT

The state is retained

(3) Up to eight (N0 to 7) nests can be used. When using nests, the MC will use the nesting (N) from the smallest No., and MCR will use from the largest No.

(4) The program between the MC command and MCR command will be scanned regardless of the

MC command ON/OFF state.

(5) By changing the destination D device, the MC command can be used as often as necessary in one scan.

(6) When the MC command is ON, the coil for the device designated for the destination will turn ON.

- 63 -

MC, MCR

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.

Program example

(1) Program to turn MC ON when X9 is ON and turn MC OFF when OFF.

- 64 -

Coding

No. of

steps

Com-

mand

Device

0 LD X9

1 MC N0 M98

4 LD X10

5 OUT Y30

6 LD X11

7 OUT Y31

8 LD X12

9 OUT Y32

10 LD X13

11 OUT Y33

12 MCR N0

PLS, PLF

PLS, PLF ... Pulse (1 scan ON)

D

Usable device

Bit device Word (16-bit) device

Con-st ant

Pointer

Level

X Y M L E F T C D R A0 A1 Z V K H P N

Digit designation

No. of steps Index

2

Function

PLS

(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.

(2) Even if the sequence program is changed from RUN to STOP and then RUN after the PLS command is executed, the PLS command will not be executed. If the PLS command is ON when the power is turned ON, the PLS command will be executed.

PLF

(1) The designated device is turned ON for one scan when the PLF command changes from ON to

OFF and is turned OFF in all other cases.

- 65 -

PLS, PLF

(2) Even if the sequence program RUN switch is changed from RUN to STOP and then RUN after the PLF command is executed, the PLF command will not be executed.

Program example

(1) Program to execute PLS command when X9 turns ON.

Coding

No. of

steps

Com-

mand

Device

0 LD X9

1 PLS M9

(2) Program to execute PLF command when X9 turns OFF.

Coding

No. of

steps

Com-

mand

Device

0 LD X9

1 PLF M9

- 66 -

SFT

SFT ... Device shift

D

Usable device

Bit device Word (16-bit) device

Con-st ant

Pointer

Level

X Y M L E F T C D R A0 A1 Z V K H P N

Digit designation

No. of steps Index

2

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.

(2) Turn the head device to be shifted ON with the SET command.

(3) When using SFT in succession, program from the largest device No.

Operation of shift command

- 67 -

Program example

(1) Program to shift Y57 to 5B when X8 turns ON.

SFT

- 68 -

Coding

No. of

steps

Com-

mand

Device

0 LD X8

1 SFT Y5B

3 SFT Y5A

5 SFT Y59

7 SFT Y58

9 LD X7

10 PLS M8

12 LD M8

13 SET Y57

MPS, MRD, MPP

MPS, MRD, MPP ... Registering, reading and clearing of operation results

Usable device

Bit device Word (16-bit) device

Con-sta nt

Pointer

Level

X Y M L E F T C D R A0 A1 Z V K H P N

Digit designation

No. of steps Index

1

Function

MPS

(1) The operation results (ON/OFF) just before the MPS command are registered.

(2) The MPS command can be used consecutively up to four times. If the MPP command is used in between, the No. of MPS usages will be decremented by one.

MRD

(1) The operation results registered with the MPS command are read, and the operation is continued from the next step using those operation results.

MPP

(1) The operation results registered with the MPS command are read, and the operation is continued from the next step using those operation results.

- 69 -

MPS, MRD, MPP

(2) The operation results registered with the MPS command are cleared.

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

Program example

(1) Program using MPS, MRD and MPP.

Coding

steps

0

Com-

mand

Device

LD X1C

2

3

5

6

8

AND M8

OUT Y30

OUT Y31

LD X1D

ANI M9

10

11

AND M68

OUT Y32

13

14

AND T0

OUT Y33

16

17

18

OUT Y34

LD X1E

AND M81

20

21

AND M96

OUT Y35

23

24

AND M97

OUT Y36

26

27

AND M98

OUT Y37

29 OUT Y38

- 70 -

DEFR

DEFR ... Pulses in regard to operation results

Usable device

Bit device Word (16-bit) device

Con-sta nt

Pointer

Level

X Y M L E F T C D R A0 A1 Z V K H P N

Digit designation

No. of steps Index

1

Function

The operation results are turned ON for one scan when the DEFR command is turned from OFF to

ON, and are turned OFF for all other cases.

Execution conditions

This is executed per scan regardless of the operation results to the DEFR command.

- 71 -

DEFR

Program example

(1) Program to turn Y0 ON for one scan when X9 turns ON.

Coding

No. of

steps

Com-

mand

Device

3

(2) Program to execute MOVE command once when X9 turns ON.

Coding

No. of

steps

Com-

mand

Device

2 MOV K0 D10

5

- 72 -

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.

Each command is explained in the following section.

- 73 -

LD=, AND=, OR=

LD=, AND=, OR= .... Comparison of 16-bit data (=)

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

S2

3

Function

(1) 16-bit comparison operation is executed with a contact handling.

(2) The comparison operation results will be as follow.

Conditions Comparison operation results

S1=/S2

Non-continuity state

Execution conditions

The execution conditions for LD=, AND= and OR= are as follow.

LD=

AND=

OR=

Executed per scan

Executed only when previous contact command is ON

Executed per scan

- 74 -

LD=, AND=, OR=

Program example

(1) Program to compare the X0 to F data and D3 data.

Coding

No. of

steps

Com-

mand

Device

0 LD= K4X0 D3

4

(2) Program to compare the BCD value 100 and D3 data.

Coding

No. of

steps

Com-

mand

Device

0 LD M3

(3) Program to compare the BIN value 100 and D3 data.

4 OUT Y33

5

Coding

No. of

steps

Com-

mand

Device

0 LD M3

4 OR M8

6 OUT Y33

7

(4) Program to compare the D0 and D3 data.

Coding

No. of

steps

Com-

mand

Device

0 LD M3

1 AND M8

5 OUT Y33

6

- 75 -

LDD=, ANDD=, ORD=

LDD=, ANDD=, ORD= ... Comparison of 32-bit data (=)

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

S2

3/4

Function

(1) 32-bit comparison operation is executed with a contact handling.

(2) The comparison operation results will be as follow.

Conditions Comparison operation results

S1=/S2

Non-continuity state

Execution conditions

The execution conditions for LDD=, ANDD= and ORD= are as follow.

LDD= Executed per scan

ANDD= Executed only when previous contact command is ON

ORD= Executed per scan

- 76 -

LDD=, ANDD=, ORD=

Program example

(1) Program to compare the X0 to 1F data, D3 and D4 data.

Coding

No. of

steps

Com-

mand

Device

3 OUT Y33

4

(2) Program to compare the BCD value 18000, D3 and D4 data.

Coding

No. of

steps

Com-

mand

Device

1

ANDD= H18000

D3

6

(3) Program to compare the BIN value -80000, D3 and D4 data.

Coding

No. of

steps

Com-

mand

Device

0 LD M3

K-80000

D3

5 OR M8

6 ANB

7 OUT Y33

8

(4) Program to compare the D0, D1, D3 and D4 data.

Coding

No. of

steps

Com-

mand

Device

0 LD M3

1 AND M8

5 OUT Y33

6

- 77 -

LD>, AND>, OR>

LD>, AND>, OR> .... Comparison of 16-bit data (>)

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

S2

3

Function

(1) 16-bit comparison operation is executed with a contact handling.

(2) The comparison operation results will be as follow.

Conditions Comparison operation results

Execution conditions

The execution conditions for LD>, AND> and OR> are as follow.

LD>

AND>

OR>

Executed per scan

Executed only when previous contact command is ON

Executed per scan

- 78 -

LD>, AND>, OR>

Program example

(1) Program to compare the X0 to F data and D3 data.

Coding

No. of

steps

Com-

mand

Device

0 LD> K4X0 D3

4

(2) Program to compare the BCD value 100 and D3 data.

Coding

No. of

steps

Com-

mand

Device

0 LD M3

(3) Program to compare the BIN value 100 and D3 data.

4 OUT Y33

5

Coding

No. of

steps

Com-

mand

Device

0 LD M3

4 OR M8

6 OUT Y33

7

(4) Program to compare the D0 and D3 data.

Coding

No. of

steps

Com-

mand

Device

0 LD M3

1 AND M8

5 OUT Y33

6

- 79 -

LDD>, ANDD>, ORD>

LDD>, ANDD>, ORD> ... Comparison of 32-bit data (>)

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

S2

3/4

Function

(1) 32-bit comparison operation is executed with a contact handling.

(2) The comparison operation results will be as follow.

Conditions Comparison operation results

Execution conditions

The execution conditions for LDD>, ANDD> and ORD> are as follow.

LDD> Executed per scan

ANDD> Executed only when previous contact command is ON

ORD> Executed per scan

- 80 -

LDD>, ANDD>, ORD>

Program example

(1) Program to compare the X0 to 1F data, D3 and D4 data.

Coding

No. of

steps

Com-

mand

Device

3 OUT Y33

4

(2) Program to compare the BCD value 18000, D3 and D4 data.

Coding

No. of

steps

Com-

mand

Device

1 ANDD> H18000

D3

6

(3) Program to compare the BIN value -80000, D3 and D4 data.

Coding

No. of

steps

Com-

mand

Device

0 LD M3

K-80000

D3

5 OR M8

6 ANB

7 OUT Y33

8

(4) Program to compare the D0, D1, D3 and D4 data.

Coding

No. of

steps

Com-

mand

Device

0 LD M3

1 AND M8

5 OUT Y33

6

- 81 -

LD<, AND<, OR<

LD<, AND<, OR< .... Comparison of 16-bit data (<)

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

S2

3

Function

(1) 16-bit comparison operation is executed with a contact handling.

(2) The comparison operation results will be as follow.

Conditions Comparison operation results

Execution conditions

The execution conditions for LD<, AND< and OR< are as follow.

LD<

AND<

OR<

Executed per scan

Executed only when previous contact command is ON

Executed per scan

- 82 -

LD<, AND<, OR<

Program example

(1) Program to compare the X0 to F data and D3 data.

Coding

No. of

steps

Com-

mand

Device

0 LD< K4X0 D3

4

(2) Program to compare the BCD value 100 and D3 data.

Coding

No. of

steps

Com-

mand

Device

0 LD M3

(3) Program to compare the BIN value 100 and D3 data.

4 OUT Y33

5

Coding

No. of

steps

Com-

mand

Device

0 LD M3

4 OR M8

6 OUT Y33

7

(4) Program to compare the D0 and D3 data.

Coding

No. of

steps

Com-

mand

Device

0 LD M3

1 AND M8

5 OUT Y33

6

- 83 -

LDD<, ANDD<, ORD<

LDD<, ANDD<, ORD< ... Comparison of 32-bit data (<)

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

S2

3/4

Function

(1) 32-bit comparison operation is executed with a contact handling.

(2) The comparison operation results will be as follow.

Conditions Comparison operation results

Execution conditions

The execution conditions for LDD<, ANDD< and ORD< are as follow.

LDD< Executed per scan

ANDD< Executed only when previous contact command is ON

ORD< Executed per scan

- 84 -

LDD<, ANDD<, ORD<

Program example

(1) Program to compare the X0 to 1F data, D3 and D4 data.

Coding

No. of

steps

Com-

mand

Device

3 OUT Y33

4

(2) Program to compare the BCD value 18000, D3 and D4 data.

Coding

No. of

steps

Com-

mand

Device

1 ANDD< H18000

D3

6

(3) Program to compare the BIN value -80000, D3 and D4 data.

Coding

No. of

steps

Com-

mand

Device

0 LD M3

K-80000

D3

5 OR M8

6 ANB

7 OUT Y33

8

(4) Program to compare the D0, D1, D3 and D4 data.

Coding

No. of

steps

Com-

mand

Device

0 LD M3

1 AND M8

5 OUT Y33

6

- 85 -

+

+ ... BIN 16-bit addition

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

S2

D

4

Function

(1) The BIN data designated with S1 and the BIN data designated with S2 are added, and the addition results are stored in the device designated with D.

(2) -32768 to 32767 (BIN 16-bit) can be designated in S1 and S2.

(3) The positive/negative of the data in S1, S2 and D is determined with the highest-order bit (B15).

B15

positive/negative

0 Positive

1 Negative

(4) The carry flag will not turn ON if the 15th bit overflows.

- 86 -

Execution conditions

The execution conditions for + are as shown below.

+

Program example

(1) Program to add the D0 BIN data and D10 BIN data and output to D20.

Coding

No. of

steps

Com-

mand

Device

0 LD M0

1 + D0 D10 D20

- 87 -

D+

D+ ... BIN 32-bit addition

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

S2

D

4/5

Function

(1) The BIN data designated with S1 and the BIN data designated with S2 are added, and the addition results are stored in the device designated with D.

(2) -2147483648 to 2147483647 (BIN 32-bit) can be designated in S1 and S2.

(3) The positive/negative of the data in S1, S2 and D is determined with the highest-order bit (B31).

B31

positive/negative

0 Positive

1 Negative

(4) The carry flag will not turn ON if the 31st bit overflows.

- 88 -

Execution conditions

The execution conditions for D+ are as shown below.

D+

Program example

(1) Program to add the D0, 1 data and D9, 10 data when X0 turns ON, and output the results to D20,

21.

Coding

No. of

steps

Com-

mand

Device

0 LD X0

1 D+ D0 D9 D20

5

(2) Program to add the A0, A1 data and D0, D1 data when XB turns ON, and output the results to

D10, D11.

Coding

No. of

steps

Com-

mand

Device

0 LD X0

1 D+ D0 A0 D10

5

- 89 -

– ... BIN 16-bit subtraction

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

S2

D

4

Function

(1) The device designated with S1 and the device designated with S2 are subtracted, and the subtracted results are stored in the device designated with D.

(2) -32768 to 32767 (BIN 16-bit) can be designated in S1 and S2.

(3) The positive/negative of the data in S1, S2 and D is determined with the highest-order bit (B15).

B15

positive/negative

0 Positive

1 Negative

(4) The carry flag will not turn ON if the 0 bit underflows.

- 90 -

Execution conditions

The execution conditions for - are as shown below.

Program example

(1) Program to subtract the BIN data from D3 to D10 and output to D20.

Coding

No. of

steps

Com-

mand

Device

0 LD M0

1 - D3 D10 D20

5

(2) Program to BCD output the difference of the timer T3 setting value and current value to D20.

Coding

No. of

steps

Com-

mand

Device

0

OUT K18000

3

K18000

D2

7 - D2 T3 D3

14

- 91 -

D–

D– ... BIN 32-bit subtraction

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

S2

D

4/5

Function

(1) The device designated with S1 and the device designated with S2 are subtracted, and the subtracted results are stored in the device designated with D.

(2) -2147483648 to 2147483647 (BIN 32-bit) can be designated in S1 and S2.

(3) The positive/negative of the data in S and D is determined with the highest-order bit (B31).

B31

of

positive/negative

0 Positive

1 Negative

(4) The carry flag will not turn ON if the 0 bit underflows.

- 92 -

Execution conditions

The execution conditions for D- are as shown below.

D–

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. Program to subtract the D0, 1 data from D10, 11 data when X2 turns ON, and output the results to D97, 98.

Coding

No. of

steps

Com-

mand

Device

0 LD X1

1 D- D10 D0 D99

5 LD X2

6 D- D10 D0 D97

10

- 93 -

*

* ... BIN 16-bit multiplication

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

S2

D

4

Function

(1) The BIN data designated with S1 and the BIN data designated with S2 are multiplied, and the multiplication results are stored in the device designated with D.

(2) -32768 to 32767 (BIN 16-bit) can be designated in S1 and S2.

(3) The positive/negative of the data in S1, S2 and D is determined with the highest-order bit (B15, D is B31).

B15/B31

of

positive/negative

0 Positive

1 Negative

- 94 -

Execution conditions

The execution conditions for * are as shown below.

*

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. of

steps

Com-

mand

Device

0 LD X5

1 * D0 K5678 D3

5

(2) Program to multiple the D0 BIN data and D10 BIN data, and output the results to D20.

Coding

No. of

steps

Com-

mand

Device

0 LD M0

1 * D0 D10 D20

5

- 95 -

D*

D* ... BIN 32-bit multiplication

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

S2 4/5

D

Function

(1) The BIN data designated with S1 and the BIN data designated with S2 are multiplied, and the multiplication results are stored in the device designated with D.

(2) -2147483648 to 2147483647 (BIN 32-bit) can be designated in S1 and S2.

(3) The positive/negative of the data in S1, S2 and D is determined with the highest-order bit (B31, D is B63).

B31/B63

positive/negative

0 Positive

1 Negative

- 96 -

Execution conditions

The execution conditions for D* are as shown below.

D*

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.

Coding

No. of

steps

Com-

mand

Device

0 LD X5

1 D* D7 D18 D1

5

(2) Program to multiply the D20 BIN data and D10 BIN data when X0 turns ON, and output the high-order 16-bit to Y30 to 4F.

Coding

No. of

steps

Com-

mand

Device

0 LD

1 D* D20 D10 D0

8

- 97 -

/

/ ... BIN 16-bit division

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

S2

D

4

Function

(1) The BIN data designated with S1 and the BIN data designated with S2 are divided, and the division results are stored in the device designated with D.

(2) -32768 to 32767 (BIN 16-bit) can be designated in S1 and S2.

(3) The positive/negative of the data in S1, S2 and D is determined with the highest-order bit (B15).

B15

of

positive/negative

0 Positive

1 Negative

(4) For the word device, the operation results will be stored as quotient and redundant using the

32-bit.

Quotient ... Stored in low-order 16-bit.

Redundant ... Stored in high-order 16-bit.

(5) The S1 and S2 data will not change even after operation is executed.

- 98 -

Execution conditions

The execution conditions for / are as shown below.

/

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. of

steps

Com-

mand

Device

0 LD X3

1 * D10 K100 D0

5 /

9

D0 K314 D5

Point

The source and destination sides of the above program are as follow.

- 99 -

D/

D/ ... BIN 32-bit division

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

S2 4/5

D

Function

(1) The BIN data designated with S1 and the BIN data designated with S2 are divided, and the division results are stored in the device designated with D.

(2) -2147483648 to 2147483647 (BIN 32-bit) can be designated in S1 and S2.

(3) The positive/negative of the data in S and D is determined with the highest-order bit (B31).

B31

positive/negative

0 Positive

1 Negative

(4) For the word device, the operation results will be stored as quotient and redundant using the

64-bit.

Quotient ... Stored in low-order 32-bit.

Redundant ... Stored in high-order 32-bit.

(5) The S1 and S2 data will not change even after operation is executed.

- 100 -

Execution conditions

The execution conditions for D/ are as shown below.

D/

Program example

(1) Program to multiply the D10 data by 3.14 when X3 turns ON, and output the results to Y30 to 3F.

Coding

No. of

steps

Com-

mand

Device

0 LD X3

1 * D10 K314 D0

5 D/ D0 K100 D2

10 MOV D2 K4Y30

Point

The source and destination sides of the above program are as follow.

- 101 -

INC

INC ... (16-bit BIN data) +1

D

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

2

Function

(1) The device (16-bit data) designated with D is incremented by one.

(2) If INC is executed when the details of the device designated with D are 32767, -32768 will be stored in the device designated with D.

Execution conditions

The execution conditions for the INC command are as shown below.

- 102 -

Program example

(1) Example of addition counter program

INC

Coding

No. of

steps

Com-

mand

Device

1 MOV K0 D8

11 LD= K100 D8

15

- 103 -

DINC

DINC ... (32-bit BIN data) +1

D

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

2

Function

(1) The device (32-bit data) designated with D is incremented by one.

(2) If DINC is executed when the details of the device designated with D are 2147483647,

-2147483648 will be stored in the device designated with D.

Execution conditions

The execution conditions for the DINC command are as shown below.

- 104 -

DINC

Program example

(1) Program to increment the D0, 1 data by one when M0 turns ON.

Coding

No. of

steps

Com-

mand

Device

0 LD M0

1 DINC D0

(2) Program to increment X10 to 27 data by one when M0 turns ON, and to store the results in D3, 4.

Coding

No. of

steps

Com-

mand

Device

- 105 -

DEC

DEC ... (16-bit BIN data) –1

D

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

2

Function

(1) The device (16-bit data) designated with D is decremented by one.

(2) If DEC is executed when the details of the device designated with D are 0, -1 will be stored in the device designated with D.

Execution conditions

The execution conditions for the DEC command are as shown below.

- 106 -

Program example

(1) Example of subtraction counter program

DEC

Coding

No. of

steps

Com-

mand

Device

1 MOV K100 D8

11 LD= K0 D8

- 107 -

DDEC

DDEC ... (32-bit BIN data) –1

D

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

2

Function

(1) The device (32-bit data) designated with D is decremented by one.

(2) If DDEC is executed when the details of the device designated with D are 0, -1 will be stored in the device designated with D.

Execution conditions

The execution conditions for the DDEC command are as shown below.

- 108 -

DDEC

Program example

(1) Program to decrement the D0, 1 data by one when M0 turns ON.

Coding

No. of

steps

Com-

mand

Device

(2) Program to decrement X10 to 27 data by one when M0 turns ON, and to store the results in D3,

4.

Coding

No. of

steps

Com-

mand

Device

- 109 -

BCD

BCD ... BIN

BCD conversion (16-bit)

S

D

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

3

Function

The BIN data (0 to 9999) of the device designated with S is BCD converted and transmitted to the device designated with D.

1)

If the device BIN data designated by S is not within 0 to 9999, it will not be converted correctly.

Execution conditions

The execution conditions for BCD are as follow.

- 110 -

Program example

(1) Program to output C4 current value from Y20 to 2F to BCD display.

BCD

Coding

No. of

steps

Com-

mand

Device

0 LD M0

1 BCD C4 D4

4 MOV D4 K4Y20

- 111 -

DBCD

DBCD ... BIN

BCD conversion (32-bit)

S

D

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

3

Function

The BIN data (0 to 99999999) of the device designated with S is BCD converted and transmitted to the device designated with D.

1)

correctly.

- 112 -

Execution conditions

The execution conditions for DBCD are as follow.

DBCD

Program example

(1) Program to output the current timer value of which the setting value exceeds 9999 to Y1C to 2F.

Coding

No. of

steps

Com-

mand

Device

0 LD

1 OUT K18000

D15

- 113 -

BIN

BIN ... BCD

BIN conversion (16-bit)

S

D

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

3

Function

The BCD data (0 to 9999) of the device designated with S is BIN converted and transmitted to the device designated with D.

1)

If the device digit data designated by S is not within 0 to 9, it will not be converted correctly.

Execution conditions

The execution conditions for BIN are as follow.

- 114 -

BIN

Program example

(1) Program to BIN convert the X10 to 1B BCD data when X8 turns On, and store in D8.

Coding

No. of

steps

Com-

mand

Device

1 BIN K3X10 D8

4

- 115 -

DBIN

DBIN ... BCD

BIN conversion (32-bit)

S

D

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

3

Function

The BCD data (0 to 99999999) of the device designated with S is BIN converted and transmitted to the device designated with D.

(Note

If the device digit data designated by S is not within 0 to 9, it will not be converted correctly.

- 116 -

Execution conditions

The execution conditions for DBIN are as follow.

DBIN

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. of

steps

Com-

mand

Device

0 LD X0

4

(2) Program to BIN convert the D0, 1 data when X0 turns ON, and store in D18, 19.

Coding

No. of

steps

Com-

mand

Device

1 DBIN D0 D18

4

- 117 -

MOV

MOV ... 16-bit data transmission

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S

∆ ∆

3

D

Note1

∆ ∆

∆: MOV from a bit device (word device) to Z or V is not possible.

Z and V cannot be independently placed on the source side, but can be used on the source side as ornaments for D and R.

Refer to "6.2.4 Index Ornaments" for details.

1) MOV to device X can be programmed, but this is a command for testing by Mitsubishi.

Do not use it.

Function

The 16-bit data of the device designated with S is transmitted to the device designated with D.

Execution conditions

The execution conditions for MOV are as shown below.

- 118 -

MOV

Program example

(1) Program to store input X0 to B data in D8.

Coding

No. of

steps

Com-

mand

Device

1 MOV K3X0 D8

4

(2) Program to store 155 in D8 as binary value when X8 turns ON.

Coding

No. of

steps

Com-

mand

Device

1 MOV K155 D8

4

(3) Program to store 155 in D93 as BCD value in when XB turns ON.

Coding

No. of

steps

Com-

mand

Device

1 MOV H155 D93

4

(4) Program to store 155 in D894 as hexadecimal (HEX) when X13 turns ON.

Coding

No. of

steps

Com-

mand

Device

4

- 119 -

DMOV

DMOV ... 32-bit data transmission

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S

3/4

D

Note2

(Note

DMOV from a bit device to a bit device is not possible.

(Note

DMOV to device X can be programmed, but this is a command for testing by Mitsubishi.

Do not use it.

Function

The 32-bit data of the device designated with S is transmitted to the device designated with D.

Execution conditions

The execution conditions for DMOV are as shown below.

- 120 -

Program example

(1) Program to store A0, A1 data in D0, D1.

DMOV

Coding

No. of

steps

Com-

mand

Device

1 DMOV A0 D0

4

(2) Program to store X0 to 1F data in D0, D1.

Coding

No. of

steps

Com-

mand

Device

0 LD M0

- 121 -

XCH

XCH ... 16-bit data exchange

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

D1

D2

3

Function

The D1 and D2 16-bit data are exchanged.

Execution conditions

The execution conditions for the XCH command are as shown below.

- 122 -

XCH

Program example

(1) Program to exchange T0 current value with D0 details when M8 turns ON.

Coding

No. of

steps

Com-

mand

Device

0 LD M8

1 XCH T0 D0

(2) Program to exchange D0 details with M16 to M31 data when M10 turns ON.

Coding

No. of

steps

Com-

mand

Device

K4M16

D0

(3) Program to exchange D0 details with R9 details when M0 turns ON.

Coding

No. of

steps

Com-

mand

Device

0 LD M0

1 XCH D0 R9

- 123 -

DXCH

DXCH ... 32-bit data exchange

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

D1

D2

3

Function

The D1 and D2 32-bit data are exchanged.

Execution conditions

The execution conditions for the DXCH command are as shown below.

- 124 -

DXCH

Program example

(1) Program to exchange T0 and T1 current values with D0, 1 details when M8 turns ON.

Coding

No. of

steps

Com-

mand

Device

1 DXCH T0 D0

(2) Program to exchange D0, 1 details with M16 to M47 data when M10 turns ON.

Coding

No. of

steps

Com-

mand

Device

0 LD X10

K8M16

D0

(3) Program to exchange D0, 1 details with R9, 10 details when M0 turns ON.

Coding

No. of

steps

Com-

mand

Device

1 DXCH D0 R9

- 125 -

BMOV

BMOV ... Block transmission of 16-bit data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S

D n

4

Function

The details of n points from the device designated with S are batch transmitted to the n point designated with D.

Execution conditions

The execution conditions of the BMOV command are as shown below.

- 126 -

BMOV

Program example

(1) Program to transmit the current values of T33 to 48 to D908 to 923.

Coding

No. of

steps

Com-

mand

Device

1 BMOV T33 D908 H10

Block transmission with BMOV command

- 127 -

FMOV

FMOV ... Batch transmission of same 16-bit data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S

D n

3

Function

The details of the device designated with S are transmitted to the n point designated with D.

Execution conditions

The execution conditions of the FMOV command are as shown below.

- 128 -

Program example

(1) Program to reset (clear) D8 to 23 when XA turns ON.

FMOV

Resetting of data registers with FMOV command

Coding

No. of

steps

Com-

mand

Device

1 FMOV K0 D8 H10

5

- 129 -

CJ

CJ ... Conditional jump

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

P 2

Function

CJ

(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.

- 130 -

CJ

Point

(1) After the timer coil is turned ON, if the timer that is turning the coil ON with the CJ command is jumped, the timer count will continue.

(2) The scan time will be shortened if jumping is done after the CJ command.

(3) The CJ command can be used to jump to a smaller step.

(4) The devices skipped with CJ will not change.

(5) Label (P**) possesses one step.

- 131 -

FEND

FEND ... Program end

Bit device

Usable device

Word (16-bit) device

Con-sta nt

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

1

Function

The sequence program is ended.

- 132 -

Program example

Program when using CJ command

FEND

Coding

No. of

steps

Com-

mand

Device

13

- 133 -

CALL, RET

CALL, RET ... Call/return of sub-routine program

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

P

2

Function

CALL

(1) The sub-routine program designated with the point (P**) is executed.

- 134 -

CALL, RET

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.

Program example

Program to execute sub-routine program when X1 changes from OFF to ON.

Coding

No. of

steps

Com-

mand

Device

8

505

- 135 -

WAND

WAND ... Logical AND of 16-bit data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

S2

D

4

Function

(1) Logical AND is executed for each bit of the 16-bit data in the device designated with S1 and the device designated with S2, and the results are stored in the device designated with D.

(2) Above the bit device digit designation is operated as 0.

(Refer to program example (2) on the next page.)

- 136 -

Execution conditions

The execution conditions for WAND are as follow.

WAND

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.

Coding

No. of

steps

Com-

mand

Device

1 WAND D10 D20 D33

(2) Program that executes logical AND of the X10 to 1B data and D33 data when XA turns ON, and outputs the results to D50.

Coding

No. of

steps

Com-

mand

Device

0 LD XA

- 137 -

DAND

DAND ... Logical AND of 32-bit data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S

D

3/4

Function

(1) Logical AND is executed for each bit of the 32-bit data in the device designated with D and the device designated in S, and the results are stored in the device designated with D.

(2) Above the bit device digit designation is operated as 0.

(Refer to program example (1) on the next page.)

Execution conditions

The execution conditions for the DAND command are as follow.

- 138 -

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.

Coding

No. of

steps

Com-

mand

Device

0 LD X3

10 DMOV

K6M80

(2) Program that executes logical AND of the D0, 1 32-bit data and R108, 109 when M16 turns ON, and outputs the results to Y100 to 11F.

Coding

No. of

steps

Com-

mand

Device

0 LD M16

R108

- 139 -

WOR

WOR ... Logical OR of 16-bit data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

S2

D

4

Function

Logical OR is executed for each bit of the 16-bit data in the device designated with S1 and the device designated with S2, and the results are stored in the device designated with D.

Execution conditions

The execution conditions for WOR are as follow.

- 140 -

WOR

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

steps

Com-

mand

Device

1 WOR D10 D20 D33

(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.

Coding

No. of

steps

Com-

mand

Device

0 LD XA

- 141 -

DOR

DOR ... Logical OR of 32-bit data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S

D

3/4

Function

Logical OR is executed for each bit of the 32-bit data in the device designated with D and the device designated with S, and the results are stored in the device designated with D.

Execution conditions

The execution conditions for DOR are as follow.

- 142 -

DOR

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.

Coding

No. of

steps

Com-

mand

Device

0 LD XB

HFOFF

R66

(2) Program that executes logical OR of the M64 to 87 24-bit data and X20 to 37 24-bit data when

M8 turns ON, and stores the results in D23, 24.

Coding

No. of

steps

Com-

mand

Device

0 LD M8

K6M64

D23

- 143 -

WXOR

WXOR ... Exclusive OR of 16-bit data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

S2

D

4

Function

Exclusive OR is executed for each bit of the 16-bit data designated with S1 and designated with S2, and the results are stored in the device designated with D.

Execution conditions

The execution conditions for WXOR are as follow.

- 144 -

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

steps

Com-

mand

Device

LD

1 WXOR D10 D20 D33

(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.

Coding

No. of

steps

Com-

mand

Device

0 LD XA

D33 D100

- 145 -

DXOR

DXOR ... Exclusive OR of 32-bit data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S

D

3/4

Function

Exclusive OR is executed for each bit of the 32-bit data designated with D and designated with S, and the results are stored in the device designated with D.

Execution conditions

The execution conditions for DXOR are as follow.

- 146 -

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.

Coding

No. of

steps

Com-

mand

Device

0 LD X6

K8X20

D9

4 SUM

- 147 -

NEG

NEG ... Complement of 2 (BIN 16-bit data)

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

D

2

Function

(1) The 16-bit data of the device designated with D is reversed and incremented by one, and then stored in the device designated with D.

(2) This is used to use a negative BIN value as an absolute value.

Execution conditions

The execution conditions for NEG are as follow.

- 148 -

NEG

Program example

(1) Program to calculate D10 - D20 when XA turns ON and obtain an absolute value when the results are negative.

Coding

No. of

steps

Com-

mand

Device

1 AND< D10 D20

6 - D10 D20 D10

13

- 149 -

ROR

ROR ... Right rotation of A0 data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

n

2

Function

The A0 data excluding the carry flag is rotated to the right n bits.

Execution conditions

The execution conditions for the ROR command are as shown below.

- 150 -

ROR

Program example

Program to rotate the A0 details 3 bits to the right when M0 turns ON.

Coding

No. of

steps

Com-

mand

Device

0 LD M0

1 ROR K3

3

Right rotation of data using ROR command

- 151 -

RCR

RCR ... Right rotation of A0 data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

n

2

Function

The A0 data including the carry flag is rotated to the right n bits.

· The carry flag must be set to 1 or 0 before executing RCR.

- 152 -

Execution conditions

The execution conditions for the RCR command are as shown below.

RCR

Program example

Program to rotate the A0 details 3 bits to the right when M0 turns ON.

Coding

No. of

steps

Com-

mand

Device

0 LD M0

1 RCR K3

3

Right rotation of data using RCR command

- 153 -

DROR

DROR ... Right rotation of A0, 1 data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

n

2

Function

The A0, 1 data excluding the carry flag is rotated to the right n bits.

Execution conditions

The execution conditions for the DROR command are as shown below.

- 154 -

DROR

Program example

Program to rotate the A0, 1 details 3 bits to the right when M0 turns ON.

Coding

No. of

steps

Com-

mand

Device

1 DMOV K1 A0

8

Right rotation of data using DROR command

- 155 -

DRCR

DRCR ... Right rotation of A0, 1 data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

n

2

Function

The A0, 1 data including the carry flag is rotated to the right n bits.

· The carry flag must be set to 1 or 0 before executing DRCR.

- 156 -

Execution conditions

The execution conditions for the DRCR command are as shown below.

DRCR

Program example

Program to rotate the A0, 1 details 3 bits to the right when M0 turns ON.

Coding

No. of

steps

Com-

mand

Device

1 DMOV K1 A0

8

Right rotation of data using DRCR command

- 157 -

ROL

ROL ... Left rotation of A0 data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

n

2

Function

The A0 data excluding the carry flag is rotated to the left n bits.

· The carry flag must be set to 1 or 0 after executing ROL.

Execution conditions

The execution conditions for the ROL command are as shown below.

- 158 -

ROL

Program example

Program to rotate the A0 details 3 bits to the left when M0 turns ON.

Coding

No. of

steps

Com-

mand

Device

0 LD M0

1 ROL K3

3

Left rotation of data using ROL command

- 159 -

RCL

RCL ... Left rotation of A0 data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

n

2

Function

The A0 data including the carry flag is rotated to the left n bits.

· The carry flag must be set to 1 or 0 before executing RCL.

- 160 -

Execution conditions

The execution conditions for the RCL command are as shown below.

RCL

Program example

Program to rotate the A0 details 3 bits to the left when M0 turns ON.

Coding

No. of

steps

Com-

mand

Device

0 LD M0

1 RCL K3

3

Left rotation of data using RCL command

- 161 -

DROL

DROL ... Left rotation of A0, 1 data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

n

2

Function

The A0, 1 data excluding the carry flag is rotated to the left n bits.

Execution conditions

The execution conditions for the DROL command are as shown below.

- 162 -

DROL

Program example

Program to rotate the A0, 1 details 3 bits to the left when M0 turns ON.

Coding

No. of

steps

Com-

mand

Device

0 LD XA

H80000000

A0

5 LD M0

6 DROL

8

Left rotation of data using DROL command

- 163 -

DRCL

DRCL ... Left rotation of A0, 1 data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

n

2

Function

The A0, 1 data including the carry flag is rotated to the left n bits.

· The carry flag must be set to 1 or 0 before executing DRCL.

- 164 -

Execution conditions

The execution conditions for the DRCL command are as shown below.

DRCL

Program example

Program to rotate the A0, 1 details 3 bits to the left when M0 turns ON.

Coding

No. of

steps

Com-

mand

Device

0 LD XA

H80000000

A0

5 LD M0

6 DRCL

8

Left rotation of data using DRCL command

- 165 -

SFR

SFR ... Right shift of 16-bit data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

D

n

3

Function

(1) The 16-bit data of the device designated with D is shifted n bits to the right.

(2) n bits from the highest order are set to 0.

(3) The T, C shift will be a current value (attribute value or count value) shift. (Shifting with the setting value is not possible.)

- 166 -

Execution conditions

The execution conditions for SFR are as shown below.

SFR

Program example

Program that shifts the details of D8 5 bits to the right when M10 turns ON.

Coding

No. of

steps

Com-

mand

Device

0 LD M10

1 SFR D8 K5

Right shift of data with SFR command (word device)

- 167 -

DSFR

DSFR ... Right shift of word device in batch

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

D

n

3

Function

(1) n points starting at the head of the device designated with D are shifted one point to the right.

(2) The highest order device is set to 0.

(3) The T, C shift will be a current value (attribute value or count value) shift. (Shifting with the setting value is not possible.)

Execution conditions

The execution conditions of DSFR are as shown below.

- 168 -

DSFR

Program example

(1) Program to shift the details of D668 to 689 to the right when M10 turns ON.

Coding

No. of

steps

Com-

mand

Device

0 LD M10

Right shift of data with DSFR command

(2) Program to shift the details of R6 to 9 to the right when M6 turns ON.

Coding

No. of

steps

Com-

mand

Device

1 DSFR R6 K4

Right shift of data with DSFR command

- 169 -

SFL

SFL ... Left shift of 16-bit data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

D

n

3

Function

(1) The 16-bit data of the device designated with D is shifted n bits to the left.

(2) n bits from the lowest order are set to 0.

(3) The T, C shift will be a current value (attribute value or count value) shift. (Shifting with the setting value is not possible.)

- 170 -

Execution conditions

The execution conditions for SFL are as shown below.

SFL

Program example

(1) Program that shifts the details of D8 5 bits to the left when M10 turns ON.

Coding

No. of

steps

Com-

mand

Device

0 LD M10

1 SFL D8 K5

Left shift of data with SFL command (word device)

- 171 -

DSFL

DSFL ... Left shift of word device in batch

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

D

n

3

Function

(1) n points starting at the head of the device designated with D are shifted one point to the left.

(2) The lowest order device is set to 0.

(3) The T, C shift will be a current value (attribute value or count value) shift. (Shifting with the setting value is not possible.)

Execution conditions

The execution conditions of DSFL are as shown below.

- 172 -

DSFL

Program example

(1) Program to shift the details of D683 to 689 to the left when M10 turns ON.

Coding

No. of

steps

Com-

mand

Device

1 DSFL D683 K7

Left shift of data with DSFL command

(2) Program to shift the details of R6 to 9 to the left when M6 turns ON.

Coding

No. of

steps

Com-

mand

Device

0 LD M6

1 DSFL R6 K4

Left shift of data with DSFL command

- 173 -

SER

SER ... Search of 16-bit data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

S2

n

4

Function

(1) Using the 16-bit data of the device designated with S1 as the keyword, the n points from the

16-0bit data of the device designated with S2 are searched.

(2) The number of data items matching the keyword is stored in A1. The relative position of the device containing the first matched data counted from S2 is stored in A0.

(3) When n is a negative value, it is interpreted as 0.

(4) No process is executed when n = 0.

Execution conditions

The execution conditions for SER are as shown below.

- 174 -

SER

Program example

Program to compare the data in D883 to D887 with 123 when XB turns ON.

Coding

No. of

steps

Com-

mand

Device

0 LD XB

1 SER D0 D883 K5

Search of data using SER command

- 175 -

SUM

SUM ... Count of No. of 16-bit data items set to 1

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

D

2

Function

The total No. of bits in the 16-bit data of the device designated with S that are set to 1 is stored in A0.

Execution conditions

The execution conditions for SUM are as shown below.

- 176 -

SUM

Program example

Program to obtain the No. of D10 data bits that are set to ON (1) when XB turns ON.

Coding

No. of

steps

Com-

mand

Device

0 LD XB

1 SUM D10

3

Counting with SUM command

- 177 -

DECO

DECO ... 8

256 bit decoding

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S

D

n

4

Function

(1) The low-order n bits of the device designated with S are decoded, and the results are stored in the 2 n

bit from the device designated with D.

(2) 1 to 8 can be designated for n.

(3) No process is executed when n = 0, and the details of the device designated with D will not change.

(4) The word device is handled as 16 bits.

Execution conditions

The execution conditions for DECO are as shown below.

- 178 -

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

steps

Com-

mand

Device

1 DECO R20 D100 K3

5

(Note

The D100 bit 0 turns ON when the R20 B0 to B2 is 0.

(Note

The D100 details remain the same even if X0 turns OFF.

(2) Program to decode the eight bits 0 to 7 of R20, and turn the bits corresponding in D100 to D115

(2

8

= 256 bits) ON.

Coding

No. of

steps

Com-

mand

Device

1 DECO R20 D100 K8

5

- 179 -

SEG

SEG ... Decoding to 7-segment display data

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S

D

3

Function

(1) The 0 to F data designated with the low-order 4-bit in S is decoded in the 7-segment display data and stored in D.

(2) Refer to the following page for the 7-segment display.

Execution conditions

The execution conditions for SEG are as follow.

- 180 -

7-segment decode table

SEG

Program example

Program to convert D7 data into 7-segment display data when X0 turns ON, and output to D8.

Coding

No. of

steps

Com-

mand

Device

1 SEG D7 D8

- 181 -

AVE

AVE ... Calculation of average value

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S

D

n

4

Function

The details of the n point devices from the device designated with S are averaged, and the results are output to the device designated with D.

- 182 -

Execution conditions

The execution conditions for AVE are as shown below.

AVE

Program example

(1) Program to average the details of D882 to D888 when XB turns ON, and to output the results to

D0.

Coding

No. of

steps

Com-

mand

Device

1 AVE D882 D0 K7

Averaging of data with AVE command

(Note) Fractional values are omitted.

- 183 -

STC, CLC

STC, CLC ... Setting/resetting of carry flag

Bit device

Usable device

Word (16-bit) device

Con-sta nt

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

1

Function

STC

(1) The carry flag contact (E12) is set (ON).

CLC

(2) The carry flag contact (E12) is reset (OFF).

Execution conditions

The execution conditions for STC and CLC are as shown below.

- 184 -

STC, CLC

Program example

Program to add the X0 to F data and D0 data when M0 turns ON and to turn the carry flag (E12) ON if the results exceed 9999. If the results are 9999 or less, the carry flag is turned OFF.

Coding

No. of

steps

Com-

mand

Device

1 + K4X0 D0 D1

5 LD> K4X0 D1

8 OR> D0 D1

11

12

14

16

- 185 -

LDBIT, ANDBIT, ORBIT

LDBIT, ANDBIT, ORBIT ... Bit test of a contact handling

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

n

3

Function

(1) A bit test of the 16-bit device is executed with a contact handling.

(2) The bit test results are as shown below.

Condition Bit test results

When test bit is 1 Continuity

When test bit is 0 Non-continuity

Execution conditions

The execution conditions for LDBIT, ANDBIT and ORBIT are as shown below.

LDBIT Executed per scan

ANDBIT Executed only when previous contact command is ON

ORBIT Executed per scan

- 186 -

Program example

(1) Program to test bit 3 of D10.

(2) Program to test bit 15 of D10.

(3) Program to test bit 15 of D10.

(4) Program to test bit 10 of D10.

- 187 -

LDBIT, ANDBIT, ORBIT

Coding

No. of

steps

Com-

mand

Device

0 LDBIT D10 K3

4

Coding

No. of

steps

Com-

mand

Device

1 ANDBIT D10 K15

5

Coding

No. of

steps

Com-

mand

Device

1 LDBIT D10 HF

7

Coding

No. of

steps

Com-

mand

Device

2 ORBIT D10 K10

6

LDBII, ANDBII, ORBII

LDBII, ANDBII, ORBII ... Bit test of b contact handling

Bit device

Usable device

Word (16-bit) device

Con-st ant

Pointer

Level

Digit designation

No. of steps Index

X Y M L E F T C D R A0 A1 Z V K H P N

S1

n

3

Function

(1) A bit test of the 16-bit device is executed with b contact handling.

(2) The bit test results are as shown below.

Condition Bit test results

When test bit is 0 Continuity

When test bit is 1 Non-continuity

Execution conditions

The execution conditions for LDBII, ANDBII and ORBII are as shown below.

LDBII

ANDBII

ORBII

Executed per scan

Executed only when previous contact command is ON

Executed per scan

- 188 -

Program example

(1) Program to test bit 3 of D10.

(2) Program to test bit 15 of D10.

(3) Program to test bit 15 of D10.

(4) Program to test bit 10 of D10.

- 189 -

LDBII, ANDBII, ORBII

Coding

No. of

steps

Com-

mand

Device

0 LDBII D10 K3

4

Coding

No. of

steps

Com-

mand

Device

1 ANDBII D10 K15

5

Coding

No. of

steps

Com-

mand

Device

1 LDBII D10 HF

7

Coding

No. of

steps

Com-

mand

Device

2 ORBII D10 K10

6

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.

Examples of exclusive commands:

· ATC dedicated command (ATC)

· Rotary body control command (ROT)

· Tool life management exclusive command (TSRH)

· DDB (direct data bus) ..... asynchronous

· External search ............... synchronous

- 190 -

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. for index of the magazine, according to the given command.

Each tool and magazine tool pot (socket) have a one-on-one corresponding relation.

Usually, the "intermediate pot" that supports the transfer of the tool is provided between the spindle and the magazine.

This control is possible by not using ATC command, but ROT command only.

(2) Memory random control

With the information of magazine rotation, or magazine position from the machine, the control system refers to tool No. stored in the memory. For index of the magazine, the direction of magazine rotation and number of steps are determined by the given T command and tool No. stored in the memory.

Each tool and magazine tool pot (socket) does not always have a one-on-one corresponding relation.

Usually, the "intermediate pot" is not provided.

9.1.2 ATC Operation

The motions related to ATC operation can be largely divided into the following four motions:

(1) Index of magazine ..... (ATC-K1, K2, K5, K6, K7, K8)

(2) Tool change (arm, or the like is used) ..... (ATC-K3, K4)

(3) Transfer of tool to intermediate pot or arm ..... (Normal function commands such as MOV, XCH are used.)

(4) Others ..... (ATC-K9, K10, K11)

9.1.3 Explanation of Terminology

(1)

This points out the position where the magazine is indexed. When a tool table in which tool No. are previously recorded is used, the tool table does not rotate with rotation of the magazine and the pointer serves as "ring counter" for control of magazine position.

(2)

This is the type with tool pots numbered and the relationship between tool pot and tool No. is fixed if the magazine is rotated. When the tool table is rotated, fixed pointer does not functionally differ from "floating pointer".

(3)

This is the type with numbered fixed position on magazine and the relationship between magazine No. and tool No. changes when the magazine rotates.

- 191 -

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; when the fixed pointer system is selected, it does not change.

- 192 -

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

Pointer or ring counter value

Tool number search

ATC K1

ATC K2

Tool number AND search

Register number of data searched

No. of the same data Error processing

Rotary body indexing

ROT K1

Rotation direction

Number of steps, etc.

Magazine rotation

Fixed pointer system

Ring counter control

ROT K3

Tool change command

Floating pointer system

Magazine stop

Forward rotation, reverse rotation of pointer

ATC K5, K6

Forward rotation,

ATC K7, K8

Tool change

ATC K4

Random position tool change reverse rotation of tool table

ATC K3

The relationship between the tool number search command and rotary body indexing command when the tool table rotation system or floating pointer system is used is explained below.

Tool table rotation system Floating pointer system

- 193 -

9. Exclusive Commands

(1) Index tool number 8 in the situation shown above

(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.

(a) In the tool table rotation system, rotation direction CW and number of steps 3 are found from the relationship between current value 0 (pointer 0) and tool number search output result 3.

(b) In the floating pointer system, rotation direction CW and number of steps 3 are found from the relationship between current value 4 (pointer 4) and tool number search output result 7, as in (a) above.

In the fixed pointer system, the pointer is fixed to 0 and the ring counter of 0 to n-1 (n is the number of magazines) separate from the pointer is controlled. The counter value is used as the current position.

9.1.6 Basic Format of ATC Exclusive Command

- 194 -

9. Exclusive Commands

9.1.7 Command List

Command

ATC K1 Rn Rm

ATC K2 Rn Rm

ATC K3 Rn Rm

ATC K4 Rn Rm

ATC K5 Rn Rm

ATC K6 Rn Rm

ATC K7 Rn Rm

ATC K8 Rn Rm

ATC K9 Rn Rm

Description

Tool No. search

Tool No. logical product search

Tool change

Random position tool change

Pointer "FWD" rotation

Pointer "REV" rotation

Tool table "FWD" rotation

Tool table "REV" rotation

Tool data read

ATC K10 Rn Rm

ATC K11 Rn Rm

Tool data write

Automatic tool data write

9.1.8 Control Data Buffer Contents

Command Rn

1 Tool No. search

No. of register to store search data

Rn+1

No. of register to which data output

Rn+2

3

Tool change

(Ex.: Spindle Index

No. of register to store search data

No. of register to specify the position of tool change

4

Random position tool change

5 Pointer "FWD" rotation

6 Pointer "REV" rotation

No. of register to specify the position of tool change

No. of register to which data output

Mask data position R

No.

— —

No. of register to specify the tool to be changed

— — —

9 Tool data read

10 Tool data write

— — —

Magazine position (to be read) R No.

Magazine position (to be written) R No.

Initial data storage R

No.

No. of register to which data output

Written data position R

No.

— —

- 195 -

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

Magazine

magazine magazine magazine

Remarks

(data type)

T4-digit/T8-digit specifications

T4-

digit

ATC control parameters R2950

T8-

digit

T4-

digit

T8-

digit

T4-

digit

T8-

digit

No. of magazine designation

R2960 R2961 R2962 Binary

Pointer designation

Spindle tool

R2965 R2966 R2967

R2970

R2970

R2971

R2980

R2980

R2981

Binary

— — BCD

Standby 1 tool

Standby 2 tool

Standby 3 tool

Standby 4 tool

R2971

R2972

R2973

R2974

R2972

R2973

R2974

R2975

R2976

R2977

R2978

R2979

R2981

R2982

R2983

R2984

R2982

R2983

R2984

R2985

R2986

R2987

R2988

R2989

— — BCD

— — BCD

— — BCD

— — BCD

AUX data

Magazine tool data

~ ~

R2998

~

~

~

R3240

R3241

R3242

R3240

R3241

R3242

R3243

R3244

R3245

~

~

R3480

R3481

R3482

~

~

~

~

Binary

R3480

R3481

BCD

R3482

R3483

R3484

R3485

BCD

BCD

~

~

~

R3318

R3396

R3397

R3558

R3636

R3637

BCD

R3319

R3398

R3399

R3559

R3638

R3639

BCD

1) A maximum of 80 tools per magazine can be used.

(Note

The tool registration screen has been prepared only for the No. 1 magazine.

- 196 -

9. Exclusive Commands

(2) Control parameter contents

R2950

F E D C B A 9 8 7 6 5 4 3 2 1 0

Max. number of standby displayed: 4

0: T 4-digit

1: T 8-digit

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.

- 197 -

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. are found, the location of tool No. nearest to the pointer is output.

- 198 -

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.

- 199 -

9. Exclusive Commands

(3)

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.

- 200 -

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). This command is used in such cases.

Magazine No. to be changed

Tool data to be changed

- 201 -

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.

When a magazine with 10 tools is used, the control sequence is as follows:

0, 1, 2, 3 ........ 9, 0, 1, 2, ........ 8, 9, 0, 1 ...

(Note 1) When this command is executed, the relationship between magazine No. and tool No., appearing on the tool entry display, changes accordingly.

(6) Pointer "REV" rotation

In the ATC control with floating pointer, pointer count is controlled so that it coincides with actually indexed magazine position when the magazine rotates in "REV" direction for index.

When a magazine with 10 tools is used, for example, the control sequence is as follows:

2, 1, 0, 9, 8 ........ 2, 1, 0, 9, 8 ........ 1, 0, 9, 8 ...

(Note 1) When this command is executed, the relationship between magazine No. and tool No., appearing on the tool entry display, changes accordingly.

- 202 -

9. Exclusive Commands

(7) Tool table "FWD" rotation

The tool table rotates in "FWD" direction in accordance with the magazine rotation.

(Note 1) In this control mode, pointer always indicates "0"

(Note 2) When this command is executed, the relationship

(tool table head). between magazine No. and tool No., appearing on the tool entry display, changes accordingly.

(8) Tool table "REV" rotation

The tool table rotates in "REV" direction in accordance with the magazine rotation.

(Note 1) In this control mode, pointer always indicates "0"

(tool table head).

(Note 2) When this command is executed, the relationship between magazine No. and tool No., appearing on the tool entry display, changes accordingly.

- 203 -

(9) Tool data read

This command is used to call a specific tool No. in the magazine.

9. Exclusive Commands

- 204 -

9. Exclusive Commands

(10) Tool data write

Instead of setting tool No. through the CRT console, the tool No. is entered to each magazine No. set through PLC program.

- 205 -

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.

- 206 -

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 E64 by using the SET command.

Program

· E64 processing is not required for ATC commands ATC K5, K6 (forward rotation, reverse rotation of pointer), ATC K7, K8 (forward rotation, reverse rotation of tool table).

· E64 is set through the use of the user PLC and reset by controller.

(2) Method of tool registration prohibiting during magazine rotation

If tool data is set on the tool registration screen during magazine rotation, data may be set in erroneous position. To prevent this error, a signal called special relay E71 is provided.

· Turn on E71 during magazine rotation.

Program

· Setting of AUX data (R2998) is valid while E71 is being ON.

9.1.12 Examples of Tool Registration Screen

Tool registration screen examples are given below.

For operation, refer to the Operation Manual.

- 207 -

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 Manual (Personal Computer Section) and PLC

Onboard Instruction Manual.

(2) Spindle tool, standby tool display part

The number of display items can be changed according to the control parameter value.

Control parameter (R2950)

F E D C B A 9 8 7 6 5 4 3 2 1 0

00: Only spindle tool is displayed.

01: Spindle tool and standby 1 are displayed.

02: Spindle tool and standby 1 and 2 are displayed.

03: Spindle tool and standby 1~3 are displayed.

04: Spindle tool and standby 1~4 are displayed.

05 or more: No spindle tool or standby tool is displayed.

Hexadecimal expression

(3) Magazine tool number display part

The number of displayed magazine tools and the magazine number start value can be changed according to the number-of-magazine parameter and control parameter values.

1) Number of magazines

Number-of-magazine parameter (R2960): The value can be set in the range of 0 to 80.

(Note) If 0 is set, the magazine number is not displayed. However, the magazine number and magazine tool number guide part is displayed.

2) Magazine number start value

Control parameter (R2950)

F E D C B A 9 8 7 6 5 4 3 2 1 0

0: The magazine number starts at 1.

1: The magazine number starts at 0.

Example) Magazine number display when the number of magazines is 12.

The magazine number starts at 1.

The magazine number starts at 0.

- 208 -

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. can also be displayed on the position display screen and tool length measurement screen that are often used. With this, the changes in the magazine pot and spindle tool No. according to the tool selection command or tool change command can be confirmed.

(1) Position display screen for 9-inch CRT

(2) Display tool selection parameter

A maximum of four standby tools can be displayed on the tool registration screen. The No. of the standby tool and the title to be displayed on the current value screen and tool length measurement screen, etc., are selected.

- 209 -

9. Exclusive Commands

9.2 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

ROT K1 Rn Rm

ROT K3 Rn Rm

Rotary body indexing

Ring counter

- 210 -

9. Exclusive Commands

(1) Rotary body indexing

Direction of rotation and number of steps of ATC magazine (or turret) are determined automatically.

1) The Index command is executed after setting R numbers to Rn to Rn+3 and writing data in the file registers (Rs) each corresponding to the R numbers. However, data setting to the parameter (Rp) is done once before execution of the Index command; this is to prevent the error code from being cleared.

2) The error code stored in bit F of the parameter (Rp) is cleared when the Index command activating signal (ACT) goes off.

- 211 -

9. Exclusive Commands

1) 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. Thus, the direct T

command output file register R36 (B, C, D) is used.

In the example of ladder circuit shown below, the rotation direction is determined by the T command and current position data given by the machine, and the rotary body is rotated in that direction until the target position reaches the current position. When indexing is completed, the auxiliary command completion signal is turned on.

- 212 -

9. Exclusive Commands

- 213 -

9. Exclusive Commands

(Note

Either M202 or M203 can be used for a stop signal.

(Note

The devices (X, Y, and R) are used in this example for no special purpose. Use any

3) device within the available range.

(Note

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.

(Note

The control parameters (R510) are specified as follows:

1) Magazine 1~km

2) Take a short cut.

3) Calculate the number of steps.

(Note

The T command (R36) is output with a BCD code. In this example, the number of rotary body index cycles is 1 to 6, and there is no difference between the binary and BCD.

Thus, the contents of R36 are used as they are.

The target position and current value (R36 and R512 in this example), which are the data to be compared in the ROT K1 command must be binaries. (In actual use, the contents of R36 are binary converted.)

- 214 -

(2) Ring counter (Up/down counter)

This command is used to control position of rotary body (or turret).

9. Exclusive Commands

The ring counter is a binary counter; it is used as an up/down counter of 0 to Km-1 or 1 to Km according to the parameter rotary body command.

Rp (parameter) contents

1) The ring counter command is executed after setting R numbers to Rn to Rn+1 and specifying data for the parameter. parameter (Rp) are cleared when the activating signal (ACT) goes off. The activating signal

(ACT) of the ring counter command is generally pulsed. This makes it hard for the interface diagnostic and ladder monitor programs to detect an error signal. For debugging, therefore, an error hold circuit is provided after the ring count command to ease error detection.

- 215 -

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.)

1. Spare tool selection ... TSRH

9.3.1 Tool Life Management System

(1) Tool life management I (When BASE SPEC parameter #1096 T-Ltyp is set to 1.)

The use time or use count of the spindle tool specified from user PLC (R3720, R3721) is integrated and the tool use state is monitored. Tool data corresponding to the spindle tool is also output. (R3724~R3735)

(2) Tool life management II (When BASE SPEC parameter #1096 T-Ltyp is set to 2.)

Tool life management II is provided by adding the spare tool selection function to tool life management I. Spare tool is selected among group by the spare tool selection command executed by user PLC during tool command, etc., and the tool data of the spare tool is output.

Tool data corresponding to the spindle tool specified from user PLC is output (R3724~R3735) and tool offset corresponding to the spindle tool is made.

9.3.2 Tool Command System

One of the following two can be selected by using a parameter for command tool number (Rm contents) input to the spare tool selection command in tool life management II:

(1) Group number command system (When BASE SPEC parameter #1104 T-Com2 is set to 0.)

The command tool number (Rm contents) input to the spare tool selection command is handled as group number. Spare tool is selected among the tools corresponding to the group number in tool data.

(2) Tool number command system (When BASE SPEC parameter #1104 T-Com2 is set to 1.)

The command tool number (Rm contents) input to the spare tool selection command is handled as a tool number. The group number containing the command tool number is found and spare tool is selected among the group.

- 216 -

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. If used tools do not exist, spare tool is selected among unused tools in the registration number order. If none of used and unused tools exist, spare tool is selected among normal life tools and abnormal tools (the former is assigned higher priority) in the registration number order.

(2) Life equality selection (When BASE SPEC parameter #1105 T-Sel2 is set to 1.)

Tool whose remaining life is the longest is selected among the used and unused tools of a single group. If more than one tool has the same remaining life, it is selected in the registration number order. If none of used and unused tools exist, spare tool is selected among normal life tools and abnormal tools (the former is assigned higher priority) in the registration number order.

9.3.4 Interface

(1)

Y2C8 Tool error 1 signal

Y2C9 Tool error 2 signal

Y2CB

Tool life management input signal

Explanation

While this signal is input, tool life management is not made.

This signal indicates tool error state 1. When controller inputs the signal it changes the status in spindle tool data to 3. (Unused tools or used tools are changed to toll error state 1.)

This signal indicates tool error state 2. When controller inputs the signal, it changes the status in spindle tool data to 4. (Unused tools or used tools are changed to toll error state 2.)

If this signal is not input, the usage data is not counted.

If this signal is input to controller and the tool life management output signal is output to PLC, tool life management is made.

(2)

X20B

Tool life management output signal

Explanation

The controller outputs this signal to PLC while the tool life management function is selected. (When

BASE SPEC parameter #1103 T-Life is set to 1.)

- 217 -

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:

NO

Read life management tool data based on the R36 contents by using TSRH command.

NO

START

Does T command exist?

YES

Is life management selected?

YES

Is tool available?

YES

Index magazine according to tool number in the read tool data.

Change tool (mount new tool on spindle)

(1)

NO

(2)

(3)

Set the tool number of the tool mounted on the spindle in R3720.

Turn on auxiliary function completion signal.

Index up magazine according to the

R36 contents.

The control system varies depending on whether or not life management is selected.

Life management tool data is read into any desired R register based on T command data (R36) by using life management exclusive command.

The tool status and tool number are checked to see if the tool can be used.

Desired tool (magazine) is indexed.

Desired tool (magazine) is indexed.

Set the tool number of the new tool mounted on the spindle in R3720.

(4) Seeing a change in the R3720 contents, controller outputs the life management tool data corresponding to the tool number to R3724~R3735 and starts life management at the same time.

The completion signal when life management is selected is turned on after the spindle tool number is set in

R3720.

Error processing

- 218 -

9. Exclusive Commands

(1) Procedure when tool command is executed

(1) 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. If life management is required, the user PLC executes the spare tool selection command.

3) The spare tool selection command outputs the tool data of the tool corresponding to the specified tool number.

4) The user PLC decides whether or not the tool can be used according to the status in the output tool data, and selects command tool or performs alarm processing.

(Note) If -1 is set in the group number in the output tool data, the tool data is invalid. At the time, the specified tool number is output to the tool number in the output tool data as it is.

(2) Tool life management II

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. If life management is required, the user PLC executes the spare tool selection command.

3) The spare tool selection command selects the spare tool corresponding to the specified number (group number, tool number) and outputs the tool data of the spare tool.

4) The user PLC decides whether or not the tool can be used according to the status in the output tool data, and selects command tool or performs alarm processing.

(Note) If -1 is set in the group number in the output tool data, the tool data is invalid. At the time, the specified tool number is output to the tool number in the output tool data as it is.

(2) Procedure when spindle tool is changed

1) When spindle tool is changed during the spindle tool change command (M06), etc., the user

PLC specifies the tool number of the spindle tool (R3720~R3721).

The controller outputs the spindle tool data corresponding to the tool number of the spindle tool every user PLC main cycle (R3724~R3735).

2) The controller integrates the use time or use count of the spindle tool based on the spindle tool data in the tool data file.

In tool life management II, it also executes tool offset corresponding to the spindle tool.

(Note) If -1 is set in the group number in the output spindle tool data, the spindle tool data is invalid. At the time, the specified tool number (R3720~R3721) is output to the tool number in the output spindle tool data as it is. The controller does not integrate the usage time or usage count of the spindle tool or make tool offset.

<When tool command is executed>

Tool command (Rm)

(Tool number, group number)

Spare tool selection

function command

Tool data (Rn)

In tool life management I, tool number is only specified and spare tool is selected.

Tool is selected according to tool number in tool data.

(User PLC)

- 219 -

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

(R3720-R3721)

Standby tool number

(R3722-R3723)

Spindle tool data

(R3724-R3735)

NC Tool data file

(Controller internal data)

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.

The controller executes life management and tool offset based on the tool data. It also outputs the tool data to

R3724~R3735 every user PLC main cycle.

- 220 -

(3) Tool data flow

9. Exclusive Commands

- 221 -

9. Exclusive Commands

(4)

The tool data is tool management data such as the group number, tool number, and tool status.

The details are given below:

name

Explanation

Group number Number to manage tools of the same type

(form and dimensions) in a group.

The tools assigned the same group number are assumed to be spare tools.

1 - 99999999

1 - 99999999 Tool number Number unique to each tool actually output during tool command execution

Tool data flag Parameter of use data count system, length compensation system, radius compensation system, etc.

Tool status The tool state is indicated. 0 - FF (H)

Auxiliary data Reserved data

Tool life data Life time or life count for each tool.

(If 0 is set, infinity is assumed to be specified.)

0 - 65535

0 - 4000 (minutes)

0 - 9999 (times)

Tool use data Use time or use count for each tool.

Tool length compensation data

Tool radius compensation data

Length compensation data set in any format of compensation number, direct offset amount, and addition offset amount.

Compensation numbers 1 - 400

Direct offset amount ±99999.999

Addition offset amount ±99999.999

Radius compensation data set in any format of compensation number, direct offset amount, and addition offset amount.

0 - 4000 (minutes)

0 - 9999 (times)

Compensation numbers 1 - 400

Direct offset amount ±99999.999

Addition offset amount ±99999.999

- 222 -

(5) Tool data flag and tool status

The tool data flag and tool status contents are shown below:

1) Correspondence with tool life management data screen

9. Exclusive Commands

2) Tool data flag ..... Bits 0~7 of file register Rn (such as R3728)

bit Explanation

Length compensation data format

(spare tool compensation system)

Radius compensation data format

(spare tool compensation system)

Usage data count system

0: Compensation number

1: Addition offset

2: Direct offset amount

0: Compensation number

1: Addition offset

2: Direct offset amount

0: Usage time (minutes)

1: Number of times tool has been mounted

2: Number of cutting times

- 223 -

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:

a) Compensation umber system (0 is set on the tool data registration screen.)

Compensation data in tool data is handled as the compensation number. It is replaced with the compensation number given in a work program and compensation is executed.

b) Addition compensation system (1 is set on the tool data registration screen.)

Compensation data in tool data is handled as addition offset amount. It is added to the offset amount indicated by the compensation number given in a work program and compensation is executed.

c) Direct compensation system (2 is set on the tool data registration screen.)

Compensation data in tool data is handled as direct offset amount. It is replaced with the offset amount indicated by the compensation number given in a work program and compensation is executed.

2) Usage data count system

a) Usage time count

For usage data, the execution time of cutting feed (such as G01, G02, or G03) is counted in 3.75-s units. However, the life data and usage data are displayed in minute units on the tool data registration screen.

b) Number of times tool has been mounted is counted

When tool is used as spindle tool in tool change, etc., usage data is counted. However, if cutting feed (G01, G02, or G03) is not executed after tool is used as spindle tool, usage data is not counted.

c) Number of cutting times is counted

Usage data is counted when a change is made from rapid traverse feed (such as

G00) command to cutting feed (such as G01, G02, or G03) command as shown below. However rapid traverse or cutting feed command with no movement becomes invalid.

Even if a command other than the rapid traverse command appears between cutting feed commands, usage data is not counted.

Caution:

When none of the tool life management input signal and use data count validity signal are input or during machine lock, auxiliary function lock, dry run, or single block, usage data is not counted.

· The usage data is not counted when the life data is 0.

· Life management is executed even in the MDI operation mode.

· The usage data is not counted even when the status is 2 or more (normal life, error tool 1, error tool 2).

- 224 -

9. Exclusive Commands

3) Tool status ..... Bits 8~F of file register Rn (such as R3728)

bit Explanation

Tool status (numeric data 0~4)

0: Unused tool

1: Used tool

2: Normal life tool

3: Tool error 1 tool

4: Tool error 2 tool

(Reserved)

4) Tool status contents

When the tool status number is 0 or 1, NC assumes the tool to be available.

number

Explanation

0

Indicates unused tool.

Normally, this state is set when tool is replaced with a new tool.

3

Indicates tool error 1 tool.

When controller inputs the tool error 1 signal, this state is set.

4

Indicates tool error 2 tool.

When controller inputs the tool error 2 signal, this state is set.

- 225 -

9.3.6 Examples of Tool Life Management Screen

Tool life management screen examples are given below.

For operation, refer to the Operation Manual.

9. Exclusive Commands

Tool life management screen example on 9-inch CRT setting and display unit

- 226 -

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. Generally, data is read or written for each data piece; data concerning the control axes is processed in batch as many as the specified number of axes.

9.4.1 Basic Format of Command

1) File registers (Rn) and data registers (Dn) to which the user is accessible can be used as the asynchronous DDB control data buffer. The file registers (R) to which the user is accessible are R500 through R549 (not backed up) and R1900 through R2799 (backed up).

9.4.2 Basic Format of Control Data

- 227 -

(1) Control signals (Rn), (Dn)

9. Exclusive Commands

(2) Large section number (Rn+1), (Dn+1)

Specify the large section number of the data to be read/written in binary form.

(3) Sub-section number (Rn+2, Rn+3), (Dn+2, Dn+3)

(LOW) (HIGH) (LOW) (HIGH)

Specify the sub-section number of the data to be read/written in binary form.

(4) Data size (Rn+4), (Dn+4)

Specify the size of the data to be read/written in binary form.

1: One byte

2: Two bytes

4: Four bytes

If any value other than 1, 2, or 4 is specified, the invalid data size alarm will occur.

(5) Read/write specifications axis (Rn+5), (Dn+5)

Specify the axis to read or write data for each axis classified by major classification numbers.

If axis specification is not made or exceeds the maximum control axis when axis data is read or written, the invalid axis number alarm will occur.

- 228 -

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.

The effective portion of data varies depending on the data size. (Hatched portion)

When read is specified the sign of 1-byte or 2-byte is extended to four bytes.

The main data that can be referenced by using the DDB function is listed below.

Specification

item

Contents Read Write Remarks

Asynchronous Current position in work coordinate, machine coordinate system, length, radius offset amount

Parameters

Maximum rotation speed of spindle, second, third,

and fourth reference position coordinates,

stroke stored limit, coordinate system offset, etc.

User macro variables

Modal data of G code, etc.

Controller alarm number

External work coordinate system input,

external tool compensation input

— —

PLC axis control, etc. — —

Caution:

The DDBA command is issued after setting necessary data such as control signal and large and sub-classification numbers to the buffer (Rn or Dn). A read or write of the control signal is specified only once before execution of the DDBA command to prevent error codes stored in high-order bits by the CNC from being erased.

- 229 -

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.

(Note 1) File register (Rn) that can be used by the

user is used for the control data buffer.

Data register (Dn) cannot be used.

(Note 2) System designation is used for 2-system

specifications.

Command

(Note) Unassigned bits will be used for later function

extension. Use only bits shown here.

- 230 -

9. Exclusive Commands

(2)

The search state is indicated.

The status is set by the controller and is used by PLC for completion check, etc.

The status is cleared by the controller when the search start instruction execution condition is off.

(3)

Specify the program number to be searched in binary form in the range of 1 to 99999999 (eight digits).

Specify 0 to search for the sequence number of the current program selected.

If a number other than 0~99999999 is specified, a data specification error will occur.

(4)

Specify the sequence number to be searched in binary form in the range of 1 to 99999 (five digits).

Specify 0 to search for the head of the specified program number.

If a number other than 0~99999 is specified, a data specification error will occur.

(5)

Specify the block number to be searched in binary form in the range of 0 to 99 (two digits).

If a number other than 0~99 is specified, a data specified error will occur.

Program

Sequence No. Search

Specified Specified Memory or tape is searched for the specified sequence number of the specified program.

Specified Not specified (=0) Memory or tape is searched for the top of the specified program.

Not specified (=0) Specified Memory or tape is searched for the specified sequence number of the current program selected.

Not specified (=0) Not specified (=0) Error (no specification)

(6)

Specify the system to be searched. If no system specification is made, only the first system is searched.

- 231 -

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:

9.5.4 Timing Charts and Error Causes

(1)

(2) Search error completion

- 232 -

(3) Search error completion (Data specification error)

9. Exclusive Commands

- 233 -

9.5.5 Sequence Program Example

9. Exclusive Commands

RST: Reset signal (reset button, output during reset, etc.)

- 234 -

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

· Operator message display

· PLC switches

· Key operation by user PLC

· Load meter display

· External machine coordinate system compensation

· User PLC version display

- 235 -

10. PLC Help Function

10.1 Alarm Message Display

The contents of an alarm that occurred during sequence (user PLC) processing can be displayed on the CRT setting and display unit.

Up to four alarm messages can be displayed at a time on the alarm diagnosis screen. The maximum length of a message is 32 characters.

10.1.1 Interface

The alarm message display interface is available in the two types: F type in which temporary memory F is used for message display request and R type in which file register (R) is used for message display request. Either type is selected by using a parameter.

(1) F type interface

This interface applies to 128 points of temporary memory F0~F127.

If temporary memory F is used as the alarm interface, do not use it for another purpose.

The highest priority is assigned to the F0 signal. The message corresponding to Fn set to 1 is fetched from the message table and displayed in order starting at F0. If no messages are prepared or Fm greater than the number of prepared messages is set to 1, the message

"USER PC ERROR m" is displayed.

(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.

- 236 -

10. PLC Help Function

The messages are displayed starting at the message corresponding to R158 from top to bottom.

Since message display is cleared by setting the R register to 0, number 0 in the table message cannot be used in the R mode.

If greater value than the number of prepared messages, m is set in the R register, the message

"USER PC ERROR m" is displayed.

(3) Alarm classification display

Classification number can be displayed following the message to be displayed regardless of the F or R type. (Dn1~Dn4 in the figure)

For example, one typical alarm message is prepared and classification number can be used to indicate the alarm source or cause.

Example) When spindle alarm occurs, the message "SPINDLE ALARM" is displayed and the alarm source or cause is indicated by the classification number.

SPINDLE 5

(Note 1)

This varies depending on the alarm cause or source.

For the classification number, the contents of each data register specified in alarm message preparation are displayed. Data register D0 cannot be specified. message display changes. It is not updated if only the contents of the specified data register (Dn1 to Dn4) change. If the contents of the specified data register are 0, no classification numbers are displayed.

Display example of 9-inch CRT setting and display unit

10.1.2 Message Creation

Create messages by using PLC development software.

Set the length of a message and the number of messages to be prepared, then enter message data through the keyboard.

The maximum length of an alarm message is 32 characters (even numbers).

A maximum of 256 alarm messages can be prepared. However, the number of alarm messages may be limited depending on the available memory capacity. For details, refer to the PLC

Development Manual (Personal Computer Section).

- 237 -

10. PLC Help Function

10.1.3 F or R Type Selection Parameter

Set the parameter on the machine manufacturer parameter bit selection screen.

7 6 5 4 3 2 1 0

Use number 6450.

Alarm message valid.

0: F mode

1: R mode

(Reference) #6450 corresponds to the high-order byte of file register R2924.

- 238 -

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. One operator message can be displayed at a time.

10.2.1 Interface

An operator message is displayed by setting the number of the operator message table to be displayed in file register R162. It is cleared by setting R162 to 0. Thus, number 0 of the operator message table cannot be displayed.

Display example of 9-inch CRT setting and

display unit

As with alarm messages, the contents of the data register specified for the class number display in operator message preparation are also displayed. not updated if only the contents of the specified data register (Dn) change.

To change the class number display only, the contents of R162 must be cleared to 0. If the contents of the specified data register are 0, no class numbers are displayed.

- 239 -

10. PLC Help Function

10.2.2 Operator Message Preparation

Create messages by using PLC development software.

On M-FAS, set the length of a message and the number of messages to be prepared, then prepare message data.

The maximum length of an operator message is 60 characters (even numbers). A maximum of 256 operator messages can be prepared. However, the number of operator messages may be limited depending on the available memory capacity. For details, refer to the PLC Development Manual

(Personal Computer Section).

10.2.3 Operator Message Display Validity Parameter

The parameter is set on the machine manufacturer parameter bit selection screen.

7 6 5 4 3 2 1 0

Use number 6450. Operator message display valid.

(Reference) #6450 corresponds to the high-order byte of file register R2924.

- 240 -

10. PLC Help Function

10.3 PLC Switches

Similar function to machine operation switches can be provided by using the controller CRT setting and display unit. The number of switch points is 32. The switch names can be given as desired.

10.3.1 Explanation of CRT Screen

The CRT screen is explained below.

PARAMETER SCREEN PLC SWITCH (MENU)

- 241 -

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 setting part # ( ) and press the

INPUT

CALC

key.

Depending on the state of the switch, its input device X is turned on (off) and accordingly the switch mark indicates the on (off) state.

The switch can be turned off (on) the same way.

Special relay E can reverse the switch on/off states. When special relay E is activated, the on/off state of the corresponding switch and device X is reversed.

To display the switch validity state, etc., the switch name can be highlighted. To do this, turn on or off output device Y corresponding to the switch name.

The corresponding table of the switch numbers, input device X, output device Y, and special relay E is listed below:

Switch

No.

Corresponding

device

Switch

X Y E

No.

Corresponding

device

E Y E

#1 X140 Y160 E80 #17 X150 Y170 E96

#2 X141 Y161 E81 #18 X151 Y171 E97

#3 X142 Y162 E82 #19 X152 Y172 E98

#4 X143 Y163 E83 #20 X153 Y173 E99

#5 X144 Y164 E84 #21 X154 Y174 E100

#6 X145 Y165 E85 #22 X155 Y175 E101

#7 X146 Y166 E86 #23 X156 Y176 E102

#8 X147 Y167 E87 #24 X157 Y177 E103

#9 X148 Y168 E88 #25 X158 Y178 E104

#10 X149 Y169 E89 #26 X159 Y179 E105

#11 X14A Y16A E90 #27 X15A Y17A E106

#12 X14B Y16B E91 #28 X15B Y17B E107

#13 X14C Y16C E92 #29 X15C Y17C E108

#14 X14D Y16D E93 #30 X15D Y17D E109

#15 X14E Y16E E94 #31 X15E Y17E E110

#16 X14F Y16F E95 #32 X15F Y17F E111

(Note 1) Input device X also holds the state if power is

turned off.

- 242 -

10. PLC Help Function

The table below shows the message displayed during operation on the PLC switch screen.

No. Message Explanation

E01

SETTING

ERROR

10.3.3 Signal Processing

A number outside the allowable setting range from 1 to 32 is specified in # ( ).

Remedy

Specify a valid number within the range.

· When setting is done on the PLC switch screen, the input device X corresponding to the specified switch number is turned on or off to switch over the switch state.

· When special relay E is turned on from the user PLC, its corresponding input device X and the switch state are reversed. Special relay E is reset immediately after the CNC reverses the input device X and the switch state. It is turned on by one pulse (scan) only also in the user PLC. In either case, when output device Y is set to on based on the input device X state, the corresponding switch name is highlighted.

- 243 -

10. PLC Help Function

The following shows an example of operation of special relay E from the user PLC.

(Example) When two opposite switches, chip conveyer manual and chip conveyer automatic, are provided;

- 244 -

1) When switch 15 (X14E) is on and switch 16 (X14F) is off, Y16E and

M1 turn on. [Initial state]

2) When switch 16 (X14F) turns on while being in state 1), Y16E turns off, E94 turns on, and M1 turns off.

3) Turning E94 on reverses X14E (to off).

4) When X14E is off and X14F is on,

E94 turns off and Y16F and M2 turn on.

5) When switch 15 (X14E) turns on while being in state 4), Y16F turns off, E95 turns on, and M2 turns off.

6) Turning E95 on reverses X14F (to off).

7) When X14F is off and X14E is on,

E95 turns off and Y16E and M1 turn on again.

10. PLC Help Function

(Example) When three opposite switches 17, 18, and 19 are provided;

- 245 -

(3) External switch and PLC switch

10. PLC Help Function

Under sequence control in the above example, the switch marks on the PLC switch screen can be operated from both external and PLC switches.

2) When an external switch (XC) that inhibits a PLC switch handle interrupt is provided;

Under sequence control in the above example, when the external switch (XC) is on, the PLC switch for a handle interrupt cannot be turned on.

- 246 -

10. PLC Help Function

10.3.4 Switch Name Preparation

Prepare PLC switch names by using PLC development software.

Alphanumeric, kana, katakana, and Kanji characters can be used for the switch name. For details, refer to the PLC Development Manual (Personal Computer Section).

- 247 -

10. PLC Help Function

10.4 Key Operation by User PLC

(This cannot be used with the MELDASMAGIC 64 Series.)

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

1) Key data is set in file registers R16 and R112 at the top of the user PLC main.

2) The user PLC refers to the key data and performs necessary processing.

3) The user PLC sets the key data matching the operation board being used in R112.

4) After user PLC main processing is performed, controller performs valid key data processing according to the R16 and R112 contents.

10.4.2 Key Operations That Can Be Performed

1) When a key is pressed, it is ignored.

· The R16 contents are judged and NULL (00H) code is set in R112.

2) When R16 is NULL, that is, key operation is not performed, user PLC performs key operation conforming to the operator.

· Key data matching the target operation is set in R112.

- 248 -

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.

Example)

- 249 -

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)

READY LED

Setting keys Function selection keys

Alphabetic character, numerical character, and symbol keys

MITSUBISHI

CRT/EL display

MONI-

TOR

READY

TOOL

PARAM

F

E

X

U

O

A

\

P

M

(

N

B

Y

V

D

L

Q

J

S

)

?

EDIT

MDI

G

C

[

T

R

K

I

H

Z

W

RESET

DIAGN

IN/OUT

SFG F0

7 8 9

4

5 6

1

2

-

+

]

EOB

0

S P

=

#

DELETE

INS

3

/

*

,

.

CB

CA N

SHIFT

INPUT

CALC

Page keys

Menu keys

Reset key

Cursor keys

Data correction keys

Input key (calculation)

Shift key

(2) Key layout for communication terminal CT120

MITSUBISHI

CRT display

F

E

X

U

O

A

\

P

(

M

MONI-

TOR

READY

TOOL

PARAM

N

B

D

L

Y

V

Q

J

)

S

?

EDIT

MDI

[

T

G

C

R

K

I

H

Z

W

RESET

DIAGN

IN/OUT

SFG F0

7 8 9

4

5 6

1

2 3

-

+

]

EOB

0

S P

=

#

DELETE

INS

/

*

,

.

CB

CA N

SHIFT

INPUT

CALC

(Note

When inputting an alphabet or symbol on the lower right of the alphabet or symbol keys, press

SHIFT , and then press the corresponding key.

(Example) When SHIFT

O

A

are pressed, "A" will be input.

- 250 -

10. PLC Help Function

10.4.5 List of Key Codes

(1) For communication terminal CT100, KB10 (M series)

Key symbol

Code

(HEX)

Key symbol

Code

(HEX)

Key symbol

MONITOR 80 ( ) 0B(F8) – (+)

TOOL/PARAM 81 ( ) 0A(F7) • (, )

EDIT/MDI 83 ( )

DIAGN IN/OUT 85 ( )

08 (F5)

09(F6)

EOB ( ] )

= (#)

Code

(HEX)

2D(2B)

2E(2C)

3B (5D)

3D(23)

Key symbol

O (A)

N (B)

G (C)

X (U)

Code

(HEX)

4F(41)

4E(42)

47 (43)

58(55)

SFG 86

(INS)

7F(8C) / (*) 2F(2A) Y (V)

C.B.(CAN) Z

59(56)

SHIFT 88 0 (SP) 30(20) F (E) 46(45)

Previous page

Next page

Menu 1

Menu 2

Menu 3

Menu 4

90

9A

91

92

93

94

Window key

(?HELP)

Activ Wind

(CTRL)

3

6

7

8

9 ($)

32 !

33 P ( I ) 50 (49)

36

37

38

39(24)

M ( ( )

S ( ) )

T ( [ )

4D(28)

53(29)

54(5B)

* The key signals and codes shown in parentheses are the shift IN side key signals.

Shift is canceled by pressing another key after pressing the shift key, or by pressing the shift key again.

Example

SHIFT

N

B

0

SP

88 42 30 generated

Example

SHIFT SHIFT

0

SP

88 88 30 generated

- 251 -

10. PLC Help Function

(2) For communication terminal CT120 (L series)

Key symbol

MONITOR

Code

(HEX)

Key symbol

80 ( )

TOOL/PARAM 81 ( )

EDIT/MDI 83 ( )

DIAGN IN/OUT 85 ( )

Code

(HEX)

0B(F8)

0A(F7)

Key symbol

– (+)

• (, )

08 (F5)

09(F6)

EOB ( ] )

= (#)

Code

(HEX)

2D(2B)

2E(2C)

3B (5D)

3D(23)

Key symbol

O (A)

N (B)

G (C)

X (U)

Code

(HEX)

4F(41)

4E(42)

47 (43)

58(59)

SFG 86

(INS)

7F(8C) / (*) 2F(2A) Z (H)

C.B.(CAN) F

5A(48)

SHIFT 88 0 (SP) 30(20) U (V) 55(56)

Previous page

Next page

Menu 1

Menu 2

Menu 3

Menu 4

90

9A

91

92

93

94

Window key

(?HELP)

Activ Wind

(CTRL)

8A(8B) 5

6

7

8

9 ($)

35

36

37

38

39(24)

S ( ! )

R ( ( )

D ( ) )

T ( [ )

53(21)

52(28)

44(29)

54(5B)

* The key signals and codes shown in parentheses are the shift IN side key signals.

Shift is canceled by pressing another key after pressing the shift key, or by pressing the shift key again.

Example

SHIFT

N

B

0

SP

88 42 30 generated

Example

SHIFT SHIFT

0

SP

88 88 30 generated

- 252 -

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 message function.

10.5.1 Interface

- 253 -

10. PLC Help Function

File register (R) for load meter display

Load meter 1

Load meter 2

Numerical display

Bar graph display

Numerical display

Bar graph display

For $1 For $2

R152 R352

R153 R353

R154 R354

R155 R355

(Note 1) Use $1 for models not having a system.

Display example of 9-inch CRT setting and display unit

(Note: This screen consists of 80 characters wide x 18 lines long.)

- 254 -

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.

The interface between user PLC and CNC is shown below.

File

register

Contents

File

register

Contents

R570

R571

(Note 1) Use $1 for models not having a system.

Data in file registers R560~R575 is not backed up. If it must be backed up, use back-up file registers (R1900~R2799).

1) The maximum delay to compensation is (one user PLC scan + 15ms). However, smoothing time constant and servo follow delay are not contained.

- 255 -

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.

(1) To display a 2-digit version code

- 256 -

(2) To display a 3-digit version code

10. PLC Help Function

Program

- 257 -

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

Simultaneous control axes

Command unit

Feedrate

Max. 2 axes

The PLC control axis is controlled independently of the NC control axis.

Simultaneous start of multiple PLC axes is possible.

Min. command unit 0.001mm (0.0001 inch)

0.0001mm

(Same command unit as the NC control axis.)

(Min. command unit 0.001mm)

Rapid traverse 0 to 240000 mm/min. (0 to 24000 inch/min.)

Cutting feed 0 to 240000 mm/min. (0 to 24000 inch/min.)

(Min. command unit 0.0001mm)

Rapid traverse 0 to 24000 mm/min. (0 to 2400 inch/min.)

Cutting feed 0 to 24000 mm/min. (0 to 2400 inch/min.)

Movement commands Incremental value commands from the current position.

Absolute value commands of the machine coordinate system.

0~

±99999999 (0.001mm/0.0001inch)

Operation modes Rapid traverse, cutting feed

Jog feed (+), (-)

Linear acceleration/linear deceleration

Reference point return feed (+), (-)

Handle feed

Acceleration/ deceleration

Rapid traverse, Jog feed

Reference point return feed

Cutting feed

Exponential function acceleration/

Handle feed } Step

Backlash compensation

Stroke end

Soft limit

Rotation axis commands

Provided

Not provided

Provided

Provided

Absolute value commands ・・・・ Rotation amount within one rotation.

(Rotates the remainder divided by 360°.)

Incremental commands ・・・・・・・ Rotates the commanded rotation amount.

Inch/mm changeover Not provided

Command to match the feedback unit.

Position detector Encoder (absolute position detection also possible)

- 258 -

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.

The same control can be realized using an interface dedicated for PLC control axes.

(4) There is no dedicated emergency switch. The emergency stop is valid in the same manner as the

NC control axis.

- 259 -

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

R-register

(*Note 1)

with the PLC, and calling the DDBS function.

11.3.1 DDBS Function Command

ACT

*Note 1

DDBS Rn

When ACT is set to 1, the PLC axis control process is carried out with the control information data contents. Thus, ACT should be set to 1 during PLC axis control.

Setting ACT to 0 causes a reset status.

(Note 1) The following R-registers can be used.

R500 to R549 (No battery backup)

R1900 to R2799 (Battery backup)

- 260 -

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.

R n

+ 0

1

2

3

4

5

6

7

8

9

10

11

12

13

2 bytes

2 bytes

2 bytes

2 bytes

2 bytes

2 bytes

4 bytes

4 bytes

4 bytes

4 bytes

Command

Status

Alarm details

Control signal

Axis designation

Operation mode

Feedrate

Movement data

Machine position

Remaining distance

PLC

CNC

PLC

CNC

CNC

PLC

CNC

PLC

A max. of 2 axes can be controlled by the PLC. Each axis should have its own control information data.

R n1

+ 0

1st axis control information data

R n2

+ 0

2nd axis control information data

- 261 -

11. PLC Axis Control

11.3.3 Control Information Data Details

11.3.3.1 Commands

Commands consist of main commands and sub-commands.

F

R n

+ 0 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" and "output" are the input/output looking from the PLC side.

- 262 -

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

R n

+ 1 bit 0: busy

1: den

Command processing

Axis movement completed

2: move Axis moving

3: SA

4: svon

5: ZP

Servo ready

Servo ON

Reference point reached

6:

7: WAIT Axis movement wait bit 8 : oper

9 :

A:

B:

C:

D:

E: ALM2

F: ALM1

Option error

Axis in control alarm

Control information data bit 0: busy Command processing

This turns ON when the command is being processed.

The next command is not received while this bit is ON. The next command to be issued is received while this bit is OFF. bit 1: den Axis movement completed

This bit turns ON when the initialization and commanded movement are completed. This bit stays OFF during movement, even when an interlock is applied. This bit turns ON at reset or servo OFF, or when ACT = 0. bit 2: move Axis moving

This bit turns ON when the machine is moving, and turns OFF when the machine is stopped. bit 3: SA Servo ready

This bit turns ON when the servo is ready. It turns OFF during emergency stops and servo alarms. bit 4: svon Servo ON

This bit turns OFF when a servo OFF signal is output. It also turns OFF during emergency stops and servo alarms.

Machine movement is possible when this signal is ON. bit5: ZP Reference point reached

This bit turns ON when the reference point is reached after completion of a reference point return.

It turns OFF when the machine moves. bit7: WAIT Axis movement wait

This bit turns ON in the buffering mode when the axis movement of the previous block has been completed, and the machine is in a WAIT 5 status. It turns OFF when the previous block movement is completed and the movement of the next block begins.

- 263 -

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.

After the cause of the alarm has been removed, turn the bit OFF by outputting a reset signal, setting ACT to 0, or turning the power OFF then ON again.

(Note) When alarms occur during axis control, the same alarms appear in the CRT screen as for NC control axes. Set the PLC 1st axis to "1", and the PLC 2nd axis to "2".

Example: When a servo alarm occurs for the PLC 1st axis

S03 Servo alarm 52 1

PLC axis bit F: ALM:1 Control information data designation alarm

This bit turns ON when the designated details of the control information data are illegal. Thus, the PLC axis control process is not executed. Turn the bit OFF by correcting the data, outputting a reset signal, or setting ACT to 0.

- 264 -

Timing chart

(1) For rapid traverse and cutting feed mode

ACT

Start busy den move

Speed

(2) For jog feed mode

ACT

Start busy den move

Speed

(Note) The axis moves by jog feed only during start ON.

11. PLC Axis Control

- 265 -

(3) For reference point return feed mode

(3-1) Dog-type reference point return

ACT

Start busy den move

ZP

11. PLC Axis Control

Speed

(G1 mode)

(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.

(Note 2) The first reference point return after the power is turned ON is always dog-type. All returns after that are high-speed reference point returns.

(3-2) High-speed reference point return

ACT

Start busy den move

ZP

Speed

(G1 mode)

- 266 -

(4) For handle feed mode

ACT

Start busy den move

Handle

Speed

(Note) Handle feed is possible only during start ON.

11. PLC Axis Control

- 267 -

(5) When the interlock signal is ON (= 1)

ACT

Start

Interlock busy den move

Speed

(6) When the reset signal is ON (= 1)

ACT

Start

Reset busy den move

Speed

11. PLC Axis Control

- 268 -

(7) When the servo OFF signal is ON (= 1)

ACT

Start

Servo OFF busy den move svon

Speed

(8) When the ACT signal is OFF (= 0)

ACT

Start busy den move

Speed

11. PLC Axis Control

- 269 -

11. PLC Axis Control

11.3.3.3 Alarm No.

The alarm Nos. of status ALM1 and ALM2 are set.

F

ALM1 Alarm No. ALM2 Alarm No.

The details of each alarm No. are shown below.

(1) ALM1 (Control information data designation alarm)

Alarm No.

01

02

Details

Control signal illegal

(A signal other than a registered control signal has been commanded.)

Axis No. illegal

03

04

Operation mode illegal (0 to 6)

Movement data range exceeded -99999999 to +99999999

05

06

·

·

·

10

Zero point return not complete

(absolute value command not possible)

11

12

(2) ALM2 (Axis in control alarm)

Alarm No.

0

1 Z-phase not passed

Details

Servo alarm (Alarm No. is displayed in the PLC axis monitor screen.

Refer to the Drive Unit Maintenance Manual for details.)

2

3

Soft limit (+)

Soft limit (-)

- 270 -

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

R n

+ 3 bit 0: Start

1:

2: bit 8 : Absolute value command

Interlock

A:

3: Servo OFF

4: Axis removal

5: Axis removal 2

B:

C:

D:

6: E:

7: F: bit 0: Start

Starting begins at the at the rising edge (OFF -> ON) of the start signal, based on the control information data.

The axis does not move during interlock, servo OFF, axis removal and axis removal 2.

Movement starts after interlock, servo OFF, axis removal and axis removal 2 are canceled.

Start is invalid during resetting. bit 1: Interlock

The moving PLC axis executes a deceleration stop when the interlock signal turns ON. The stopped PLC axis will resume movement when the interlock signal turns OFF (is canceled). bit 2: Reset

The PLC axis is reset when the reset signal turns ON. Moving PLC axes will execute a deceleration stop. Commands and controls are invalid during resetting.

If the reset signal turns ON during an alarm occurrence, the alarm will be cleared. bit 3: Servo OFF

The PLC axis will execute a deceleration stop and its servo will turn OFF when the servo OFF signal turns ON. Whether the PLC axis movement is compensated during servo OFF can be selected in the basic specification parameter "#1064 svof".

A servo ON status will result when the power is turned ON. bit4: Axis removal

The axis will execute a deceleration stop, and a servo OFF status will result, when the axis removal signal turns ON. A servo ON status will result and the stopped PLC axis will resume movement when the axis removal signal turns OFF (is canceled).

Axis removal is validated when either this signal or machining parameter and axis parameter

"#8201 Axis Removal" is validated.

The zero point return will become incomplete when the axis is removed. Therefore, a dog-type reference point return must be completed again when starting with an absolute value command.

- 271 -

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).

A restart must be executed to start the movement again.

Position control cannot be carried out while the axis removal 2 signal is ON. However, position detection is possible so the position will not be lost. bit 8: Absolute value command

Turn this bit ON when the movement data is commanded in absolute values.

When this bit is OFF, the commands will be processed as incremental value commands.

- 272 -

11. PLC Axis Control

11.3.3.5 Axis Designation

The axis No. of the PLC axis is designated.

R n

+ 4

Axis designation

0:

1:

11.3.3.6 Operation Mode

The operation mode for the PLC axis is designated.

R n

+ 5 Operation mode

Rapid

1:

Jog

3:

4:

Reference

6:

The axis movement will not be affected by changing the operation mode, even while the axis is moving. The new operation mode is validated at the next start.

- 273 -

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.

R n

+ 6

Feedrate

7

Designation

1 to 240000 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.

(Note 2) The feedrate can be changed during axis movement. In that case, change using a direct feedrate data (Rn + 6, 7) is possible.

11.3.3.8 Movement Data

When the operation mode is rapid traverse or cutting feed, the movement data is designated with a binary code.

R n

+ 8

9

Movement data value

0 to

±99999999 (0.001mm/0.0001inch)

(Note 1) The movement data is classified as follows by the absolute value command flag (bit 8) of the command signal.

Absolute value command flag = 0: Incremental value from the current position

Absolute value command flag = 1: Absolute value of the machine coordinate system

(Note 2) If the movement amount is changed during axis movement, the new movement amount will be validated at the next start.

- 274 -

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.

R n

+ 10

11

13

Remaining distance (input unit)

Machine position (input unit)

11.3.3.10 Remaining Distance

The remaining distance of the movement data output to the machine system is expressed.

R n

+ 12

- 275 -

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

Y2E2

Y2E3

Y2E4

Y2E5

Y2E6

Y2E7

Reference point return near point detection 1

Reference point return near point detection 2

(Note) The responsiveness when the dog signal is set in PLC middle-speed processing is worse than when set in PLC high-speed processing.

- 276 -

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 HS1P 1st handle PLC axis valid

Y2E5 HS2P 2nd handle PLC axis valid

Y2E6

Y2E7

When Y2E4 and Y2E5 are ON, each handle is PLC axis dedicated and not valid for NC axes.

Y248 to Y24F and Y250 to Y257 are used for the axis selection of each handle.

(Note) 1. The handle feed magnification is also used for NC control axes.

- 277 -

12. Appendix

12. Appendix

12.1 Example of Faulty Circuit

Wrong configurations of circuits are shown below. Correct the circuitry, if any.

Correct circuit Faulty circuit producing errors

(1) Circuit containing OR

(2) Rounding circuit

X1

X3

X2

X4

Y10

Y11

Whether or not the Y10 condition includes X3, X4 and X2 is unknown.

(3) Modification of loopback circuit

0

0

0

1

X1

X2 X3

X1

X3

X2

X4

X4

Y10

Necessity

Y11

0

1

(4) Presence of a contact before RET, FEND, or MCR circuit

RET

RET

- 278 -

Sub-No.

Date of revision

February 1998 First edition created.

Revision details

1998 MITSUBISHI ELECTRIC CORPORATION

ALL RIGHTS RESERVED

(0208)MEE

MODEL

MODEL

CODE

Manual No.

MITSUBISHI ELECTRIC CORPORATION

HEAD OFFICE : MITSUBISHI DENKI BLDG., 2-2-3, MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN

M60/60S Series

008-099

BNP-B2212*(ENG)

Specifications subject to change without notice.

Printed in Japan on recycled paper.

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

Download PDF

advertisement