Mitsubishi Electric MELDAS C6 Programming Manual
Mitsubishi Electric MELDAS C6 Programming Manual

Mitsubishi Electric MELDAS C6 Programming Manual

Hide thumbs Also See for MELDAS C6:
Table of Contents

Advertisement

Quick Links

CNC
C6/C64
PLC PROGRAMMING MANUAL
(Ladder Section with MELSEC Tool)
BNP-B2309D(ENG)
Get other manuals https://www.bkmanuals.com

Advertisement

Table of Contents
loading

Summary of Contents for Mitsubishi Electric MELDAS C6

  • Page 1 C6/C64 PLC PROGRAMMING MANUAL (Ladder Section with MELSEC Tool) BNP-B2309D(ENG) Get other manuals https://www.bkmanuals.com...
  • Page 2 MELSEC and MELDAS are the registered trademarks of Mitsubishi Electric Corporation. Microsoft, Windows and Microsoft Windows NT are the registered trademarks of Microsoft Corporation in the United States and/or other countries. Other company and product names herein may be the trademarks or registered trademarks of their respective owners.
  • Page 3 Introduction These specifications are the programming manual used when creating the sequence program with the PLC development software, or Mitsubishi Electric Co.’s integrated FA software MELSOFT series (GX Developer). The PLC (Programmable Logic Controller) is largely divided into the basic commands, function commands and exclusive commands, and ample command types are available.
  • Page 4 Precautions for Safety Always read the specifications issued by the machine manufacturer, this manual, related manuals and attached documents before installation, operation, programming, maintenance or inspection to ensure correct use. Understand this numerical controller, safety items and cautions before using the unit. This manual ranks the safety precautions into "DANGER", "WARNING"...
  • Page 5 CAUTION 3. Items related to program development Always observe the cautions before development to develop a program. If the data transferred does not follow the file name rule, the CNC will mistake it for another data, resulting in unexpected operation, e.g. PLC program erasure. Do not read a sequence program on which a conversion error occurred into the GX Developer.
  • Page 6: Table Of Contents

    Contents 1. PLC Development Environment Using GX Developer ............1 1.1 Function ..........................1 1.1.1 Development Environment Configuration..............1 1.1.2 Software Configuration ....................1 1.1.3 GX Developer Functions Supported by C64 Series ...........3 1.1.3.1 Function Support Conditions (general section)..........3 1.1.3.2 Function Support Conditions (on-line section)..........7 1.2 Setup..........................10 1.2.1 Installing the Tools ....................10 1.2.2 Connecting the Serial Cable ..................10...
  • Page 7 3.3 High-Speed Input/output Designation Method ..............57 4. Parameters ..........................58 4.1 PLC Constants........................58 4.2 Bit Selection Parameters ....................59 5. Explanation of Devices ......................63 5.1 Devices and Device Numbers ...................63 5.2 Device List..........................63 5.3 Detailed Explanation of Devices..................64 5.3.1 Input/output X, Y ......................64 5.3.2 Internal Relays M and F, Latch Relay L..............65 5.3.3 Special Relays SM ....................65 5.3.4 Link Relay B, Link Register W ..................66...
  • Page 8 10.1.12 Examples of Tool Registration Screen ...............351 10.1.13 Display of Spindle Tool and Standby Tool............353 10.2 S.ROT Commands ......................354 10.2.1 Command List .......................354 10.3 Tool Life Management Exclusive Command..............360 10.3.1 Tool Life Management System ................360 10.3.2 Tool Command System ..................360 10.3.3 Spare Tool Selection System ................361 10.3.4 Interface ........................361 10.3.5 User PLC Processing When the Tool Life Management Function Is Selected ...362...
  • Page 9 12.3.3.3 Alarm No....................414 12.3.3.4 Control Signals (PLC axis control information data) ........415 12.3.3.5 Axis Designation..................417 12.3.3.6 Operation Mode..................417 12.3.3.7 Feedrate ....................418 12.3.3.8 Movement Data ..................418 12.3.3.9 Machine Position ..................419 12.3.3.10 Remaining Distance ................419 12.3.4 Reference Point Return near Point Detection ............420 12.3.5 Handle Feed Axis Selection..................421 Appendix 1.
  • Page 10: Plc Development Environment Using Gx Developer

    1. PLC Development Environment Using GX Developer 1.1 Function 1. PLC Development Environment Using GX Developer In the C64 Series, the user PLC development environment is supported using MELSEC PLC development tool, which is Mitsubishi integrated FA software MELSOFT series (GX Developer). This manual explains system configurations user PLC development environment using GX Developer, mainly usage specific to MELDAS.
  • Page 11 (1) GX Developer (PLC development software package for Windows) GX Developer is a programming software package (model name: SW7D5C-GPPW) designed for Mitsubishi Electric's MELSEC series programmable logic controllers. The conventional function corresponding to MELDAS PLC development S/W (PLC4B) has been reinforced, and, furthermore, that is a strong tool added the monitoring function by way of RS-232C.
  • Page 12: Gx Developer Functions Supported By C64 Series

    1. PLC Development Environment Using GX Developer 1.1 Function 1.1.3 GX Developer Functions Supported by C64 Series The GX Developer functions explained here are those supported by the C64 Series in the "off-line functions" operated with the GX Developer independently and "on-line functions" carried out connected to the CNC controller.
  • Page 13 1. PLC Development Environment Using GX Developer 1.1 Function List of general section functions (2) : Possible, : Limitedly possible, : Not possible Function Menu Sub menu Support Remarks (Project) Macro Registration macros Macro utilize Delete macros Macro reference path Printer setup Print Start new GX Developer session...
  • Page 14 1. PLC Development Environment Using GX Developer 1.1 Function List of general section functions (3) : Possible, : Limitedly possible, : Not possible Function Menu Sub menu Support Remarks Find/Replace Find device Find instruction Find step no. Find character string Find contact or coil Replace device Replace instruction...
  • Page 15 1. PLC Development Environment Using GX Developer 1.1 Function List of general section functions (4) : Possible, : Limitedly possible, : Not possible Function Menu Sub menu Support Remarks Tools Check program Merge data Check parameter Transfer ROM Read Write Verify Write to file Delete unused comments...
  • Page 16: Function Support Conditions (On-Line Section)

    1. PLC Development Environment Using GX Developer 1.1 Function 1.1.3.2 Function Support Conditions (on-line section) The following shows a list of GX Developer on-line functions supported by the C64 Series. mark indicates functions that can currently be used by the C64 Series. An r mark indicates that the function cannot be used because it is related to "MELSEC Series"...
  • Page 17 1. PLC Development Environment Using GX Developer 1.1 Function List of on-line section functions (2) : Possible, : Limitedly possible, : Not possible Menu Sub menu Detailed function Support Remarks Monitor Monitor mode ON/OFF state Scan time PLC status Monitor [Write mode] Start monitor [All windows] Stop monitor...
  • Page 18 1. PLC Development Environment Using GX Developer 1.1 Function List of on-line section functions (3) : Possible, : Limitedly possible, : Not possible Menu Sub menu Detailed function Support Remarks Debug Device test FORCE ON FORCE OFF Toggle force Device Buffer memory Debug Skip execution...
  • Page 19: Setup

    Refer to the enclosed Operating Manual for the setup and start procedures of each tool. 1.2.2 Connecting the Serial Cable As for the serial port connected with the CNC, refer to the MELDAS C6/C64/C64T Connection and Maintenance Manual (BNP-B2255). (1) RS-232C connection...
  • Page 20: Developing Plc Programs

    1. PLC Development Environment Using GX Developer 1.2 Setup (2) RS-422 connection MELSEC-dedicated cable can be used to connect with C64 controller. Refer to the GX Developer Operating Manual for details. (3) Ethernet connection For the connection using Ethernet, the Ethernet card (FCU6-EX875) must be mounted to the extension slot on the control unit.
  • Page 21 1. PLC Development Environment Using GX Developer 1.3 Developing PLC Programs (5) Statements and notes GX Developer allows a PLC program to be commented (with interlinear statements and notes). They are available in two types: integrated and peripheral. Integrated type : Can be downloaded together with a ladder program to the CNC controller.
  • Page 22: Creating A New Program

    1. PLC Development Environment Using GX Developer 1.3 Developing PLC Programs List of PLC-related data File name Related data classification Remarks (GX Developer) PLC program (ladder) zzzzzz.WPG PLC ladder code PLC program comment zzzzzz.WCD Comment data for GX Developer 3 Message 1st language M1xxxx.WPG Message 1st language data such as alarm messages/...
  • Page 23: Specifying The Connection Target

    1. PLC Development Environment Using GX Developer 1.3 Developing PLC Programs 1.3.3 Specifying the Connection Target You must specify the connection target before performing on-line operations from GX Developer to the CNC. (1) Operation procedure Perform the following operation from GX Developer to start the setting screen. [Online] →...
  • Page 24 1. PLC Development Environment Using GX Developer 1.3 Developing PLC Programs • Setting the GX Developer Connection Destination These parameters are used to set the GX Developer connection method. These parameters are included in the GX Developer project data. - 15 - Get other manuals https://www.bkmanuals.com...
  • Page 25: Starting/Stopping The Plc Of The Cnc

    1. PLC Development Environment Using GX Developer 1.3 Developing PLC Programs 1.3.4 Starting/Stopping the PLC of the CNC Before writing a ladder program, you must stop the PLC of the CNC. (1) Operation procedure Perform the following operation from GX Developer to start the operation screen. [Online] →...
  • Page 26: Writing The Plc Program To The Cnc

    1. PLC Development Environment Using GX Developer 1.3 Developing PLC Programs 1.3.5 Writing the PLC Program to the CNC The following indicates how to write ladders from GX Developer to the CNC (especially the restrictions and C64 series-specific operations). (1) Operation procedure Perform the following operation from GX Developer to start the operation screen.
  • Page 27 1. PLC Development Environment Using GX Developer 1.3 Developing PLC Programs (2) Operation to be performed at write error As soon as a ladder is written from GX Developer to the CNC, the CNC converts it into the CNC- specific ladder machine code. A conversion error occurs if any of the devices and command formats not supported by the C64 series is used.
  • Page 28 1. PLC Development Environment Using GX Developer 1.3 Developing PLC Programs (3) How to confirm the error step number At a conversion error, error information is stored to the special registers as below. Device- monitoring these registers enables to find the error position. SD30 : Error step No.
  • Page 29: Reading The Plc Program From The Cnc

    1. PLC Development Environment Using GX Developer 1.3 Developing PLC Programs 1.3.6 Reading the PLC Program from the CNC The following indicates how to read a ladder from the CNC to GX Developer. (1) Operation procedure Perform the following operation from GX Developer to start the operation screen. [Online] →...
  • Page 30: Verifying The Plc Programs

    1. PLC Development Environment Using GX Developer 1.3 Developing PLC Programs 1.3.7 Verifying the PLC Programs The following indicates how to verify ladders between the CNC and GX Developer. (1) Operation procedure Perform the following operation from GX Developer to start the operation screen. [Online] →...
  • Page 31: Monitoring The Plc Program

    1. PLC Development Environment Using GX Developer 1.3 Developing PLC Programs 1.3.8 Monitoring the PLC Program There are no MELDAS-specific operations to monitor a PLC program. Refer to the GX Developer operating manual for the operation methods. For usable functions, refer to "1.1.3.2 Function Support Conditions (on-line section)".
  • Page 32: Diverting The Plc Program That Was Developed Using Plc4B

    1. PLC Development Environment Using GX Developer 1.3 Developing PLC Programs 1.3.9 Diverting the PLC program that was developed using PLC4B (Note) PLC4B and LIST4B can not be used with C64. This section describes the method to use the ladder data on the C64 series system, however, the ladder data here must be created with PLC4B of the former-model CNC.
  • Page 33 1. PLC Development Environment Using GX Developer 1.3 Developing PLC Programs (2) Starting GX Converter and specifying the file to be converted Perform the following operation from GX Developer to start GX Converter (read). [Project] → [Import file] → [Import to TEXT ,CSV format file] On the following screen, specify the file to be converted (LDTEST.TXT) and click [OK].
  • Page 34 1. PLC Development Environment Using GX Developer 1.3 Developing PLC Programs (b) Data conversion wizard 2/4 Choose [Delimiters]-[Tab] and click [Next>]. (c) Data conversion wizard 3/4 Choose to highlight the [Instr] column part in the [Data Preview] list and choose [Column Data Format]-[Instruction].
  • Page 35 1. PLC Development Environment Using GX Developer 1.3 Developing PLC Programs (d) Data conversion wizard 3/4 Further, choose to highlight the Argument column part in the [Data Preview] list and choose [Column Data Format]-[I/O(Device)]. Click [Next>]. (e) Data conversion wizard 4/4 Set the program name used on GX Developer at [Data name] column and a ladder annotation at [Title] column, and click [Finish].
  • Page 36: Creating Plc Message Data

    1. PLC Development Environment Using GX Developer 1.4 Creating PLC-related Data 1.4 Creating PLC Message Data This chapter explains a procedure for developing PLC-related data such as alarm messages, operator messages, and PLC switches. 1.4.1 Development Procedure There are the following two methods as a general development procedure of message data. 1) Making conversion into GX Developer data using a general text editor or spreadsheet tool and data conversion package.
  • Page 37 1. PLC Development Environment Using GX Developer 1.4 Creating PLC-related Data (1) Using a general text editor (a) Creation The message data is described using a general text editor. The description method and format will be described later. (b) Conversion The conversion from text data to GX Developer data is carried out using the "GX Converter (data conversion software package)".
  • Page 38: Message Data Description Method

    1. PLC Development Environment Using GX Developer 1.4 Creating PLC-related Data 1.4.2 Message Data Description Method The message data can be described as text data by a general text editor and also by commercially available spreadsheet software in addition to the direct input with GX Developer. (1) Description Format Message data is classified into setting areas to store the setting for each message and message areas to store message data.
  • Page 39 1. PLC Development Environment Using GX Developer 1.4 Creating PLC-related Data (2) Description Method The message data is described as text data by the following description format. ;# ladder ver1. '00.08.01 ... Comment ;$, A,32, 200 ;$, 0, 40, 200 ...
  • Page 40 1. PLC Development Environment Using GX Developer 1.4 Creating PLC-related Data (e) End code An end code is described at the end of the description. Description after the end code are ignored. An error will occur if there is no end code. (3) Details of comment message The messages used for Tool registration screen and for load meter are defined as the comment messages...
  • Page 41 1. PLC Development Environment Using GX Developer 1.4 Creating PLC-related Data (c) Load meter display 40 characters 34 characters S p i n d l e 1 0 0 | | | | | | | | | | | |...
  • Page 42 1. PLC Development Environment Using GX Developer 1.4 Creating PLC-related Data (4) Precautions No. of characters, quantity limitations, handling of information other than settings, handling of information other than format. (a) Message data maximum value Processing will be carried out with the following values considered as the maximum values if the setting is not carried out in the setting area, or if the description position in the setting area is illegal.
  • Page 43: Converting Data Into Gx Developer Format

    1. PLC Development Environment Using GX Developer 1.4 Creating PLC-related Data 1.4.3 Converting Data into GX Developer Format Convert the message data, which was described using a text editor or like, into GX Developer data in the following method. Use "GX Converter (data conversion software package)" for conversion. GX Converter can be started from the GX Developer menu.
  • Page 44 1. PLC Development Environment Using GX Developer 1.4 Creating PLC-related Data (b) Data conversion wizard 2/4 Just click [Next>]. (c) Data conversion wizard 3/4 Choose to highlight the Command column part in the [Data Preview] list and choose [Column Data Format]-[Instruction ,Statement ,Note]. Click [Next>]. (d) Data conversion wizard 4/4 Set the program name used on GX Developer in [Data name] and a data annotation in [Title], and click [Finish].
  • Page 45: Entering/Editing Data Using Gx Developer

    1. PLC Development Environment Using GX Developer 1.4 Creating PLC-related Data 1.4.4 Entering/Editing Data Using GX Developer The message data in GX Developer are handled as the "integrated type interlinear statements" of a PLC program. "Integrated type interlinear statements" are interlinear comments provided to assist the understanding of the PLC program, and those transferred to the controller together with the PLC program are called the "integrated type".
  • Page 46 1. PLC Development Environment Using GX Developer 1.4 Creating PLC-related Data (2) Interlinear Statement Display Using List Display (a) Display of project data list Perform the following operation to display the Project data list window and double-click the file name to display the edit screen. First, the normal ladder screen appears. [View] →...
  • Page 47 1. PLC Development Environment Using GX Developer 1.4 Creating PLC-related Data (3) Editing of integrated type interlinear statements (a) Circuit display On the circuit display screen that shows the integrated type interlinear statements, double- clicking the interlinear statement you want to edit displays the following dialog. Perform editing operation on the dialog and click [OK] or press [Enter].
  • Page 48: Writing To The Cnc

    1. PLC Development Environment Using GX Developer 1.4 Creating PLC-related Data 1.4.5 Writing to the CNC The following shows the method of transferring a message from the GX Developer to the CNC. The transfer method is the same as the ladder code transfer method. Ladder codes and message data are distinguished by their file names only.
  • Page 49 1. PLC Development Environment Using GX Developer 1.4 Creating PLC-related Data (2) Message Read Format The message description format was shown in "1.4.2 (1) Description format", but there are no special rules concerning provision of descriptions in the setting area or the order of message description in the message area.
  • Page 50: Creating Device Comments

    1. PLC Development Environment Using GX Developer 1.5 Creating Device Comments 1.5 Creating Device Comments There are no MELDAS-specific operations for device comments. Therefore, refer to the GX Developer operating manual for the development method. This section describes the device comment development procedure outline and the development method using a general-purpose tool.
  • Page 51: Description Method For Indirect Entry

    1. PLC Development Environment Using GX Developer 1.5 Creating Device Comments 1.5.2 Description Method for Indirect Entry The following explains the description method for creating device comments using a spreadsheet tool or like. The following example describes device comments using a spreadsheet tool. Describe device, equipment Safety unit run name and comment on the...
  • Page 52: Converting Comment Data Into Gx Developer Data

    1. PLC Development Environment Using GX Developer 1.5 Creating Device Comments 1.5.3 Converting Comment Data into GX Developer Data Convert the comment data (CSV format), which was created using a spreadsheet tool or like, into GX Developer data in the following method. Use "GX Converter (data conversion software package)"...
  • Page 53 1. PLC Development Environment Using GX Developer 1.5 Creating Device Comments (b) Data conversion wizard 2/4 Choose [Delimiters]-[Tab] and click [Next>]. (c) Data conversion wizard 3/4 Make sure that the column parts in the [Data Preview] list are in order of [Device Number], [Label] and [Comment], and click [Next>].
  • Page 54: Writing Comment Data To The Cnc

    1. PLC Development Environment Using GX Developer 1.5 Creating Device Comments (e) Completion The setting is complete when the following dialog appears. Click [OK]. (f) Error status If an error occurred during conversion, its status and the line where it occurred are displayed. 1.5.4 Writing Comment Data to the CNC The following shows the method of transferring a device comment data from the GX Developer to the CNC.
  • Page 55: Plc4B Plc Development Environment (M500) And Differences

    1. PLC Development Environment Using GX Developer 1.6 PLC4B PLC Development Environment (M500) and Differences 1.6 PLC4B PLC Development Environment (M500) and Differences This section explains differences between the PLC4B development environment and C64 series PLC development environment. 1.6.1 Development Tools, etc. In the C64 series, a user PLC development environment that used the MELSEC PLC development tool was constructed.
  • Page 56: Plc Commands

    1. PLC Development Environment Using GX Developer 1.6 PLC4B PLC Development Environment (M500) and Differences 1.6.2 PLC Commands Some commands have been changed because the user PLC development environment using the MELSEC PLC development tool has been supported in C64 series. The command range that can be used in the MELSEC-QnA Series PLC program differs from the command range that can be used by the MELDAS Series.
  • Page 57 1. PLC Development Environment Using GX Developer 1.6 PLC4B PLC Development Environment (M500) and Differences (2) Commands with the Format that Differs from that of the GX Developer The device types and assignments have been reconsidered because the user PLC development environment using the MELSEC PLC development tool has been supported in C64 series.
  • Page 58: Error Status

    1. PLC Development Environment Using GX Developer 1.7 Error Status 1.7 Error Status If an error has occurred in GX Developer, the following dialog appears. The error message and error status are displayed in the dialog. (1) Error message (2) Error status (Note) When an error occurred at GX Developer On-line function, the error message may not explain exactly the state in the CNC side.
  • Page 59 1. PLC Development Environment Using GX Developer 1.7 Error Status Status Message Cause Remedy 4070 The program before correction A ladder command outside the Perform verification to identify differs from the registered specification is included. the command that is the cause program.
  • Page 60: Initializing For Plc Data Storage Area

    1. PLC Development Environment Using GX Developer 1.8 Initializing PLC Data Storage Area 1.8 Initializing for PLC Data Storage Area When an error has occurred during writing to the CNC, or when the normal sate is not recovered in spite of error handling, perform initialization for the PLC data storage area, and retry from the first. !...
  • Page 61: Plc Processing Program

    2. PLC Processing Program 2.1 PLC Processing Program Level and Operation 2. PLC Processing Program 2.1 PLC Processing Program Level and Operation 2.1.1 High-speed processing program and main processing program Table 2.1-1 explains the contents of users PLC processing level and Fig. 2.1-1 shows the timing chart. Table 2.1-1 PLC processing level Program name Description (frequency, level, etc.)
  • Page 62: Cautions On High-Speed Processing Programming

    2. PLC Processing Program 2.1 PLC Processing Program Level and Operation 2.1.2 Cautions on high-speed processing programming The cautions on programming a high-speed processing program are explained. Pay careful attention to the following items before programming a high-speed processing program. (1) Index resistor There are some function commands which use the index Z0 or Z1.
  • Page 63: Multi-Programming Function

    2. PLC Processing Program 2.2 Multi-Programming Function 2.2 Multi-Programming Function Multiple PLC programs can be registered in C64 and executed in order. Using this function, PLC program can also be developed by each process. 2.2.1 Program Registration Numbers Max. registration numbers of PLC program are 9. One program can contain programs for main and for high-speed together.
  • Page 64: Input/Output Signals

    3. Input/Output Signals 3.1 Input/Output Signal Types and Processing 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;...
  • Page 65: Handling Of Input Signals Designated For High-Speed Input

    3. Input/Output Signals 3.1 Input/Output Signal Types and Processing Table 3.1-1 lists whether or not high-speed input/output, interrupt input and initial processing can be performed. Table 3.1-1 Whether or not high-speed input/output, interrupt input and initial can be performed High-speed input High-speed output specification specification...
  • Page 66: High-Speed Input/Output Designation Method

    3. Input/Output Signals 3.3 High-Speed Input/output Designation Method 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 These bits selection correspond to the parameter low-order byte #6457...
  • Page 67: Parameters

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

    4. Parameters 4.2 Bit Selection Parameters 4.2 Bit Selection Parameters The parameters that can be used in user PLC include bit selection parameters set in the bit type. Set up data is stored in a file register and is backed up. For use in bit operation in a sequence program, the file register contents are transferred to temporary memory (M) using the MOV command.
  • Page 69 4. Parameters 4.2 Bit Selection Parameters Bit selection screen - 60 - Get other manuals https://www.bkmanuals.com...
  • Page 70 4. Parameters 4.2 Bit Selection Parameters Contents of bit selection parameters #6449~#6496 Symbol name Bit selection Control unit Display unit Counter C Integrating PLC counter PLC timer thermal thermal program hold timer T program #6449 alarm invalid alarm invalid valid hold valid R4624L...
  • Page 71 4. Parameters 4.2 Bit Selection Parameters Symbol name #6465 R4632L — — — — — — — — #6466 R4632H — — — — — — — — #6467 R4633L — — — — — — — — #6468 R4633H —...
  • Page 72: Explanation Of Devices

    5. Explanation of Devices 5.1 Devices and Device Numbers 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, B, W, and H are represented in hexadecimal notation.
  • Page 73: Detailed Explanation Of Devices

    5. Explanation of Devices 5.3 Detailed 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 Input/output X and Y are a window for executing communication with the PLC and external device or controller.
  • Page 74: Internal Relays M And F, Latch Relay L

    5. Explanation of Devices 5.3 Detailed Explanation of Devices 5.3.2 Internal Relays M and F, Latch Relay L The internal relay and latch relay are auxiliary relays in the PLC that cannot directly output to an external source. Internal relay M (a) The relay is cleared when the power is turned OFF.
  • Page 75: Link Relay B, Link Register W

    5. Explanation of Devices 5.3 Detailed Explanation of Devices 5.3.4 Link Relay B, Link Register W (1) Link relay B is a bit type device used for the data link in each link function. An unused part can be used as first memory, etc., however, the step No. will be increased. (2) Link register W is a word type device used for the data link in each link function.
  • Page 76: Timer T

    5. Explanation of Devices 5.3 Detailed Explanation of Devices 5.3.6 Timer T (1) The 100ms timer, 10ms timer and 100ms integrated timer are available for this count-up type timer. 100ms Timer T (a) When the input conditions are set, the count starts. When the set value is counted, that timer contact will turn ON.
  • Page 77 5. Explanation of Devices 5.3 Detailed Explanation of Devices 100ms Integrated timer T (a) When the input conditions are set, the count starts. When the set value is counted, that timer contact will turn ON. (b) Even the input conditions are turned OFF, the 100ms integrated timer current value (count value) will be held, and the contact state will not change.
  • Page 78 5. Explanation of Devices 5.3 Detailed Explanation of Devices (3) Cautions for when using the same timer at two or more positions. The timer programmed last will be valid even if the timer is set in the subprogram which is not ladder-processed according to the branch as shown in the following circuit.
  • Page 79 5. Explanation of Devices 5.3 Detailed Explanation of Devices M100 CALL P100 M100 CALL P110 FEND NOPLF P100 M1000 MOV K50 D100 T30 D100 NOPLF P110 M1000 MOV K100 D100 T30 D100 NOPLF The circuit above enables that Y10 device will be ON after 5 seconds if M100 is ON and after 10 seconds if M100 is OFF.
  • Page 80: Counter C

    5. Explanation of Devices 5.3 Detailed Explanation of Devices 5.3.7 Counter C (1) The counter counts up and detects the rising edge of the input conditions. Thus, the count will not take place when the input conditions are ON. Counter C (a) The value is set with a decimal, and can be designated from 1 to 32767.
  • Page 81 5. Explanation of Devices 5.3 Detailed Explanation of Devices (3) Cautions for when using the same counter at two or more positions. The counter programmed last will be valid even if the counter is set in the subprogram which is not ladder-processed according to the branch as shown in the following circuit.
  • Page 82 5. Explanation of Devices 5.3 Detailed Explanation of Devices M100 CALL P100 M100 CALL P110 FEND NOPLF P100 M1100 MOV K50 D100 C20 D100 NOPLF P110 M1100 MOV K30 D100 C20 D100 NOPLF The circuit above enables that Y10 device will be ON after 50 counts if M100 is ON and after 30 counts if M100 is OFF.
  • Page 83: Data Register D

    5. Explanation of Devices 5.3 Detailed Explanation of Devices 5.3.8 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.
  • Page 84: File Register R

    5. Explanation of Devices 5.3 Detailed Explanation of Devices 5.3.9 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.
  • Page 85: Special Register Sd

    5. Explanation of Devices 5.3 Detailed Explanation of Devices 5.3.10 Special Register SD (1) Special register SD is a data register that the applications are fixed as 1-second counter, etc. Do not use even a part not used currently in SD0 to SD127 for other purpose such as temporary memory.
  • Page 86: Nesting N

    5. Explanation of Devices 5.3 Detailed Explanation of Devices 5.3.12 Nesting N (1) This indicates the master control nesting structure. (2) The master control nesting (N) is used in order from smallest number. Execute when A conditions are set. Execute when A,B conditions are set. Execute when A,B,C conditions are set.
  • Page 87: Decimal Constant K

    5. Explanation of Devices 5.3 Detailed Explanation of Devices Pointer Jump to label P20 (step 501) when X13 turns ON. Label Jump to END when P255 X17 turns ON. (4) The special usages of the pointers other than P255 are shown below. P251, P360 to P368: Label for starting PLC high-speed processing program.
  • Page 88: Explanation Of Commands

    6. Explanation of Commands 6.1 Command List 6. Explanation of Commands 6.1 Command List 6.1.1 Basic Commands Command Process Class Process details Page Symbol unit sign steps Start of logic operation (A contact operation start) Start of logic denial operation (B contact operation start) Logical AND (A contact serial connection)
  • Page 89 6. Explanation of Commands 6.1 Command List Command Process Class Process details Page Symbol unit sign steps Device set Device reset Master control start Master control release Generate one cycle worth of pulses at rising edge of input signal Generate one cycle worth of pulses at falling edge of input signal Reversal of device output Basic...
  • Page 90: Function Commands

    6. Explanation of Commands 6.1 Command List 6.1.2 Function Commands (1) Comparison commands Process Command Class Process details Page Symbol unit sign steps S1 S2 Continuity state when (S1) = (S2) 16-bit AND= S1 S2 Non-continuity state when (S1) =/ (S2) S1 S2 LDD= S1 S2...
  • Page 91 6. Explanation of Commands 6.1 Command List Process Command Process details Class Symbol Page unit sign steps LD< S1 S2 < Continuity state when (S1) < (S2) AND< < S1 S2 Non-continuity state when (S1) >= (S2) OR< < S1 S2 LD<= S1 S2 <=...
  • Page 92 6. Explanation of Commands 6.1 Command List (2) Arithmetic operation commands Process Command Class Symbol Process details Page unit sign steps (D) + (S) (BIN) 16-bit S2 D (S1) + (S2) (BIN) S2 D (BIN) (D+1,D) + (S+1,S) (D+1,D) (BIN) 9/10 32-bit S2 D...
  • Page 93 6. Explanation of Commands 6.1 Command List Process Command Symbol Class Process details Page unit sign steps S2 D (S1) (S2) 16-bit Quotient (D) Remainder (D+1) (BIN) S2 D 11/12 (BIN) S2 D (S1+1, S1) (S2+1, S2) 32-bit Quotient (D+1,D) Remainder (D+3, D+2) (BIN) S2 D 11/12...
  • Page 94 6. Explanation of Commands 6.1 Command List Process Command Symbol Class Process details Page unit sign steps ・( D ) BIN data NEGP NEGP Comple- 16-bit ment of 2 DNEG DNEG ・( D+1, D ) (D + 1, D) BIN data DNEGP DNEGP D (3) BCD...
  • Page 95 6. Explanation of Commands 6.1 Command List (4) Data transmission commands Process Command Class Symbol Process details Page unit sign step ⋅ (S) 16-bit MOVP S MOVP DMOV S DMOV ⋅ (S+1,S) (D+1,D) 32-bit DMOVP S D DMOVP 9/10 T r a n s- m i ss i o n ⋅...
  • Page 96 6. Explanation of Commands 6.1 Command List (5) Program branch commands Process Command Class Symbol Process details Page unit sign step Jump to Pn after input conditions are met Jump — Jump to Pn unconditionally Program End process during sequence program FEND FEND —...
  • Page 97 6. Explanation of Commands 6.1 Command List (6) Logical operation commands Process Comman Class Symbol Process details Page unit d sign step WAND WAND S (D) ^ (S) WANDP WANDP S D 16-bit WAND WAND S1 S2 D (S1) ^ (S2) WANDP WANDP S1 S2 D Logical AND...
  • Page 98 6. Explanation of Commands 6.1 Command List Process Comman Symbol Class Process details Page unit d sign step WXOR S D WXOR ⋅ (D) WXORP S D WXORP 16-bit WXOR S1 S2 D WXOR ⋅ (S1) (S2) WXORP S1 S2 D WXORP Exclusive OR DXOR S...
  • Page 99 6. Explanation of Commands 6.1 Command List (7) Rotation commands Process Command Class Symbol Process details Page unit sign step ROR D SM12 RORP D Rotate n bits right. RORP 16-bit RCR D SM12 Right rotation RCRP D Rotate n bits right. RCRP DROR (D+1)
  • Page 100 6. Explanation of Commands 6.1 Command List Process Command Symbol Process details Class Page unit sign step 16-bit b0 SM12 SFRP D Right shift SFRP 0 ~ 0 DSFR DSFR Device unit DSFRP D n DSFRP 16-bit SM12 SFLP D Left shift SFLP 0~0...
  • Page 101 6. Explanation of Commands 6.1 Command List (8) Data processing commands Process Command Class Symbol Process details Page unit sign step (S2) (S1) SER S1 S2 :Match No. SERP SERP S1 S2 D (D+1) :Number of match data pieces 32 bit 16-bit Search (S2)
  • Page 102 6. Explanation of Commands 6.1 Command List (9) Other function commands Process Command Class Symbol Process details Page unit sign step Carry flag S.STC S.STC Carry flag contact (SM12) is turned on. — Carry flag S.CLC S.CLC Carry flag contact (SM12) is turned off. —...
  • Page 103: Exclusive Commands 1

    6. Explanation of Commands 6.1 Command List 6.1.3 Exclusive Commands 1 Command Process Class Symbol Process details Page unit sign step Reads the data of the buffer memory of MELSEC intelligent n1 n2 Dn n3 FROM FROM function unit out to the C6/C64 Intelligent PLC.
  • Page 104: Exclusive Commands 2

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

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

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

    6. Explanation of Commands 6.2 Command Formats 6.2.3 END Command The END command is automatically created in both a circuit mode and a list mode. 6.2.4 Index Qualification (1) Index qualification (a) Index qualification is an indirect setting made by using an index register. When an index qualification is used in a sequence program, the device to be used will become the device number designated directly plus the contents of the index register.
  • Page 108 6. Explanation of Commands 6.2 Command Formats (2) Devices which can be index-qualified With the exception of the restrictions noted below, index qualification can be used with devices used with contacts, coils, basic commands, and application commands. (a) Devices which cannot use index qualification Device Meaning K, H...
  • Page 109: Digit Designation

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

    7. Basic Commands 7. Basic Commands These commands are the basis for the sequence programs. The sequence program cannot be created without these commands. The circuit can be created (programmed) with the same image as creating a circuit by combining the actual relay A contacts and B contacts as done conventionally.
  • Page 113 7. Basic Commands LD, LDI LD, LDI ... Operation start Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K (Note) In the modification of index, 2 steps are used for B or SB device.
  • Page 114 7. Basic Commands LD, LDI Program example (1) Program used at head of circuit block. Coding No. of Com- Device steps mand (2) Program used at head of circuit block connected with ANB. Coding No. of Com- Device steps mand Circuit block connected with ANB.
  • Page 115 7. Basic Commands AND, ANI AND, ANI ... Serial connection of contact Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K (Note) In the modification of index, 2 steps are used for B or SB device.
  • Page 116 7. Basic Commands AND, ANI Program example (1) Program used after LD, LDI, AND or ANI, etc. Coding No. of Com- Device steps mand (2) Program used to connect contact in parallel with coil. Coding No. of Com- Device steps mand - 107 - Get other manuals https://www.bkmanuals.com...
  • Page 117 7. Basic Commands OR, ORI OR, ORI ... Parallel connection of one contact Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K (Note) In the modification of index, 2 steps are used for B or SB device.
  • Page 118 7. Basic Commands OR, ORI Program example (1) Program used at head of circuit block. Coding No. of Com- Device steps mand (2) Program used in circuit. Coding No. of Com- Device steps mand M111 M113 M105 M111 M113 M105 - 109 - Get other manuals https://www.bkmanuals.com...
  • Page 119 7. Basic Commands ANB ... Serial connection of circuit block Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K A block B block Function...
  • Page 120 7. Basic Commands Program example Program that serially connects continuous circuit blocks. Coding No. of Com- Device steps mand - 111 - Get other manuals https://www.bkmanuals.com...
  • Page 121 7. Basic Commands ORB ... Parallel connection of blocks Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K A block B block OR or ORI is used for the one contact...
  • Page 122 7. Basic Commands Program example Program that connects continuous circuit blocks in parallel. Coding No. of Com- Device steps mand - 113 - Get other manuals https://www.bkmanuals.com...
  • Page 123 7. Basic Commands LDP, LDF, ANDP, ANDF, ORP, ORF LDP, LDF, ANDP, ANDF, ORP, ORF ... Pulse operation start, pulse series connection, pulse parallel connection Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K...
  • Page 124 7. Basic Commands LDP, LDF, ANDP, ANDF, ORP, ORF Cautions (1) Devices used for LDP have to be limited to the ones already output with OUT command, etc. If the devices to be output later are used, the condition will not be achieved. Correct example Incorrect example X0 X5...
  • Page 125 7. Basic Commands INV ... Operation results inversion Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Function Inverts the operation result immediately prior to the INV command. Operation result immediately Operation result following the prior to the INV command.
  • Page 126 7. Basic Commands MEP, MEF MEP, MEF ... Operation results pulse conversion Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Function (1) If operation results up to MEP command are leading edge (from OFF to ON), turns ON (continuity state).
  • Page 127 7. Basic Commands EGP, EGF EGP, EGF ... Pulse conversion of edge relay operation results Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Pulse conversion command Pulse conversion...
  • Page 128 7. Basic Commands EGP, EGF Program example (1) Program containing a subroutine program using an EGP command. Coding M400 No. of Com- Device steps mand M400 CALL CALL CALL CALL FEND FEND X0Z0 V0Z0 D0Z0 X0Z0 V0Z0 D0Z0 END processing ①...
  • Page 129 7. Basic Commands OUT (Y, M, G, L, F, B, SB, SM) OUT (Y, M, G, L, F, B, SB, SM) ... Output (Y, M, G, L, F, B, SB, SM) Usable device Digit No. of Con- Bit device Word device desig- Index Pointer...
  • Page 130 7. Basic Commands OUT (Y, M, G, L, F, B, SB, SM) Program example (1) Program output to output unit. Coding No. of Com- Device steps mand (2) Program that turns internal relay or latch relay ON/OFF. Coding No. of Com- Device steps...
  • Page 131 7. Basic Commands OUT (T) OUT (T)... Timer output Digit No. of Usable device desig- Index steps nation Con- Bit device Word device Pointer stant X Y M L F B SB T SM V T C D R W SW Z SD K H Device Setting value...
  • Page 132 7. Basic Commands OUT (T) Execution condition This is executed per scan regardless of the operation results before the OUT command. Program example (1) Program to turn ON Y10 and Y14 ten seconds after X0 turns ON. Coding No. of Com- Device T1 K100...
  • Page 133 7. Basic Commands OUT (C) OUT (C) ... Counter output Digit No. of Usable device desig- Index steps nation Con- Bit device Word device Pointer stant X Y M L F B SB T SM V T C D R W SW Z SD K H Device Setting value...
  • Page 134 7. Basic Commands OUT (C) Program example (1) Program to turn Y30 ON when X0 turns ON ten times, and to turn Y30 OFF when X1 turns ON. Coding No. of Com- Device steps mand C10 K10 C10 K10 RST C10 (2) Program to set C10 setting value to 10 when X0 turns ON, and to 20 when X1 turns ON.
  • Page 135 7. Basic Commands SET ... Device setting (ON) Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K (Note) In the modification of index, 2 steps are used for B or SB device. Setting command Setting data Device N0.
  • Page 136 7. Basic Commands Program example (1) Program to set Y8B (ON) when X8 turns ON, and reset Y8B (OFF) when X9 turns ON. Coding No. of Com- Device steps mand X8 ( SET input ) X9 ( RST input ) Operation of SET and RST commands - 127 - Get other manuals https://www.bkmanuals.com...
  • Page 137 7. Basic Commands RST ... Device resetting Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K (Note) In the modification of index, 2 steps are used for B or SB device. 2 steps are used for T or C device, also.
  • Page 138 7. Basic Commands Program example (1) Program to reset 100ms cumulative timer and counter. When T96 is set for the cumulative timer, T96 K18000 T96 will turn ON when the X4 ON time is 30 min. The No. of times that T96 turns ON is counted. T96 is reset when T96 turns ON.
  • Page 139 7. Basic Commands MC, MCR MC, MCR ... Master control set/reset Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K MC ON/OFF command Setting data Nesting...
  • Page 140 7. Basic Commands MC, MCR (1) This is the master control cancel command, and indicates the end of the master control range. (2) The designated nesting (N) No. and following nests will be canceled. N3 to N7 master control is canceled. Program example (1) Program to turn MC ON when X9 is ON and turn MC OFF when OFF.
  • Page 141 7. Basic Commands PLS, PLF PLS, PLF ... Pulse (1 scan ON) Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K PLS command Setting data Device No.
  • Page 142 7. Basic Commands PLS, PLF Program example (1) Program to execute PLS command when X9 turns ON. Coding No. of Com- Device steps mand X9 OFF M9 OFF 1 scan (2) Program to execute PLF command when X9 turns OFF. Coding No.
  • Page 143 7. Basic Commands FF ... Bit device output inversion Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Inversion command Setting data Device number to invert...
  • Page 144 7. Basic Commands - 135 - Get other manuals https://www.bkmanuals.com...
  • Page 145 7. Basic Commands SFT, SFTP SFT, SFTP ... Device shift Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Shift command SFTP SFTP...
  • Page 146 7. Basic Commands SFT, SFTP SFT input SFT command Executed per scan Executed per scan SFTP command Program example (1) Program to shift the data of Y57 to Y5B when X8 turns ON. PLS M0 (pules coding) Shifting is executed when M0 turns ON. (program from the largest device No.) PLS M8 X57 is turned ON when X7 turns ON.
  • Page 147 7. Basic Commands MPS, MRD, MPP MPS, MRD, MPP ... Registering, reading and clearing of operation results Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K MPS, MRD and MPP are not displayed.
  • Page 148 7. Basic Commands MPS, MRD, MPP Points (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 No.
  • Page 149 7. Basic Commands NOP, NOPLF, PAGE n NOP, NOPLF, PAGE n ... No operation Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K 1/1/2 "NOP"...
  • Page 150 7. Basic Commands NOP, NOPLF, PAGE n Program example (1) Contact closed……….Deletes AND or ANI command Coding Before change No. of Com- Device steps mand Change to NOP After change Coding No. of Com- Device steps mand (2) Contact closed……….Replaces LD or LDI command with NOP command. (Note that when LD or LDI command is replaced with NOP command, the circuit will quite differ from the original one.) Before change...
  • Page 151 7. Basic Commands NOP, NOPLF, PAGE n NOPLF Coding No. of Com- 〔回路モード〕 Device steps mand NOPLF NOPLF NOPLF NOPLF • Printing the ladder will result in the following: X000 NOPLF 回路ブロックの区切りにNOPLF命令があると Page break inserted when NOPLF is 改ページを行います。 inserted between ladder blocks. -1-...
  • Page 152 7. Basic Commands NOP, NOPLF, PAGE n PAGE n Coding No. of Com- Device steps mand 〔回路モード〕 PAGE PAGE NOPLF NOPLF PAGE PAGE - 143 - Get other manuals https://www.bkmanuals.com...
  • Page 153 - 144 - Get other manuals https://www.bkmanuals.com...
  • Page 154: Function Commands (=, >, <, +, -, *, /, Bcd, Bin, Mov

    8. Function Commands 8. Function Commands Recent sequence programs that require more advanced control cannot provide sufficient control only with basic commands and thus need four-rule operation and comparison, etc. Many function commands have been prepared for this. There are approx. 118 types of function commands.
  • Page 155 8. Function Commands LD=, AND=, OR= LD=, AND=, OR= ..Comparison of 16-bit data (=) Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Setting data Comparison data or No.
  • Page 156 8. Function Commands LD=, AND=, OR= Program example (1) Program to compare the X0 to F data and D3 data. Coding No. of Com- Device steps mand K4X0 K4X0 D3 (2) Program to compare the BCD value 100 and D3 data. Coding No.
  • Page 157 8. Function Commands LDD=, ANDD=, ORD= LDD=, ANDD=, ORD= ... Comparison of 32-bit data (=) Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K LDD= Setting data Comparison data or...
  • Page 158 8. Function Commands LDD=, ANDD=, ORD= Program example (1) Program to compare the X0 to 1F data and D3, 4 data. Coding No. of Com- Device steps mand K8X0 LDD= K8X0 (2) Program to compare the BCD value 18000 and D3, 4 data. Coding No.
  • Page 159 8. Function Commands LD>, AND>, OR>, LD>=, AND>=, OR>= LD>, AND>, OR>, LD>=, AND>=, OR>= ..Comparison of 16-bit data (>, >=) Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K LD>...
  • Page 160 8. Function Commands LD>, AND>, OR>, LD>=, AND>=, OR>= Program example (1) Program to compare the X0 to F data and D3 data. Coding No. of Com- Device steps mand > K4X0 LD> K4X0 (2) Program to compare the BCD value 100 and D3 data. Coding No.
  • Page 161 8. Function Commands LDD>, ANDD>, ORD>, LDD>=, ANDD>=, ORD>= LDD>, ANDD>, ORD>, LDD>=, ANDD>=, ORD>= ... Comparison of 32-bit data (>, >=) Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K D>...
  • Page 162 8. Function Commands LDD>, ANDD>, ORD>, LDD>=, ANDD>=, ORD>= Program example (1) Program to compare the X0 to 1F data and D3, 4 data. Coding No. of Com- Device steps mand K8X0 D> LDD> K8X0 (2) Program to compare the BCD value 18000 and D3, 4 data. Coding No.
  • Page 163 8. Function Commands LD<, AND<, OR<, LD<=, AND<=, OR<= LD<, AND<, OR<, LD<=, AND<=, OR<= ..Comparison of 16-bit data (<) Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K (Note) (Note) <...
  • Page 164 8. Function Commands LD<, AND<, OR<, LD<=, AND<=, OR<= Cautions Each command of LD<=, AND<=, and OR<= cannot use a constant for S2. When S2 is a constant, it operates as LDBIT, ANDBIT, and an ORBIT command, respectively. Program example (1) Program to compare the X0 to F data and D3 data.
  • Page 165 8. Function Commands LD<>, AND<>, OR<> LDD<, ANDD<, ORD<, LDD<=, ANDD<=, ORD<= ... Comparison of 32-bit data (<, <=) Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K D<...
  • Page 166 8. Function Commands LD<>, AND<>, OR<> Program example (1) Program to compare the X0 to 1F data and D3, 4 data. Coding No. of Com- Device steps mand K8X0 D< LDD< K8X0 (2) Program to compare the BCD value 18000 and D3, 4 data. Coding No.
  • Page 167 8. Function Commands LD<>, AND<>, OR<> LD<>, AND<>, OR<> ..Comparison of 16-bit data (<>) Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K (Note) (Note) <>...
  • Page 168 8. Function Commands LD<>, AND<>, OR<> Program example (1) Program to compare the X0 to F data and D3 data. Coding No. of Com- Device steps mand <> K 4X0 LD<> K4X0 (2) Program to compare the BCD value 1800 and D3 data. Coding No.
  • Page 169 8. Function Commands LD<>, AND<>, OR<> LDD<>, ANDD<>, ORD<> ..Comparison of 32-bit data (<>) Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K D<>...
  • Page 170 8. Function Commands LD<>, AND<>, OR<> Program example (1) Program to compare the X0 to F data and D3, D4 data. Coding No. of Com- Device steps mand D<> K8X0 LDD<> K8X0 (2) Program to compare the BCD value 18000 and D3, D4 data. Coding No.
  • Page 171 8. Function Commands +, +P +, +P ... BIN 16-bit addition Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Addition command Setting data (See *1) Addition data or No.
  • Page 172 8. Function Commands +, +P (2) -32768 to 32767 (BIN 16-bit) can be designated in S1, S2 and S. (3) The positive/negative of the data in S1, S2, S and D is determined with the highest-order bit (B15). Judgment of positive/negative Positive Negative...
  • Page 173 8. Function Commands D+, D+P D+, D+P ... BIN 32-bit addition Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Addition command Setting data (See *1) Addition data or head No.
  • Page 174 8. Function Commands D+, D+P (2) -2147483648 to 2147483647 (BIN 32-bit) can be designated in S1, S2 and S. (3) The positive/negative of the data in S1, S2, S and D is determined with the highest-order bit (B31). Judgment of positive/negative Positive Negative...
  • Page 175 8. Function Commands –, –P –, –P ... BIN 16-bit subtraction Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Subtraction command Setting data (See *1) Subtraction data or No.
  • Page 176 8. Function Commands –, –P (3) The positive/negative of the data in S1, S2, S and D is determined with the highest-order bit (B15). Judgment of positive/negative Positive Negative (4) The carry flag will not turn ON if the 0 bit underflows. Execution conditions The execution conditions for -, -P are as shown below.
  • Page 177 8. Function Commands D–, D–P D–, D–P ... BIN 32-bit subtraction Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Setting data (See *1) Subtraction command Subtraction data or head No.
  • Page 178 8. Function Commands D–, D–P (2) -2147483648 to 2147483647 (BIN 32-bit) can be designated in S1, S2 and S. (3) The positive/negative of the data in S1, S2, S and D is determined with the highest-order bit (B31). Judgment of positive/negative Positive Negative...
  • Page 179 8. Function Commands *, *P *, *P ... BIN 16-bit multiplication Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Setting data Multiplication command Multiplication data or No.
  • Page 180 8. Function Commands *, *P Execution conditions The execution conditions for *, *P are as shown below. Multiplication command Executed per scan Executed per scan Program example (1) Program to multiply the D0 data and BIN 5678 when X5 turns ON, and output the results to D3, Coding No.
  • Page 181 8. Function Commands D*, D*P D*, D*P ... BIN 32-bit multiplication Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Setting data Multiplication command Multiplication data or head No.
  • Page 182 8. Function Commands D*, D*P Execution conditions The execution conditions for D*, D*P are as shown below. Multiplication command Executed per scan Executed per scan Program example (1) Program to multiply the D7, 8 BIN data and D18, 19 BIN data when X5 turns ON, and output the results to D1 to 4.
  • Page 183 8. Function Commands /, /P /, /P ... BIN 16-bit division Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Setting data Division command Division data or No.
  • Page 184 8. Function Commands /, /P Execution conditions The execution conditions for /, /P are as shown below. Division command Executed per scan Executed per scan Program example (1) Program to divide the D10 data by 3.14 when X3 turns ON, and output the value (quotient) to D5. Coding No.
  • Page 185 8. Function Commands D/, D/P D/, D/P ... BIN 32-bit division Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Setting data Division command Division data or head No.
  • Page 186 8. Function Commands D/, D/P Execution conditions The execution conditions for D/, D/P are as shown below. Division command Executed per scan Executed per scan Program example (1) Program to multiply the D10 data by 3.14 when X3 turns ON, and output the low-order 16-bit of the results to Y30 to 3F.
  • Page 187 8. Function Commands B+, B+P B+, B+P ... BCD 16-bit addition Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Setting data Addition command Addition data or No.
  • Page 188 8. Function Commands B+, B+P Execution conditions The execution conditions for B+, B+P are as shown below. Addition command OFF Executed per scan Executed per scan Program example (1) Program to add the D0 BCD data and D10 BCD data and output to D20. Coding No.
  • Page 189 8. Function Commands B–, B–P B–, B–P ... BCD 16-bit subtraction Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Setting data Subtraction command Subtraction data or No.
  • Page 190 8. Function Commands B–, B–P Program example (1) Program to subtract the D10 BCD data from D3 and output to D20. Coding No. of Com- Device steps mand (ON) (2) Program to output the difference of the timer T3 setting value and current value to D20 BCD data. Coding No.
  • Page 191 8. Function Commands B*, B*P B*, B*P ... BCD 16-bit multiplication Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Setting data Multiplication command Multiplication data or No.
  • Page 192 8. Function Commands B*, B*P Execution conditions The execution conditions for B*, B*P are as shown below. Multiplication command Executed per scan Executed per scan Program example (1) Program to multiple the D0 BCD data and D10 BCD data, and output the results to D20. Coding No.
  • Page 193 8. Function Commands B/, B/P B/, B/P ... BCD 16-bit division Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Setting data Division command Division data or No.
  • Page 194 8. Function Commands B/, B/P Execution conditions The execution conditions for B/, B/P are as shown below. Multiplication command Executed per scan Executed per scan Program example (1) Program to divide the D10 BCD data D20 when X3 turns ON, and output the value (quotient) to Coding No.
  • Page 195 8. Function Commands INC, INCP INC, INCP ... (16-bit BIN data) +1 Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Increment command IN C Setting data...
  • Page 196 8. Function Commands INC, INCP Program example (1) Example of addition counter program Set D8 to 0 when X7 turns ON. INCP D8 Execute D8+1 at X8 OFF when M38 is OFF. M38 turns ON when D8 = 100. K100 Coding No.
  • Page 197 8. Function Commands DINC, DINCP DINC, DINCP ... (32-bit BIN data) +1 Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Increment command DINC DINC...
  • Page 198 8. Function Commands DINC, DINCP Program example (1) Program to increment the D0, 1 data by one when M0 turns ON. Coding No. of Com- Device steps mand DINC (Pulse coding) DINC (2) Program to increment X10 to X27 data by one when M0 turns ON, and to store the results in D3, Coding No.
  • Page 199 8. Function Commands DEC, DECP DEC, DECP ... (16-bit BIN data) –1 Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Decrement command Setting data No.
  • Page 200 8. Function Commands DEC, DECP Program example (1) Example of subtraction counter program K100 D8 Set D8 to 100 when X7 turns ON. DECP D8 Execute D8-1 at X8 OFF when M38 turns OFF. M38 turns ON when D8 = 0. Coding No.
  • Page 201 8. Function Commands DDEC, DDECP DDEC, DDECP ... (32-bit BIN data) –1 Usable device Digit No. of Con- Bit device Word device desig- Index Pointer steps stant nation B SB T SM V T C D R W SW Z SD K Decrement command DDEC Setting data...
  • Page 202 8. Function Commands DDEC, DDECP Program example (1) Program to decrement the D0, 1 data by one when M0 turns ON. Coding No. of Com- Device steps mand DDEC (pulse coding) DDEC (2) Program to decrement X10 to X27 data by one when M0 turns ON, and to store the results in D3, Coding No.
  • Page 203 8. Function Commands NEG, NEGP NEG, NEGP ... Complement of 2 (BIN 16-bit data) Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Complement of 2 execution command NEGP D NEGP...
  • Page 204 8. Function Commands NEG, NEGP Program example (1) Program to subtract D20 from D10 when XA turns ON and obtain an absolute value when the results are negative. < M3 turns ON when D10 < D20 D10-D20 is executed. NEG D10 The absolute value (complement of 2) when M3 turns ON is obtained.
  • Page 205 8. Function Commands DNEG, DNEGP DNEG, DNEGP ... Complement of 2 (BIN 32-bit data) Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Complement of 2 execution command DNEG DNEG...
  • Page 206 8. Function Commands DNEG, DNEGP Program example (1) Program to subtract D20 from D10 when XA turns ON and obtain an absolute value when the results are negative. D< M3 turns ON when D10, 11 < D20, 21 Subtracts D20, 21 from D10, 11. DNEG The absolute value (complement of 2) when M3 turns ON is obtained.
  • Page 207 8. Function Commands BCD, BCDP BCD, BCDP ... BIN BCD conversion (16-bit) Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K BCD conversion command Setting data BIN data or No.
  • Page 208 8. Function Commands BCD, BCDP Program example (1) Program to output C4 current value from Y20 to Y2F to BCD display. Coding No. of Com- Device steps mand (ON) K4Y20 K4Y20 - 199 - Get other manuals https://www.bkmanuals.com...
  • Page 209 8. Function Commands DBCD, DBCDP DBCD, DBCDP ... BIN BCD conversion (32-bit) Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K BCD conversion command Setting data BIN data or head No.
  • Page 210 8. Function Commands DBCD, DBCDP Execution conditions The execution conditions for DBCD, DBCDP are as follow. Conversion command OFF DBCD Executed per scan Executed per scan DBCDP Program example (1) Program to output the current timer value of which the setting value exceeds 9999 to Y1C to 2F. Coding No.
  • Page 211 8. Function Commands BIN, BINP BIN, BINP ... BCD BIN conversion (16-bit) Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K BIN conversion command Setting data BCD data or No.
  • Page 212 8. Function Commands BIN, BINP Program example (1) Program to BIN convert the X10 to X1B BCD data when X8 turns On, and store in D8. Digital switch BCD Can be used for other purposes DI card Coding No. of Com- Device steps...
  • Page 213 8. Function Commands DBIN, DBINP DBIN, DBINP ... BCD BIN conversion (32-bit) Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K BIN conversion command Setting data BCD data or head No.
  • Page 214 8. Function Commands DBIN, DBINP Execution conditions The execution conditions for DBIN, DBINP are as follow. Conversion command OFF DBIN Executed per scan Executed per scan DBINP Program example (1) Program to BIN convert the X10 to X23 BCD data when X0 turns ON, and to store in D14, 15. Coding No.
  • Page 215 8. Function Commands MOV, MOVP MOV, MOVP ... 16-bit data transmission Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K *1 Destination device X of MOV command is reserved for the test by Mitsubishi.
  • Page 216 8. Function Commands MOV, MOVP Program example (1) Program to store input X0 to XB data in D8. Coding No. of Com- Device steps mand K3X0 (ON) K3X0 " " (2) Program to store in D8 as binary value when X8 turns ON. Coding No.
  • Page 217 8. Function Commands DMOV, DMOVP DMOV, DMOVP ... 32-bit data transmission Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K *1 Destination device X of DMOV command is reserved for the test by Mitsubishi.
  • Page 218 8. Function Commands DMOV, DMOVP Program example (1) Program to store D10, 11 data in D0, D1. Coding No. of Com- Device DMOV steps mand (ON) DMOV D10 (2) Program to store X0 to X1F data in D0, D1. Coding No.
  • Page 219 8. Function Commands CML, CMLP CML, CMLP ... 16-bit data negation transmission Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Transmission command Setting data Data to be inverted or No.
  • Page 220 8. Function Commands CML, CMLP Program example (1) Program to invert X0 to X7 data and to transmit the results to D0. Coding No. of Com- M1 0 0 Device K2X0 steps mand M100 K2X0 D0 When the number of bits at S is less than the number of bits at D: のビット数<...
  • Page 221 8. Function Commands DCML, DCMLP DCML, DCMLP ... 32-bit data negation transmission Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Transmission command Setting data Data to be inverted or...
  • Page 222 8. Function Commands DCML, DCMLP Program example (1) Program to invert X0 to X1F data and to transmit the results to D0, 1. Coding No. of Com- M2 0 0 Device DCML K8X0 steps mand M200 DCML K8X0 D0 When the number of bits at S is less than the number of bits at D: のビット数<...
  • Page 223 8. Function Commands XCH, XCHP XCH, XCHP ... 16-bit data exchange Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Exchange command Setting data D1 D2...
  • Page 224 8. Function Commands XCH, XCHP Program example (1) Program to exchange T0 current value with D0 data when M8 turns ON. Coding No. of Com- Device steps mand (pulse coding) (2) Program to exchange D0 data with M16 to M31 data when M10 turns ON. Coding No.
  • Page 225 8. Function Commands DXCH, DXCHP DXCH, DXCHP ... 32-bit data exchange Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Conversion command Setting data DXCH D1...
  • Page 226 8. Function Commands DXCH, DXCHP Program example (1) Program to exchange T0, T1 current values with D0, 1 data when M8 turns ON. Coding No. of Com- Device DXCH steps mand (Pulse coding) DXCH (2) Program to exchange D0, 1 data with M16 to M47 data when M10 turns ON. Coding No.
  • Page 227 8. Function Commands BMOV, BMOVP BMOV, BMOVP ... Block transmission of 16-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Setting data Transmission command Head No.
  • Page 228 8. Function Commands BMOV, BMOVP Program example (1) Program to transmit the current values of T33 to T48 to D908 to D923. Coding No. of Com- Device steps mand BMOV D908 BMOV D908 Before execution After execution (Transmission source) (Transmission destinasion) D906 0000 0100...
  • Page 229 8. Function Commands FMOV, FMOVP FMOV, FMOVP ... Batch transmission of same 16-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Setting data Transmission command Head No.
  • Page 230 8. Function Commands FMOV, FMOVP Program example (1) Program to reset (clear) D8 to D23 when XA turns ON. 16 data blocks Transmission Resetting of data registers with FMOV command Coding No. of Com- Device steps mand FMOV FMOV - 221 - Get other manuals https://www.bkmanuals.com...
  • Page 231 8. Function Commands CJ, JMP CJ, JMP ... Conditional jump Usable device Digit No. of Con- Bit device Word device desig- Index Pointer steps stant nation B SB T SM V T C D R W SW Z SD K Jump command Setting data Jump destination pointer...
  • Page 232 8. Function Commands CJ, JMP Points (1) After the timer coil is turned ON, if the timer that is turning the coil ON with the CJ or JMP command is jumped, the timer count will continue. (2) The scan time will be shortened if jumping is done backward using the CJ or JMP command. (3) The CJ and JMP commands can be used to jump to a smaller step.
  • Page 233 8. Function Commands FEND FEND ... Program end Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K FEND Function The sequence program is ended.
  • Page 234 8. Function Commands FEND Program example Program when using CJ command. When XB turns ON, the program jumps to the P23 label, and the step following P23 is executed. Execute when XB is OFF. When XB turns OFF, the end of the FEND sequence program is indicated.
  • Page 235 8. Function Commands CALL, CALLP, RET CALL, CALLP, RET ... Call/return of sub-routine program Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Call of sub-routine program Sub-routine execution command...
  • Page 236 8. Function Commands CALL, CALLP, RET Cautions When returning from CALL or CALLP command (that is, when executing RET command), the operation results obtained immediately before will be retained. Thus, make sure not to program a command following to CALL or CALLP as it may cause an illegal operation.
  • Page 237 8. Function Commands CALL, CALLP, 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 or CALLP command will be executed. Execution conditions The execution conditions of the CALL, CALLP are as shown below. Sub-routine execution command OFF CALL Executed per scan...
  • Page 238 8. Function Commands CALL, CALLP, RET - 229 - Get other manuals https://www.bkmanuals.com...
  • Page 239 8. Function Commands FOR, NEXT FOR, NEXT ... Command loop Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K (Note) "n"...
  • Page 240 8. Function Commands FOR, NEXT Program example (1) Program to execute FOR to NEXT loop when X8 is OFF, and not to execute it when X8 is ON. Coding No. of Com- Device steps mand D0Z3 NEXT Caution (1) To force an end to the repetitious execution of the FOR to NEXT loop during the execution of the loop, insert a BREAK command.
  • Page 241 8. Function Commands BREAK, BREAKP BREAK, BREAKP ... Forced end of FOR to NEXT loop Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Command Setting data Number of device to...
  • Page 242 8. Function Commands BREAK, BREAKP Program example (1) Program to force FOR to NEXT loop to end when D0 data reaches 30, that is, FOR to NEXT loop has been executed 30 times. Coding No. of Com- Device steps mand MOV K0 K100 BREAKP...
  • Page 243 8. Function Commands WAND, WANDP WAND, WANDP ... Logical AND of 16-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Operation command Setting data W AND...
  • Page 244 8. Function Commands WAND, WANDP (2) The bits other than designated digit are operated as 0. (Refer to program example (2).) Execution conditions The execution conditions for WAND, WANDP are as follows. Operation command OFF WAND Executed per scan Executed per scan WANDP Program example (1) Program to execute logical AND of the D10 data and D20 data when XA turns ON, and to store...
  • Page 245 8. Function Commands DAND, DANDP DAND, DANDP ... Logical AND of 32-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Setting data Operation command Data to be logical ANDed...
  • Page 246 8. Function Commands DAND, DANDP Execution conditions The execution conditions for the DAND, DANDP are as follows. Operation command OFF DAND Executed per scan Executed per scan DANDP Program example (1) Program to execute logical AND of the X30 to 47 24-bit data and D99, 100 data when X8 turns ON, and to transmit the results to M80 to 103.
  • Page 247 8. Function Commands WOR, WORP WOR, WORP ... Logical OR of 16-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Operation command Setting data Data to be logical ORed...
  • Page 248 8. Function Commands WOR, WORP Execution conditions The execution conditions for WOR, WORP are as follows. Operation command OFF Executed per scan Executed per scan WORP Program example (1) Program to execute logical OR of the D10 data and D20 data when XA turns ON, and to store the result in D33.
  • Page 249 8. Function Commands DOR, DORP DOR, DORP ... Logical OR of 32-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Operation command Setting data Data to be logical ORed...
  • Page 250 8. Function Commands DOR, DORP Execution conditions The execution conditions for DOR, DORP are as follows. Operation command OFF Executed per scan Executed per scan DORP Program example (1) Program to execute logical OR of the X0 to 1F 32-bit data and the F0FF hexadecimal when XB turns ON, and to store the results in R66, 67.
  • Page 251 8. Function Commands WXOR, WXORP WXOR, WXORP ... Exclusive OR of 16-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Operation command Setting data WXOR...
  • Page 252 8. Function Commands WXOR, WXORP Execution conditions The execution conditions for WXOR, WXORP are as follows. Operation command OFF WXOR Executed per scan Executed per scan WXORP Program example (1) Program to execute exclusive OR of the D10 data and D20 data when XA turns ON, and to store the results in D33.
  • Page 253 8. Function Commands DXOR, DXORP DXOR, DXORP ... Exclusive OR of 32-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Operation command Setting data DXOR...
  • Page 254 8. Function Commands DXOR, DXORP Execution conditions The execution conditions for DXOR, DXORP are as follows. Operation command OFF DXOR Executed per scan Executed per scan DXORP Program example (1) Program to compare the X20 to 3F 32-bit data and the D9, 10 data when X6 turns ON, and to store the No.
  • Page 255 8. Function Commands WXNR, WXNRP WXNR, WXNRP ... Non-exclusive OR of 16-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Non-exclusive operation command Setting data WXNR...
  • Page 256 8. Function Commands WXNR, WXNRP Execution conditions The execution conditions for WXNR, WXNRP are as follows. Operation command OFF WXNR Executed per scan Executed per scan WXNRP Program example (1) Program to execute non-exclusive OR of the D10 data and D20 data when XA turns ON, and to store the results in D33.
  • Page 257 8. Function Commands DXNR, DXNRP DXNR, DXNRP ... Non-exclusive OR of 32-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Operation command Setting data DXNR...
  • Page 258 8. Function Commands DXNR, DXNRP Execution conditions The execution conditions for DXNR, DXNRP are as follows. Operation command OFF DXNR Executed per scan Executed per scan DXNRP Program example (1) Program to compare the X20 to 3F 32-bit data and the D9, 10 data when X6 turns ON, and to store the No.
  • Page 259 8. Function Commands ROR, RORP ROR, RORP ... Right rotation of 16-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Right rotation command RORP RORP...
  • Page 260 8. Function Commands ROR, RORP Program example (1) Program to rotate the D10 data 3 bits to the right when M0 turns ON. Coding No. of Com- Device steps mand (Pulse coding) B15 B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0 To B15 D10 before execution Carry flag...
  • Page 261 8. Function Commands RCR, RCRP RCR, RCRP ... Right rotation of 16-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Right rotation command RCRP RCRP...
  • Page 262 8. Function Commands RCR, RCRP Program example (1) Program to rotate the D10 data 3 bits to the right when M0 turns ON. Coding No. of Com- Device steps mand (pulse coding) Carry flag (SM12) B15 B14 B13B12 B11B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0 D10 before execution To carry flag B0 before...
  • Page 263 8. Function Commands DROR, DRORP DROR, DRORP ... Right rotation of 32-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Right rotation command DROR DROR...
  • Page 264 8. Function Commands DROR, DRORP Program example (1) Program to rotate the D10, 11 data 3 bits to the right when M0 turns ON. Coding No. of Com- Device steps mand DMOV DMOV K1 DROR (pulse coding) DROR B31 B30B29 B28B27 B5 B4 B3 B2 B1 B0...
  • Page 265 8. Function Commands DRCR, DRCRP DRCR, DRCRP ... Right rotation of 32-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Right rotation command DRCR DRCR...
  • Page 266 8. Function Commands DRCR, DRCRP Program example (1) Program to rotate the D10, 11 data 3 bits to the right when M0 turns ON. Coding No. of Com- Device DMOV steps mand DMOV K1 DRCR (pulse coding) DRCR Carry flag (SM12)...
  • Page 267 8. Function Commands ROL, ROLP ROL, ROLP ... Left rotation of 16-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Left rotation command ROLP ROLP...
  • Page 268 8. Function Commands ROL, ROLP Program example Program to rotate the D10 data 3 bits to the left when M0 turns ON. Coding No. of Com- Device steps mand (Pulse coding) Carry flag (SM12) B15 B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0 D10 before execution To B0 before execution...
  • Page 269 8. Function Commands RCL, RCLP RCL, RCLP ... Left rotation of 16-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Left rotation command RCLP RCLP...
  • Page 270 8. Function Commands RCL, RCLP Program example Program to rotate the D10 data 3 bits to the left when M0 turns ON. Coding No. of Com- Device steps mand (Pulse coding) Carry flag (SM12) B15 B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0 D10 before execution To carry flag (n=1)
  • Page 271 8. Function Commands DROL, DROLP DROL, DROLP ... Left rotation of 32-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Left rotation command DROL DROL...
  • Page 272 8. Function Commands DROL, DROLP Program example Program to rotate the D10, 11 data 3 bits to the left when M0 turns ON. Coding No. of Com- Device H80000000 DMOV steps mand H80000000 DMOV DROL (Pulse coding) DROL D10 B31B30B29 B28B27 B5 B4 B3 B2 B1 B0...
  • Page 273 8. Function Commands DRCL, DRCLP DRCL, DRCLP ... Left rotation of 32-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Left rotation command DRCL DRCL...
  • Page 274 8. Function Commands DRCL, DRCLP Program example Program to rotate the D10, 11 data 3 bits to the left when M0 turns ON. Coding No. of Com- Device DMOV H80000000 steps mand H80000000 DMOV DRCL (Pulse coding) DRCL D10 Carry flag (SM12)...
  • Page 275 8. Function Commands SFR, SFRP SFR, SFRP ... Right shift of 16-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Shift command SFRP SFRP...
  • Page 276 8. Function Commands SFR, SFRP Execution conditions The execution conditions for SFR, SFRP are as shown below. Right shift command OFF Executed per scan Executed per scan SFRP Program example Program that shifts the D8 data 5 bits to the right when M10 turns ON. Coding No.
  • Page 277 8. Function Commands DSFR, DSFRP DSFR, DSFRP ... Right shift of word device in batch Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Shift command DSFR DSFR...
  • Page 278 8. Function Commands DSFR, DSFRP Program example (1) Program to shift the D668 to 689 data to the right when M10 turns ON. Coding No. of Com- Device steps mand D683 DSFR (Pulse coding) DSFR D683 Designation range of DSFR command D689 D688 D687...
  • Page 279 8. Function Commands SFL, SFLP SFL, SFLP ... Left shift of 16-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Shift command SFLP SFLP...
  • Page 280 8. Function Commands SFL, SFLP Execution conditions The execution conditions for SFL, SFLP are as shown below. Left shift command OFF Executed per scan Executed per scan SFLP Program example (1) Program that shifts the D8 data 5 bits to the left when M10 turns ON. Coding No.
  • Page 281 8. Function Commands DSFL, DSFLP DSFL, DSFLP ... Left shift of word device in batch Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Shift command DSFL DSFL...
  • Page 282 8. Function Commands DSFL, DSFLP Program example (1) Program to shift the D683 to 689 data to the left when M10 turns ON. Coding No. of Com- Device steps mand DSFL D683 (pulse coding) DSFL D683 Designation range of DSFL command D689 D688 D687...
  • Page 283 8. Function Commands SER, SERP SER, SERP ... Search of 16-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Setting data Search command No.
  • Page 284 8. Function Commands SER, SERP Program example Program to compare the D883 to D887 data with "123" when XB turns ON. Coding No. of Com- Device steps mand D883 D883 D10 K5 Head No. to be searched Search data D882 D883 D0 data Search results...
  • Page 285 8. Function Commands DSER, DSERP DSER, DSERP ... Search of 32-bit data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Setting data Search command No.
  • Page 286 8. Function Commands DSER, DSERP Program example Program to compare the D884 to D893 data with "123" when XB turns ON. Coding No. of Com- Device steps mand DSER D884 DSER D0 D884 D10 K5 Head No. to be searched Search data D883, D882 D885, D884...
  • Page 287 8. Function Commands SUM, SUMP SUM, SUMP ... Count of No. of 16-bit data set to 1 Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Operation command SUMP SUMP...
  • Page 288 8. Function Commands SUM, SUMP Program example Program to obtain the No. of D10 data bits that are set to ON (1) when XB turns ON. Coding No. of Com- Device steps mand Counter data B15……………………………………………B0 The total No. of bits set to 1 is stored in D20.
  • Page 289 8. Function Commands DSUM, DSUMP DSUM, DSUMP ... Count of No. of 32-bit data set to "1" Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Operation command DSUM DSUM...
  • Page 290 8. Function Commands DSUM, DSUMP Program example Program to obtain the No. of D10, D11 data bits that are set to ON (1) when XB turns ON. Coding No. of Com- Device steps mand DSUM DSUM D10 Counter data B31……………………………………………B0 D10, D11 The total No.
  • Page 291 8. Function Commands DECO, DECOP DECO, DECOP ... 8 256 bit decoding Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Decode command DECO DECO...
  • Page 292 8. Function Commands DECO, DECOP Program example (1) Program to decode the three bits 0 to 2 of R20, and turn the bits corresponding in D100 ON. Coding No. of Com- Device DECO D100 steps mand DECO D100 B15B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 When bit 0 to 2 data is binary and 6.
  • Page 293 8. Function Commands S.BDECO S.BDECO ... BCD data decoding Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Decode command S.BDECO Setting data No.
  • Page 294 8. Function Commands S.BDECO Program example (1) Program to convert the low-order 8 bits (BCD) of R20 to the BIN data, and to store the results obtained by decoding in D10 to D25 data Coding No. of Com- Device steps mand S.BDECO S.BDECO R22...
  • Page 295 8. Function Commands SEG, SEGP SEG, SEGP ... Decoding to 7-segment display data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Decode command SEGP SEGP...
  • Page 296 8. Function Commands SEG, SEGP 7-segment decode table Configuration of Display 7-segment Hexa- data Bit pattern B7 B6 B5 B4 B3 B2 B1 B0 decimal 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Lowest-order bit of word device Program example...
  • Page 297 8. Function Commands ENCO, ENCOP ENCO, ENCOP ... 256 8 bit encoding Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Encode command ENCO ENCO...
  • Page 298 8. Function Commands ENCO, ENCOP Program example (1) Program to encode the eight bits 0 to 7 of R20, and turn the bits corresponding in D100 ON. Coding No. of Com- Device ENCO D100 steps mand ENCO D100 B15・・・・・・・・・・・・・ B7 B6 B5 B4 B3 B2 B1 B0 B15・・・・・・・・・・・・・・・・・・・・・...
  • Page 299 8. Function Commands S.AVE S.AVE ... Calculation of average value Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Average value command S.AVE Setting data...
  • Page 300 8. Function Commands S.AVE Program example (1) Program to average the details of D882 to D888 when XB turns ON, and to output the results to Coding No. of Com- Device steps mand S.AVE D882 S.AVE D882 D882 D883 Average value D884 7 data items D885...
  • Page 301 8. Function Commands S.STC, S.CLC S.STC, S.CLC ... Setting/resetting of carry flag Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Input of carry flag set S.STC (Setting of carry...
  • Page 302 8. Function Commands S.STC, S.CLC Program example Program to add the D2 data and D0 data when M0 turns ON and to turn the carry flag (SM12) ON if the results exceed 32767. If the results are 32767 or less, the carry flag is turned OFF. Add the D2 and D0 data, and store the results in D1.
  • Page 303 8. Function Commands LDBIT, ANDBIT, ORBIT LDBIT, ANDBIT, ORBIT ... Bit test of "A" contact handling Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K (Note) (Note) <...
  • Page 304 8. Function Commands LDBIT, ANDBIT, ORBIT Program example (1) Program to test bit 3 of D10. Coding No. of Com- Device steps mand < = LD<= (2) Program to test bit 15 of D10. Coding No. of Com- Device steps mand <...
  • Page 305 8. Function Commands LDBII, ANDBII, ORBII LDBII, ANDBII, ORBII ... Bit test of "B" contact handling Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K (Note) (Note) <...
  • Page 306 8. Function Commands LDBII, ANDBII, ORBII Program example (1) Program to test bit 3 of D10. Coding No. of Com- Device steps mand < > LD<> (2) Program to test bit 15 of D10. Coding No. of Com- Device steps mand <...
  • Page 307 8. Function Commands BSET, BSETP BSET, BSETP ... Bit setting of word device Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Bit set command BSET BSET...
  • Page 308 8. Function Commands BSET, BSETP Program example (1) Program to reset 8th bit (to 0) of D8 when XB turns OFF, and to set 3rd bit (to 1) of D8 when XB turns ON. Reset 8th bit of D8. BRST D8 Set 3rd bit of D8.
  • Page 309 8. Function Commands BRST, BRSTP BRST, BRSTP ... Bit resetting of word device Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Bit reset command BRST BRST...
  • Page 310 8. Function Commands BRST, BRSTP Program example (1) Program to reset 8th bit (to 0) of D8 when XB turns OFF, and to set 3rd bit (to 1) of D8 when XB turns ON. Reset 8th bit of D8. BRST D8 Set 3rd bit of D8.
  • Page 311 - 302 - Get other manuals https://www.bkmanuals.com...
  • Page 312: Exclusive Commands 1

    9. Exclusive Commands 1 9. Exclusive Commands 1 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, we provide a number of exclusive commands which are explained below.
  • Page 313 9. Exclusive Commands 1 FROM, TO FROM, TO ... Reading from buffer memory / Writing to buffer memory Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Execution condition FROM...
  • Page 314 9. Exclusive Commands 1 FROM, TO Execution conditions The execution conditions for FROM, TO are as shown below. Command FROM Executed per scan Executed per scan Program example (1) To read 32 words of data in Area 2 of the FL-net unit (buffer memory address 2000H) and write them into D0 to D31 of data register.
  • Page 315 9. Exclusive Commands 1 FROM, TO Restrictions in Using FROM/TO Command Using FROM/TO command by the built-in PLC in C6/C64 has the restrictions below. (1) The number of FROM and TO commands that can be used in one scan (including multiple program) is 50 each.
  • Page 316 9. Exclusive Commands 1 FROM, TO - 307 - Get other manuals https://www.bkmanuals.com...
  • Page 317 9. Exclusive Commands 1 READ, SREAD, WRITE, SWRITE READ, SREAD, WRITE, SWRITE ... Transient command Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K 6/12 7/13 Command...
  • Page 318 9. Exclusive Commands 1 READ, SREAD, WRITE, SWRITE Function READ/SREAD Reads the word device data of the designated station out to the local station. SREAD turns the target station device ON at read completion, that enables the target station to confirm the data has been read out.
  • Page 319 9. Exclusive Commands 1 READ, SREAD, WRITE, SWRITE Setting Device Item Set data Set by range (S1)+1 Completion status Store the status at completion of a command. — System : Normal Other than 0 : Error (error code) (S1)+2 Channel used by the Designate the channel used by the local 1 to 8 User...
  • Page 320 9. Exclusive Commands 1 READ, SREAD, WRITE, SWRITE Setting Device Item Set data Set by range (S1)+16 Error detection Stores the network number of the station that 1 to 239 System network No. detected an error. However, it is not stored when the completion status of (S1)+1 is "Channel in use (C085H)."...
  • Page 321 9. Exclusive Commands 1 READ, SREAD, WRITE, SWRITE Control data Setting Device Item Set data Set by range (S1)+0 Execution type 0001 H User 0081 H (1) Execution type (bit 0) 0:No arrival confirmation When the target station is on the same network: Completed when the data is sent from the local station.
  • Page 322 9. Exclusive Commands 1 READ, SREAD, WRITE, SWRITE Setting Device Item Set data Set by range (S1)+4 Target station Designate the network No. of the target User 1 to 239, network No. station. 1 to 239:Network No. 254:When 254 is designated in "Un" (S1)+5 Target station No.
  • Page 323 9. Exclusive Commands 1 READ, SREAD, WRITE, SWRITE Setting Device Item Set data Set by range (S1)+13 Date/Hour of error Higher 8 bits : hour (00H to 23H), — System occurrence lower 8 bits : date (01H to 31H) Hour (00H to 23H) Date (01H to 31H) (S1)+14 Minute/Second of...
  • Page 324 9. Exclusive Commands 1 READ, SREAD, WRITE, SWRITE Program example Reading the data stored in D10 to D14 of the station 4 into D200 to D204 of the station 1. (→Refer to (a).) Writing the data stored in D300 to D304 of the station 2 into D50 to D53 of the station 3. (→Refer to (b).) station 2 station 1...
  • Page 325 9. Exclusive Commands 1 READ, SREAD, WRITE, SWRITE (a) Program of Ch.1 (READ command) To execute the program as below, apply the interlock. Command to set control data Sets the clock data. MOV H81 D0 Channel used by the local station MOV K3 D2 Target station network No.
  • Page 326 9. Exclusive Commands 1 READ, SREAD, WRITE, SWRITE (b) Program of Ch.2 (WRITE command) To execute the program as below, apply the interlock. Command to set control data With arrival confirmation. Sets the clock data. MOV H81 D0 Channel used by the local station MOV K6 D2 Target station network No.
  • Page 327 9. Exclusive Commands 1 RIRD, RIWT RIRD, RIWT ... Read/Write the device data Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K 5/11 Command G.RIRD...
  • Page 328 9. Exclusive Commands 1 RIRD, RIWT Function RIRD Reads the device data from the designated station CPU. (1) Control data Setting Set by Device Item Set data range (*1) (S) + 0 Completion status Stores the status when the command is complete. : No error (normal completion) —...
  • Page 329 9. Exclusive Commands 1 RIRD, RIWT RIWT Writes the device data to the designated station CPU. (1) Control data Setting Set by Device Item Set data range (*1) (S) + 0 Completion status Stores the status when the command is complete. : No error (normal completion) —...
  • Page 330 9. Exclusive Commands 1 RIRD, RIWT Execution conditions The execution conditions for RIRD, RIWT are as shown below. Command OFF G.RIRD,G.RIWT Executed per scan Executed per scan GP.RIRD,GP.RIWT Program example Program to read out the D100 to D103 data of the local station 2nd channel. Coding No.
  • Page 331 9. Exclusive Commands 1 OPEN OPEN ... Opens a connection Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Command ZP.OPEN "Un"...
  • Page 332 9. Exclusive Commands 1 OPEN Setting Setting Device Item Setting data range side (S2) + 3 Blank (S2) + 4 to Client device Designate the client device's IP address. User (S2) + 5 IP address FFFFFFFF (Set 0×A8C00101 for IP = 168.192.1.1) (S2) + 6 Client device Designate the port No.
  • Page 333 9. Exclusive Commands 1 OPEN Execution conditions The execution condition for OPEN is as shown below. Command OFF OPEN Program example Program to open a connection to send data with port No. :6000 and connection No.:5. "U20" D100 M150 ZP.OPEN No.
  • Page 334 9. Exclusive Commands 1 OPEN - 325 - Get other manuals https://www.bkmanuals.com...
  • Page 335 9. Exclusive Commands 1 CLOSE CLOSE ... Close the connection Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Command ZP.CLOSE "Un"...
  • Page 336 9. Exclusive Commands 1 CLOSE Program example M340 "U20" D130 M170 ZP.CLOSE No. of Command Device steps M340 ZP.CLOSE "U20" D130 M170 Cautions (1) Even if the dedicated commands (OPEN, CLOSE, BUFSND, BUFRCV) are executed with the high-speed PLC, the actual operation will take place at the same timing as the medium-speed PLC.
  • Page 337 9. Exclusive Commands 1 BUFSND BUFSND ... Data transmission (for fixed–buffer communication) Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Command ZP.BUFSND "...
  • Page 338 9. Exclusive Commands 1 BUFSND Execution conditions The execution condition for BUFSND is as shown below. Command OFF BUFSND Program example The program to send a connection to send in R500 and above with the port No. :6000 and the connection No.:5.
  • Page 339 9. Exclusive Commands 1 BUFSND Example of data communication program The following is an example of the program that executes sending (BUFSND) and receiving (BUFRCV). UDP/IP, non-procedural type are used for both commands. The send destination IP address is 192.168.1.3, and the applicable port No. is 6000. Connection 5 is used.
  • Page 340 9. Exclusive Commands 1 BUFSND Recept’n Recept’n OPEN OPENcmnd execut’n execut’n st pulse type Recept’n OPENcmnd applica- tion set Recept’n OPENcmnd clnt dev IP addrs Recept’n OPENcmnd clnt dev port No. Recept’n Recept’n OPENcmnd OPEN execut’n complete type status Reception Recept’n Recept’n OPEN...
  • Page 341 9. Exclusive Commands 1 BUFRCV BUFRCV ... Data reception (for fixed–buffer communication) Usable device Digit No. of Con- Bit device Word device Pointer desig- Index steps stant nation B SB T SM V T C D R W SW Z SD K Command "...
  • Page 342 9. Exclusive Commands 1 BUFRCV Execution conditions The execution condition for BUFRCV is as shown below. Command OFF BUFRCV Program example The program to receive data stored in R600 and above with the port No. :6001 and the connection No.:1. D120 R600 “U20”...
  • Page 343: Exclusive Commands 2

    10. Exclusive Commands 2 10. Exclusive Commands 2 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, we provide a number of exclusive commands which are explained below.
  • Page 344: Atc Exclusive Command

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

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

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

    10. Exclusive Commands 2 10.1 ATC Exclusive Command (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.
  • Page 348: Command List

    10. Exclusive Commands 2 10.1 ATC Exclusive Command 10.1.7 Command List Command Description S.ATC Tool No. search S.ATC Tool No. logical product search S.ATC Tool change S.ATC Random position tool change S.ATC Pointer forward rotation S.ATC Pointer reverse rotation S.ATC Tool table forward rotation S.ATC Tool table reverse rotation...
  • Page 349: File Register (R Register) Assignment And Parameters

    10. Exclusive Commands 2 10.1 ATC Exclusive Command 10.1.9 File Register (R Register) Assignment and Parameters (1) File registers for ATC control The file registers used with the ATC are as shown below. Corresponding file (R) register No. 1 No. 2 No.
  • Page 350 10. Exclusive Commands 2 10.1 ATC Exclusive Command (2) Control parameter contents R4700 0:T 4-digit Max. number of standby displayed: 4 1:T 8-digit 0:Magazine starts from "1". 1:Magazine starts from "0". For details on the control parameters, refer to "10.1.12 Examples of Tool Registration Screen". - 341 - Get other manuals https://www.bkmanuals.com...
  • Page 351: Details Of Each Command

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

    10. Exclusive Commands 2 10.1 ATC Exclusive Command 10.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: ·...
  • Page 361 10. Exclusive Commands 2 10.1 ATC Exclusive Command (1) Comment display part Comment in the comment display part is prepared by the user with the comment display function. Refer to the section "1.4 Creating PLC-related Data". (2) Spindle tool, standby tool display part The number of display items can be changed according to the control parameter value.
  • Page 362: Display Of Spindle Tool And Standby Tool

    10. Exclusive Commands 2 10.1 ATC Exclusive Command 10.1.13 Display of Spindle Tool and Standby Tool The tool mounted on the spindle or the tool to be mounted next on the spindle (standby tool) and tool No. in the magazine are set and displayed on the tool registration screen. However, the spindle and standby tool Nos.
  • Page 363: S.rot Commands

    10. Exclusive Commands 2 10.2 S.ROT Commands 10.2 S.ROT Commands ROT commands are prepared as functions such as rotary body target position, rotation direction and ring counter. The commands can be used to determine the direction of rotation and number of steps with the data resulting from ATC exclusive command tool No.
  • Page 364 10. Exclusive Commands 2 10.2 S.ROT Commands (1) Rotary body indexing Direction of rotation and number of steps of ATC magazine (or turret) are determined automatically. Parameter setting R No. Indirect Rn+1 Current position R No. designation Rn+2 Target position R No. Rn+3 Output R No.
  • Page 365 10. Exclusive Commands 2 10.2 S.ROT Commands (a) Example of rotary body index by ROT K1 instruction Conditions: (i) The number of rotary body index cycles is 6. (ii) The target position is specified by a T command. (Note) Normally the target position must be a binary, but in this example, the number of rotary body index cycles is 1 to 6, and there is no difference between the binary and BCD.
  • Page 366 10. Exclusive Commands 2 10.2 S.ROT Commands File register (R) map S.ROT (Note 5) Top of control data buffer 0:CW (R4000 in this example) T command 1~6 ( BCD) R220 1:CCW (from CNC) R221 R number to specify rotary body index cycles (R4011 in this example) ~...
  • Page 367 10. Exclusive Commands 2 10.2 S.ROT Commands (Note 1) Either M202 or M203 can be used for a stop signal. (Note 2) The devices (X, Y, and R) are used in this example for no special purpose. Use any device within the available range.
  • Page 368 10. Exclusive Commands 2 10.2 S.ROT Commands (2) Ring counter (Up/down counter) This command is used to control position of rotary body (or turret). S.ROT K3 R m Mm (Pulse coding) Completion ("1" for error) Cycles of index for rotary body Ring counter command are apecified.
  • Page 369: Tool Life Management Exclusive Command

    10. Exclusive Commands 2 10.3 Tool Life Management Exclusive Command 10.3 Tool Life Management Exclusive Command (When BASE SPEC parameter #1037 cmdtype is set to 1 or 2.) The following command is provided only for tool life management. (It is used for the machining centers.) Spare tool selection ...
  • Page 370: Spare Tool Selection System

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

    10. Exclusive Commands 2 10.3 Tool Life Management Exclusive Command 10.3.5 User PLC Processing When the Tool Life Management Function Is Selected A PLC processing example when tool change is made by the T command is given below: START Does T command exist? Is life management The control system varies depending on selected?
  • Page 372 10. Exclusive Commands 2 10.3 Tool Life Management Exclusive Command (1) Procedure when tool command is executed (a) Tool life management I 1) When tool command (T command) is given, the controller outputs T code data and start signal (TF). (Note) The T code data (BCD) is binary converted and then used. 2) The user PLC checks the tool command.
  • Page 373 10. Exclusive Commands 2 10.3 Tool Life Management Exclusive Command <When tool is changed> When tool is changed, the spindle tool number is set in R6350, R6351. (User PLC) Spindle tool number Tool data file (R6350-R6351) (Controller internal data) Standby tool number (R6352-R6353) When the spindle tool number changes, the controller assumes that the spindle tool is changed,...
  • Page 374 10. Exclusive Commands 2 10.3 Tool Life Management Exclusive Command (3) Tool data flow R220 R4000 R221 R4001 R6500 R6501 TSRH R4000 R6500 R6502 R6503 R6504 R6505 R6500. R6506 R6400 to R7199. R6507 R6508 R6509 R6510 R6511 R6350, R6351. R6350 R6351 R6352 R6353...
  • Page 375 10. Exclusive Commands 2 10.3 Tool Life Management Exclusive Command (4) Tool data The tool data is tool management data such as the group number, tool number, and tool status. The details are given below: Tool data Explanation Data range name Group number Number to manage tools of the same type 1 - 99999999...
  • Page 376 10. Exclusive Commands 2 10.3 Tool Life Management Exclusive Command (5) Tool data flag and tool status The tool data flag and tool status contents are shown below: Correspondence with tool life management data screen Tool data flag ..Bits 0~7 of file register Rn (such as R6358) Explanation bit 0 Length compensation data format...
  • Page 377 10. Exclusive Commands 2 10.3 Tool Life Management Exclusive Command 1) Spare tool compensation system Tool compensation corresponding to the spindle tool can be made in tool life management II. One of the following three types of length and compensation can be selected by setting tool data: i) Compensation umber system (0 is set on the tool data registration screen.) Compensation data in tool data is handled as the compensation number.
  • Page 378 10. Exclusive Commands 2 10.3 Tool Life Management Exclusive Command (c) Tool status ..Bits 8~F of file register Rn (such as R6358) Explanation Tool status (numeric data 0~4) bit 8 0: Unused tool bit 9 1: Used tool 2: Normal life tool bit A 3: Tool error 1 tool bit B...
  • Page 379: Examples Of Tool Life Management Screen

    10. Exclusive Commands 2 10.3 Tool Life Management Exclusive Command 10.3.6 Examples of Tool Life Management Screen Tool life management screen examples are given below. For operation, refer to the Operation Manual. Screen example - 370 - Get other manuals https://www.bkmanuals.com...
  • Page 380: Ddb (Direct Data Bus)

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

    10. Exclusive Commands 2 10.5 External Search 10.5 External Search 10.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 for the program number, sequence number, and block number.
  • Page 384 10. Exclusive Commands 2 10.5 External Search (2) Status The search state is indicated. The status is set by the controller and is used by PLC for completion check, etc. 2 1 0 External Search processing search no option Search completion <Error cause>...
  • Page 385: Search Start Instruction

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

    10. Exclusive Commands 2 10.5 External Search 10.5.5 Sequence Program Example Search start memo External search status MOV Rn+1 K4M00 is transferred to M00 ~ M15. Search start memo Data specification error Search start memo Search error completion Automatic Search start button operation Search start memo Search start memo...
  • Page 388: Plc Help Function

    11. PLC Help Function 11. PLC Help Function To help the user PLC, an exclusive interface is provided between the user PLC and controller or PLC basic. The function and interface are explained below. PLC help function examples: · Alarm message display ·...
  • Page 389: Alarm Message Display

    11. PLC Help Function 11.1 Alarm Message Display 11.1 Alarm Message Display The contents of an alarm that occurred during sequence (user PLC) processing can be displayed on the 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.
  • Page 390: Message Creation

    11. PLC Help Function 11.1 Alarm Message Display (3) Alarm classification display Classification No. 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 No. can be used to indicate the alarm source or cause.
  • Page 391: F Or R Type Selection Parameter

    11. PLC Help Function 11.1 Alarm Message Display 11.1.3 F or R Type Selection Parameter Set the parameter on the bit selection screen of PLC parameter (setup parameter). [Bit selection parameter screen] # (6450) Data ( 0 0: Alarm message invalid. 1: Alarm message valid.
  • Page 392: Operator Message Display

    11. PLC Help Function 11.2 Operator Message Display 11.2 Operator Message Display When a condition to inform the operator of a message occurs, an operator message can be displayed independently of an alarm message. A maximum of 60 characters can be displayed for the operator message on the alarm diagnosis screen.
  • Page 393: Operator Message Preparation

    11. PLC Help Function 11.2 Operator Message Display 11.2.2 Operator Message Preparation Create messages by using PLC development software (GX Developer). According to the description format, set the number of characters for one message and the number of messages to be prepared, then prepare message data. The maximum length of an operator message is 60 characters.
  • Page 394: Plc Switches

    11. PLC Help Function 11.3 PLC Switches 11.3 PLC Switches Similar function to machine operation switches can be provided by using the controller setting and display unit. The number of switch points is 32. The switch names can be given as desired. 11.3.1 Explanation of Screen The screen is explained below.
  • Page 395: Explanation Of Operation

    11. PLC Help Function 11.3 PLC Switches 11.3.2 Explanation of Operation To turn on or off a switch, set the number of the switch to be turned on or off in the parentheses of INPUT setting part # ( ) and press the key.
  • Page 396: Signal Processing

    11. PLC Help Function 11.3 PLC Switches The table below shows the message displayed during operation on the PLC switch screen. Message Explanation Remedy A number outside the allowable SETTING Specify a valid number within the setting range from 1 to 32 is specified ERROR range.
  • Page 397 11. PLC Help Function 11.3 PLC Switches The following shows an example of operation of special relay SM from the user PLC. (1) Two-point switch (Example) When two opposite switches, chip conveyer manual and chip conveyer automatic, are provided; Always ON MOV R38 K4M100 M10E M10F M20E...
  • Page 398 11. PLC Help Function 11.3 PLC Switches (2) Three-point switch (Example) When three opposite switches 17, 18, and 19 are provided; Always ON MOV R39 K4M100 M100 M101 M102 M200 M100 M101 M102 When SM96 turns on, SM96 R39 bit0 turns OFF. M100 M101 M102 M100 M101 M102 M200...
  • Page 399 11. PLC Help Function 11.3 PLC Switches (3) External switch and PLC switch (Example 1) When an external optional stop switch (X14) is provided; Always ON MOV R38 K4M100 X14 M104 X14 M104 X14 M104 M8 X14 M104 SM83 M203 Always ON MOV K4M200 R138 Under sequence control in the above example, the switch marks on the PLC switch screen can...
  • Page 400: Switch Name Preparation

    11. PLC Help Function 11.3 PLC Switches (Example 2) When an external switch (XC) that inhibits a PLC switch handle interrupt is provided; Always ON MOV R38 K4M100 M104 M204 M104 PLS M10 SM84 Always ON MOV K4M200 R138 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.
  • Page 401: Key Operation By User Plc

    11. PLC Help Function 11.4 Key Operation by User PLC 11.4 Key Operation by User PLC The same operation as if the operator performed key operation can be performed by operating key data by user PLC. 11.4.1 Key Data Flow For monitor User PLC R112...
  • Page 402: Key Data Processing Timing

    11. PLC Help Function 11.4 Key Operation by User PLC 11.4.3 Key Data Processing Timing Key data is processed at the timing shown below. Set data in R112 only when it is necessary. Normal key operation by the operator is made impossible. 100ms or longer (100 300ms is adequate.) R112...
  • Page 403: Layout Of Keys On Communication Terminal

    11. PLC Help Function 11.4 Key Operation by User PLC 11.4.4 Layout of Keys on Communication Terminal The layouts for the keys on the communication terminal used with this controller is as shown below. (1) Key layout for setting and display unit (NC-dedicated display unit) Alphabetic character, READY LED numerical character,...
  • Page 404: List Of Key Codes

    11. PLC Help Function 11.4 Key Operation by User PLC 11.4.5 List of Key Codes Code Code Code Code Key symbol Key symbol Key symbol Key symbol (HEX) (HEX) (HEX) (HEX) MONITOR 0B(F8) – (+) 2D(2B) O (A) 4F(41) TOOL/PARAM 0A(F7) •...
  • Page 405: Load Meter Display

    11. PLC Help Function 11.5 Load Meter Display 11.5 Load Meter Display The load meter can be displayed by setting a value in the designated file register (R) with the ladder program. The spindle load, Z axis load, etc. characters and scale are created with comments in the PLC development software (GX Developer) message function.
  • Page 406 11. PLC Help Function 11.5 Load Meter Display File register (R) for load meter display For $1 For $2 For $3 For $4 For $5 For $6 For $7 Numerical display R942 R1042 R1142 R1242 R1342 R1442 R1542 Load meter 1 Bar graph display R943 R1043...
  • Page 407: External Machine Coordinate System Compensation

    11. PLC Help Function 11.6 External Machine Coordinate System Compensation 11.6 External Machine Coordinate System Compensation External machine coordinate system compensation is executed by setting compensation data (absolute amount) in the PLC file register (R) for each axis. Thus, the compensation timing is when PLC rewrites file register (R) compensation data. Necessary condition, timing, etc., are set by user PLC.
  • Page 408: User Plc Version Display

    11. PLC Help Function 11.7 User PLC Version Display 11.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. (Note) The user PLC must be controlled by the user.
  • Page 409 11. PLC Help Function 11.7 User PLC Version Display (2) To display a 3-digit version code R 1 3 2 R 1 3 3 R 1 3 4 R 1 3 5 Program example) R 1 3 2 R 1 3 3 R 1 3 4 R 1 3 5 - 400 -...
  • Page 410: Plc Axis Control

    12. PLC Axis Control 12.1 Outline 12. PLC Axis Control 12.1 Outline This function allows an independent axis to be controlled with commands from the PLC, separately from the NC control axis. 12.2 Specifications 12.2.1 Basic Specifications Item Details No. of control axes Max.
  • Page 411: Other Restrictions

    12. PLC Axis Control 12.2 Specifications 12.2.2 Other Restrictions (1) There is no mirror image, external deceleration or machine lock function. (2) Rapid feed override, cutting override and dry run control are not possible. (3) Automatic operation start, automatic operation stop, reset and interlock NC controls are invalid for PLC control axes.
  • Page 412: Plc Interface

    12. PLC Axis Control 12.3 PLC Interface 12.3 PLC Interface The interface between the PLC and NC is carried out by setting the control information data in the (Note 1) R-register with the PLC, and calling the S.DDBS function. 12.3.1 S.DDBS Function Command (Note 1) S.DDBS When ACT is set to 1, the PLC axis control process is carried out with the control information data...
  • Page 413: Control Information Data

    12. PLC Axis Control 12.3 PLC Interface 12.3.2 Control Information Data Set the control information data in the R-register before calling the S.DDBS function command. The following is a list of control information data. Command 2 bytes 2 bytes Status 2 bytes Alarm details 2 bytes...
  • Page 414: Control Information Data Details

    12. PLC Axis Control 12.3 PLC Interface 12.3.3 Control Information Data Details 12.3.3.1 Commands Commands consist of main commands and sub-commands. Sub-commands Main commands Main commands: The types of DBBS main commands are as follows. 1: Search 2: PLC axis control Sub-commands: The PLC axis control sub-command is as follows.
  • Page 415: Status

    12. PLC Axis Control 12.3 PLC Interface 12.3.3.2 Status The status is set by the NC to indicate the execution status of this function command and the status of the axis being controlled. F E D C B A 9 8 7 6 5 4 3 2 1 0 bit 0: busy Command processing bit 8 : oper...
  • Page 416 12. PLC Axis Control 12.3 PLC Interface 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.
  • Page 417 12. PLC Axis Control 12.3 PLC Interface Timing chart (1) For rapid traverse and cutting feed mode Start busy move Speed (2) For jog feed mode Start busy move Speed (Note) The axis moves by jog feed only during start ON. - 408 - Get other manuals https://www.bkmanuals.com...
  • Page 418 12. PLC Axis Control 12.3 PLC Interface (3) For reference point return feed mode (3-1) Dog-type reference point return Start busy move (G1 mode) Speed (Note 1) The axis moves by reference point return feed only during start ON. Turn the start OFF after confirming that the reference point has been reached.
  • Page 419 12. PLC Axis Control 12.3 PLC Interface (4) For handle feed mode Start busy move Handle Speed (Note) Handle feed is possible only during start ON. - 410 - Get other manuals https://www.bkmanuals.com...
  • Page 420 12. PLC Axis Control 12.3 PLC Interface (5) When the interlock signal is ON (= 1) Start Interlock busy move Speed (6) When the reset signal is ON (= 1) Start Reset busy move Speed - 411 - Get other manuals https://www.bkmanuals.com...
  • Page 421 12. PLC Axis Control 12.3 PLC Interface (7) When the servo OFF signal is ON (= 1) Start Servo OFF busy move svon Speed (8) When the ACT signal is OFF (= 0) Start busy move Speed - 412 - Get other manuals https://www.bkmanuals.com...
  • Page 422 12. PLC Axis Control 12.3 PLC Interface (9) When the start signal ON (=1) is earlier than the ACT signal ON (=1) (A section) (9-1) When OFF the last ACT signal OFF is earlier than a start signal OFF (B section) A section B section Start...
  • Page 423 12. PLC Axis Control 12.3 PLC Interface 12.3.3.3 Alarm No. The alarm Nos. of status ALM1 and ALM2 are set. ALM1 Alarm No. ALM2 Alarm No. The details of each alarm No. are shown below. (1) ALM1 (Control information data designation alarm) Alarm No.
  • Page 424 12. PLC Axis Control 12.3 PLC Interface 12.3.3.4 Control Signals (PLC axis control information data) Control signals such as start, interlock, reset, axis removal and axis removal 2 are designated for the PLC axis. F E D C B A 9 8 7 6 5 4 3 2 1 0 bit 0: Start bit 8: Absolute value command 1: Interlock...
  • Page 425 12. PLC Axis Control 12.3 PLC Interface bit 5: Axis removal 2 The axis will execute a deceleration stop, and a servo OFF/ready OFF status will result, when the axis removal 2 signal turns ON. A servo ON/ready ON status will result for the stopped PLC axis when the axis removal 2 signal turns OFF (is canceled).
  • Page 426 12. PLC Axis Control 12.3 PLC Interface 12.3.3.5 Axis Designation The axis No. of the PLC axis is designated. Axis designation 0: 1st axis 1: 2nd axis 6: 7th axis 12.3.3.6 Operation Mode The operation mode for the PLC axis is designated. For example, in the handle mode, Rn+5=6 (DATA) is set.
  • Page 427 12. PLC Axis Control 12.3 PLC Interface 12.3.3.7 Feedrate When the operation mode is cutting feed or jog feed (Rn + 5 = 1 to 3), the PLC axis feedrate is designated with a binary code. Feedrate Designation value 1 to 1000000 mm/min. (0.1 inch/min.) (Note 1) The feedrate designated in the parameters is used for the rapid traverse mode and reference point return mode.
  • Page 428 12. PLC Axis Control 12.3 PLC Interface 12.3.3.9 Machine Position The machine position output to the machine system is expressed. The machine position becomes the rfp (reference point) when the reference point is reached. + 10 Machine position (input unit) 12.3.3.10 Remaining Distance The remaining distance of the movement data output to the machine system is expressed.
  • Page 429 12. PLC Axis Control 12.3 PLC Interface 12.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 Reference point return Y438 *PCD1...
  • Page 430 12. PLC Axis Control 12.3 PLC Interface 12.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 Y42D HS1P 1st handle PLC axis valid Y42E HS2P 2nd handle PLC axis valid...
  • Page 431 Appendix 1. Example of Faulty Circuit Appendix 1. Example of Faulty Circuit Wrong configurations of circuits are shown below. Correct the circuitry, if any. Faulty circuit producing errors Correct circuit (1) Circuit containing OR (2) Rounding circuit Necessity Whether or not the Y10 condition includes X3, X4 and X2 is unknown.
  • Page 432 Appendix 2. MELSEC QnA Series Command Lists 2.1 Sequence Commands Appendix 2. MELSEC QnA Series Command Lists The following command lists are excerpts from the "QnACPU Programming Manual (Common Commands)" (model name: QNACPU-P (KYOUTU) 13J522). In these lists, the commands "marked "...
  • Page 433 Appendix 2. MELSEC QnA Series Command Lists 2.1 Sequence Commands End commands Other commands Classifi- Command Classifi- Command Symbol Symbol cation sign cation sign Stop STOP FEND FEND STOP Program ────── opera- tion NOPLF NOPLF PAGE PAGE 2.2 Basic Commands Comparison operation commands Comparison operation commands (continued) Classifi-...
  • Page 434 Appendix 2. MELSEC QnA Series Command Lists 2.2 Basic Commands Comparison operation commands (continued) Comparison operation commands (continued) Classifi- Command Classifi- Symbol Command sign Symbol cation sign cation Real Charac- S1 S2 S1 S2 number data string S1 S2 S1 S2 ANDE AND$ compar-...
  • Page 435 Appendix 2. MELSEC QnA Series Command Lists 2.2 Basic Commands Arithmetic operation commands Arithmetic operation commands (continued) Classifi- Command Classific Command Symbol Symbol cation sign ation sign 16-bit 4-digit addition/ addition subtrac- /subtrac tion tion S1 S2 D S1 S2 D S1 S2 D S1 S2 D S1 S2 D...
  • Page 436 Appendix 2. MELSEC QnA Series Command Lists 2.2 Basic Commands Arithmetic operation commands (continued) Data conversion commands (continued) Classifi- Command Classifi- Command Symbol Symbol cation sign cation sign conver- sion BINP BINP S1 S2 D DBIN Floating- DBIN point S1 S2 D DBINP DBINP data...
  • Page 437 Appendix 2. MELSEC QnA Series Command Lists 2.2 Basic Commands Program branch commands Data transfer commands Classifi- Command Classifi- Command Symbol Symbol cation sign cation sign Jump 16-bit data transfer MOVP MOVP 32-bit DMOV DMOV data transfer DMOVP GOEND DMOVP GOEND Floating- EMOV...
  • Page 438 Appendix 2. MELSEC QnA Series Command Lists 2.3 Application Commands 2.3 Application Commands Logical operation commands Logical operation commands (continued) Classifi- Command Classifi- Command Symbol Symbol cation sign cation sign NOT- WAND WXNR WAND WXNR exclusive WANDP WXNRP WANDP WXNRP WAND S1 S2 D WXNR...
  • Page 439 Appendix 2. MELSEC QnA Series Command Lists 2.3 Application Commands Shift commands Data processing commands Classifi- Command Classifi- Command Symbol Symbol cation sign cation sign n-bit shift Data S1 S2 D search SFRP SFRP SERP S1 S2 D SERP DSER S1 S2 D DSER SFLP...
  • Page 440 Appendix 2. MELSEC QnA Series Command Lists 2.3 Application Commands Data processing commands (continued) Structuring commands Classifi- Command Classifi- Command Symbol Symbol cation sign cation sign Retrieval Repeat MAXP MAXP NEXT NEXT BREAK BREAK MINP BREAKP MINP BREAKP Sub- CALL Pn S1~Sn DMAX DMAX...
  • Page 441 Appendix 2. MELSEC QnA Series Command Lists 2.4 Exclusive Commands 2.4 Exclusive Commands Exclusive commands (communication) Classifi- Command Symbol cation sign Transient S2 D1 ZP.OPEN "Un" OPEN trans- mission S2 D1 ZP.CLOSE "Un" CLOSE ZP.BUFSND "Un" BUFSND ZP.BUFRCV "Un" BUFRCV ERRCLR ERRRD UINI...
  • Page 442 Appendix 3. PLC Development Environment using GPPQ 3.1 System Configuration at PLC Development Appendix 3. PLC Development Environment using GPPQ The system configuration and respective tool function outlines of the PLC development environment are described here, especially the function of the "MELSEC QnA Series GPP Function Software Package (GPPQ)"...
  • Page 443 Appendix 3. PLC Development Environment using GPPQ 3.2 Development Tool Function Outline 3.2.3 GPPQ (SW2IVD/NX-GPPQ type GPP Function Software Package) The GPPQ is a programming software package (model name: SW2IVD-GPPQ) for the mainstream model "QnA Series" of the Mitsubishi programmable logic controller MELSEC Series. The GPPQ is a powerful tool with the same functions as conventional MELDAS PLC development software (PLC4B), but strengthened.
  • Page 444 Appendix 3. PLC Development Environment using GPPQ 3.3 GPPQ Function Outline and Functions Supported by the C64 Series 3.3 GPPQ Function Outline and Functions Supported by the C64 Series The GPPQ is a programming software package (model name: SW1IVD-GPPQ) for the mainstream model "QnA Series"...
  • Page 445 Appendix 3. PLC Development Environment using GPPQ 3.3 GPPQ Function Outline and Functions Supported by the C64 Series List of general section functions (2) : Possible, r : Support not possible/not determined Mode Function Support Remarks Parameter PC name setting PC system setting PC file setting Device setting...
  • Page 446 Appendix 3. PLC Development Environment using GPPQ 3.3 GPPQ Function Outline and Functions Supported by the C64 Series List of general section functions (3) : Possible, r : Support not possible/not determined Mode Function Support Remarks Text Device comment creation Pointer statement Interlinear statement Note...
  • Page 447 Appendix 3. PLC Development Environment using GPPQ 3.3 GPPQ Function Outline and Functions Supported by the C64 Series 3.3.2 Function Support Conditions (on-line section) The following shows a list of GPPQ on-line functions supported by the C64 Series. mark indicates functions that can currently be used by the C64 Series. An r mark indicates that the function cannot be used because it is related to "QnA Series"...
  • Page 448 Appendix 3. PLC Development Environment using GPPQ 3.3 GPPQ Function Outline and Functions Supported by the C64 Series List of on-line section functions (2) : Possible, r : Support not possible/not determined Mode Function Menu Detailed function Support Remarks 6.5 Test 6.5.1 Monitor trigger stop Stop at bit device rising edge Stop at bit device falling edge...
  • Page 449 Appendix 3. PLC Development Environment using GPPQ 3.3 GPPQ Function Outline and Functions Supported by the C64 Series List of on-line section functions (3) : Possible, r : Support not possible/not determined Mode Function Menu Detailed function Support Remarks 6.8 PC menu 6.8.7 Remote operation CPU status display STOP...
  • Page 450 Appendix 3. PLC Development Environment using GPPQ 3.3 GPPQ Function Outline and Functions Supported by the C64 Series List of on-line section functions (4) : Possible, r : Support not possible/not determined Mode Function Menu Detailed function Support Remarks 6.10 Monitor 6.10.5 Device registration monitor Digit designation monitor display and test...
  • Page 451 Appendix 3. PLC Development Environment using GPPQ 3.3 GPPQ Function Outline and Functions Supported by the C64 Series List of on-line section functions (5) : Possible, r : Support not possible/not determined Mode Function Menu Detailed function Support Remarks 10.2 Drive Internal RAM Fixed name...
  • Page 452 Appendix 3. PLC Development Environment using GPPQ 3.3 GPPQ Function Outline and Functions Supported by the C64 Series List of on-line section functions (6) : Possible, r : Support not possible/not determined Mode Function Menu Detailed function Support Remarks 10.5 PC menu 10.5.8 Write option For write during run...
  • Page 453 Appendix 3. PLC Development Environment using GPPQ 3.4 Setup Procedure 3.4 Setup Procedure 3.4.1 Tool Setup Procedure In the C64 Series PLC development environment, it is assumed that the various tools are used with an IBM PC-compatible personal computer. Prepare each tool so that it is IBM PC-compatible. Refer to the enclosed Operating Manual for the setup and start procedures of each tool.
  • Page 454 Appendix 3. PLC Development Environment using GPPQ 3.5 PLC Program Development Procedure 3.5 PLC Program Development Procedure 3.5.1 Precautions before Development Pay careful attention to the following items before developing ladder programs using the GPPQ. (1) PC Type Selection The PC type must be set when newly creating programs, etc. Select the following CPU type when requesting PC type selection with the GPPQ.
  • Page 455 Appendix 3. PLC Development Environment using GPPQ 3.5 PLC Program Development Procedure 3.5.2 Ladder Transfer to the C64 Controller The method of transferring a ladder to the C64 controller with the GPPQ (especially the restrictions and C64 characteristic operations) is explained below. (1) Menu Selection The screen is selected from the menu using the following GPPQ basic operation.
  • Page 456 Appendix 3. PLC Development Environment using GPPQ 3.5 PLC Program Development Procedure (3) Operation during a Transfer Error The ladder data is conversed to the ladder machine code characteristic to the C64 controller simultaneously with the ladder transfer from the GPPQ to the C64 controller. A conversion error will occur if devices or command formats are used that are not supported by the C64 Series.
  • Page 457 Appendix 3. PLC Development Environment using GPPQ 3.5 PLC Program Development Procedure 3.5.3 Ladder Read from the C64 Controller The method of reading a ladder from the M600 controller to the GPPQ is explained below. (1) Menu Selection The screen is selected from the menu using the following GPPQ basic operation. PC read PC menu ( GRPH )
  • Page 458 Appendix 3. PLC Development Environment using GPPQ 3.5 PLC Program Development Procedure 3.5.4 Ladder Comparison with the C64 Controller The method of comparing the ladders between the C64 controller and GPPQ is explained below. (1) Menu Selection The screen is selected from the menu using the following GPPQ basic operation. PC compare PC menu ( GRPH )
  • Page 459 Appendix 3. PLC Development Environment using GPPQ 3.6 PLC-Related Data Development Procedure 3.6 PLC-Related Data Development Procedure The development procedure is explained here for alarm messages, operator messages, PLC switches, etc., as PLC related data. 3.6.1 PLC Related Data File Names The PLC related data is controlled and stored in the categories shown below inside the C64 Series.
  • Page 460 Appendix 3. PLC Development Environment using GPPQ 3.6 PLC-Related Data Development Procedure 3.6.2 Development Procedure The general development procedure for message date is explained below. (1) Creation The message data is described using a general text editor. The description method and format will be described later.
  • Page 461 Appendix 3. PLC Development Environment using GPPQ 3.6 PLC-Related Data Development Procedure 3.6.3 Message Data Description Method The message data can be described as text data by a general text editor. Commercially available spreadsheet software can also be used if it conforms to the following description method. (1) Description Format Message data is classified into setting areas for setting each message and message areas for the respective message main unit.
  • Page 462 Appendix 3. PLC Development Environment using GPPQ 3.6 PLC-Related Data Development Procedure (2) Description Method The message data is described as text data by the following description format. ;# ladder ver1.0 '97.08.01 … Comment ;$, A, 32, 200 ;$, 0, 40, 200 …...
  • Page 463 Appendix 3. PLC Development Environment using GPPQ 3.6 PLC-Related Data Development Procedure (3) Details of comment message The message of tool registration screen and the massage for load meter are defined in the comment message. The description format of comment message is shown as below. ;M, Device, Device No., Message character string (a) Tool registration screen message The message can be made up to 5 steps with maximum 8 characters.
  • Page 464 Appendix 3. PLC Development Environment using GPPQ 3.6 PLC-Related Data Development Procedure (c) Load meter display 40 characters 34 characters Spindle load 1 0 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1 0 0 Z axis load 1 0 0...
  • Page 465 Appendix 3. PLC Development Environment using GPPQ 3.6 PLC-Related Data Development Procedure (4) Precautions NO. of characters quantity limitations, handling of information other than settings, handling of information other than format. (a) Message data maximum value Processing will be carried out with the values at the following maximum values if the setting is not carried out in the setting area, or if the description position in the setting area is illegal.
  • Page 466 Appendix 3. PLC Development Environment using GPPQ 3.6 PLC-Related Data Development Procedure 3.6.4 Conversion to GPPQ Data "CNVQ (data conversion software package)" is used in the conversion from text data to GPPQ data. It is also possible to convert to GPPQ data from spreadsheet software instead of text data. Refer to the Operating Manual for details.
  • Page 467 Appendix 3. PLC Development Environment using GPPQ 3.6 PLC-Related Data Development Procedure (3) Commercially Available Software QnA Conversion Setting The screen is selected from the menu using the following CNVQ basic operation. Commercially Mode available selection F11 ( HOME CLR software QnA conversion menu screen...
  • Page 468 Appendix 3. PLC Development Environment using GPPQ 3.6 PLC-Related Data Development Procedure 3.6.5 Operation with the GPPQ Message data in the GPPQ is handled as "Integrated interlinear statements" in the PLC program. "Integrated interlinear statements" are interlinear comments to help in understanding the PLC program.
  • Page 469 Appendix 3. PLC Development Environment using GPPQ 3.6 PLC-Related Data Development Procedure (2) Interlinear Statement Editing The screen is selected from the menu using the following GPPQ basic operation. Mode Device 7 5 selection Alt ( GRPH ) F11 ( HOME CLR ) comment menu screen edit screen...
  • Page 470 Appendix 3. PLC Development Environment using GPPQ 3.6 PLC-Related Data Development Procedure 3.6.6 Transfer to the Controller The following shows the method of transferring a message from the GPPQ to the CNC controller. The transfer method is the same as that of the ladder code. Ladder codes and message data are distinguished by their file names only.
  • Page 471 Appendix 3. PLC Development Environment using GPPQ 3.6 PLC-Related Data Development Procedure 3.6.7 Reading and Comparing from the Controller The following describes the method of reading and comparing a message from the CNC controller to the GPPQ. The method of reading and comparing is the same as that of ladder codes. Ladder codes and message data are distinguished by their file names only.
  • Page 472 Appendix 3. PLC Development Environment using GPPQ 3.6 PLC-Related Data Development Procedure (3) Message Data Comparison Message data comparison can be executed in the same manner as the ladder program, however, note that the target compared is the ladder code (NOPLF, END) only. Therefore, message data described as "Integrated interlinear statements"...
  • Page 473 Appendix 3. PLC Development Environment using GPPQ 3.7 Differences From The M500 PLC Development Environment 3.7 Differences From The M500 PLC Development Environment 3.7.1 PLC Commands The command range that can be used in the MELSEC-QnA Series PLC program differs from the command range that can be used by the C64.
  • Page 474 Appendix 3. PLC Development Environment using GPPQ 3.7 Differences From The M500 PLC Development Environment (2) Commands that the Format Differs from that of the GPPQ "Commands used by inputting or outputting an accumulator (A0, A1)" in the conventional M500 Series did not have A0 or A1 designated in the command.
  • Page 475 Appendix 3. PLC Development Environment using GPPQ 3.7 Differences From The M500 PLC Development Environment (3) Commands that can be Used with the GPPQ, but cannot be Used by the C64 When commands that cannot be used by the M600 are written from the GPPQ to the C64, they are rewritten to "NOP"...
  • Page 476 Revision History Date of revision Manual No. Revision details Feb. 2002 BNP-B2309A First edition created. • The section "1. GX Developer" is revised wholly. May 2004 BNP-B2309C • The following commands were added in according to the software version D; FROM, TO, OPEN, CLOSE, BUFSND, BUFRCV, READ, SREAD, WRITE, SWRITE, RIRD, RIWT •...
  • Page 477 Every effort has been made to keep up with software and hardware revisions in the contents described in this manual. However, please understand that in some unavoidable cases simultaneous revision is not possible. Please contact your Mitsubishi Electric dealer with any questions or comments regarding the use of this product. Duplication Prohibited This instruction manual may not be reproduced in any form, in part or in whole, without written permission from Mitsubishi Electric Corporation.
  • Page 478 MITSUBISHI ELECTRIC CORPORATION HEAD OFFICE : MITSUBISHI DENKI BLDG., 2-2-3, MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN MC6/C64 MODEL MODEL 008-185 CODE BNP-B2309D(ENG) Manual No. Specifications subject to change without notice. Printed in Japan on recycled paper. (0412) MEE Get other manuals https://www.bkmanuals.com...

This manual is also suitable for:

Meldas c64

Table of Contents