Download Print this page
LSIS XGB User Manual
LSIS XGB User Manual

LSIS XGB User Manual

Programmable logic controller

Advertisement

Quick Links

Programmable Logic Controller
XGB M-Type (XBC-H)
User Manual
XBM-DN32H

Advertisement

loading
Need help?

Need help?

Do you have a question about the XGB and is the answer not in the manual?

Questions and answers

Summary of Contents for LSIS XGB

  • Page 1 Programmable Logic Controller XGB M-Type (XBC-H) User Manual XBM-DN32H...
  • Page 2 Revision History Page Version Date Remark Part 1. First Edition V 1.0 2016.12 ※ The number of User’s manual is indicated the right side of the back cover. ⓒ LS IS Co.,Ltd. 2016 All Rights Reserved.
  • Page 3 Safety Instruction Before using the product … For your safety and effective operation, please read the safety instructions thoroughly before using the product. Safety Instructions should always be observed in order to prevent accident ► or risk with the safe and proper use the product. Instructions are separated into “Warning”...
  • Page 4 User’s Manual. The Use’s Manual describes the product. If necessary, you may refer to the following description and order accordingly. In addition, you may connect our website(http://www.lsis.com/) and download the information as a PDF file.
  • Page 5 Table of Contents Contents CHAPTER 1 INTRODUCTION ............................... 1 1.1 G ..............................1 UIDE TO ANUAL 1.2 F ................................... 2 EATURES 1.3 XGB S ............................... 4 YSTEM ONFIGURATION 1.4 P ..................................5 RODUCT 1.5 T ..................................7 ERMINOLOGY CHAPTER 2 QUICK START GUIDE ............................1 2.1 G...
  • Page 6 Table of Contents 3.9.2 Communication Ports ............................. 39 3.9.3 Comm. Port 1, USB Connection ..........................40 3.9.4 Comm. Port 2, RS-232C Connection ........................40 3.9.5 Comm. Port 3, RS-485 Connection ......................... 41 3.9.6 Comm. Port 4, Ethernet Connection ........................42 CHAPTER 4 CPU SPECIFICATIONS ............................
  • Page 7 Table of Contents 5.3 A ..............................25 DDITIONAL UNCTIONS 5.3.1 Scan Watchdog timer ............................. 25 5.3.2 Timer Function ............................... 26 5.3.3 Counter processing ..............................29 5.3.4 RTC Function ................................32 5.4 I/O A ................................34 LLOCATION 5.4.1 I/O Parameters ............................... 34 5.4.2 Allocate I/O Numbers .............................
  • Page 8 Table of Contents 6.6 S ..........................32 PECIAL OMMUNICATION NSTRUCTION 6.6.1 Special module common instruction ........................32 6.7 S (F) L ................................ 35 PECIAL ELAY 6.8 C (L) ............................40 OMMUNICATION ELAY 6.9 G ............................45 UIDE FOR NSTRUCTION ETAILS INSTRUCTION DETAILS ..............................
  • Page 9 Table of Contents 7.1 G .................................... 1 ENERAL 7.1.1 General ..................................1 7.2 PID C ..................................3 ONTROL 7.2.1 Basic theory of PID control ............................3 7.2.2 Functional specifications of PID control ......................... 10 7.2.3 PID control parameter setting ..........................11 7.2.4 PID flag ...................................
  • Page 10 Table of Contents 9.3.6 XBE-TN16A, 16 point transistor output module (Sink type) ................... 13 9.3.7 XBE-TP16A, 16 point transistor output module (Source type) ................14 9.3.8 XBE-TN32A, 32 point transistor output module (Sink type) ................... 15 9.3.9 XBE-TP32A, 32 point transistor output module (Source type) ................16 9.4 C ......................
  • Page 11 Table of Contents 10.13 F ..........................70 UNCTIONS OF OSITIONING ONITOR 10.13.1 Monitoring and Command ..........................70 10.13.2 Parameter/Operation Data Settings ........................74 10.14 E ........................... 76 XAMPLE OSITIONING ROGRAMS 10.14.1 Floating Origin Settings / Single Operation......................76 10.14.2 Straight Interpolation Operation ........................77 10.14.3 Deceleration Stop ...............................
  • Page 12 Table of Contents 11.6.2 Checking status of main unit ..........................19 11.6.3 Communication module information ........................19 11.6.4 Frame monitor ..............................20 11.6.5 Status by service ..............................21 11.7 T ............................23 ROUBLESHOOTING BY RROR 11.7.1 Troubleshooting when P2P parameter setting error occurs in case of XG5000 connection ........ 23 11.7.2 Troubleshooting when communication is not done after P2P client setting ............
  • Page 13 Chapter 1 Introduction Chapter 1 Introduction 1.1 Guide to Use This Manual This manual includes specifications, functions, and handling instructions for the XGB series PLC and is divided up into chapters as follows. Title Contents Describes the configuration of this manual, PLC features, and...
  • Page 14 Chapter 1 Introduction 1.2 Features The features of XGB system are as follows. 1. High performance hardware. a. High Processing Speed b. Max. 284 I/O control supporting small & mid-sized system implementation Type Item XBM-DN32H Operation processing 83ns / Step...
  • Page 15 Chapter 1 Introduction c. Communication module may be additionally increased by adding modules (up to 2 stages such as Cnet, Ethernet, and etc). d. Convenient network-diagnostic function through network & communication frame monitoring. e. Convenient networking to other systems through Ethernet or Cnet. 6.
  • Page 16 4 channel (2 voltage, 2 current) analog output c. 14bit resolution 1.3 XGB System Configuration XGB series System Configuration is as follows. Up to 7 expansion modules are available. (Only up to two communication modules supported per PLC) Basic unit I/O module Special...
  • Page 17 Chapter 1 Introduction 1.4 Product List Types Model Description Remark AC110-220V power supply, DC24V input 16 point, Transistor output 16 Main XBM-DN32H point(sink) Basic type Unit XBE-DC08A DC24V Input 8 point Input XBE-DC16A/B DC24V Input 16 point XBE-DC32A DC24V Input 32 point XBE-RY08A Relay output 8 point XBE-RY08B...
  • Page 18 Chapter 1 Introduction Model Description Remark Types XBL-C21A Cnet (RS-232C/Modem) I/F XBL-C41A Cnet (RS-422/485) I/F XBL-EMTA Enet I/F XBL-EIMT/F/H RAPIEnet I/F 2 UTP cable XBL-EIPT EtherNet I/P Module XBL-CMEA CANopen MasterI/F XBL-CSEA CANopen Slave I/F XBL-PMEC Profibus-DP, Master XBL-PSEA Profibus-DP, Slave XBL-DSEA DeviceNet, Slave USB-301A...
  • Page 19 Chapter 1 Introduction 1.5 Terminology The following table gives definition of terms used in this manual. Terms Definition Remark Example: A standard component that has a specified function which Expansion module, Module configures the system. Devices such as I/O board, which is Special module, inserted onto the mother board.
  • Page 20 Chapter 1 Introduction Terms Definition Current flows from the switch to the PLC input terminal if an input signal turns on. Input Sensing Switch Current Sink Input Input Power Module Supply Sensing Input Optical Circuit Isolation Common − Current flows from the PLC input terminal to the switch after an input signal turns on.
  • Page 21 Chapter 2 Quick Start Guide 2.1 Getting Started The quick start guide is intended to show a basic setup and programming of the XGB PLC. For more details on the features of the XGB PLC, refer to the rest of this manual.
  • Page 22 Chapter 2 Quick Start Guide 5. Next select the CPU Type according to the chart below. Software CPU Type Selection Corresponding PLC Series XGB-XBCE E Type XGB-XBCS SU Type XGB-XBMH(V1) H Type XGB-XBCU U Type 2.3.2 Writing a Ladder Logic Program 1.
  • Page 23 Chapter 2 Quick Start Guide 2. Upon placing the contact, the Input Variable/Device window will appear. 3. Input P00 for the Variable/Device and click OK to insert the contact. 4. Next, select the Coil by clicking the icon or pressing F9. Pressing F9 will automatically insert the coil in the last slot of the rung.
  • Page 24 Chapter 2 Quick Start Guide 6. Input P20 for the Variable/Device and click OK to insert the coil. 7. You have now written a simple Ladder Logic Program. This program will instruct the PLC to turn on the P20 output coil when P00 input is closed. XBC H-Type Main Unit Ver.
  • Page 25 Chapter 2 Quick Start Guide 2.3.3 Simulating Program Without PLC 1. The program can be simulated using XG5000 without needing to connect to a physical PLC. 2. To start the simulator, click either the taskbar icon shown below or Tools > Start Simulator. 3.
  • Page 26 Chapter 2 Quick Start Guide 4. The simulator allows you to control and test all functions of your ladder program. Double click the P00 contact to open the Change Value window. 5. Click OK to activate P00 which will cause P20 to turn on. XBC H-Type Main Unit Ver.
  • Page 27 Chapter 2 Quick Start Guide 2.4 Installation and Wiring of PLC 2.4.1 Connect Power Wiring 1. We are going to wire PLC and test program using PLC hardware. a. Connect power and I/O wiring to PLC according to the drawing below. b.
  • Page 28 Chapter 2 Quick Start Guide e. Next, connect the PLC to your computer using the Comm. 1 port and cable. 2.5 Writing Program to PLC 1. Return to XG5000 and the test program we have written. 2. Open the connection settings by clicking: Online > Connection Settings XBC H-Type Main Unit Ver.
  • Page 29 Chapter 2 Quick Start Guide 3. This will show the Connection Settings Window. Since we are using an H-type PLC in this example, set Type to USB and Depth to Local. XG5000 software will automatically detect the PC port where the PLC is connected. 4.
  • Page 30 Chapter 2 Quick Start Guide 6. Since the PLC was not running when we wrote the program to it, XG5000 will prompt to reset the PLC. Click OK. 7. To reconnect with the PLC click Online > Connect. 8. To run the PLC with its new program, click Online > Change Mode > Run. XBC H-Type Main Unit 2-10 Ver.
  • Page 31 Chapter 2 Quick Start Guide 9. You can now test the program by closing the switch connected to P00 which will cause output P20 to turn on. XBC H-Type Main Unit 2-11 Ver. 1...
  • Page 32 Chapter 3 Installation and Wiring Chapter 3 Installation and Wiring 3.1 Safety Instructions Warning  Design protection circuitry based on individual machine operation to protect the machine and operator in the event of a PLC failure or external power quality issue. ...
  • Page 33 Chapter 3 Installation and Wiring 3.1.1 Safety Instructions when designing PLC system Warning  Install protection circuit on the exterior of PLC to protect the whole control system from any error in external power or PLC module. Any abnormal output or operation may cause serious problem in safety of the whole system.
  • Page 34 Chapter 3 Installation and Wiring Caution  I/O signal or communication line shall be wired at least 100mm away from a high-voltage cable or power line. If not, it may cause abnormal output or operation. Caution  Use PLC only in the environment specified in PLC manual or general standard of data sheet.
  • Page 35 Chapter 3 Installation and Wiring 3.1.2 Safety Instructions when wiring Warning  Prior to wiring, be sure that power of PLC and external power is turned off. If not, electric shock or damage on the product may occur.  Before PLC system is powered on, be sure that all terminal covers are securely closed.
  • Page 36 Chapter 3 Installation and Wiring 3.1.3 Safety Instructions for test-operation or repair Caution  Prior to installing or disassembling the module, switch off all external power, including PLC power. If not, electric shock or abnormal operation may occur.  Keep any wireless installations or cell phone at least 30cm away from PLC.
  • Page 37 External Aux. 24VDC Supply External Auxiliary 24VDC supply 3.2.1 Internal DC5V Power Calculation LSIS PLCs supply power to expansion modules and option cards through a 5VDC internal bus. The rated output varies according to PLC model as shown in the table below. Specification...
  • Page 38 Chapter 3 Installation and Wiring Example calculation: Item Model Number Current Supply Current 1570mA XBM-DN32H Current Draw XBE-DC32A 50mA Slot 0 Module XBE-DR16A 250mA Slot 1 Module XBF-DV04A 110mA Slot 2 Module XBL-AD04A 120mA Slot 3 Module Totals 530mA Current Required 1040mA Current Remaining Internal Current Consumption (DC 5V)
  • Page 39 Chapter 3 Installation and Wiring (Unit : ㎃) Type Model Consumption current XBF-AD04A XBF-AD08A XBF-AH04A XBF-DV04A XBF-DC04A XBF-RD04A XBF-RD01A XBF-TC04S Expansion Special module XBF-PD02A XBF-HO02A XBF-HD02A XBF-AD04C XBF-DC04C XBF-DV04C XBF-TC04RT XBF-TC04TT XBF-LD02S XBL-C21A XBL-C41A XBL-EMTA XBL-EIMT XBL-EIMF XBL-EIMH Expansion Communication module XBL-EIPT XBL-CMEA...
  • Page 40 Chapter 3 Installation and Wiring 3.3 Names of Part and Function Names Purposes LED for displaying input, ■ Displays the On/Off status of input, output contacts ① output ■ Terminal block receiving the actual input signal ② Input connector ■ Terminal block outputting the actual output signal ③...
  • Page 41 Chapter 3 Installation and Wiring 3.4 Dimension (Unit: mm) 3.4.1 CPU Type XBM-DN(P)32H 3.4.4 Extension I/O module XBE-DC32A, XBE-TN32A, XBE-TP32A, XBE-DN32A XBC H-Type Main Unit 3-10 Ver. 1...
  • Page 42 Chapter 3 Installation and Wiring XBE-RY16A XBE-DC08A, XBE-DC16A, XBE-TN08A, XBE-TN16A XBC H-Type Main Unit 3-11 Ver. 1...
  • Page 43 Chapter 3 Installation and Wiring XBE-DR16A, XBE-RY08A XBL-C41A, XBL-C21A XBC H-Type Main Unit 3-12 Ver. 1...
  • Page 44 Chapter 3 Installation and Wiring 3.5 PLC Mounting Use caution in handling Use PLC in accordance to general specification listed in manual. Improper use, may cause electric shock, fire, malfunction, or damage to product. Warning  Module must be mounted to hook for proper fixation. The module may be damaged from over-applied force.
  • Page 45 Chapter 3 Installation and Wiring Installation of module. XGB PLC has a mount for 35mm width DIN rail. a. When installing on DIN rail: i. Pull hook for DIN rail at the bottom of module and install it on DIN rail.
  • Page 46 Chapter 3 Installation and Wiring b. When installing on panel i. You can install XBG compact type main unit on panel directly using screw holes and M4 type screws. Panel #8 (2-Ø4.5) screw hole Module equipment location Keep the following distance between module and other components for ventilation and easy detachment and attachment.
  • Page 47 Chapter 3 Installation and Wiring PLC mounting orientation a. For best ventilation, install like the following figure with PLC vents facing up and down. b. Do not install in any orientation other than vertical as shown above. XBC H-Type Main Unit 3-16 Ver.
  • Page 48 Chapter 3 Installation and Wiring Distance with another device To avoid radiated electrical noise or heat, keep the distance between PLC and powered devices and cabling at least 4in. (100mm) from the front. For equipment installed next to PLC: 2in. (50mm) or more XBC H-Type Main Unit 3-17 Ver.
  • Page 49 Chapter 3 Installation and Wiring 3.6 High Speed Expansion Modules 3.6.1 High Performance Expansion Modules The following high performance expansion modules are compatible with U-Type PLC and can take advantage of the High Speed Bus available in slots 2 and 3. XBF-PN04B: 4 Axis EtherCAT Positioning Module XBF-PN08B: 8-axis EtherCAT Positioning Module 3.6.2 High Performance Expansion Module Installation...
  • Page 50 Do not allow foreign material to enter into module. It may cause fire, malfunction, or error. 3.7.1 Wiring General Specifications Do not use a ferrule with the XGB terminal strip. Ring and Fork terminals are acceptable as well as stranded wire.
  • Page 51 Chapter 3 Installation and Wiring 3.7.2 On-Board Power Supply Power supply specification of main unit Specification Items DC power Input voltage range DC24V Rated input voltage DC19.2~28.8V Input frequency Input current 1A or less Input Inrush current 70 A peak or less leakage current 3㎃...
  • Page 52 Chapter 3 Installation and Wiring 3.7.4 I/O Device Wiring Concepts The size of I/O device cable is limited to 22-14AWG (0.3~2 mm ) but it is recommended to select a size (0.3 mm ) for ease of use. I/O signal lines should be routed a minimum of 4in. (100mm) from high voltage/high current main circuit cable.
  • Page 53 Chapter 3 Installation and Wiring Setting input filter a. Click I/O Parameter』in the project window of XG5000 XBC H-Type Main Unit 3-22 Ver. 1...
  • Page 54 Chapter 3 Installation and Wiring b. Click『Module』 at the slot location. c. Set I/O module really equipped XBC H-Type Main Unit 3-23 Ver. 1...
  • Page 55 Chapter 3 Installation and Wiring d. After setting I/O module, click Input Filter e. Set filter value XBC H-Type Main Unit 3-24 Ver. 1...
  • Page 56 Chapter 3 Installation and Wiring Setting output status in case of error a. Click Emergency Out in the I/O parameter setting window b. Click Emergency Output c. If it is selected as Clear, the output will be Off and if Hold is selected, the output will be kept. XBC H-Type Main Unit 3-25 Ver.
  • Page 57 Connect A-phase only for 1-phase input. b. Connect A-phase and B-phase for 2-phase input. 3.7.7 Example of high speed wiring When pulse generator (encoder) is voltage output. Pulse generator XGB PLC Shielded twisted pair cable Contact 24V DC When pulse generator is open-collector output type.
  • Page 58 Chapter 3 Installation and Wiring 3.7.8 Ground Wiring The PLC contains noise suppression, so it can be used without any separate grounding if there is a large amount of noise. However, if grounding is required, please refer to the following. For grounding, please make sure to use exclusive grounding (preferred method in the figure below).
  • Page 59 Chapter 3 Installation and Wiring 3.7.9 Caution in handling • Don’t drop product. • Don’t disassemble the PLCs or modules. There are no user serviceable parts inside. • In case of wiring, make sure foreign substance not to enter upper part of module. Caution in handling I/O module.
  • Page 60 Chapter 3 Installation and Wiring 3.7.10 Smart link board Easy wiring is available by connecting the I/O connector with smart link board. The available smart link and I/O cable are as follows. Smart link Connection cable No. of Item Model Model Model Length...
  • Page 61 Chapter 3 Installation and Wiring I/O Wiring of XGB, SLP-T40P and SLT-CT101-XBM. For wiring of other smart link boards or XGB extension module, refer to XGB user manual for hardware. SLT-T40P terminal array Item Specification Rated voltage AC/DC 125[V] Rated current Max.
  • Page 62 Chapter 3 Installation and Wiring Relationship of XGB I/O signal and Smart link board terminal number is as follows. The following figure describes signal allocation when C40HH-10SB-XBE is used as connection cable. Terminal block Name Terminal block board (TG7-1H40S) I/O wiring a.
  • Page 63 Chapter 3 Installation and Wiring b. XBE-TN32A (TG7-1H40S) c. XBE-TP32A (TG7-1H40S) d. XBE-TN32A (R32C-NS5A-40P) XBC H-Type Main Unit 3-32 Ver. 1...
  • Page 64 Chapter 3 Installation and Wiring 3.8 Main Unit Digital Specifications 3.8.1 General I/O Specifications PCB Terminal Block General Specifications Cable and Terminals 30 - 16 AWG (0.05 - 1.5 mm ); Cu wire; PCB Terminal block Torque 1.8 in/lb (0.2 N/m) Smart Link Board General Specifications Cable and Terminals 26 - 16 AWG (0.14 - 1.5 mm...
  • Page 65 Chapter 3 Installation and Wiring 3.8.2 XBM-DN(P)32H Transistor Output I/O XBC H-Type Main Unit 3-34 Ver. 1...
  • Page 66 Chapter 3 Installation and Wiring Input Specifications Input point 16 point, 1 COM Insulation method Photo-coupler isolation Rated input voltage DC24V Rated input current 4mA (Point 0-3: 5mA) Operation voltage range DC20.4-28.8V (within ripple rate 5%) On voltage / On current DC19V or higher / 3mA or higher Off voltage / Off current DC6V or lower / 1mA or lower...
  • Page 67 Chapter 3 Installation and Wiring 3.8.4 Input Filter The XGB PLC’s input modules have the input filter function to disregard the external electrical noise on the input signal. For more details on the input filter function, refer to the below.
  • Page 68 Chapter 3 Installation and Wiring 3.8.5 Emergency Output Function Output can be set to hold at current state or turn OFF the output when the PLC stops due to an error. The emergency outputs can be set in 8-point blocks. Right click and select『Details』on the slot image or the relevant slot position in the base window as shown below.
  • Page 69 3.8.6 Pulse Catch Function The XGB PLC basic unit has the input contacts (P0008 ~ P000F) for Pulse Catch with 8 points. Through these contacts, it is possible to receive the very short pulse signal that cannot be detected by the normal digital input during the PLC scan.
  • Page 70 Chapter 3 Installation and Wiring 3.9 Communications Specifications 3.9.1 Built-in Serial Communication Interface (Cnet) Built-in serial communication is used to connect between the main unit and external devices. Further details can be found in the XGB Cnet I/F Manual. 3.9.2 Communication Ports Comm. Connection...
  • Page 71 Chapter 3 Installation and Wiring Item Comm. Port 2 Specifications Comm. Port 3 Specifications Serial communication method RS-232C RS-485 Modem connection function Data bit 7 or 8 7 or 8 Data type Stop bit 1 or 2 1 or 2 Parity Even/Odd/None Even/Odd/None...
  • Page 72 Chapter 3 Installation and Wiring 3.9.5 Comm. Port 3, RS-485 Connection RS-485 uses two wires for communication. XBC H-Type Main Unit 3-41 Ver. 1...
  • Page 73 Chapter 3 Installation and Wiring 3.9.6 Comm. Port 4, Ethernet Connection XGB U-Type PLC features two Ethernet ports for communication. XBC H-Type Main Unit 3-42 Ver. 1...
  • Page 74 • Peak acceleration : 147 m/s (15G) • Duration : 11ms Shock Resistance • Pulse wave type : Half-sine (3 times each direction per each axis) AC: ±1,500 V Square wave LSIS standard DC: ±900 V impulse noise Electrostatic IEC61131-2 Voltage: 4kV (Contact discharge) discharge...
  • Page 75 Chapter 4 CPU Specifications 4.2 Performance Specifications 4.2.1 CPU Specifications Specifications Items Remark XBM-DN32H Program control Fixed Scan Time, Constant Scan method Batch processing by simultaneous scan (Refresh method), I/O control method Directed by program instruction Program language Ladder Diagram, Instruction List Basic Number of instructions...
  • Page 76 Chapter 4 CPU Specifications 4.2.2 Built-in Functions Specifications Items Remark XBM-DN32H Control by PLC program instructions, auto-tuning, Analog Output, PWM Output, Manual mode, Operation scan time setting, PID control Antiwindup, Delta MV, PV tracking, Hybrid operation, Cascade loop operation Dedicated protocol(XGT) Modbus Server Protocol Cnet...
  • Page 77 Chapter 4 CPU Specifications 4.3 Battery 4.3.1 Battery Specifications Items Specifications Nominal voltage / current DC 3V / 6.5 mAh Warranty term 3 years (at room temperature) Purpose RTC operation during the blackout Backup time 183 days at 70°F (25℃) Specifications Lithium battery, 3.6V φ14.5 X 26 mm...
  • Page 78 Chapter 4 CPU Specifications 4.4 Program Instruction 4.4.1 Program execution methods 1. Cyclic operation method (Scan). This is a basic program proceeding method of PLC that performs the operation repeatedly for the prepared program from the beginning to the last step, which is called ‘program scan’.
  • Page 79 Chapter 4 CPU Specifications 2. Interrupt operation (Cycle time, Internal device). This is the method that stops the normal program operation from proceeding temporarily and carries out the operation processing which corresponds to interrupt program immediately when there occurs the status to process emergently during PLC program execution.
  • Page 80 Chapter 4 CPU Specifications Remark 1) Momentary power failure? This means the voltage of supply power at power condition designated by PLC is lowered as it exceeds the allowable variable range and the short time (some ms ~ some dozens ms) interruption is called ‘momentary power failure’.
  • Page 81 Scan time = ① Scan program process + ② System check & Task process + ③I/O data Refresh + ④ Network Service + ⑤ XG5000 Service + ⑥ User Task Program process ① Scan program process = number of instructions x process speed per each instruction (refer to XGK/XGB instruction user manual) ②...
  • Page 82 Chapter 4 CPU Specifications ④ Task Program process time: sum of task processing time that occurs within a scan; the time calculation by task programs are as same as that of scan program. ⑤ XG5000 processing time: 100㎲ during maximum data monitoring. When changing monitor screen, scan time increases;...
  • Page 83 Chapter 4 CPU Specifications 4.5 Memory There are two types of memory in CPU module that the user can use. One is Program Memory that saves the program written by the user to run the program. The other is Data Memory that provides the device an area to save the data during operation.
  • Page 84 Chapter 4 CPU Specifications 2. Word device area Characteristics of Area Per Device Purpose devices Area to preserve the internal data. D0000~D10239 Data register Bit of word available. (D0000.0) Register used to read data from special module installed in the U00.00~U08.31 Analog data register slot.
  • Page 85 Chapter 4 CPU Specifications 4.5.3 I/O P I/O P, is the area equivalent to external equipment composed of push buttons as input devices, input section to receive signals of switch or limit switch, solenoid used as output device, or output section to deliver operation result to motor and lamp.
  • Page 86 Chapter 4 CPU Specifications 4.5.5 Keep relay K K Bits are retentive internal relays to be used in the program. They are designated in a bit within a word in Hex format. For example, Word K000 bits 0 through F. The K Bits states are not changed by a power cycle, Stop to Run mode change, or a program download.
  • Page 87 Chapter 4 CPU Specifications 4.6 Data Types and Application Methods 4.6.1 Data types 4.6.2 Bit data (Bit) Bit data displays On/Off with 1 bit like contact or coil, or is processed by 1 bit unit inside the memory without I/O. 1.
  • Page 88 Chapter 4 CPU Specifications Here, a Word device’s number is displayed in decimal and bit number in hexadecimal. For example, in order to express D0010’s bit number 1, set D0010.1. Similarly, D0010’s 10 bit would be specified as D0011.A as seen below.
  • Page 89 Chapter 4 CPU Specifications b. Word device: takes 4 or 8 bits from word device’s bit contact used as operand. When specified bit contact is used as the source and 4 or 8 bits is taken from specified contact, the bit which exceeds the applicable word unit will be processed as 0. Like above, if specified bit contact is used as the destination, the data exceeding the word will be lost.
  • Page 90 Chapter 4 CPU Specifications 2. Bit device The bit device is expressed with its lowest digit (Digits expressed in hexadecimal – position to display bit) taken out and will be designated as word data. P00010 MOV H1234 P0000 P0000 1 word data of P0000 specified Remark 1) XGK instructions are based on signed operation.
  • Page 91 Chapter 4 CPU Specifications 2. Bit device Like the expression of word data, the bit device is expressed with its lowest digit taken out, using the data of (Specified device number) and (Specified device number + 1) as double word data. P00010 DMOV 1234 P0001 2-point data (word) such as P0001, P0002 is the object...
  • Page 92 Remark Expression of real data meets IEEE754 format. However, its direct input with the format is impossible. In case of XGB, even though it is satisfied to operation error condition, flag applied isn’t set. XBC H-Type Main Unit 4-19...
  • Page 93 Chapter 4 CPU Specifications 4.6.7 String data Among application instructions, string related instructions use the data type of number, alphabet, special sign, etc. to save in ASCII code. String data up to NULL code (h00) is regarded as one string row. And the maximum length of a string row is 32 bytes (including NULL).
  • Page 94 Chapter 4 CPU Specifications 4.7 Configuration Diagram of Data Memory 4.7.1 Data areas XBC H-Type Main Unit 4-21 Ver. 1...
  • Page 95 Chapter 4 CPU Specifications 4.7.2 Data latch When PLC stops and restarts, the data required for operation or data occurred during operation, will be lost by default. If you want to keep and use that data, data latch can be used. It is possible to use a certain area of some data devices as latch area by parameter setting.
  • Page 96 Chapter 4 CPU Specifications 1. Data latch area operation a. The method to delete the latched data is as below. i. Latch 1/latch 2 clear operation by XG5000 ii. Write by Program (initialization program recommended) iii. Write ‘0’ FILL from XG5000 monitor mode. For keep or reset (clear) operation of latch area data according to PLC operation, please refer to the below table.
  • Page 97 Chapter 4 CPU Specifications a. Latch 1, 2 area is cleared by『Online』-『Clear PLC』. 2. Data initialization Using the memory delete function, the memory of all devices shall be cleared to ‘0’. To set the data value at the beginning according to the system, please use the initialization task. a.
  • Page 98 Chapter 5 Programming Concepts Chapter 5 Programming Concepts 5.1 Program Execution 5.1.1 Configuration of program All functional elements needed to execute a certain control process are called a ‘program’. The program is stored in the built-in RAM mounted on a CPU module or flash memory of an external memory module. The following table shows the classification of the program.
  • Page 99 Chapter 5 Programming Concepts 5.1.2 Program execution methods Here describes the program proceeding method that is executed when the power is applied or key switch is ‘RUN’. The program performs the operation processing according to the configuration as below. Start processing It executes up to execution of INIT_DONE instruction when initializing program is designated.
  • Page 100 Chapter 5 Programming Concepts ii. Cycle time task program 1. Executes the program according to the fixed time interval. iii. Internal device task program 1. Executes the corresponding program after scan program completion when the start condition of internal device occurs. 2.
  • Page 101 Chapter 5 Programming Concepts 5.1.3 Interrupt Example of interrupt setting is as shown below. Interrupt type Interrupt Name Priority Task No. Program Name Initialization Interrupt0 Initialization program Fixed cycle 1 Interrupt1 Fixed cycle 1 External Interrupt2 External Internal device Interrupt3 Internal device High speed Interrupt4...
  • Page 102 Chapter 5 Programming Concepts 5.1.4 Task Setup 1. How to write an initialization task Generate the task in the project window of XG5000 as below and add the program to be executed by each task. For further information, please refer to XG5000 user’s manual. (Interrupt program may be created when XG5000 is not connected with PLC.) a.
  • Page 103 Chapter 5 Programming Concepts b. The Task setting screen is shown. Click 『Initialization』 in Execution condition and make a Task name. c. Click right button of mouse at registered task and select『Add Item』-『Program』. XBC H-Type Main Unit Ver. 1...
  • Page 104 Chapter 5 Programming Concepts d. Make the initializing program. In initializing program, INIT_DONE instruction must be made. If not, Scan program is not executed. 2. How to write the Cycle interrupt task Add the task in the project window of XG5000 as below and add the program to be performed by each task.
  • Page 105 Chapter 5 Programming Concepts b. The screen for registering the task will be displayed. Click 『Fixed cycle』in the execution conditions and after entering the task name, input the items required for setting as below Items Input range Description priority Designates the priority of tasks. Designates the task number.
  • Page 106 Chapter 5 Programming Concepts d. Register the task program name and comment. e. The program window for the task program will be displayed. Create the task program here. 3. How to prepare external contact task a. Select 『Project』–『Add Items』–『Task』 or after clicking with the right mouse button on the project name of the project tree, select 『Add Items』-『Task』...
  • Page 107 Chapter 5 Programming Concepts b. The screen for registering the task will be displayed. Click 『External contact』in the execution conditions and after entering the task name, input the items required for setting as below. Items Input range Description Priority Designates the priority of tasks. Designates the task number.
  • Page 108 Chapter 5 Programming Concepts d. Register the task program name and comment. e. The program window for the task program will be displayed. Create the task program here. 4. How to prepare internal device task a. Select 『Project』–『Add Items』–『Task』 right clicking the project name in the project tree, select 『Add Items』-『Task』...
  • Page 109 Chapter 5 Programming Concepts b. The screen for registering the task will be displayed. Click 『Internal device』in the execution conditions and after entering the task name, input the items required for setting as below. Items Input range Description Priority Designates the priority of tasks.. Designates the task number.
  • Page 110 Chapter 5 Programming Concepts c. Right click the registered task and click 『Add Items』-『Program』. d. Register the task name and comment e. The program window for the task program will be displayed. Create the task program here. XBC H-Type Main Unit 5-13 Ver.
  • Page 111 Chapter 5 Programming Concepts 5. How to prepare high speed counter task a. Select 『Project』–『Add Items』–『Task』 or right clicking the project name in the project tree, select 『Add Items』-『Task』 as shown in the below figure. b. The screen for registering the task will be displayed. Click 『High speed counter』 in the execution conditions and after entering the task name, select the channel.
  • Page 112 Chapter 5 Programming Concepts c. Right click on the registered task and click 『Add Items』-『Program』. d. Register the task program name and comment e. The program window for the task program will be displayed. Create the task program here. XBC H-Type Main Unit 5-15 Ver.
  • Page 113 Chapter 5 Programming Concepts 5.1.5 Task types Task type and function is as follows: Type High speed counter Fixed cycle task External contact task Internal contact task Spec. task Maximum 16 EA 8 EA 16 EA 8 EA number Rising or falling edge of the High speed counter Fixed cycle (Can be set Start...
  • Page 114 Chapter 5 Programming Concepts c. Processing delay time i. There are some causes for Task Program processing delay as shown below. Please consider this when task setting or program preparation. 1. Task detection delay (Refer to detailed description of each task.) 2.
  • Page 115 Chapter 5 Programming Concepts 2. Cyclic task program processing method Below describes the processing method when the task (start condition) of Task program is set as Cycle time. a. Items to be set in Task i. Set the execution cycle and priority which are the start condition of Task program to be executed.
  • Page 116 Chapter 5 Programming Concepts 3. I/O task program processing It described the I/O task program processing. (“S” type: P000~P007) a. Items to be set in Task i. Set the execution condition and priority to the task being executed. Check the task number to manage the task.
  • Page 117 Chapter 5 Programming Concepts 4. Internal device task program processing Below describes the processing method of an internal device task program which extends the task (start condition) of the task program from contact point to device as execution range. a. Items to be set in Task i.
  • Page 118 Chapter 5 Programming Concepts 5. Verification of task program a. Is the task setting proper? i. If task occurs more than needed or several tasks occur in one scan, scan time may lengthen or be irregular. When unable to change the task setting, verify maximum scan time.
  • Page 119 Chapter 5 Programming Concepts Scan started Scan program stopped New scan started (Initial operation started) Scan program Program 1 10ms_Cycle time Program 2 Internal device_M000 Program 3 External I/O_P000 Time 6 7 8 10 12 20 22 24 25 30 32 34 Process per time Time (㎳) Process...
  • Page 120 Chapter 5 Programming Concepts 5.2 Operation Mode For operation mode of the CPU module, there are 3 types: RUN mode, STOP mode and DEBUG mode. This describes the operation processing of each operation mode. 5.2.1 RUN mode Executes program operation normally. RUN mode first scan start Initialize data area Check program for errors...
  • Page 121 Chapter 5 Programming Concepts 5.2.2 STOP mode Stop state without Program operation. It is available to transmit the program through XG5000 only in Remote STOP mode. 1. Processing at Mode Change: Clear the output image area and execute output update. 2.
  • Page 122 Chapter 5 Programming Concepts 2. Type of operation mode Operation mode switch XG5000 command Operation mode unchangeable Local Run Remote Run STOP Remote Stop STOP Debug Debug Run Mode change Previous operation mode RUN -> STOP Stop a. Remote mode conversion is available only in the state of ‘Remote Enabled: On’, ‘Mode switch: Stop’.
  • Page 123 Chapter 5 Programming Concepts 2. If WDT detects the excess of detection setting time while watching the elapsed time of scan during operation, it stops the operation of PLC immediately and keeps or clears the output according to parameter setting. 3.
  • Page 124 Chapter 5 Programming Concepts 1. On delay timer The current value of timer starts to increase from 0 when the input condition of TON instruction turns on. When the current value reaches the preset value (Current value=Preset value), the timer output relay (Txxxx) turns on. When the timer input condition is turned off, the current value becomes 0 and the timer output relay is turned off.
  • Page 125 Chapter 5 Programming Concepts 3. Integral timer In general, its operation is same as on-delay timer. Only the difference is the current value will not be clear when the input condition of TMR instruction is turned off. It keeps the elapsed value and restart to increase when the input condition is turned on again.
  • Page 126 Current value (ET) t0+PT Remark The Maximum timer error of timers of XGB series is ‘1 scan time + the time from 0 step to timer instruction’ 5.3.3 Counter processing The counter counts the rising edges of pulses driving its input signal and counts once only when the input signal is switched from off to on.
  • Page 127 Chapter 5 Programming Concepts b. Down counter i. Down counter decreases the current value at the rising edges of input. ii. The counter output contact (Cxxx) is turned On when the current value reaches the preset value. When the reset input is turned On, the counter output contact (Cxxx) is turned Off.
  • Page 128 Chapter 5 Programming Concepts 7. Maximum counting speed The maximum counting speed is determined by the length of scan time. Counting is possible only when the on/off switching time (duty cycle) of the counter input signal is longer than scan time.
  • Page 129 Chapter 5 Programming Concepts 5.3.4 RTC Function 1. Read/Set Clock Data Using XG5000 a. Click 『Online』-『Diagnosis』- 『PLC information』. b. Click the PLC clock tab of 『PLC information』. i. To transfer the PC’s current time to the PLC, click “Synchronize PLC with PC clock”...
  • Page 130 Chapter 5 Programming Concepts 3. Changing the Clock Data through with the PLC program Area Item Input data Description D0000 Year, Month h'0314 Mar./2014 D0001 Day, Hour h'1230 12:00/30 D0002 Second, Minute h'1130 11 seconds/30 minutes D0003 Year, Day h'2000 2000s /Sun.
  • Page 131 Chapter 5 Programming Concepts 5.4 I/O Allocation 5.4.1 I/O Parameters 1. Double-click “I/O Parameter” In the project tree 2. Use the drop-down menu for each slot to assign the appropriate device for each slot used. XBC H-Type Main Unit 5-34 Ver.
  • Page 132 Chapter 5 Programming Concepts 3. Additional settings such as Input Filters and Emergency Output Actions for each device can be accessed by right-clicking the slot and selecting “Details”. XBC H-Type Main Unit 5-35 Ver. 1...
  • Page 133 Unused I/O points can be used as internal relays.  For high performance XGB basic type, it does not have the embedded special function assigned to the No.1 slot but allocates No.1 slot as an empty slot. XBC H-Type Main Unit 5-36 Ver.
  • Page 134 Chapter 6 Instruction and Flag List Chapter 6 Instruction and Flag List 6.1 Classifications of Instructions Classification Instructions Details Remarks Contact Point LOAD, AND, OR related Instructions Unite AND LOAD, OR LOAD, MPUSH, MLOAD, MPOP Reverse Master Control MCS, MCSCLR OUT, SET, RST, 1 Scan Output Instruction, Output Reverse Output Basic...
  • Page 135 Chapter 6 Instruction and Flag List 6.2 Basic Instructions 6.2.1 Contact Point Instruction Details Classification Designations Name Page LOAD Normally Open Contact 6-46 LOAD NOT Normally Closed Contact AND Normally Open Contact 6-48 AND NOT AND Normally Closed Contact OR Normally Open Contact 6-49 OR NOT OR Normally Closed Contact...
  • Page 136 Chapter 6 Instruction and Flag List 6.2.5 Output Instruction Details Classification Designations Name Page Mnemonic Output Contact OUT NOT Mnemonic Reverse Output Contact 6-47 OUTP Output on Rising Input Output OUTN Output on Falling Input Set Contact Point Output 6-51 Reset Contact Point Output 6-52 Output Reverse on Input Condition...
  • Page 137 Chapter 6 Instruction and Flag List 6.2.10 Counter instruction Details Classification Designations Name Page Count Down 6-74 Count Up 6-76 Counter CTUD Count Up/Count Down 6-78 Ring Counter 6-81 6.3 Application Instruction 6.3.1 Data transfer instruction Details Classification Designations Name Page Move 16 bits...
  • Page 138 Chapter 6 Instruction and Flag List 6.3.2 BCD/BIN conversion instruction Details Classification Designations Name Page BCD to Decimal Conversion Binary Coded BCDP Rising Edge BCD to Decimal Conversion Decimal 6-96 (BCD) DBCD Double Word BCD to Decimal Conversion Conversion DBCDP Rising Edge Double Word BCD to Decimal Conversion BCD4 Nibble Binary to BCD Conversion...
  • Page 139 Chapter 6 Instruction and Flag List 6.3.3 Data type conversion instruction Details Classification Designations Name Page Integer to Real 16 Bits I2RP Rising Edge Integer to Real Integer/Real 6-105 Integer to Long Real Conversion I2LP Rising Edge Integer to Long Real Double Integer to Real D2RP Rising Edge Double Integer to Real...
  • Page 140 Chapter 6 Instruction and Flag List 6.3.4 Comparison instruction Details Classification Designations Name Page Compare Unsigned CMPP Rising Edge Compare Compare 6-113 DCMP Double Word Compare Using Flags DCMPP Rising Edge Double Word Compare CMP4 Compare Nibble CMP4P Rising Edge Compare Nibble Unsigned 4/8 6-114 Bits Compare...
  • Page 141 Chapter 6 Instruction and Flag List Details Classification Designations Name Page GDEQ Group Double Word Equal To GDEQP Group Double Word Equal To Rising Edge GDGT Group Double Word Greater Than GDGTP Group Double Word Greater Than Rising Edge GDLT Group Double Word Less Than GDLTP Group Double Word Less Than Rising Edge...
  • Page 142 Chapter 6 Instruction and Flag List Designations Details Classification Name /Mnemonic Page < 16-Bit Less Than <= 16-Bit Less Than or Equal To 16-Bit <> 16-Bit Not Equal To Data 16-Bit Equal To Compare > 16-Bit Greater Than >= 16-Bit Greater Than or Equal To 6-118 <...
  • Page 143 Chapter 6 Instruction and Flag List Designations Details Classification Name /Mnemonic Page $< String Less Than $<= String Less Than or Equal To $<> String Not Equal To String 6-122 Compare String Equal To $> String Greater Than $>= String Greater Than or Equal To G<...
  • Page 144 Chapter 6 Instruction and Flag List Designations Details Classification Name /Mnemonic Page <3 3 Variable 16-Bit Greater Than <=3 3 Variable 16-Bit Less Than or Equal To <>3 3 Variable 16-Bit Not Equal To Three 16-Bit Data Compare 3 Variable 16-Bit Equal To >3 3 Variable 16-Bit Greater Than >=3...
  • Page 145 Chapter 6 Instruction and Flag List 6.3.5 Increase/Decrease instruction Designations/ Details Classification Name Mnemonic Page BIN Data Increase INCP BIN Data Increase Rising Edge 6-130 DINC BIN Data Double Increase Binary (BIN) DINCP BIN Data Double Increase Rising Edge Data Increase BIN Data Decrease Decrease (Signed)
  • Page 146 Chapter 6 Instruction and Flag List 6.3.6 Rotation Function Details Classification Designations Name Page Rotate Left ROLP Rotate Left Rising Edge Rotate to Left 6-136 DROL Double Rotate Left DROLP Double Rotate Left Rising Edge ROL4 Nibble Rotate Left ROL4P Nibble Rotate Left Rising Edge 4/8 Bits 6-137...
  • Page 147 Chapter 6 Instruction and Flag List 6.3.7 Move instruction Details Classification Designations Name Page BSFT Bit Shift Bits Move 6-144 BSFTP Bit Shift Rising Edge BSFL Bit Shift Left BSFLP Bit Shift Left Rising Edge Move to 6-145 Higher Bit DBSFL Double Bit Shift Left DBSFLP...
  • Page 148 Chapter 6 Instruction and Flag List 6.3.8 Exchange instruction Details Classification Designations Name Page XCHG Exchange XCHGP Exchange Rising Edge Data 6-153 Exchange DXCHG Double Exchange DXCHGP Double Exchange Rising Edge Group GXCHG Group Exchange Data 6-154 GXCHGP Group Exchange Rising Edge Exchange Higher/Lower SWAP...
  • Page 149 Chapter 6 Instruction and Flag List 6.3.9 BIN operation instruction Details Classification Designations Name Page Integer ADDP Add Rising Edge Addition 6-157 DADD Double Add (Signed) DADDP Double Add Rising Edge Subtract Integer SUBP Subtract Rising Edge Subtraction 6-158 DSUB Double Subtract (Signed) DSUBP...
  • Page 150 Chapter 6 Instruction and Flag List Details Classification Designations Name Page DIVU Divide Unsigned DIVUP Divide Unsigned Rising Edge Integer Division 6-164 DDIVU Double Divide Unsigned (Unsigned) DDIVUP Double Divide Unsigned Rising Edge RADD Real Add RADDP Real Add Rising Edge Real Number 6-165 Addition...
  • Page 151 Chapter 6 Instruction and Flag List 6.3.10 BCD operation instruction Details Classification Designations Name Page ADDB BCD Add ADDBP BCD Add Rising Edge BCD Addition 6-172 DADDB Double BCD Add DADDBP Double BCD Add Rising Edge SUBB BCD Subtract SUBBP BCD Subtract Rising Edge 6-173 Subtraction...
  • Page 152 Chapter 6 Instruction and Flag List 6.3.11 Logic operation instruction Details Classification Designations Name Page WAND Word AND WANDP Word AND Rising Edge Logic 6-177 Multiplication DWAND Double Word AND DWANDP Double Word AND Rising Edge Word OR WORP Word OR Rising Edge Logic Addition 6-179 DWOR...
  • Page 153 Chapter 6 Instruction and Flag List 6.3.12 Data process instruction Details Classification Designations Name Page BSUM Bit Summary BSUMP Bit Summary Rising Edge Bit Check 6-199 DBSUM Double Bit Summary DBSUMP Double Bit Summary Rising Edge BRST Bit Reset Bit Reset 6-200 BRSTP Bit Reset Rising Edge...
  • Page 154 Chapter 6 Instruction and Flag List Details Classification Designations Name Page Search Min Word MINP Search Min Word Rising Edge Min. Value 6-212 Search DMIN Search Min Double Word DMINP Search Min Double Word Rising Edge Word Summary SUMP Word Summary Rising Edge 6-214 DSUM Double Word Summary...
  • Page 155 Chapter 6 Instruction and Flag List 6.3.13 Data table process instruction Details Classification Designations Name Page FIWR File Write Data 6-226 Write FIWRP File Write Rising Edge FIFRD First File Read First-input Data 6-228 Read FIFRDP First File Read Rising Edge FILRD Last File Read Last-Input...
  • Page 156 Chapter 6 Instruction and Flag List 6.3.15 String Process instruction Details Classification Designations Name Page BINDA Binary to Decimal ASCII Convert to BINDAP Binary to Decimal ASCII Rising Edge Decimal 6-232 ASCII DBINDA Double Binary to Decimal ASCII Cord DBINDAP Double Binary to Decimal ASCII Rising Edge BINHA Binary to Hex ASCII...
  • Page 157 Chapter 6 Instruction and Flag List Details Classification Designations Name Page Binary to String Convert STRP Binary to String Rising Edge BIN16/32 to 6-245 String DSTR Double Binary to String DSTRP Double Binary to String Rising Edge String to Binary VALP String to Binary Rising Edge Convert String...
  • Page 158 Chapter 6 Instruction and Flag List Details Classification Designations Name Page RBCD Real to BCD Parse Real RBCDP Real to BCD Rising Edge Number to 6-262 LBCD Long Real to BCD LBCDP Long Real to BCD Rising Edge BCDR BCD to Real Convert BCD BCDRP BCD to Real Rising Edge...
  • Page 159 Chapter 6 Instruction and Flag List 6.3.16 Special function instruction Details Classification Designations Name Page Sine SIN Operation 6-266 SINP Sine Rising Edge ASIN Arc-sine ARCSIN 6-267 Operation ASINP Arc-sine Rising Edge Cosine 6-268 Operation COSP Cosine Rising Edge ACOS Arc-cosine ARCCOS 6-269...
  • Page 160 Chapter 6 Instruction and Flag List 6.3.17 Data control instruction Details Classification Designations Name Page LIMIT Limit Output LIMITP Limit Output Rising Edge Limit 6-279 Control DLIMIT Double Word Limit Output DLIMITP Double Word Limit Output Rising Edge DZONE Dead Zone DZONEP Dead Zone Rising Edge 6-281...
  • Page 161 Chapter 6 Instruction and Flag List 6.3.18 Time related instruction Details Classification Designations Name Page Date/Time DATERD Date Read 6-297 Data DATERDP Date Read Rising Edge Read Date/Time DATEWR Date Write Data 6-298 DATEWRP Date Write Rising Edge Write ADDCLK Add Clock Time Data 6-299...
  • Page 162 Chapter 6 Instruction and Flag List 6.3.20 Loop instruction Details Classification Designations Name Page Start Loop 6-305 Loop NEXT Next Loop Instruction 6-306 BREAK Break Loop 6.3.21 Flag instruction Details Classification Designations Name Page Set Carry Flag Carry Flag Set, 6-307 Reset Clear Carry Flag...
  • Page 163 Chapter 6 Instruction and Flag List 6.3.23 Interrupt related instruction Details Classification Designations Name Page Execute All Tasks All Task Interrupt 6-317 Setting Do Not Execute All Tasks Individual Task Execute Specific Task Interrupt 6-318 Setting Stop Specific Task 6.3.24 Sign reversion instruction Details Classification Designations Name...
  • Page 164 Chapter 6 Instruction and Flag List 6.3.25 File Related Instructions Details Classification Designations Name Page RSET Block Number Reset Block 6-322 Conversion RSETP Block Number Reset Rising Edge Block Read EBREAD Read Flash Memory Block 6-323 Block Write EBWRITE Write Flash Memory Block 6-324 Block EBCMP...
  • Page 165 Chapter 6 Instruction and Flag List 6.6 Special/Communication Instruction 6.6.1 Special module common instruction Details Classification Designations Name Page Get Data 6-334 GETP Get Data Rising Edge Special Module Read/Write Put Data 6-336 PUTP Put Data Rising Edge 6.6.2 Communication Instruction Details Classification Designations Name...
  • Page 166 Chapter 6 Instruction and Flag List 6.6.3 Exclusive position control instruction Details Classification Designations Name Page Return to Return to Origin Point 6-356 Origin Point Floating Origin Set Floating Point 6-357 Point Direct Start Direct Start 6-358 Indirect Start Indirect Start 6-359 Linear Linear Interpolation...
  • Page 167 Chapter 6 Instruction and Flag List Details Classification Designations Name Page Encoder Value EPRS Change Present Encoder Value 6-376 Change Teaching Start Teaching Mode 6-377 Teaching TEAA Start Teaching Array Mode 6-378 Array Emergency Emergency Stop 6-379 Stop Error Reset Clear Error 6-380 Teach Basic...
  • Page 168 Chapter 6 Instruction and Flag List 6.7 Special Relay (F) List 1. “U” type Word Variables Function Description _SYS_STATE Mode and state Indicates PLC mode and operation State. F0000 _RUN Run state. F0001 _STOP Stop Stop state. F0002 _ERROR Error Error state.
  • Page 169 Chapter 6 Instruction and Flag List Word Variable Function Description F0028 _BPRM_ER Basic parameter Basic parameter error. F0029 _IOPRM_ER IO parameter I/O configuration parameter error. Special module parameter is F002A _SPPRM_ER Special module parameter Abnormal. Communication module Communication module parameter F002B _CPPRM_ER F002~3...
  • Page 170 Chapter 6 Instruction and Flag List Word Variable Function Description _USER_CLK User Clock Clock available for user setting. F0100 _USR_CLK0 Setting scan repeat On/Off as much as set scan Clock 0. F0101 _USR_CLK1 Setting scan repeat On/Off as much as set scan Clock 1. F0102 _USR_CLK2 Setting scan repeat...
  • Page 171 Chapter 6 Instruction and Flag List Word Variable Function Description Supported when using RTC option module Clock data (Second/minute) F0055 _SEC_MIN Second/minute Supported when using RTC option module Clock data (Hundred year/week) F0056 _HUND_WK Hundred year/week Supported when using RTC option module _FPU_INFO F0570 _FPU_LFLAG_I...
  • Page 172 Chapter 6 Instruction and Flag List Word Variable Function Description F094 _IP_IFER_N IF error slot Module interface error slot no. F096 _IO_TYER0 Module Type 0 error Main base module Type error. Word Variable Function Description F104 _IO_DEER0 Module Detach 0 error Main base module Detach error.
  • Page 173 Chapter 6 Instruction and Flag List 6.8 Communication Relay List (L) 1. High-speed Link 1 Device Keyword Type Description High speed link parameter 1 normal operation of all station Indicates normal operation of all station according to parameter set in High speed link, and On under the condition as below. 1.
  • Page 174 Chapter 6 Instruction and Flag List 2. High-speed Link 2-5 Block Address Note Number L0260~L047F(extension) L0580~L079F(extension) For each block flags, refer to the table on the preceding page. L0840~L104F(high extension) L1090~L129F(high extension)  ‘k’ is the block number that indicates the information of 64 blocks in the range of 00~63 through 4 words; 16 per 1 word.
  • Page 175 Chapter 6 Instruction and Flag List 4. Network Register (N) List Device Keyword Type Description N000 _P1B00SN Word Saves another station no. of P2P parameter 1, 00 block. N0001~0004 _P1B00RD1 Device Structure Saves area device 1 to read P2P parameter 1, 00 block. N005 _P1B00RS1 Word...
  • Page 176 Chapter 6 Instruction and Flag List A total of 32 blocks from number 1 to number 31 exist per P2P 1 to P2P 6. Saving parameters of each block have the same size and function as the above table. L Address Note Number N0000~N1311(Cnet)
  • Page 177 Chapter 6 Instruction and Flag List 5. ASCII (American national Standard Code for Information Interchange) ASCII ASCII ASCII ASCII Value Value Value Value NULL (space) " & < > XBC H-Type Main Unit 6-44 Ver. 1...
  • Page 178 Chapter 6 Instruction and Flag List 6.9 Guide for Instruction Details For each instruction, you will find the following tables: Data Area Table: Area Available Flag Instruction Step Error Zero Carry P M K Z D.x R.x U N D R nst.
  • Page 179 Chapter 6 Instruction Details Instruction Details 6.10 Contact point Instruction 6.10.1 LOAD, LOAD NOT, LOADP, LOADN Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) LOAD LOAD NOT LOADP LOADN LOAD S LOAD NOT S LOADP S LOADN S [Area Setting]...
  • Page 180 Chapter 6 Instruction Details 3) Program Example (1) Where if Input Condition P00020 is On, P00060 Output will be On, and at the same time P00061 Output will be Off. And while D00020.3 changes 01 for 1 scan, P00062 Output will be On, and while D00020.3 changes 10 for 1 scan, P00063 Output will be On.
  • Page 181 Chapter 6 Instruction Details 6.10.2 AND, AND NOT, ANDP, ANDN Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) AND NOT ANDP ANDN AND S AND NOT S ANDP S ANDN S [Area Setting] Operand Description Data Type Bit device’s contact / Word device’s bit contact...
  • Page 182 Chapter 6 Instruction Details 6.10.3 OR, OR NOT, ORP, ORN Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) OR NOT OR S OR NOT S ORP S ORN S [Area Setting] Operand Description Data Type Bit device’s contact / Word device’s bit contact 1) OR, OR NOT (1) OR is 1 contact’s A contact parallel-connected instruction, and OR NOT is B contact parallel-connected instruction.
  • Page 183 Chapter 6 Instruction Details [Example 4-1] Forward/Reverse Operation of Motor [LOAD, AND, OR, OUT] 1) Operation Press instant contact push button PB1 to rotate motor clockwise, or PB2 to rotate motor counterclockwise. Rotation direction can be changed even if the motor is not stopped. Press instant contact push button PB0 to stop the motor.
  • Page 184 Chapter 6 Instruction Details *1) Clockwise Motor Operation Clockwise motor operation and interlock ‘P00032 P00061’ setting P00032 P00061 *2) Counterclockwise Motor Operation Counterclockwise motor operation and interlock ‘P00031 P00060’ setting P00031 P00060 Remark < Latching Circuit > P00060 P00031 P00030 P00060 (1) P00031 if On makes Output P00060 On, which makes self-used input a contact P00060 On and keeps the On state till P00030 signal is input.
  • Page 185 Chapter 6 Instruction Details 6.11 Union Instruction 6.11.1 AND LOAD Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) AND LOAD AND LOAD B Block A Block 1) Function (1) It performs AND Operation of A Block and B Block. (2) If AND LOAD is continuously used, normal operation is not available when the max.
  • Page 186 Chapter 6 Instruction Details 3) References In case Circuit Block is series-connected continuously, program input is of 2 types as follows. M00000 M00002 M00004 M00006 M00008 P00050 M00001 M00003 M00005 M00007 M00009 AND LOAD times unlimited AND LOAD times limited LOAD LOAD M00000...
  • Page 187 Chapter 6 Instruction Details 6.11.2 OR LOAD Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) OR LOAD A block OR LOAD B block 1) OR LOAD (1) Performs OR operation of A Block and B Block to get the result. (2) If OR LOAD is continuously used, normal operation is not available when the maximum usable number is exceeded.
  • Page 188 Chapter 6 Instruction Details 3) References In case Circuit Block is series-connected continuously, program input is of 2 types as follows. M00000 M00001 P00006 M00002 M00003 M00004 M00005 M00006 M00007 M00008 M00009 OR LOAD times unlimited OR LOAD times unlimited LOAD M00000 LOAD...
  • Page 189 Chapter 6 Instruction Details 6.11.3 MPUSH, MLOAD, MPOP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) MPUSH MLOAD MPOP MPUSH MLOAD MPOP 1) MPUSH, MLOAD, MPOP (1) Makes Ladder’s Multiple Diverge available. (2) As for MPUSH & MPOP, 16 steps are available. (3) MPUSH: saves result operated up to present.
  • Page 190 Chapter 6 Instruction Details 2) References [Ladder Program] P00020 P00022 P00023 P00024 P00021 P00060 00000 P00025 P00061 P00026 P00062 P00027 P00063 P00028 P00064 P00029 P00065 P0002A P00066 00027 [Mnemonic Program] Step Mnemonic Operand LOAD P00200 0000 MPUSH 0001 P00021 0002 MPUSH 0003 P00022...
  • Page 191 Chapter 6 Instruction Details 6.12 Reversion Instruction 6.12.1 NOT Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) 1) NOT (1) NOT reverses the previous result. (2) If Reverse Instruction(NOT) is used, A contact circuit is reversed to B contact circuit, B contact circuit to A contact circuit, and series-connected circuit is reversed to parallel-connected circuit, parallel-connected circuit to series- connected circuit for the left circuit of Reverse Instruction.
  • Page 192 (1) If MCS’s input condition is On, up to MCSCLR identical to MCS number will be executed. And if input condition is Off, nothing will be executed. (2) Priority is that MCS number 0 is the highest, 15(XGK)/7(XGB) the lowest, which should be used in priority sequence. Clearing will be to the contrary.
  • Page 193 Chapter 6 Instruction Details Remark 1) If MCS’s On/Off Instruction is Off, MCS ~ MCSCLR’s operation result will as follows; Be careful when using MCS (MCSCLR) Instruction. · Timer Instruction: Not Processed. Identical Process to contact Off · Counter Instruction: Not Processed (Present value kept) ·...
  • Page 195 Chapter 6 Instruction Details [Master control used] P00020 P00021 P00022 M00010 P00026 P00027 M00011 MCSCLR P00021 P00020 P00024 P00023 M00020 P00027 P00026 M00021 MCSCLR M00010 P00061 P00060 M00020 M00011 P00060 P00061 P00021 P00061 XBC H-Type Main Unit 6-46 Ver. 1...
  • Page 196 Chapter 6 Instruction Details 6.14 Output Instruction 6.14.1 OUT, OUT NOT, OUTP, OUTN Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) OUT NOT OUTP OUTN OUT D OUT NOT D OUTP D OUTN D [Area Setting] Operand Description...
  • Page 197 Chapter 6 Instruction Details 3) Program Example (1) OUTP Example: performs OUTP Instruction when input contact P00032 changes Off to On. [Ladder Program] [Mnemonic Program] P00032 M00002 Step Nnemonic Operand LOAD P00032 OUTP M00002 M00002 P00060 LOAD M00002 P00060 P00060 P00060 Self-holding where 1 scan On is output as P00060 [Time Chart]...
  • Page 198 Chapter 6 Instruction Details (2) OUTN Example: performs D Instruction when input contact P00032 changes Off to On. [Ladder Program] [Mnemonic Program] P00033 M00003 Step Nnemonic Operand LOAD P00033 OUTN M00003 M00003 P00061 LOAD M00003 P00061 P00061 P00061 Self-holding where 1 scan On is output as P00061 ·...
  • Page 199 Chapter 6 Instruction Details [Example 4.3] Output On/Off Operation [OUTP/OUTN] (1) Operation Press instant contact push button PB0 to make Output On first, and press again to make Output Off. Whenever PB0 is pressed, Output is repeatedly On and Off. (2) System Diagram Digital input module Digital output module...
  • Page 200 Chapter 6 Instruction Details 6.14.2 SET Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Type Contact to keep On state / Word device’s bit contact 1) SET (1) If input condition is On, output is kept On although specified output contact is kept On to make Input Off. If specified output contact is of Word device’s bit contact, its applicable bit should be 1.
  • Page 201 Chapter 6 Instruction Details 6.14.3 RST Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Type Contact to keep Off state / Word device’s bit contact 1) RST (1) If input condition is On, output is kept Off although specified output contact is kept Off to make Input Off. If specified output contact is of Word device’s bit contact, its applicable bit should be 0.
  • Page 202 Chapter 6 Instruction Details Example 4.4] Precautions against Power Failure About differences between P & K areas & Set/Reset Operation (1) Differences between Input/Output Relay(P) and Keep Relay(K) All the following sequences are of self-keep circuit with the same operation. However, if Output is cut off during On and then powered again, its output state will be different.
  • Page 203 Chapter 6 Instruction Details 6.14.4 FF Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Type Bit device’s contact / Word device’s bit contact 1) FF (1) Reverses specified device’s state when input contact changes Off  On by Bit Output Reverse Instruction. 2) Program Example (1) Where P0060 state is reversed when input contact P0020 is changed from Off to On.
  • Page 204 Chapter 6 Instruction Details 6.15 Sequence/Last-input Preferred Instruction 6.15.1 SET Syy.xx Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) Syy.xx SET Syy.xx [Area Setting] Operand Description Data Type As S device contact, yy is for group number, xx for step number. Syy.xx Group Number is available 0~127, and step number 0~99 1) SET Syy.xx(Sequence Control)
  • Page 205 Chapter 6 Instruction Details [Example 4.5] Sequence Control [SET S] Where Process 2 is executed only after Process 1 is complete, and Process 1 is executed again after Process 3 is complete in applicable sequence. [Ladder Program] Start S00.01 Process 3 End Process 1 End S00.02 Process condition 2 S00.02 output...
  • Page 206 Chapter 6 Instruction Details 6.15.2 OUT Syy.xx Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) Syy.xx OUT Syy.xx [Area Setting] Operand Description Data Type As S device contact, yy is for group number, xx for step number. Syy.xx Group Number is available 0~127, and step number 0~99 1) OUT Syy.xx (Subsequent Input Preferred)
  • Page 207 Chapter 6 Instruction Details 6.16 End Instruction 6.16.1 END Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) 1) END (1) Displays Program End. (2) Returns to 0000 Step to process after END Instruction is processed. (3) END Instruction should be surely input last in program.
  • Page 208 Chapter 6 Instruction Details 6.17 Non-process Instruction 6.17.1 NOP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) No Ladder Symbol. (used only in Mnemonic) 1) NOP (1) It means No Operation Instruction which has no effect on operation result of applicable circuit till then. (2) Only used in Mnemonic Program.
  • Page 209 (3) Up to 2,048 for XGK, up to 256 for XGB Timers can be used regardless of its type, and the setting value range available is 0~65, 535. Repeated use of the same timer number is impossible. If the same timer number is used repeatedly regardless of index used, it will be processed as repeated use, which makes Program Download unavailable.
  • Page 210 Chapter 6 Instruction Details (6) If Reset Instruction is used to reset Timer, be sure to input in the same format as used in Timer format as shown below; If TON T0001[Z000] D00010[Z003] is used, Timer format used in reset coil should be T0001[Z000], or program error will occur in XG5000 to make Program Download unavailable.
  • Page 211 Chapter 6 Instruction Details 6.18.2 TON Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) Input Condition [Area Setting] Operand Description Data Type Timer Contact to use WORD stands for Timer’s setting value. Integer or word device available WORD Setting Time = Basic cycle (100ms, 10ms, 1ms) x setting value (t) 1) TON (On Timer)
  • Page 212 Chapter 6 Instruction Details [Example 4.6] Flicker Circuit [TON] (1) Operation: uses 2 timers to blink Output.. [System Diagram] Output module Input Module P00006 P00002 Start Program LAMP [Time Chart] P00002 P00060 [Program] P00020 T0001 OFF time setting (0.5) sec. TON T0000 5 T0000 ON time setting (0.6) sec.
  • Page 213 Chapter 6 Instruction Details 6.18.3 TOFF Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) TOFF Input Condition Contact TOFF TOFF [Area Setting] Operand Description Data Type Timer Contact to use WORD Stands for Timer’s setting value. Integer or word device available WORD Setting Time = Basic cycle (100ms, 10ms, 1ms) x Setting value( t) 1) TOFF (Off Timer)
  • Page 214 Chapter 6 Instruction Details (1) Operation It makes several conveyers operate (A → B → C) and stop (C → B → A) in sequence. [System Diagram] Input Module Ouput Module P00020 P00060 Conveyor Start Motor Motor Motor [Ladder Program] A.
  • Page 215 Chapter 6 Instruction Details 6.18.4 TMR Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) Input Condition Contact [Area Setting] Operand Description Data Type Timer Contact to use WORD Stands for timer’s setting value. Integer or word device available WORD Setting Time = Basic cycle (100ms, 10ms, 1ms) x Setting value( t) 1) TMR (Accumulating Timer)
  • Page 216 Chapter 6 Instruction Details [Example 4.8] Tools’s Life Alarm Circuit [TMR] (1) Operation It measures application time of tool such as machining center and outputs alarm to exchange tools. (2) System Diagram Digital input module Digital input module P00006 P00002 Program Sensor (Measures tool...
  • Page 217 Chapter 6 Instruction Details 6.18.5 TMON Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) TMON Input condition contact TMON TMON [Area Setting] Operand Description Data Type Timer Contact to use WORD Stands for Timer’s setting value. Integer or word device available WORD Setting Time= Basic cycle (100ms, 10ms, 1ms) x Setting value( t) 1) TMON (Monostable Timer)
  • Page 218 Chapter 6 Instruction Details [Example 4.9] Signal Vibration-Proof Circuit [TMON] (1) Operation It keeps from vibration of passing signal of object with irregular speed (limit switch) so to get stable signal. (2) System Diagram Digital input module Limit switch signal in P00002 case of low speed Signal stabilized...
  • Page 219 Chapter 6 Instruction Details 6.18.6 TRTG Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) TRTG Input Condition Contact Point TRTG TRTG [Area Setting] Operand Description Data Type Timer Contact to use WORD Stands for Timer’s setting value. Integer or word device available WORD Setting Time= Basic cycle (100ms, 10ms, 1ms) x Setting value( t) 1) TRTG (Retriggerable Timer)
  • Page 220 Chapter 6 Instruction Details [Example 4.10] Error Detect Circuit of Returning Equipment [TRTG] (1) Operation Detects missing item on conveyor based on a known time between detection of intems. When item is detected on Input P0002, Timer T0005 begins counting down from the preset and Bit Output M0002 is turned ON, starting the process.
  • Page 221 Output is On. And if pulse is again input, present value is On (3) Up to 2,048 for XGK, up to 256 for XGB Counters can be used regardless of its type, and the setting value range available is 0~65,535.
  • Page 222 Chapter 6 Instruction Details (4) Counter value setting available device (Operand available) is integers of P, M, K, U, D, R, etc. with index functions available. However, at this moment available index range is Z0 ~ Z3. (5) If Reset Instruction is used to reset Counter, be sure to input in the same format as used in Counter format as shown below;...
  • Page 223 Chapter 6 Instruction Details 6.19.2 CTD Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) Count Input Reset Signal [Area Setting] Operand Description Data Type Counter contact to use WORD Set Value (0 ~ 65535) WORD 1) Function (1) It decreases by 1 from setting value whenever rising edge of pulse is input.
  • Page 224 Chapter 6 Instruction Details 2) Program Example (1) If P00030 contact is On 5 times, P00060 Output will be On when present value is counted down to “0”. (2) If P00031 contact is On, Output will be Off and present value will be setting value. [Ladder Program] P00030 C0010...
  • Page 225 Chapter 6 Instruction Details 6.19.3 CTU Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) Count Input Reset Signal [Area Setting] Operand Description Data Type Counter contact to use WORD Setting value (0 ~ 65535) WORD 1) Function (1) It increases present value by 1 whenever Rising edge of the pulse is input.
  • Page 226 Chapter 6 Instruction Details 2) Program Example (1) If counted up to P00030 contact with present value identical to setting value, P00060 Output will be On. (2) If P00031 contact is On, Output will be Off and present value will be initialized to “0”. [Ladder Program] P00030 C0010...
  • Page 227 Chapter 6 Instruction Details 6.19.4 CTUD Area Available Flag Instruction Step Error Zero Carry D.x R.x (F110) (F111) (F112) CTUD Input Count CTUD CTUD Reset Signal ( R ) [Area Setting] Operand Description Data Type Counter contact to use WORD Increases present value by 1 (+1) Decreases present value by 1 (-1) Setting Value (0 ~ 65,535)
  • Page 228 Chapter 6 Instruction Details 2) Program Example (1) If present value is the same as setting value with count up to P00030 contact, P00060 Output will be On. (2) It will be counted Down due to P00031 contact’s Rising edge of the pulse. (3) If Reset Condition is met, Output will be Off and counter’s present value “0”.
  • Page 229 Chapter 6 Instruction Details [Example 4.11] Adjustment Control of the Number of Motor Operation [CTUD] (1) Operation As for 4 motors to be controlled, press instant contact push button PB1 to increase operation motor number by 1, and press PB2 to decrease by 1. When 4 motors are operated, press PB1 to stop all the motors. When 1 motor is operated, press PB2 to make no motor operate.
  • Page 230 Chapter 6 Instruction Details 6.19.5 CTR Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) Count Input Reset Signal ( R ) [Area Setting] Operand Description Data Type Counter contact to use WORD Setting value (0 ~ 65,535) WORD 1) Function (1) It increases present value by 1 whenever riseing edge of the pulse is input.
  • Page 231 Chapter 6 Instruction Details 6.20 Data transfer Instruction 6.20.1 MOV, MOVP, DMOV, DMOVP Area Available Flag Instruction Step Error Zero Carry( Z D.x R.x (F110) (F111) F112) MOV(P) DMOV(P) MOV, DMOV MOVP, MOVP means MOV/DMOV [Area Setting] Operand Description Data Type Data to transfer or device number data is saved in WORD/DWORD Device number to save data transferred...
  • Page 232 Chapter 6 Instruction Details (2) Whenever P00001 is on, data (hF0F0 FF33) of P0002, P0001 is moved to P0006, P0005 double word by MOVP instruction P00001 DMOVP P0001 P0005 P0002 P0001 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 0 0 1 1 0 0 1 1 P0006 P0005 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 0 0 1 1 0 0 1 1...
  • Page 233 Chapter 6 Instruction Details 6.20.2 MOV4, MOV4P, MOV8, MOV8P Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) MOV4(P) MOV8(P) MOV4, MOV8 MOV4P, MOV8P means MOV4/MOV8 [Area Setting] Operand Description Data Type Data to transfer or bit position of device number data is saved in NIBBLE/BYTE Bit position of device number to save data transferred NIBBLE/BYTE...
  • Page 234 Chapter 6 Instruction Details 3) MOV8 D00003.A D10.3 (1) If Source Device is of word, and data to transfer is out of the specified word range, the range exceeded will be disregarded and filled with 0 in Destination. 4) Program Example Where 4-Bit Data from P00004 is transferred to D0.2 ~ D0.5 by MOV4P Instruction whenever Input Signal P00020 is On.
  • Page 235 Chapter 6 Instruction Details 6.20.3 CMOV, CMOVP, DCMOV, DCMOVP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) CMOV(P) DCMOV(P) CMOV, DCMOV CMOVP, DCMOVP means CMOV/DCMOV [Area Setting] Operand Description Data Type Data to transfer or device number data is saved in WORD/DWORD Device number to save data transferred WORD/DWORD...
  • Page 236 Chapter 6 Instruction Details 3) Program Example (1) If Input P00020 is On, it takes P00002 word data’s 1’s complement to transfer to P0006. P00020 CMOV P0002 P0006 1 Word S 0 1 1 0 1 0 1 1 0 0 1 0 1 0 1 1 ( P0002) D 1 0 0 1 0 1 0 0 1 1 0 1 0 1 0 0 CMOV execution...
  • Page 237 Chapter 6 Instruction Details 6.20.4 GMOV, GMOVP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) GMOV(P) GMOV GMOV GMOVP GMOVP [Area Setting] Operand Description Data Size Data to transfer or device number data is saved in WORD Device number to save data transferred WORD...
  • Page 238 Chapter 6 Instruction Details 6.20.5 FMOV, FMOVP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) FMOV(P) FMOV FMOV FMOVP FMOVP [Area Setting] Operand Description Data Size Data to transfer or device number data is saved in WORD Device number to save data transferred WORD...
  • Page 239 Chapter 6 Instruction Details 1) FMOV (File Move) (1) It transfers Word data S for N Word from D in regular order. (2) It is mainly used to initialize data’s specific area. (3) If N’s range exceeds specified area, Error Flag (F110) will be set but not processed. P00020 FMOV D00000 M0000 4 S1(Source) FMOV execution...
  • Page 240 Chapter 6 Instruction Details 6.20.6 BMOV, BMOVP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) BMOV(P) BMOV BMOV BMOVP BMOVP [Area Setting] Operand Description Data Type Area Number data is saved in WORD Destination Area Number WORD Format to execute BMOV(P) WORD...
  • Page 241 Chapter 6 Instruction Details 2) Program Example Whenever Input Signal P00030 is On, 4-bit from the 0 bit in P0002 area will be saved in P0006 starting from P0063 bit. P00030 BMOVP P0002 P0006 h0304 . . . P0002 . . . P0006 XBC H-Type Main Unit 6-92...
  • Page 242 Chapter 6 Instruction Details 6.20.7 GBMOV, GBMOVP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) GBMOV(P) GBMOV GBMOV GBMOVP GBMOVP [Area Setting] Operand Description Data Type Area Number data is saved in WORD Destination Area Number WORD Format to execute GBMOV(P) WORD...
  • Page 243 Chapter 6 Instruction Details 6.20.8 RMOV, RMOVP, LMOV, LMOVP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) RMOV(P) LMOV(P) RMOV, LMOV RMOVP, LMOVP means RMOV/LMOV [Area Setting] Operand Description Data Type Data to transfer or device number data is saved in REAL/LREAL Device number to save data transferred REAL/LREAL...
  • Page 244 Chapter 6 Instruction Details 6.20.9 $MOV, $MOVP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) $MOV(P) 2~18 $MOV $MOV $MOVP $MOVP [Area Setting] Operand Description Data Size String to transfer or device’s head number string is saved in STRING Device’s head number to save string transferred STRING...
  • Page 245 Chapter 6 Instruction Details 6.21 Conversion Instruction 6.21.1 BCD, BCDP, DBCD, DBCDP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) BCD(P) DBCD(P) BCD, DBCD BCDP, DBCDP means BCD/DBCD [Area Setting] Operand Description Data Type Device Number data is saved in WORD/DWORD Device number of Destination area...
  • Page 246 Chapter 6 Instruction Details 2) DBCD (Binary-Coded Decimal) (1) It converts specified (S+1,S) device’s BIN Data (0~h05F5E0FF) to BCD so to save in D+1 and D respectively. S+1 (Higher places) S (Lower places) 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 S : h05F5EOFF Convert to BCD D : BCD 99999999...
  • Page 247 Chapter 6 Instruction Details [Example 4.12] Counter’s (Timer) External Output of Present Value [BCD, BMOV] (1) Operation If the warehouse keeps 30 products in stock, conveyer will stop and the number kept in stock will be displayed out. (2) System Diagram Digital Input Module Digital Output Module P00004...
  • Page 248 Chapter 6 Instruction Details 6.21.2 BCD4, BCD4P, BCD8, BCD8P Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) BCD4(P) BCD8(P) BCD4, BCD8 BCD4P, BCD8P means BCD4/BCD8 [Area Setting] Operand Description Data Type Data to convert to BCD or bit position of device number data is saved in NIBBLE/BYTE Bit position of device number to save data converted NIBBLE/BYTE...
  • Page 249 Chapter 6 Instruction Details 6.21.3 BIN, BINP, DBIN, DBINP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) BIN(P) DBIN(P) BIN, DBIN BINP, DBINP means BIN/DBIN [Area Setting] Operand Description Data Type Area Number or BCD Data BCD Data is saved in WORD/DWORD Area data converted to BIN is saved in WORD/DWORD...
  • Page 250 Chapter 6 Instruction Details S : BCD 99999999 S+1 (Higher 4 places) S (Lower 4 places) 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 Covert to BIN 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1...
  • Page 251 Chapter 6 Instruction Details 6.21.4 BIN4, BIN4P, BIN8, BIN8P Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) BIN4(P) BIN8(P) BIN4, BIN8 BIN4P, BIN8P means BIN4/BIN8 [Area Setting] Operand Description Data Type Data to convert or bit position of device number data is saved in NIBBLE/BYTE Bit position of device number to save data converted NIBBLE/BYTE...
  • Page 252 Chapter 6 Instruction Details 6.21.5 GBCD, GBCDP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) GBCD(P) GBCD GBCD GBCDP GBCDP [Area Setting] Operand Description Data Type Data to convert to BCD or Device number data is saved in WORD Device number to save BCD data converted WORD...
  • Page 253 Chapter 6 Instruction Details 6.21.6 GBIN, GBINP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) GBIN(P) GBIN GBIN GBINP GBINP [Area Setting] Operand Description Data Type BCD Data to convert to BIN or Device number data is saved in WORD Device number to save BIN data converted WORD...
  • Page 254 Chapter 6 Instruction Details 6.22 Convert Real Instruction 6.22.1 I2R, I2RP, I2L, I2LP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) I2R(P) I2L(P) I2R, I2L I2RP, I2LP means I2R/I2L [Area Setting] Operand Description Data Type Area Number where Integer Data is saved, or Integer Data Device Position to save data converted to Real Data Format REAL/LREAL...
  • Page 255 Chapter 6 Instruction Details 6.22.2 D2R, D2RP, D2L, D2LP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) D2R(P) D2L(P) D2R, D2L D2RP, D2LP means D2R/D2L [Area Setting] Operand Description Data Type Area Number where Double Integer Data is saved, or Double Integer Data DINT Device Position to save data converted to Real Data Format REAL/LREAL...
  • Page 256 Chapter 6 Instruction Details 6.22.3 R2I, R2IP, R2D, R2DP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) R2I(P) R2D(P) R2I, R2D R2IP, R2DP means R2I/R2D [Area Setting] Operand Description Data Type Area Number where Real number is saved, or Real number REAL Device Position to save data converted to Real Data Format INT/DINT...
  • Page 257 Chapter 6 Instruction Details 3) Error (1) When R2I Instruction used and S specified Single Real Number is out of -32,768~32,767 range, operation error occurs. (2) When R2D Instruction used and S specified Single Real Number is out of -2,147,483,648~2,147,483,647 range, operation error occurs.
  • Page 258 Chapter 6 Instruction Details 6.22.4 L2I, L2IP, L2D, L2DP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) L2I(P) L2D(P) L2I, L2D L2IP, L2DP means L2I/L2D [Area Setting] Operand Description Data Type Area Number where Long Real Data is saved, or Long Real Data LREAL Device Position to save data converted to IntegerData Format INT/DINT...
  • Page 259 Chapter 6 Instruction Details 3) Program Example (1) In case of Long Real data from D1000~D1003=13456.6 is saved, If Input signal P0000 is On, Integer data of 13457 is converted and it is saved in P1100. P00000 D1000 P1100 XBC H-Type Main Unit 6-110 Ver.
  • Page 260 Chapter 6 Instruction Details 6.22.5 R2L, R2LP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) R2L(P) R2LP means R2L [Area Setting] Operand Description Data Type Area Number where Real Data is saved, or Long Real Data REAL Area Number where Long Real Data is saved, or Long Real Data LREAL...
  • Page 261 Chapter 6 Instruction Details 6.22.6 L2R, L2RP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) L2R(P) L2RP means L2R [Area Setting] Operand Description Data Type Area Number where Long Real Data is saved, or Long Real Data LREAL Area Number where Real Data is saved, or Long Real Data REAL...
  • Page 262 Chapter 6 Instruction Details 6.23 Output Terminal Compare Instruction (Unsigned) 6.23.1 CMP, CMPP, DCMP, DCMPP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) CMP(P) S1 O DCMP(P) S2 O CMP, DCMP CMPP, DCMPP means CMP/DCMP [Area Setting] Operand Description...
  • Page 263 Chapter 6 Instruction Details 6.23.2 CMP4, CMP4P, CMP8, CMP8P Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O CMP4(P) CMP8(P) S2 O CMP4, CMP8 CMP4P, CMP8P means CMP4/CMP8 [Area Setting] Operand Description Data Type Data to compare or device’s start bit to compare NIBBLE/BYTE Data to compare or device’s start bit to compare...
  • Page 264 Chapter 6 Instruction Details 6.23.3 TCMP, TCMPP, DTCMP, DTCMPP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O TCMP(P) S2 O DTCMP(P) TCMP, DTCMP TCMPP, DTCMPP means TCMP/DTCMP [Area Setting] Operand Description Data Type Data or Data address to compare with S2 WORD/DWORD Data address to compare with S1...
  • Page 265 Chapter 6 Instruction Details 6.23.4 GX(P), GDX(P), (GEQ, GEQP, GGT, GGTP, GLT, GLTP, GGE, GGEP, GLE, GLEP, GNE, GNEP , GDEQ, GDEQP, GDGT, GDGTP, GDLT, GDLTP, GDGE, GDGEP, GDLE, GDLEP, GDNE, GDNEP) Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111)
  • Page 266 Chapter 6 Instruction Details 2) Program Example Operation Result h00F D1000 D1100 D1200 1234 1234 D1001 D1101 5678 5678 D1002 D1102 5000 5000 D1006 D1106 7777 7777 D1007 D1107 4321 4321 If Input signal P0000 is On, it compare 8-word data and compared result h00FF is saved in D1200. P00000 D1000 D1100 D1200 8 XBC H-Type Main Unit...
  • Page 267 Chapter 6 Instruction Details 6.24 Compare Instruction, Signed (Input Position*) 6.24.1 Compare (16-Bit: <, <=, <>, =, >, >= ) (32-Bit: D<, D<=, D<>, D=, D>, D>=) Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O (compare...
  • Page 268 Chapter 6 Instruction Details b) Example: When Data Register D1000 >= D2000 (i.e. D1000=10; D2000=10) AND contact P00000 is On, ‘1500’ is then saved in P1600 (I/O Device) area. 3) OR x (16-Bit: <, <=, <>, =, >, >= ) (32-Bit: D<, D<=, D<>, D=, D>, D>=) a) Ladder Structure: If contacts C1 and C2 are On, OR if x comparision condition is true, coil CR1 will be On.
  • Page 269 Chapter 6 Instruction Details 6.24.2 Real Compare (16-Bit: R<, R<=, R<>, R=, R>, R>= ) (32-Bit: L<, L<=, L<>,L=, L>, L>=) Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O (compare S2 O operators) 16-Bit 32-Bit...
  • Page 270 Chapter 6 Instruction Details b) Example: When Data Register D1000 >= D2000 (i.e. D1000=10; D2000=10) AND contact P00000 is On , ‘1234’ is then saved in P1600 (I/O Device ) area. 3) OR x (16-Bit: R<, R<=, R<>, R=, R>, R>= ) (32-Bit: L<, L<=, L<>, L=, L>, L>=) a) Ladder Structure: If contacts C1 and C2 are On, OR if x comparision condition is true, coil CR1 wil be On.
  • Page 271 Chapter 6 Instruction Details 6.24.3 String Compare ($<, $<=, $<>, $=, $>, $>=) Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O (compare S2 O operators) Operation Operation x Operators Name Condition Condition result result S1 ≥...
  • Page 272 Chapter 6 Instruction Details b) Example: When Data Register D1000>=D2000 (i.e. D1000=’English’; D2000=’English’) AND contact P00000 is On, ‘1567’ is then saved in P1600 (I/O device) area. 3) OR x ($<, $<=, $<>, $=, $>, $>=) a) Ladder Structure: If contacts C1 and C2 are On, OR if x comparision condition is true, coil CR1 wil be On.
  • Page 273 Chapter 6 Instruction Details 6.24.4 Group Compare (16-Bit: G<, G<=, G<>, G=, G>, G>= ) (32-Bit: DG<, DG<=, DG<>, DG=, DG>, L>=) Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O (compare S2 O operators) 16-Bit 32-Bit...
  • Page 274 Chapter 6 Instruction Details b) Example: When the 8-word data groups D1000 to D1007 is equal to D1100 to D1107, Group Compare Input Signal is On and then ‘1300’ is saved in P1400. When ‘=’ comparing two groups, if any one value is not identical, Group Compare Input Signal will not turn On.
  • Page 275 Chapter 6 Instruction Details 6.24.5 3-Word Compare (16-bit: <3, <=3, <>3, =3, >3, >=3) (32-bit: D<3, D<=3, D<>3, D=3, D>3, D>=3) Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O (compare S2 O operators) S3 O 16-Bit...
  • Page 276 Chapter 6 Instruction Details b) Example: When Data Registers D1000 = D1200 = D1300 (i.e. D1000=100, D1200=100, and D1300=100) AND contact P00000 is On, ‘1234’ is saved in P1500 (I/O Device) area. OR x (16-bit: <3, <=3, <>3, =3, >3, >=3) (32-bit: D<3, D<=3, D<>3, D=3, D>3, D>=3) a) Ladder Structure: If contacts C1 and C2 are On, OR if x comparision condition is true, coil CR1 will be On.
  • Page 277 Chapter 6 Instruction Details 6.24.6 Byte/Nibble Compare (Byte: 8<, 8<=, 8<>, 8=, 8>, 8>=) (Nibble: 4<, 4<=, 4<>, 4=, 4>, 4>=) Area Available Flag Instruction Step Error Zero Carry P M K Z D.x R.x U N D R nst. (F110) (F111) (F112)
  • Page 278 Chapter 6 Instruction Details 2) AND x (Byte: 8=, 8>, 8<, 8>=, 8<=, 8<>) (Nibble: 4=, 4>, 4<, 4>=, 4<=, 4<>) a) Ladder Structure: If the contact C1 is on AND the x comparision condition is true, then coil CR1 will be On. Otherwise CR1 will be Off.
  • Page 279 Chapter 6 Instruction Details 6.25 Increase/Decrease Instruction 6.25.1 INC, INCP, DINC, DINCP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) INC(P) DINC(P) Command INC, DINC Command INCP, DINCP means INC/DINC [Area Setting] Operand Description Data Type Data address to perform operation.
  • Page 280 Chapter 6 Instruction Details 6.25.2 INC4, INC4P, INC8, INC8P Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) INC4(P) INC8(P) Command INC4, INC8 Command INC4P, INC8P means INC4/INC8 [Area Setting] Operand Description Data Type Data address to perform operation. NIBBLE/BYTE 1) INC4 (Nibble Increment) (1) It saves the result of D plus 1 again in D within Nibble data size range.
  • Page 281 Chapter 6 Instruction Details 6.25.3 DEC, DECP, DDEC, DDECP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) DEC(P) DDEC(P) Command DEC, DDEC Command DECP, DDECP means DEC/DDEC [Area Setting] Operand Description Data Type Data address to perform operation. 1) DEC (Decrement) (1) It saves the result of D minus 1 again in D.
  • Page 282 Chapter 6 Instruction Details 6.25.4 DEC4, DEC4P, DEC8, DEC8P Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) DEC4(P) DEC8(P) Command DEC4, DEC8 Command DEC4P, DEC8P means DEC4/DEC8 [Area Setting] Operand Description Data Type Data address to perform operation. NIBBLE/BYTE 1) DEC4 (Nibble Decrement) (1) It saves the result of D plus 1 again in D within Nibble data size range.
  • Page 283 Chapter 6 Instruction Details 6.25.5 INCU, INCUP, DINCU, DINCUP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) INCU(P) DINCU(P) Command INCU, DINUC Command INCUP, DINCUP means INCU/DINCU [Area Setting] Operand Description Data Type Data address to perform operation. WORD [Flag Set] Flag...
  • Page 284 Chapter 6 Instruction Details 6.25.6 DECU, DECUP, DDECU, DDECUP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) DECU(P) DDECU(P) Command DECU, DDECU Command DECPU, DDECUP means DECU/DDECU [Area Setting] Operand Description Data Type Data address to perform operation. WORD [Flag Set] Flag...
  • Page 285 Chapter 6 Instruction Details 6.26 Rotation Instruction 6.26.1 ROL, ROLP, DROL, DROLP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) ROL(P) DROL(P) Command ROL, DROL Command ROLP, DROLP means ROL/DROL [Area Setting] Operand Description Data Type Data address to perform operation.
  • Page 286 Chapter 6 Instruction Details 6.26.2 ROL4, ROL4P, ROL8, ROL8P Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) ROL4(P) ROL8(P) Command ROL4, ROL8 Command ROL4P, ROL8P means ROL4/ROL8 [Area Setting] Operand Description Data Type Data address to perform operation. NIBBLE/BYTE Number of bits to rotate to the left.
  • Page 287 Chapter 6 Instruction Details 6.26.3 ROR, RORP, DROR, DRORP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) ROR(P) DROR(P) Command ROR, DROR Command RORP, DRORP means ROR/DROR [Area Setting] Operand Description Data Type Data address to perform operation. WORD/DWORD Number of bits to rotate to the left.
  • Page 288 Chapter 6 Instruction Details 6.26.4 ROR4, ROR4P, ROR8, ROR8P Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) ROR4(P) ROR8(P) Command ROR4, ROR8 Command ROR4P, ROR8P means ROR4/ROR8 [Area Setting] Operand Description Data Type Data address to perform operation. NIBBLE/BYTE Number of bits to rotate to the left.
  • Page 289 Chapter 6 Instruction Details 6.26.5 RCL, RCLP, DRCL, DRCLP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) RCL(P) DRCL(P) Command RCL, DRCL Command RCLP, DRCLP means RCL/DRCL [Area Setting] Operand Description Data Type Data address to perform operation. WORD/DWORD Number of bits to rotate to the left.
  • Page 290 Chapter 6 Instruction Details 6.26.6 RCL4, RCL4P, RCL8, RCL8P Area Available Flag Instruction Step Error Zero Carry P M K F D.x R.x (F110) (F111) (F112) D O O O - RCL4(P) RCL8(P) n O O O - Command RCL4, RCL8 Command RCL4P, RCL8P means RCL4/RCL8...
  • Page 291 Chapter 6 Instruction Details 6.26.7 RCR, RCRP, DRCR, DRCRP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) RCR(P) DRCR(P) Command RCR, DRCR Command RCRP, DRCRP means RCR/DRCR [Area Setting] Operand Description Data Type Data address to perform operation. WORD/DWORD Number of bits to rotate to the right.
  • Page 292 Chapter 6 Instruction Details 6.26.8 RCR4, RCR4P, RCR8, RCR8P Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) RCR4(P) RCR8(P) Command RCR4, RCR8 Command RCR4P, RCR8P means RCR4/RCR8 [Area Setting] Operand Description Data Type Data address to perform operation. NIBBLE/BYTE Number of bits to rotate to the right.
  • Page 293 Chapter 6 Instruction Details 6.27 Move Instruction 6.27.1 BSFT, BSFTP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) BSFT(P) ¾ Ed O Command BSFT Command BSFTP means BSFT [Area Setting] Operand Description Data Type Start bit of BSFT Operation End bit of BSFT Operation 1) BSFT (Bit Shift)
  • Page 294 Chapter 6 Instruction Details 6.27.2 BSFL, BSFLP, DBSFL, DBSFLP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) BSFL(P) DBSFL(P) Command BSFL, DBSFL Command BSFLP, DBSFLP means BSFL/DBSFL [Area Setting] Operand Description Data Type Device Number to shift bits. WORD/DWORD Number of times to shift word data S to the left bit by bit.
  • Page 295 Chapter 6 Instruction Details 3) Program Example (1) In case of P1000=’h000F’, When P00000 is changed to On from Off status, it rotates 4 bit to the left bit by bit and ‘h00F0’ is saved in P1000’. P00000 BSFL P1000 XBC H-Type Main Unit 6-146 Ver.
  • Page 296 Chapter 6 Instruction Details 6.27.3 BSFL4, BSFL4P, BSFL8, BSFL8P Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) BSFL4(P) BSFL8(P) Command BSFL4, BSFL8 Command BSFL4P, BSFL8P means BSFL4/BSFL8 [Area Setting] Operand Description Data Type Start bit position of BSFL Operation NIBBLE/BYTE Number of bits among 4/8 bits to shift to the left from specified D bit position.
  • Page 297 Chapter 6 Instruction Details 6.27.4 BSFR, BSFRP, DBSFR, DBSFRP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) BSFR(P) DBSFR(P) Command BSFR, DBSFR Command BSFRP, DBSFRP means BSFR/DBSFR [Area Setting] Operand Description Data Type Device Number to shift bits WORD/DWORD Number of times to shift word data S to the right bit by bit.
  • Page 298 Chapter 6 Instruction Details 6.27.5 BSFR4, BSFR4P, BSFR8, BSFR8P Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) BSFR4(P) BSFR8(P) Command BSFR4(P) Command BSFR8(P) means BSFL [Area Setting] Operand Description Data Type Start bit position of BSFR Operation NIBBLE/BYTE Number of bits among 4/8 bits to shift to the right from specified D bit position.
  • Page 299 Chapter 6 Instruction Details 6.27.6 WSFT, WSFTP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) WSFT(P) Command WSFT Command WSFTP means WSFT [Area Setting] Operand Description Data Type Address of Start word data of WSFT Operation WORD Address of End word data of WSFT Operation WORD...
  • Page 300 Chapter 6 Instruction Details 6.27.7 WSFL, WSFLP, WSFR, WSFRP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) D1 O WSFL(P) D2 O WSFR(P) Command WSFL, WSFR Command WSFLP, WSFRP P D1 means WSFL/WSFR [Area Setting] Operand Description Data Type...
  • Page 301 Chapter 6 Instruction Details 6.27.8 SR Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) Db O Command [Area Setting] Operand Description Data Type Start bit of area to shift in bit unit Data of input to shift in bit unit Shift direction in bit unit Number of bits to shift WORD...
  • Page 302 Chapter 6 Instruction Details 6.28 Exchange Instruction 6.28.1 XCHG, XCHGP, DXCHG, DXCHGP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) XCHG(P) D1 O DXCHG(P) D2 O (D)XCHG (D)XCHGP means (D)XCHG [Area Setting] Operand Description Data Type Device Number of data to exchange WORD/DWORD...
  • Page 303 Chapter 6 Instruction Details 6.28.2 GXCHG, GXCHGP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) D1 O GXCHG(P) D2 O GXCHG P D1 GXCHGP means GXCHG [Area Setting] Operand Description Data Type Start address of area to exchange data with D2 in word unit WORD Start address of area to exchange data with D1 in word unit WORD...
  • Page 304 Chapter 6 Instruction Details 6.28.3 SWAP, SWAPP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) SWAP(P) Command SWAP Command SWAPP means SWAP [Area Setting] Operand Description Data Type Word address of data to exchange byte upper and lower WORD 1) SWAP (1) It exchanges byte upper and lower in a word.
  • Page 305 Chapter 6 Instruction Details 6.28.4 GSWAP, GSWAPP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) GSWAP(P) GSWAP GSWAPP means GSWAP [Area Setting] Operand Description Data Type First Device Number of data to exchange byte upper and lower WORD Number of word data to exchange byte upper and lower WORD...
  • Page 306 Chapter 6 Instruction Details 6.29 BIN Operation Instruction 6.29.1 ADD, ADDP, DADD, DADDP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O ADD(P) S2 O DADD(P) (D)ADD (D)ADDP means ADD/DADD [Area Setting] Operand Description Data Type Data to be added to S2...
  • Page 307 Chapter 6 Instruction Details 6.29.2 SUB, SUBP, DSUB, DSUBP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O SUB(P) S2 O DSUB(P) (D)SUB (D)SUBP means SUB/DSUB [Area Setting] Operand Description Data Type Data to be subtracted from S2 INT/DINT Data to be subtracted from S1 INT/DINT...
  • Page 308 Chapter 6 Instruction Details 6.29.3 MUL, MULP, DMUL, DMULP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O MUL(P) S2 O DMUL(P) MUL,DMUL MULP, DMULP means MUL/DMUL [Area Setting] Operand Description Data Type Data to be multiplied by S2 INT/DINT Data to be multiplied by S1...
  • Page 309 Chapter 6 Instruction Details 6.29.4 DIV, DIVP, DDIV, DDIVP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O DIV(P) S2 O DDIV(P) (D)DIVU (D)DIVUP means DIV/DDIV [Area Setting] Operand Description Data Type Data to be divided by S2 INT/DINT Data to be divided by S1 INT/DINT...
  • Page 310 Chapter 6 Instruction Details 6.29.5 ADDU, ADDUP, DADDU, DADDUP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O ADDU(P) S2 O DADDU(P) (D)ADDU (D)ADDUP means ADDU/DADDU [Area Setting] Operand Description Data Type Data to be added to S2 WORD/DWORD Data to be added to S1 WORD/DWORD...
  • Page 311 Chapter 6 Instruction Details 6.29.6 SUBU, SUBUP, DSUBU, DSUBUP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O SUBU(P) S2 O DSUBU(P) (D)SUBU (D)SUBUP means SUBU/DSUBU [Area Setting] Operand Description Data Type Data to be subtracted from S2 WORD/DWORD Data to be subtracted from S1 WORD/DWORD...
  • Page 312 Chapter 6 Instruction Details 6.29.7 MULU, MULUP, DMULU, DMULUP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O MULU(P) S2 O DMULU(P) (D)MULU (D)MULUP means MULU/DMULU [Area Setting] Operand Description Data Type Data to be multiplied by S2 WORD/DWORD Data to be multiplied by S1 WORD/DWORD...
  • Page 313 Chapter 6 Instruction Details 6.29.8 DIVU, DIVUP, DDIVU, DDIVUP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O DIVU(P) S2 O DDIVU(P) (D)DIVU (D)DIVUP means DIVU/DDIVU [Area Setting] Operand Description Data Type Data to be divided by S2 WORD/DWORD Data to be divided by S1 WORD/DWORD...
  • Page 314 Chapter 6 Instruction Details 6.29.9 RADD, RADDP, LADD, LADDP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O RADD(P) S2 O LADD(P) RADD, LADD RADDP, LADDP means RADD/LADD [Area Setting] Operand Description Data Type Data to be added to S2 REAL/LREAL Data to be added to S1...
  • Page 315 Chapter 6 Instruction Details 6.29.10 RSUB, RSUBP, LSUB, LSUBP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O RSUB(P) S2 O LSUB(P) RSUB, LSUB RSUBP, LSUBP P S1 means RSUB/LSUB [Area Setting] Operand Description Data Type Data to be subtracted from S2...
  • Page 316 Chapter 6 Instruction Details 6.29.11 RMUL, RMULP, LMUL, LMULP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O RMUL(P) S2 O LMOV(P) RMUL RMULP means RMUL/LMUL [Area Setting] Operand Description Data Type Data to be multiplied by S2 REAL/LREAL Data to be multiplied by S1 REAL/LREAL...
  • Page 317 Chapter 6 Instruction Details 6.29.12 RDIV, RDIVP, LDIV, LDIVP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O RDIV(P) S2 O LDIV(P) RDIV, LDIV RDIVP, LDIVP means RDIV/LDIV [Area Setting] Operand Description Data Type Data to be divided by S2 REAL/LREAL Data to be divided by S1...
  • Page 318 "LSIS" "PLC" "LSIS PLC" (2) Even if the length of S1 string plus S2 string exceeds the size of string data, error will not occur. In this case, the value to be saved in D will be as big as the size of string data starting from S1 value.
  • Page 319 Chapter 6 Instruction Details 6.29.14 GADD, GADDP, GSUB, GSUBP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O GADD(P) S2 O GSUB(P) GADD, GSUB GADDP, GSUBP means GADD/GSUB [Area Setting] Operand Description Data Type Data address to be added to S2 Data address to be added to S1 Address to save operation result in...
  • Page 320 Chapter 6 Instruction Details 2) GSUB (Group Subtract) (1) It saves the result of N word data from specified device S1 minus N word data from S2 respectively in N word data from specified device D. 1234 1111 S1+1 5555 S2+1 2222 3333...
  • Page 321 Chapter 6 Instruction Details 6.30 BCD Operation Instruction 6.30.1 ADDB, ADDBP, DADDB, DADDBP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O ADDB(P) S2 O DADDB(P) ADDB, DADDB ADDBP, DADDBP means ADDB [Area Setting] Operand Description Data Type...
  • Page 322 Chapter 6 Instruction Details 6.30.2 SUBB, SUBBP, DSUBB, DSUBBP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O SUBB(P) S2 O DSUBB(P) SUBB,DSUBB SUBBP, DSUBBP means SUBB/DSUBB [Area Setting] Operand Description Data Type BCD data to be subtracted from S2 WORD/DWORD BCD data to be subtracted from S1...
  • Page 323 Chapter 6 Instruction Details 6.30.3 MULB, MULBP, DMULB, DMULBP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O MULB (P) S2 O DMULB(P) MULB, DMULB MULBP, DMULBP means MULB/DMULB [Area Setting] Operand Description Data Type BCD data to be multiplied by S2 WORD/DWORD...
  • Page 324 Chapter 6 Instruction Details 6.30.4 DIVB, DIVBP, DDIVB, DDIVBP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O DIVB(P) S2 O DDIVB(P) DIVB, DDIVB DIVBP, DDIVBP means DIVB/DDIVB [Area Setting] Operand Description Data Type BCD data to be divided by S2 WORD/DWORD BCD data to be divided by S1...
  • Page 325 Chapter 6 Instruction Details 3) Program Example (1) In case of P1000=’105’ and P1100=’10’, If Input Signal is chaged from Off to On, P1000 is divided by P1100. In BCD division result, the quotient ‘10’ is saved in P1200 and the remainder ‘5’ is saved in P1201. P00000 DIVB P1000...
  • Page 326 Chapter 6 Instruction Details 6.31 Logic Operation Instruction 6.31.1 WAND, WANDP, DWAND, DWANDP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O WAND(P) S2 O DWAND(P) (D)WAND (D)WANDP P S1 means WAND/DWAND [Area Setting] Operand Description Data Type...
  • Page 327 Chapter 6 Instruction Details S1+1 b16 b15 1 0 1 1 1 DWAND S2+1 b16 b15 1 0 1 1 0 0 1 1 0 1 1 1 0 1 b16 b15 1 0 0 0 0 0 1 1 0 0 0 1 0 0 (1) Logic Operation Table Example...
  • Page 328 Chapter 6 Instruction Details 6.31.2 WOR, WORP, DWOR, DWORP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O WOR(P) S2 O DWOR(P) (D)WOR (D)WORP P S1 means WOR/DWOR [Area Setting] Operand Description Data Type Data to execute WOR operation with S2 BIN 16/32 Data to execute WOR operation with S1...
  • Page 329 Chapter 6 Instruction Details S1+1 b16 b15 1 1 1 1 0 DWOR S2+1 b16 b15 1 1 0 0 1 0 0 1 0 1 1 0 1 1 b16 b15 1 1 0 1 1 1 1 1 0 1 1 0 1 1 3) Program Example (1) In case of P1000=‘h1111’...
  • Page 330 Chapter 6 Instruction Details 6.31.3 WXOR, WXORP, DWXOR, DWXORP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O WXOR(P) S2 O DWXOR(P) (D)WXOR (D)WXORP P S1 means WXOR/DWXOR [Area Setting] Operand Description Data Type Data to execute WXOR operation with S2 WORD/DWORD Data to execute WXOR operation with S1...
  • Page 331 Chapter 6 Instruction Details S1+1 b16 b15 0 0 1 1 0 DWXOR S2+1 b16 b15 1 0 0 1 1 0 0 1 0 1 1 0 1 0 b16 b15 1 1 1 0 1 0 1 0 0 0 1 0 1 1 3) Program Example (1) In case of P1000=‘h1111’...
  • Page 332 Chapter 6 Instruction Details 6.31.4 WXNR, WXNRP, DWXNR, DWXNRP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O WXNR(P) S2 O DWXNR(P) (D)WXNR (D)WXNR P S1 means WXNR [Area Setting] Operand Description Data Type Data to execute WXNR operation with S2 BIN 16/32 Data to execute WXNR operation with S1...
  • Page 333 Chapter 6 Instruction Details S1+1 b16 b15 0 0 1 1 0 DWXNR S2+1 b16 b15 0 0 1 0 1 0 1 1 1 0 0 0 1 0 b16 b15 0 1 1 1 0 1 1 1 0 0 0 0 1 1 3) Program Example (1) In case of P1000=‘h1111’...
  • Page 334 Chapter 6 Instruction Details 6.31.5 GWAND, GWANDP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O S2 O GWAND(P) GWAND GWANDP means GWAND [Area Setting] Operand Description Data Type Address of data to start GWAND operation with S2 BIN 16 Address of data to start GWAND operation with S1 BIN 16...
  • Page 335 Chapter 6 Instruction Details 1) GWAND( Group Word AND) (1) It saves the results of word data from S1 and S2 operated in Logic WAND for N times in word unit in D in regular order. 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 1 0 1 1 1 1 0 0 1 1 0 0 1 S1+1 1 0 1 1 0 1 0 1 1 0 1 0 1 1 0 0 S2+1 1 1 0 0 0 1 0 1 1 0 1 1 1 0 1 0...
  • Page 336 Chapter 6 Instruction Details (1) -32,768~32,767(BIN 16-bit) of integer is available for S2. 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 S1+1 1 0 1 1 0 1 0 1 1 0 1 0 1 1 0 0 S1+2 0 1 0 1 0 1 1 0 0 0 1 1 1 0 0 1 1 0 1 1 0 1 1 1 1 0 0 1 1 0 0 1 S1+(N-2) 1 1 1 1 0 1 1 1 1 0 1 1 1 0 0 0...
  • Page 337 Chapter 6 Instruction Details 6.31.6 GWOR, GWORP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O S2 O GWOR(P) GWOR GWORP means GWOR [Area Setting] Operand Description Data Type Address of data to start GWOR operation with S2 WORD Address of data to start GWOR operation with S1 WORD...
  • Page 338 Chapter 6 Instruction Details 1) GWAOR( Group Word OR) (1) It saves the results of word data from S1 and S2 operated in Logic WOR for N times in word unit in D in regular order. 0 0 0 1 0 0 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 0 1 1 0 1 S1+1 1 1 0 1 0 1 0 1 0 0 1 0 0 0 0 1 S2+1 1 1 0 1 1 1 0 0 1 1 1 0 0 1 1 1...
  • Page 339 Chapter 6 Instruction Details (1) -32,768~32,767 (WORD) of integer is available for S2. 0 0 0 1 0 0 1 1 0 1 1 1 1 1 0 1 S1+1 1 1 0 1 0 1 0 1 0 0 1 0 0 0 0 1 S1+2 0 0 1 0 0 1 1 0 0 0 0 0 1 0 0 1 1 1 1 1 0 1 1 1 0 0 1 0 1 1 0 1 S1+(N-2) 1 0 1 1 1 1 0 1 1 1 0 1 1 0 1 0...
  • Page 340 Chapter 6 Instruction Details 6.31.7 GWXOR, GWXORP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O S2 O GWXOR(P) GWXOR GWXORP means GWXOR [Area Setting] Operand Description Data Type Address of data to start GWXOR operation with S2 WORD Address of data to start GWXOR operation with S1 WORD...
  • Page 341 Chapter 6 Instruction Details 1) GWXOR( Group Word XOR) (1) It saves the results of word data from S1 and S2 operated in Logic WXOR for N times in word unit in D in regular order. 0 0 1 1 1 1 1 1 0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1 1 1 1 1 S1+1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 S2+1 1 1 1 1 1 1 0 0 0 0 1 1 0 0 1 1...
  • Page 342 Chapter 6 Instruction Details (1) -32,768~32,767(WORD) of integer is available for S2. 0 0 1 1 1 1 1 1 0 0 1 1 1 1 0 0 S1+1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 S1+2 0 0 1 1 0 0 1 1 0 0 0 1 1 1 0 1 1 1 0 0 0 0 1 1 0 0 1 1 1 1 1 1 S1+(N-2) 1 0 0 1 1 1 0 0 1 1 1 1 0 0 1 1...
  • Page 343 Chapter 6 Instruction Details 6.31.8 GWXNR, GWXNRP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O S2 O GWXNR(P) GWXNR GWXNRP means GWXNR [Area Setting] Operand Description Data Type Address of data to start GWXNR operation with S2 WORD Address of data to start GWXNR operation with S1 WORD...
  • Page 344 Chapter 6 Instruction Details 1 1 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 0 1 0 0 0 0 1 0 1 0 1 0 1 1 S1+1 0 0 0 1 1 1 0 0 1 1 0 1 0 0 1 1 S2+1 1 0 1 0 1 0 0 1 1 0 1 0 1 0 0 1 S1+2 1 0 1 1 1 0 1 0 1 1 0 0 1 1 0 0 S2+2 0 0 1 1 0 1 0 1 1 0 1 1 0 1 1 1...
  • Page 345 Chapter 6 Instruction Details (1) -32,768~32,767(BIN 16-bit) of integer is available for S2. 1 1 0 0 0 0 1 1 1 1 0 0 1 1 1 1 S1+1 0 0 0 1 1 1 0 0 1 1 0 1 0 0 1 1 S1+2 1 0 1 1 1 0 1 0 1 1 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 1 0 1 1 S1+(N-2) 1 0 0 1 1 1 0 0 1 0 1 0 1 1 1 1...
  • Page 346 Chapter 6 Instruction Details 6.32 Display Instruction 6.32.1 SEG, SEGP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) SEG(P) SEGP means SEG [Area Setting] Operand Description Data Type Address where data to decode in 7 segments is saved. BIN 32 Address to save data decoded.
  • Page 347 Chapter 6 Instruction Details 2) Formation of Segments Formation of Data 7 Segments displayed Hexadecimal 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 3) Program Example (1) If Input Signal P00000 is changed from Off to On status, It displays for 4 digits that it is decoded from No.0 bit of P1000 to No.0 of P1100 to 4 digits by 7 segments decoding format ‘h0004’...
  • Page 348 Chapter 6 Instruction Details 6.33 Data Process Instruction 6.33.1 BSUM, BSUMP, DBSUM, DBSUMP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) BSUM(P) DBSUM(P) (D)BSUM (D)BSUMP means BSUM [Area Setting] Operand Description Data Type Address of word data to count the number of 1s WORD/DWORD Address to save the counting result WORD...
  • Page 349 Chapter 6 Instruction Details 6.33.2 BRST, BRSTP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) BRST(P) BRST BRSTP means BRST [Area Setting] Operand Description Data Type Device Number to display Reset Start Position Number of bits to Reset WORD [Flag Setting] Flag...
  • Page 350 Chapter 6 Instruction Details 6.33.3 ENCO, ENCOP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) ENCO(P) ENCO ENCOP means ENCO [Area Setting] Operand Description Data Type Data or address to perform ENCO operation WORD Address to save operation result in WORD Available multipliers of bits to encode are 1 ~ 8...
  • Page 351 Chapter 6 Instruction Details 6.33.4 DECO, DECOP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) DECO(P) DECO DECOP means DECO [Area Setting] Operand Description Data Type Data address to perform DECO operation WORD Address to save operation result in WORD Available multipliers of bits to decode WORD...
  • Page 352 Chapter 6 Instruction Details 6.33.5 DIS, DISP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) DIS(P) DISP means DIS [Area Setting] Operand Description Data Type Data address to perform DIS operation WORD Address to save operation result in WORD Number of 4-bit data to be saved in starting D WORD...
  • Page 353 Chapter 6 Instruction Details 6.33.6 UNI, UNIP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) UNI(P) UNIP means UNI [Area Setting] Operand Description Data Type Data address to perform UNI operation WORD Address to save operation result in WORD Number of 4-bit data to be united from S WORD...
  • Page 354 Chapter 6 Instruction Details 6.33.7 WTOB, WTOBP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) WTOB(P) WTOB WTOBP means WTOB [Area Setting] Operand Description Data Type WORD data or Area Number where WORD data is saved WORD Start Number of area to save data converted to Byte WORD...
  • Page 355 Chapter 6 Instruction Details 6.33.8 BTOW, BTOWP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) BTOW(P) BTOW BTOWP means BTOW [Area Setting] Operand Description Data Type Byte data or Area Number where Byte data is saved WORD Area to save data converted to WORD WORD...
  • Page 356 Chapter 6 Instruction Details 6.33.9 IORF, IORFP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) IORF(P) S2 O S3 O IORF IORF S3 S3 IORFP IORFP [Area Setting] Operand Description Data Type Position (base + slot) I/O module to process immediately. WORD Upper 32-bit data or Device Number to mask DWORD...
  • Page 357 Chapter 6 Instruction Details 6.33.10 SCH, SCHP, DSCH, DSCHP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O S2 O SCH(P) DSCH(P) (D)SCH (D)SCHP P S1 means (D)SCH [Area Setting] Operand Description Data Type Data or address to searches for WORD/DWORD Start address of the area to searches for...
  • Page 358 Chapter 6 Instruction Details 2) DSCH (Double Word Search) (1) It searches specified S2 device for N points (WORD 2N points) in 32-bit unit with specified S1+1,S1 device’s 32- bit data used as a key word. (2) It saves the number identical to the key word in D+1, the position of the first identical data in specified device D.
  • Page 359 Chapter 6 Instruction Details 6.33.11 MAX, MAXP, DMAX, DMAXP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) MAX(P) DMAX(P) (D)MAX (D)MAXP means (D)MAX [Area Setting] Operand Description Data Type Data address to start MAX operation INT/DINT Address to save operation result.
  • Page 360 Chapter 6 Instruction Details 2) DMAX (Double Maximum) (1) It searches from double word data S up to N range for the maximum value to save in D. (2) Comparison in size will be performed by signed operation. (3) If operation result is Zero, Zero Flag will be set. (4) If N=0, the instruction will not be executed.
  • Page 361 Chapter 6 Instruction Details 6.33.12 MIN, MINP, DMIN, DMINP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) MIN(P) DMIN(P) (D)MIN (D)MINP means (D)MIN [Area Setting] Operand Description Data Type Data address to start MIN operation INT/DINT Address to save operation result.
  • Page 362 Chapter 6 Instruction Details 2) DMIN (Double Minimum) (1) It searches from double word data S up to N range for the minimum value to save in D. (2) Comparison in size will be performed by signed operation. (3) If operation result is Zero, Zero Flag will be set. (4) If N=0, the instruction will not be executed.
  • Page 363 Chapter 6 Instruction Details 6.33.13 SUM, SUMP, DSUM, DSUMP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) SUM(P) DSUM(P) (D)SUM (D)SUMP means (D)SUM [Area Setting] Operand Description Data Type Data address to start SUM operation INT/DINT Address to save operation result.
  • Page 364 Chapter 6 Instruction Details 2) DSUM (Double Word Summary) (1) It saves the result of the sum up to N data starting from double word data S in D. (2) Sum will be performed by signed operation. (3) If operation result is Zero, Zero Flag will be set. (4) If overflow occurs during operation, Carry Flag and Error Flag will be set.
  • Page 365 Chapter 6 Instruction Details 6.33.14 AVE, AVEP, DAVE, DAVEP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) AVE(P) DAVE(P) (D)AVE (D)AVEP means AVE [Area Setting] Operand Description Data Type Data address to start AVE operation INT/DINT Address to save AVE operation result INT/DINT...
  • Page 366 Chapter 6 Instruction Details 2) DAVE (Double Word Average) (1) It saves the average resulted from the sum up to N double word data starting from S divided by N in D. (2) Value to be saved in double word data D is of DINT. (3) If operation result is Zero, Zero Flag will be set.
  • Page 367 Chapter 6 Instruction Details 6.33.15 MUX, MUXP, DMUX, DMUXP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O S2 O MUX(P) DMUX(P) (D)MUX (D)MUXP P S1 means (D)MUX [Area Setting] Operand Description Data Type Position to select (0~N-1) WORD/DWORD Head position of data to select...
  • Page 368 Chapter 6 Instruction Details 6.33.16 DETECT, DETECTP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O S2 O DETECT(P) DETECT DETECTP P S1 means DETECT [Area Setting] Operand Description Data Type Start position of data to detect WORD Allowance WORD...
  • Page 369 Chapter 6 Instruction Details 6.33.17 RAMP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) N1 O N2 O RAMP D1 O N3 O D2 O RAMP RAMP D1 N3 [Area Setting] Operand Description Data Type Initial value WORD Final value...
  • Page 370 Chapter 6 Instruction Details (10) Though the instruction is Off while the instruction is executed, details of D1 (present value) are not changed. If the instruction is back On, RAMP instruction restarts the work. (11) Set 1 to completed device to cancel the RAMP instruction in the middle. (12) Turn the instruction Off ...
  • Page 371 Chapter 6 Instruction Details 6.33.18 SORT, DSORT Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) N1 O (D)SORT N2 O D1 O D2 O (D)SORT means (D)SORT [Area Setting] Operand Description Data Type Start position of data to align WORD/DWORD Aligning range &...
  • Page 372 Chapter 6 Instruction Details (5) Specified D1 device (completed device) saves 1 if SORT Instruction completed. After sorted, turn input contact point (Instruction) OFF to make specified D1 device’s value 0. (6) In specified D2 device, 2-point (SORT)/4-point (DSORT) is used by system when the instruction is executed. User shall not change 2-point (SORT)/4-point (DSORT) in specified D2 device.
  • Page 373 Chapter 6 Instruction Details 6.33.19 TRAMP, RTRAMP Area Available Flag Instruction Step Error Zero Carry D.x R.x (F110) (F111) (F112) N1 O N2 O (R)TRAMP N3 O (R)TRAMP means (R)TRAMP [Area Setting] Operand Description Data Type Initial value INT (REAL) Last value INT (REAL) Time required (sec)
  • Page 374 Chapter 6 Instruction Details 2) Program example In case D01000=0, D01100=350, D01200=7, if you turn on P00000, D01300 increases by a velocity of 50/sec every scan and a timer is saved in the D01302. After 7s, D01300 becomes equal to 350 and keeps its value Time P00000 TRAMP...
  • Page 375 Chapter 6 Instruction Details 6.34 Data Table Process Instruction 6.34.1 FIWR, FIWRP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) FIWR(P) FIWR FIWRP means FIWR [Area Setting] Operand Description Data Type Data to input WORD Start position of table WORD...
  • Page 376 Chapter 6 Instruction Details 2) FIWR( File Write) (1) It saves specified data S in specified data table D. At this moment, the data is saved in present number of data + 1 word position from the specified position D. 1234 1234 Executed...
  • Page 377 Chapter 6 Instruction Details 6.34.2 FIFRD, FIFRDP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) FIFRD(P) FIFRD FIFRDP means FIFRD [Area Setting] Operand Description Data Type Start position of data table WORD Position to save in the value read from data table WORD [Flag Setting] Flag...
  • Page 378 Chapter 6 Instruction Details 6.34.3 FILRD, FILRDP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) FILRD(P) FILRD FILRDP means FILRD [Area Setting] Operand Description Data Type Start position of data table WORD Position to save in the value read from data table WORD [Flag Setting] Flag...
  • Page 379 Chapter 6 Instruction Details 6.34.4 FIINS, FIINSP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) FIINS(P) FIINS FIINSP means FIINS [Area Setting] Operand Description Data Type Data value to input WORD Start position of data table WORD Position to save the input value in WORD...
  • Page 380 Chapter 6 Instruction Details 6.34.5 FIDEL, FIDELP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) FIDEL(P) FIDEL FIDELP means FIDEL [Area Setting] Operand Description Data Type Start position of data table WORD Data value deleted WORD Position of data to delete WORD...
  • Page 381 Chapter 6 Instruction Details 6.35 String Process Instruction 6.35.1 BINDA, BINDAP, DBINDA, DBINDAP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) BINDA(P) DBINDA(P) (D)BINDA (D)BINDAP means BINDA [Area Setting] Operand Description Data Type Data or address to convert to ASCII INT/DINT Address to save operation result in STRING...
  • Page 382 Chapter 6 Instruction Details 2) DBINDA (Binary to Decimal ASCII) (1) It converts each digit to ASCII from the upper in regular order when input binary 32-bit data is made in decimal. (2) The value converted to ASCII will be saved in starting D by 2 digits per word in regular order. (3) If S is a negative number, sign value of “–“...
  • Page 383 Chapter 6 Instruction Details 6.35.2 BINHA, BINHAP, DBINHA, DBINHAP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) BINHA(P) DBINHA(P) (D)BINHA (D)BINHAP means BINHA [Area Setting] Operand Description Data Type Data or address to convert to ASCII WORD/DWORD Address to save operation result in BIN 32...
  • Page 384 Chapter 6 Instruction Details 2) DBINHA (Binary to Hex ASCII) (1) It converts each digit to ASCII from the upper in regular order when input binary 32-bit data is made in Hexadecimal. (2) The value converted to ASCII will be saved in starting D by 2 digits per word in regular order. (3) In DBINHA, its operation range is h00000000 ~ hFFFFFFFF.
  • Page 385 Chapter 6 Instruction Details 6.35.3 BCDDA, BCDDAP, DBCDDA, DBCDDAP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) BCDDA(P) DBCDDA(P) (D)BCDDA (D)BCDDAP means BCDDA [Area Setting] Operand Description Data Type BCD data or address to convert to ASCII Address to save operation result in STRING [Flag Setting]...
  • Page 386 Chapter 6 Instruction Details 2) DBCDDA (BCD to Decimal ASCII) (1) It converts each digit to ASCII from the upper in regular order when input binary data is made in decimal. (2) The value converted to ASCII will be saved in starting D by 2 digits per word in regular order. (3) In DBCDDA, its operation range is h00000000 ~ h99999999.
  • Page 387 Chapter 6 Instruction Details 6.35.4 DABIN, DABINP, DDABIN, DDABINP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) DABIN(P) DDABIN(P) (D)DABIN (D)DABINP means DABIN [Area Setting] Operand Description Data Type Address where decimal ASCII data to convert to binary is saved STRING Address to save operation result in INT/DINT...
  • Page 388 Chapter 6 Instruction Details 2) DDABIN (Double Decimal ASCII to Binary) (1) It converts decimal value saved in ASCII to binary and saves in D. (2) NULL is surely at the end of ASCII string. word in input ASCII value decides the sign of binary value. (3) The lower byte of the 1 (4) Sign will be of –(h2D) or +(h2B).
  • Page 389 Chapter 6 Instruction Details 6.35.5 HABIN, HABINP, DHABIN, DHABINP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) HABIN(P) DHABIN(P) (D)HABIN (D)HABINP means HABIN [Area Setting] Operand Description Data Type Address where Hexadecimal ASCII data to convert to binary is saved STRING Address to save operation result in WORD/DWORD...
  • Page 390 Chapter 6 Instruction Details -digit ASCII code -digit ASCII code -digit ASCII code -digit ASCII code -digit ASCII code -digit ASCII code Upper 16-bit Lower 16-bit -digit ASCII code -digit ASCII code 32-bit Binary data 3) Program Example P00000 HABINP P1000 P1100 XBC H-Type Main Unit...
  • Page 391 Chapter 6 Instruction Details 6.35.6 DABCD, DABCDP, DDABCD, DDABCDP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) DABCD(P) DDABCD(P) (D)DABCD (D)DABCDP means DABCD [Area Setting] Operand Description Data Type Address where decimal ASCII data to convert to BCD is saved STRING Address to save operation result in [Flag Setting]...
  • Page 392 Chapter 6 Instruction Details 3) Program Example (1) If Input Signal P00000 is changed to On, It converts ASCII code saved in D00000~D00001 to BCD value and saved ‘1284’ in D00010. b12 b11 h00 (NULL) P00000 DABCDP D00000 D00010 XBC H-Type Main Unit 6-243 Ver.
  • Page 393 Chapter 6 Instruction and Flag 6.34.7 LEN, LENP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) LEN(P) LENP means LEN [Area Setting] Operand Description Data Type Start position of string STRING Position to save string length WORD 1) LEN( Length) (1) It calculates the string length saved in ASCII starting from S to save in D by 2 digits per word.
  • Page 394 Chapter 6 Instruction and Flag 6.34.8 STR, STRP, DSTR, DSTRP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O STR(P) S2 O DSTR(P) (D)STR (D)STRP P S1 means STR [Area Setting] Operand Description Data Type Data address (0~28) where S2’...
  • Page 395 Chapter 6 Instruction and Flag 2) DSTR (String) (1) It converts specified Binary 32-bit data S2 with decimal places added to specified position S1, to string to save in the next number to specified device D. Decimal places (Specified total places-1) ASCII code of Sign ASCII code (Specified total places-2)
  • Page 396 Chapter 6 Instruction and Flag 6.34.9 VAL, VALP, DVAL, DVALP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) VAL(P) D1 O DVAL(P) D2 O (D)VAL (D)VALP means VAL [Area Setting] Operand Description Data Type Start address of string to convert to Binary data STRING Position to save Binary data’s places after converted...
  • Page 397 Chapter 6 Instruction and Flag 2) DVAL (Value) (1) It saves specified string S converted to Binary data in D1, and saves converted data in D2. (2) ASCII string range is h30 ~ h39, and Error Flag will be set for others than sign and decimal point. In DVAL, convertible range of S is –2147483648 ~ 2147483647.
  • Page 398 Chapter 6 Instruction and Flag 6.34.10 RSTR, RSTRP, LSTR, LSTRP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O RSTR(P) S2 O LSTR(P) (D)RSTR (D)RSTRP P S1 means RSTR [Area Setting] Operand Description Data Type Floating point data to convert REAL/LONG...
  • Page 399 Chapter 6 Instruction and Flag 2) LSTR (Double real to String) (1) It converts floating point real data S1 to ASCII string based on saved format in S2 to save in starting D by 2 per word in regular order. (2) STRL’s operation range is -1.7976931348623157e+290 ~ -2.2250738585072014e-290 or 2.2250738585 072014e-290 ~ 1.7976931348623157e+290.
  • Page 400 Chapter 6 Instruction and Flag 6.34.11 STRR, STRRP, STRL, STRLP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) STRR(P) STRL(P) STRR STRRP means STRR [Area Setting] Operand Description Data Type Address string to convert is saved in STRING Address to save in converted floating point data REAL/LREAL...
  • Page 401 Chapter 6 Instruction and Flag 34H (4) 20H (-) 2EH (.) 31H (1) S +1 S +2 32H (2) 33H (3) S +3 31H (1) 30H (0) -4.1320 1E+11 20H (+) 45H (E) S +4 Floating point Real S +5 30H (0) 31H (1) S +6...
  • Page 402 Chapter 6 Instruction and Flag 6.34.12 ASC, ASCP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) ASC(P) cw O ASCP means ASC [Area Setting] Operand Description Data Type Hexadecimal Binary WORD Position to save converted string in. STRING Number of characters to convert.
  • Page 403 Chapter 6 Instruction and Flag h45 (E) h46 (F) h31 (1) h32 (2) Specified number n of letters h37 (7) h38 (8) h41 (A) h42 (B) Binary data (3) Setting the number of characters N will automatically set specified Binary data S’s range and specified device D’s range to save string in.
  • Page 404 Chapter 6 Instruction and Flag 6.34.13 HEX, HEXP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) HEX(P) HEXP means HEX [Area Setting] Operand Description Data Type String to convert to Binary data STRING Device address to save Binary data converted WORD Number of characters to convert WORD...
  • Page 405 Chapter 6 Instruction and Flag (3) The specified number of characters N, specified string S’s range and specified device D’s range to save Binary data in will be automatically set. (4) Even if the device range where ASCII data to convert is saved and the device range where converted Binary data will be saved are duplicated, its process will be normal.
  • Page 406 Chapter 6 Instruction and Flag 6.34.14 RIGHT, RIGHTP, LEFT, LEFTP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) RIGHT(P) LEFT(P) RIGHT, LEFT RIGHTP, LEFTP means RIGHT/LEFT [Area Setting] Operand Description Data Type String STRING Position to save string extracted in STRING Number of characters to extract...
  • Page 407 Chapter 6 Instruction and Flag b8 b7 b8 b7 "ABCDEF1" "ABCDEF12345" character’s ASCII code 3) Program Example (1) If Input Signal P00000 is changed to On, It saves the data 5 strings starting from the right (end of the string) of the string among D00000~D00005 in the D00100~D00102 b8 b7 b8 b7 h42 (B)
  • Page 408 Chapter 6 Instruction and Flag 6.34.15 MID, MIDP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O MID(P) S2 O MIDP P S1 means MID [Area Setting] Operand Description Data Type Start address of string STRING Address to save operation result of string STRING...
  • Page 409 Chapter 6 Instruction and Flag 6.34.16 REPLACE, REPLACEP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O REPLACE(P) S2 O REPLACE REPLACEP P S1 means REPLACE [Area Setting] Operand Description Data Type Start address of string to replace STRING Start address of string STRING...
  • Page 410 Chapter 6 Instruction and Flag 6.34.17 FIND, FINDP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O S2 O FIND(P) FIND FINDP P S1 means FIND [Area Setting] Operand Description Data Type Start address of string to be searched for STRING Start address of string to search for STRING...
  • Page 411 Chapter 6 Instruction and Flag 6.34.18 RBCD, RBCDP, LBCD, LBCDP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O RBCD(P) S2 O LBCD(P) RBCD, LBCD RBCDP, LBCDP P S1 means RBCD/LBCD [Area Setting] Operand Description Data Type...
  • Page 412 Chapter 6 Instruction and Flag 2) LBCD (Double real to BCD) (1) It decomposes floating pointdouble real data saved in specified device S to BCD floating point format, to save in the place after specified device number D. (2) BCD format is as specified in RBCD. (3) STRL’s operation range is -1.7976931348623157e+290 ~ -2.2250738585072014e-290 or 2.225073858 5072014e-290 ~ 1.7976931348623157e+290.
  • Page 413 Chapter 6 Instruction and Flag 6.34.19 BCDR, BCDRP, BCDL, BCDLP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O BCDR(P) S2 O BCDL(P) BCDR BCDRP P S1 means BCDR [Area Setting] Operand Description Data Type Data with BCD floating point format WORD...
  • Page 414 Chapter 6 Instruction and Flag 2) BCDL (BCD to Double real) (1) It converts BCD floating point data saved in specified device S1 to floating point double real data based on decimal places saved in specified device S2, to save in the place after specified device number D (2) The range of BCD long floating point format’s exponential area specified in S1+4 is 0~290.
  • Page 415 Chapter 6 Instruction and Flag 6.36 Special Functional Instruction 6.36.1 SIN, SINP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) SIN(P) SINP SINP [Area Setting] Operand Description Data Size Input angle value (Radian) of Sine operation LREAL Device number to save operation result in LREAL...
  • Page 416 Chapter 6 Instruction and Flag 6.36.2 ASIN, ASINP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) ASIN(P) ASIN ASIN ASINP ASINP [Area Setting] Operand Description Data Size Device number where SIN value for Arc Sine operation is saved LREAL Device number to save operation result in LREAL...
  • Page 417 Chapter 6 Instruction and Flag 6.36.3 COS, COSP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) COS(P) COSP COSP [Area Setting] Operand Description Data Size Input angle value (Radian) of Cosine operation LREAL Device number to save operation result in LREAL 1) COS (Cosine) (1) It performs COS operation of data value in specified area S to save in D.
  • Page 418 Chapter 6 Instruction and Flag 6.36.4 ACOS, ACOSP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) ACOS(P) ACOS ACOS ACOSP ACOSP [Area Setting] Operand Description Data Size Device number where COS value for Arc Cosine operation is saved LREAL Device number to save operation result in LREAL...
  • Page 419 Chapter 6 Instruction and Flag 6.36.5 TAN, TANP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) TAN(P) TANP TANP [Area Setting] Operand Description Data Size Input angle value (Radian) of Tangent operation LREAL Device number to save operation result in LREAL 1) TAN (Tangent) (1) It performs Tangent operation of data value in specified area S to save in D.
  • Page 420 Chapter 6 Instruction and Flag 6.36.6 ATAN, ATANP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) ATAN(P) ATAN ATAN ATANP ATANP [Area Setting] Operand Description Data Size Device number where SIN value for Arc Sine operation is saved LREAL Device number to save operation result in LREAL...
  • Page 421 Chapter 6 Instruction and Flag 6.36.7 RAD, RADP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) RAD(P) RADP RADP [Area Setting] Operand Description Data Size Angle data LREAL Device number to save in the operation result of converted RADIAN value LREAL 1) RAD (Radian) (1) It converts angle (0) of data in specified area S to radian to save in D.
  • Page 422 Chapter 6 Instruction and Flag 6.36.8 DEG, DEGP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) DEG(P) DEGP DEGP [Area Setting] Operand Description Data Size Radian value LREAL Device number to save operation result in. LREAL 1) DEG (Degree) (1) It converts radian of data in specified area S to angle (degree) to save in D.
  • Page 423 Chapter 6 Instruction and Flag 6.36.9 SQRT, SQRTP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) SQRT(P) SQRT SQRT SQRTP SQRTP [Area Setting] Operand Description Data Size Input value to perform SQRT operation LREAL Device number to save operation result in LREAL [Flag Setting]...
  • Page 424 Chapter 6 Instruction and Flag 6.36.10 LN, LNP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) LN(P) [Area Setting] Operand Description Data Size Input value to perform natural logarithm operation LREAL Device number to save operation result in LREAL [Flag Setting] Device...
  • Page 425 Chapter 6 Instruction and Flag 6.36.11 LOG, LOGP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) LOG(P) LOGP [Area Setting] Operand Description Data Size Input value to perform coommon logarithm operation LREAL Device number to save operation result in LREAL [Flag Setting] Device...
  • Page 426 Chapter 6 Instruction and Flag 6.36.12 EXP, EXPP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) EXP(P) EXPP EXPP [Area Setting] Operand Description Data Size Input value to perform exponential operation LREAL Device number to save operation result in LREAL 1) EXP (Exponential operation) (1) It performs Exponential operation of data in specified area S to save in D.
  • Page 427 Chapter 6 Instruction and Flag 6.36.13 EXPT, EXPTP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) EXPT(P) EXPT EXPT EXPTP EXPTP [Area Setting] Operand Description Data Size The base number for operation LREAL The exponential number for operation Device number to save operation result in LREAL 1) EXPT (Exponential operation)
  • Page 428 Chapter 6 Instruction and Flag 6.37 Data Control Instruction 6.37.1 LIMIT, LIMITP, DLIMIT, DLIMITP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O LIMIT(P) S2 O DLIMIT(P) S3 O LIMIT,DLIMIT LIMITP, DLIMITP P S1 means LIMIT/DLIMIT [Area Setting] Operand...
  • Page 429 Chapter 6 Instruction and Flag 2) Program Example P00010 LIMIT D00010 300 -400 D00040 If D00010 is -500, D00040 = -400 If D00010 is -400, D00040 = -400 If D00010 is -300, D00040 = -300 If D00010 is -200, D00040 = -200 If D00010 is 0, D00040 = If D00010 is 200,...
  • Page 430 Chapter 6 Instruction and Flag 6.37.2 DZONE, DZONEP, DDZONE, DDZONEP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O DZONE(P) S2 O DDZONE(P) S3 O DZONE, DDZONE DZONEP, DDZONEP P S1 means DZONE/DDZONE [Area Setting] Operand Description...
  • Page 431 Chapter 6 Instruction and Flag 2) Program Example P00011 D00011 D00021 DZONE If D00010 is -500, D00040 = -350 If D00010 is -400, D00040 = -250 If D00010 is -300, D00040 = -150 If D00010 is -200, D00040 = -100 If D00010 is D00040 = If D00010 is 200,...
  • Page 432 Chapter 6 Instruction and Flag 6.37.3 DZONES, DZONESP, DDZONES, DDZONESP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O DZONES(P) S2 O DDZONES(P) S3 O COMMAND DZONES DDZONES COMMAND DZONESP DDZONESP Means DZONES/DDZONES [Area Setting] Operand Description...
  • Page 433 Chapter 6 Instruction and Flag XBC H-Type Main Unit 6-284 Ver. 1...
  • Page 434 Chapter 6 Instruction and Flag 6.37.4 VZONE, VZONEP, DVZONE, DVZONEP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O VZONE(P) S2 O DVZONE(P) S3 O VZONE, DVZONE P S1 VZONEP, DVZONEP means ZONE/DZONE [Area Setting] Operand Description...
  • Page 435 Chapter 6 Instruction and Flag 2) Program Example P00011 VZONE D00011 D00021 If D00010 is -500, D00040 = -650 If D00010 is -400, D00040 = -550 If D00010 is -200, D00040 = -350 If D00010 is -100, D00040 = -200 If D00010 is 0 , D00040 = 0 If D00010 is 100,...
  • Page 436 (2) K device PID parameter area How to assign PID parameter positions in K device is as shown in the table below; (3) PID common area shows all the loops’ simple setting and state. The bit position in double word (in XGB case, the bit position in word) is just the loop number.
  • Page 437 Chapter 6 Instruction and Flag Device Type Name Function K1200 16bit _PID_MAN PID output select (0: Auto, 1: Manual) K1201 16bit _PID_PAUSE PID pause (0: STOP/RUN, 1: PAUSE) K1202 16bit _PID_REV PID operation selection (0: Forward, 1: Reverse) PID Anti Wind-up2 prohibition (0: Operate 1: K1203 16bit _PID_AW2D...
  • Page 438 Chapter 6 Instruction and Flag 6.37.6 PIDPAUSE Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) PIDPAUSE PIDPAUSE PIDPAUSE [Area Setting] Operand Description Data Size Loop number to convert PID operation to PAUSE(temporary stop) state (0~31) Const 1) PIDPAUSE (PID PAUSE) (1) It operates only when contact point is ON, in order to convert RUN to PAUSE (temporary stop) state of PID...
  • Page 439 Chapter 6 Instruction and Flag 6.37.7 PIDPRMT Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) PIDPRMT PIDPRMT PIDPRMT [Area Setting] Operand Description Data Size Device number where PID operation information to change is saved Loop number to change PID operation information (0~31) Const 1) PIDPRMT (PID Parameter)
  • Page 440 Chapter 6 Instruction and Flag 6.37.8 PIDAT Area Available Flag Instruction Step Error Zero Carry D.x R.x (F110) (F111) (F112) PIDAT PIDAT PIDAT [Area Setting] Operand Description Data Size Loop number to perform AT operation (0~15) Const 1) PIDAT (PID AutoTune) (1) User should operate parameter or K area(K1856 ~ K2176 in word)’s PID Loop (S:Loop Number) auto- tuning saved as adjusted to AT format.
  • Page 441 Chapter 6 Instruction and Flag Device Type Name Function K1856 16bit _AT_REV AT operation selection (0: Forware, 1: Reverse) AT PWM operation permission (0: Prohibit, 1: K1857 16bit _AT_PWM_EN Permit) AT common K1858 16bit _AT_ERROR AT display of error status (0: Normal, 1: Error) K1859 Reserved NO USE...
  • Page 442 Chapter 6 Instruction and Flag 6.37.9 PIDHBD Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) PIDHBD PIDPRMT PIDHBD [Area Setting] Operand Description Data Size Loop number to operate forward PID operation (0~15) Const Loop number to operate reverse PID operation (0~15) Const 1) PIDHBD (PID Hybrid) (1) User should operate forward/reverse mixing operation connecting to forward/reverse parameter or K...
  • Page 443 Chapter 6 Instruction and Flag 6.37.10 PIDCAS Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) PIDCAS PIDCAS PIDCAS [Area Setting] Operand Description Data Size CASCADE external loop number (0~15) Const CASCADE internal loop number (0~15) Const 1) PIDCAS (PID Cascade) (1) User should operate cascade operation connecting to external/internal parameter or K area(K1200 ~...
  • Page 444 Chapter 6 Instruction and Flag 6.37.11 SCAL, SCALP, DSCAL, DSCALP, RSCAL, RSCALP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O SCAL(P) / S2 O DSCAL(P) / S3 O RSCAL(P) COMMAND SCAL DSCAL RSCAL COMMAND SCALP...
  • Page 445 Chapter 6 Instruction and Flag S3+1 S2+1 input S1 (7) The result of the operation of INT/DINT type is represented rounded off the number to one decimal place. (8) Be cautious when using more than ±1.000e+010 at a numerator or less than ±1.000e-010 at a denominator, because, out of the range of expressable Max/Min value in the operation of REAL type, it is represented as ±1.INF00000e+000 (9) In case operation result exceeds the max./min.
  • Page 446 Chapter 6 Instruction and Flag 2) Program example (1) SCAL program scales value between 0 and 16000 to value between 100 and 200. P00000 SCAL D100 D200 D1000 D100 = 16000 D101 = 0 D200 = 200 D201 = 100 subsitution input output...
  • Page 447 Chapter 6 Instruction and Flag 6.38 Time related Instruction 6.38.1 DATERD, DATERDP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) DATERD(P) D DATERD DATERDP means DATERD [Area Setting] Operand Description Data Size Device number to save transferred data WORD 1) DATERD (Date Read) (1) It reads date and time data of PLC to saves in D.
  • Page 448 Chapter 6 Instruction and Flag 6.38.2 DATEWR, DATEWRP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) DATEWR(P) D DATEWR DATEWRP means DATERD/DATEWR [Area Setting] Operand Description Data Size Device number time data is saved in WORD * 4 [Flag Setting] Flag...
  • Page 449 Chapter 6 Instruction and Flag 6.38.3 ADDCLK, ADDCLKP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O ADDCLK(P) S2 O ADDCLK ADDCLKP P S1 means ADDCLK/SUBCLK [Area Setting] Operand Description Data Size Device number time data is saved in DWORD Device number time data is saved in DWORD...
  • Page 450 Chapter 6 Instruction and Flag 6.38.4 SUBCLK, SUBCLKP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O SUBCLK(P) S2 O SUBCLK SUBCLKP P S1 means ADDCLK/SUBCLK [Area Setting] Operand Description Data Size Device number time data is saved in DWORD Device number time data is saved in DWORD...
  • Page 451 Chapter 6 Instruction and Flag 6.38.5 SECOND, SECONDP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) SECOND(P) SECOND SECOND SECONDP SECONDP [Area Setting] Operand Description Data Size Data to transfer, or device number data is saved in DWORD Device number to save transferred data in DWORD...
  • Page 452 Chapter 6 Instruction and Flag 6.38.6 HOUR, HOURP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) HOUR(P) HOUR HOURP means SECOND/HOUR [Area Setting] Operand Description Data Size Data to transfer, or device number data is saved in DWORD Device number to save transferred data in DWORD...
  • Page 453 Chapter 6 Instruction and Flag 6.39 Divergence Instruction 6.39.1 JMP, LABEL Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) LABEL Label Label [Area Setting] Operand Description Data Type Position label to jump on (English : up to 16) STRING 1) JMP (1) If JMP (label) instruction’s input contact point is On, it will jump on the place after specified label (LABEL),...
  • Page 454 Chapter 6 Instruction and Flag 6.39.2 CALL, CALLP, SBRT, RET Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) CALL(P) SBRT CALL(P) SBRT SBRT means CALL [Area Setting] Operand Description Data Type Function’s label to call (English : up to 16, Korean : up to 8 characters) STRING 1) CALL (1) If input condition is allowed while program executed, the program between SBRT n ~ RET instructions...
  • Page 455 Chapter 6 Instruction and Flag 6.40 Loop Instruction 6.40.1 FOR, NEXT Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) NEXT NEXT NEXT [Area Setting] Operand Description Data Type Number of times to execute FOR~NEXT WORD 1) FOR~NEXT (1) PLC meeting FOR in RUN mode will execute the process between FOR~NEXT instructions for n times...
  • Page 456 Chapter 6 Instruction and Flag 6.40.2 BREAK Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) BREAK BREAK BREAK 1) BREAK (1) It is used to escape from FOR~NEXT section. (2) BREAK instruction can not be used solely. It shall be surely used only between FOR~NEXT. If not used between FOR~NEXT, it will cause program error to make program downloading unavailable.
  • Page 457 Chapter 6 Instruction and Flag 6.41 Flag Instruction 6.41.1 STC, CLC Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) STC / CLC [Flag Setting] Flag Description Device Number To be set if execution condition of STC is On Carry To be reset if execution condition of CLC is On F112...
  • Page 458 Chapter 6 Instruction and Flag 6.41.2 CLE Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) 1) CLE (Clear Latch Error Flag) (1) If input condition M0001 is On, Error Latch Flag (F115) will be cleared. M00001 XBC H-Type Main Unit 6-309...
  • Page 459 Chapter 6 Instruction and Flag 6.42 System Instruction 6.42.1 FALS Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) FALS FALS means FALS [Area Setting] Operand Description Data Type Number to be saved in F area (F0014) WORD 1) FALS (1) It saves N in specified address of F area.
  • Page 460 Chapter 6 Instruction and Flag 6.42.2 DUTY Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) DUTY DUTY DUTY N1 N2 [Area Setting] Operand Description Data Type F100 ~ F107 BIT- Number of scans to be ON WORD Number of scans to be OFF WORD...
  • Page 461 Chapter 6 Instruction and Flag 6.42.3 TFLK Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) D1 O S1 O TFLK S2 O D2 O TFLK TFLK S2 D2 [Area Setting] Operand Description Data Type Bit number to be On/Off for setting time Time to turn the bit On specified in D1 WORD...
  • Page 462 Chapter 6 Instruction and Flag 6.42.4 WDT, WDTP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) WDT(P) WDTP means WDT 1) WDT (Watch Dog Timer Clear) (1) It resets Watch Dog Timer during program operation. (2) WDT is used to stop the program operation if time from the step 0 to END exceeds the maximum Watch Dog Setting range during program execution.
  • Page 463 Chapter 6 Instruction and Flag 6.42.5 OUTOFF Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) OUTOFF OUTOFF OUTOFF 1) OUTOFF (1) If input condition is allowed, the whole output will be Off, and internal operation will go on with F113 (whole output Off) Flag to be set in F area.
  • Page 464 Chapter 6 Instruction and Flag 6.42.6 STOP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) STOP STOP STOP 1) STOP (1) It converts to program mode after the scan presently in progress is completed. (2) This instruction is used to stop the operation at specific time desired.
  • Page 465 Chapter 6 Instruction and Flag 6.42.7 ESTOP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) ESTOP ESTOP ESTOP 1) ESTOP (Emergency Stop) (1) ESTOP instruction will stop the operation of PLC the moment it is executed. (2) This instruction can be used in emergency.
  • Page 466 Chapter 6 Instruction and Flag 6.42.8 INIT_DONE Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) INIT_DONE INIT_DONE INIT_DONE 1) INIT_DONE (Initial Task Done) (1) It is used to finish the Initial Task. (2) It is used to finish the initial task program without exception. If it is not used in initial task program, you can not entered the Scan program 2) Program Example (1) If contact point P00000 becomes On, the initial task is finished.
  • Page 467 Chapter 6 Instruction and Flag 6.43 Interrupt related Instruction 6.43.1 EI, DI Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) EI / DI 1) EI All the prepared task programs are executed. 2) DI All the prepared task programs are not be executed.
  • Page 468 Chapter 6 Instruction and Flag 6.43.2 EIN, DIN Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) EIN / DIN [Area Setting] Operand Description Data Type Interrupt number to specify. WORD 1) EIN (1) Specified n task program is executed. ∗...
  • Page 469 Chapter 6 Instruction and Flag 6.44 Sign Reverse Instruction 6.44.1 NEG, NEGP, DNEG, DNEGP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) NEG(P) DNEG(P) NEG, DNEG NEGP, DNEGP means NEG / DNEG [Area Setting] Operand Description Data Type...
  • Page 470 Chapter 6 Instruction and Flag 6.44.2 RNEG, RNEGP, LNEG, LNEGP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) RNEG(P) LNEG(P) RNEG, LNEG LNEGP, LNEGP means RNEG/LNEG [Area Setting] Operand Description Data Type Area to convert signs REAL/LREAL 1) RNEG (Real Negative) (1) It converts the sign of the detail in specified area D to save in D area.
  • Page 471 Chapter 6 Instruction and Flag 6.44.3 ABS, ABSP, DABS, DABSP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) ABS(P) DABS(P) ABS, DABS ABSP, DABSP means ABS/DABS [Area Setting] Operand Description Data Type Area to convert absolute value. WORD/DWORD 1) ABS (Absolute Value) (1) It converts the absolute value in specified area D to save in D area.
  • Page 472 Chapter 6 Instruction and Flag 6.45 File related Instruction 6.45.1 RSET, RSETP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) RSET(P) RSET RSET [Area Setting] Operand Description Data Type Block number to convert, or device number (0~1) where Block number to convert is saved WORD 1) RSET (R_No.
  • Page 473 Chapter 6 Instruction and Flag 6.45.3 EBREAD Area Available Flag Instruction Step Error Zero Carry D.x R.x (F110) (F111) (F112) EBREAD EBREAD EBREAD [Area Setting] Operand Description Data Size Block number of flash area (0 ~ 31) WORD R device’s block number to save (0 ~ 1) WORD 1) EBREAD (Read Flash Memory Block) (1) It reads 1 block detail in specified flash S1 to the block inside the internal RAM applicable to S2.
  • Page 474 Chapter 6 Instruction and Flag 6.45.4 EBWRITE Area Available Flag Instruction Step Error Zero Carry D.x R.x (F110) (F111) (F112) EBWRITE EBWRITE EBWRITE [Area Setting] Operand Description Data Size Block number of R device (internal RAM) WORD Block number of flash area to save WORD 1) EBWRITE (Write Flash Memory Block) (1) It writes 1 block detail in specified R device S1 to the block in specified flash area S2 when the...
  • Page 475 Chapter 6 Instruction and Flag 6.45.5 EBCMP Area Available Flag Instruction Step Error Zero Carry D.x R.x (F110) (F111) (F112) EBCMP EBCMP D1 D2 EBCMP [Area Setting] Operand Description Data Size R device’s block number (CPUH : 0~1, CPUS : 0) WORD Flash memory’s block number (0~31) WORD...
  • Page 476 Chapter 6 Instruction and Flag 6.45.6 EERRST Area available Flag Instruction Step Error Zero Carry D.x R.x (F110) (F111) (F112) EERRST EERRST EERRST 1) EERRST (EEPROM Error Reset) (1) If input contact point becomes On, it is clear the Flash Block Status Flag (F0159, WORD) and the Block Error Flag (F0164, DWORD).
  • Page 477 Chapter 6 Instruction and Flag 6.46 F area Control Instruction 6.46.1 FSET Area Available Flag Instruction Error Zero Carry D.x R.x Step (F110) (F111) (F112) FSET FSET FSET [Area Setting] Operand Description Data Size Area of F10240 ~ F2047R in F area 1) FSET (1) It is to be set the bit between F10240~F2047F among the Special Relay Area F.
  • Page 478 Chapter 6 Instruction and Flag 6.46.2 FRST Area Available Flag Instruction Step Error Zero Carry D.x R.x (F110) (F111) (F112) FRST FRST FRST [Area Setting] Operand Description Data Size F10240 ~ F2047F area in F area 1) FRST It is used to instruction to reset the bit of F10240~F2047F in F area of Special Relay area. It is not need to use the FRST instruction because the bit of F10240 ~ F10243 area become to reset after 1 Scan automatically even if the bit become Set.
  • Page 479 Chapter 6 Instruction and Flag 6.46.3 FWRITE Area available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) FWRITE FWRITE FWRITE [Area Setting] Operand Description Data Size Number of Data or Device WORD F1024 ~ F2047 area in F area WORD 1) FWRITE (1) It is used to instruction to save temporary value in word of F1024~F2047 in Special Rely in F area.
  • Page 480 Chapter 6 Instruction and Flag 6.47 Bit Control Instruction in Word Area 6.47.1 Bit of Word (B, BN) Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) Operators Operation Operation x Operators Name Condition Condition result result Bit of Word...
  • Page 481 Chapter 6 Instruction and Flag 2) AND x (B, BN) a) When n bit of word data (S) is 1 (for B) or 0 (for BN) AND contact C1 is On, then coil P0001A will be On. Otherwise CR1 will be Off. Contact AND x Coil...
  • Page 482 Chapter 6 Instruction and Flag 6.47.2 BOUT Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) BOUT BOUT BOUT Operand Description Data Size Word area of the relevant device WORD bit in Word area WORD 1) BOUT (1) This instruction outputs a present operation result to n bit of specified D area.
  • Page 483 Chapter 6 Instruction and Flag 6.47.3 BSET, BRESET Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) BSET BRESET BSET BSET BRESET BRESET Operand Description Data Size Word area of the relevant device WORD bit in Word area WORD 1) BSET (1) In sufficient condition, set n...
  • Page 484 Chapter 6 Instruction and Flag 6.48 Special/Communication Module related Instruction 6.48.1 GET, GETP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) GET(P) GETP P sl means GET [Area Setting] Operand Description Data Size Slot number where special module is installed (Set to the Hexadecimal) WORD Start address of internal memory in special module WORD...
  • Page 485 Chapter 6 Instruction and Flag 2) Program Example (1) If Input Signal P00001 is changed to On, it saves 4-word data from special module’s fixed area address 0 installed on the slot number 3 of the base number 0, in D0010 ~ 00013. P00001 D00010 D00010...
  • Page 486 Chapter 6 Instruction and Flag 6.48.2 PUT, PUTP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) PUT(P) PUTP P sl means PUT [Area Setting] Operand Description Data Size Slot number where special module is installed (Set to the Hexadecimal) WORD Address in internal memory of special module WORD...
  • Page 487 Chapter 6 Instruction and Flag 2) Program Example (1) Where the 40-word data of D1000 ~ D1039 is written in special module’s starting memory address 10 ~ 50 installed on the slot number 7 of No.0 base when M00000 is On. M00000 D1000 (2) Where the 3-word data of word M00010 ~ M00012 is written in A/D module’s internal memory address 5...
  • Page 488 Chapter 6 Instruction and Flag 6.49 Communication Instruction 6.49.1 P2PSN Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) N1 O P2PSN N2 O N3 O P2PSN P2PSN [Area Setting] Operand Description Data Size P2P number (1 ~8) WORD Block number( 0 ~ 63) WORD...
  • Page 489 Chapter 6 Instruction and Flag 6.49.2 P2PWRD Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) N1 O N2 O N3 O P2PWRD N4 O N5 O P2PWRD P2PWRD [Area Setting] Operand Description Data Size P2P number (1 ~ 8) WORD Block number( 0 ~ 63)
  • Page 490 Chapter 6 Instruction and Flag 6.49.3 P2PWWR Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) N1 O N2 O N3 O P2PWWR N4 O N5 O P2PWWR P2PWWR [Area Setting] Operand Description Data Size P2P number (1 ~ 8) WORD Block number( 0 ~ 63)
  • Page 491 Chapter 6 Instruction and Flag 6.49.4 P2PBRD Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) N1 O N2 O N3 O P2PBRD N4 O N5 O P2PBRD P2PBRD [Area Setting] Operand Description Data Size P2P Number (1 ~ 8) WORD Block Number( 0 ~ 63)
  • Page 492 Chapter 6 Instruction and Flag 6.49.5 P2PBWR Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) N1 O N2 O N3 O P2PBWR N4 O N5 O P2PBWR P2PBWR [Area Setting] Operand Description Data Size P2P number (1 ~ 8) WORD Block number (0 ~ 63)
  • Page 493 Chapter 6 Instruction and Flag 6.50 Communication Module related Instruction 6.50.1 SNDUDATA Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O SNDUDATA S2 O S3 O COMMAND SNDUDATA SNDUDATA [Area Setting] Operand Description Data type Base and slot number WORD...
  • Page 494 Operation condition is set before complete previous instruction at the instruction same slot * State code 09 is only for XGB 4) Program Example Remark (1) Devices D+1 ~ D+3 set in operand D are the areas to be saved with instruction information. So users must not change that areas.
  • Page 495 Chapter 6 Instruction and Flag 6.50.2 RCVUDATA Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O D1 O SNDUDATA D2 O D3 O COMMAND RCVUDATA RCVUDATA [Area Setting] Operand Description Data type Base and slot number WORD Channel (1 or 2) WORD...
  • Page 496 Operation condition is set before complete previous instruction at the instruction same slot * State code 09 is only for XGB 4) Program Example Remark (1) Devices D3+1 ~ D3+3 set in operand D3 are the areas to be saved with instruction information. So users must not change that areas.
  • Page 497 Chapter 6 Instruction and Flag 6.50.3 SENDDTR Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O SNDDTR S2 O COMMAND SENDDTR SENDDTR [Area Setting] Operand Description Data type Base and slot number WORD Channel (1 or 2) WORD DTR (0 or 1)
  • Page 498 Operation condition is set before complete previous instruction at the instruction same slot * State code 09 is only for XGB 4) Program Example Remark (1) Devices D+1 ~ D+3 set in operand D are the areas to be saved with instruction information. So users must not change that areas.
  • Page 499 Chapter 6 Instruction and Flag 6.50.4 SENDRTS Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) S1 O SNDDTR S2 O COMMAND SENDRTS SENDRTS [Area Setting] Operand Description Data type Base and slot number WORD Channel (1 or 2) WORD RTS (0 or 1)
  • Page 500 Operation condition is set before complete previous instruction at the instruction same slot * State code 09 is only for XGB 4) Program Example Remark (1) Devices D+1 ~ D+3 set in operand D are the areas to be saved with instruction information. So users must not change that areas.
  • Page 501 Chapter 6 Instruction and Flag 6.50.5 GETCOMM Device Flag Command Step error zero carry Z D.x R.x (F110) (F111) (F112) GETCOMM [Area Setting] Operand Description Data size No. of the slot where communication module is installed WORD (set up with hexadecilmal number) Station number of the slave to be read, SDO index/sub-index WORD Starting address of the device where the data read from slave is to be stored...
  • Page 502 Chapter 6 Instruction and Flag No. 2, and save the data in D6300.. Meanings of the operands sl(h0002): base No. 00, slot No.02 S(D1000~D1003): slot and object index Address Device Bit[15-8] Bit[7-0] Allocation S + 0 Station No. of Slave D1000 Slave-side object index Slave-side object index (Low)
  • Page 503 Chapter 6 Instruction and Flag 6.50.6 PUTCOMM Device Flag Command Step error zero carry P M K Z D.x R.x (F110) (F111) (F112) O O O PUTCOMM O O O O O O [Area Setting] Operand Description Data size No. of the slot where communication module is installed (set up with WORD hexadecilmal number) Station number of the slave to be read, SDO index/sub-index...
  • Page 504 Chapter 6 Instruction and Flag Meanings of the operands sl(h0002): Base No 00, Slot No 02 S(D1000~D1004): slot and object index, data Adddress Device Bit [15-8] Bit [7-0] Allocation Station No. of corressponding S + 0 D1000 device Slave-side object index S + 1 Slave-side object index (Low) D1001...
  • Page 505 Chapter 6 Instruction Details 6.51 Position Control Instruction (APM) 6.51.1 ORG Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on WORD Axis to instruction WORD [Flag Setting] Flag...
  • Page 506 Floating Origin Point. (2) Error A) For XGK, if a value more than 2 is input in specified instruction axis ‘ax’, for XGB, if a value more than 1 is input Error Flag (F110) will be set.
  • Page 507 Chapter 6 Instruction Details 6.51.3 DST Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on WORD Axis to instruction WORD Target position DINT Target speed DWORD...
  • Page 508 Chapter 6 Instruction Details 6.51.4 IST Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on WORD Axis to instruction WORD Step number to start WORD [Flag Setting] Flag...
  • Page 509 (Unused in Y axis X axis XGB) 2) Error (1) If a value more than 2 is input in specified instruction axis ‘ax’, Error Flag (F110) will be set. (2) If there is no special module on the specified slot, or no address specified in S is available in the installed module, Error Flag (F110) will be set.
  • Page 510 (Unused in Y axis X axis XGB) 2) Error (1) If a value more than 2 is input in specified instruction axis ‘ax’, Error Flag (F110) will be set. (2) If there is no special module on the specified slot, or no address specified in S is available in the installed module, Error Flag (F110) will be set.
  • Page 511 (2) It is used to instruction the positioning module’s specified axis ‘ax’ installed on sl (positioning module’s slot number) to let the axes simultaneously operate n1 (X), n2 (Y) and n3 (Z) steps (unused in XGB case) by Simultaneous Start.
  • Page 512 Chapter 6 Instruction Details 6.51.8 VTP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on WORD Axis to instruction WORD [Flag Setting] Flag Description Device Number...
  • Page 513 Chapter 6 Instruction Details 6.51.9 PTV Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on WORD Axis to instruction WORD [Flag Setting] Flag Description Device Number...
  • Page 514 2) Error (1) For XGK, if a value more than 2 is input in specified instruction axis ‘ax’, for XGB, if a value more than 1 is input Error Flag (F110) will be set.
  • Page 515 Chapter 6 Instruction Details 6.51.11 SSP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on WORD Axis to instruction WORD Main axis’s position value to execute Position Synchronization DWORD Step number of instruction axis to operate when Position Synchronization starts WORD...
  • Page 516 Axis to instruction WORD XGK: Main axis ratio of Speed Synchronization; XGB: Speed Synchronization ratio WORD (0 ~ 100.00%) XGK: Slave axis ratio of Speed Synchronization; XGB: delay time (1 ~ 10ms) WORD Setting main axis of Speed Synchronization WORD [Flag Setting]...
  • Page 517 2) Error (1) For XGK, if a value more than 2 is input in specified instruction axis ‘ax’, for XGB, if a value more than 1 is input Error Flag (F110) will be set.
  • Page 518 Chapter 6 Instruction Details 6.51.14 SOR Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on WORD Axis to instruction WORD Target Speed to change DWORD [Flag Setting] Flag...
  • Page 519 Chapter 6 Instruction Details 6.51.15 PSO Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on WORD Axis to instruction WORD Position to change speed DINT Target speed to change DWORD...
  • Page 520 Chapter 6 Instruction Details 6.51.16 INCH Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) INCH INCH INCH [Area Setting] Operand Description Data Size Slot number positioning module is installed on. WORD Axis to instruction WORD Target Position DINT...
  • Page 521 Chapter 6 Instruction Details 6.51.17 SNS Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on. WORD Axis to instruction WORD Setting step number of next operation WORD [Flag Setting] Flag...
  • Page 522 Chapter 6 Instruction Details 6.51.18 SRS Area Available Flag Instruction Step Error Zero Carry D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on. WORD Axis to instruction WORD Setting step of repeated operation WORD [Flag Setting] Flag...
  • Page 523 Chapter 6 Instruction Details 6.51.19 MOF Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on. WORD Axis to instruction WORD [Flag Setting] Flag Description Device Number...
  • Page 524 Chapter 6 Instruction Details 6.51.20 PRS Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on. WORD Axis to instruction WORD Setting present position to change. DINT [Flag Setting] Flag...
  • Page 525 Chapter 6 Instruction Details 6.51.21 EPRS Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) EPRS ERPS ERPS [Area Setting] Operand Description Data Size Slot number positioning module is installed on. WORD Axis to instruction WORD Setting encoder value to change DWORD...
  • Page 526 Chapter 6 Instruction Details 6.51.22 TEA Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on. WORD Axis to instruction WORD Teaching Data (target position or target speed) DINT Setting step number to teach WORD...
  • Page 527 Chapter 6 Instruction Details 6.51.23 TEAA Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) TEAA TEAA TEAA [Area Setting] Operand Description Data Size Slot number positioning module is installed on. WORD Axis to instruction WORD Setting head step number to teach WORD...
  • Page 528 Chapter 6 Instruction Details 6.51.24 EMG Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on. WORD Axis to instruction WORD [Flag Setting] Flag Description Device Number...
  • Page 529 Chapter 6 Instruction Details 6.51.25 CLR Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on. WORD Axis to instruction WORD Setting prohibited output to clear WORD [Flag Setting] Flag...
  • Page 530 Chapter 6 Instruction Details 6.51.26 TBP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on. WORD Axis to instruction WORD Teaching Data (changed value of the item to change among basic parameters) DWORD Item to change among basic parameters.
  • Page 531 Chapter 6 Instruction Details 6.51.27 TEP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on. WORD Axis to instruction WORD Teaching Data (changed value of the item to change among extended parameters) DINT Item to change among extended parameters.
  • Page 532 Chapter 6 Instruction Details 3) Program Example (1) If input signal M00000 is On, it instructions the positioning module’s axis ‘X’ installed on the slot number 1 to change Backlash Compensation to 100 among extended parameters, with extended parameters teaching. M00000 (2) If input signal M00000 is On, it instructions the positioning module’s axis specified in D00010 installed on the slot number 3 to change External Stop Allowed to the value specified in D00020 among extended...
  • Page 533 Chapter 6 Instruction Details 6.51.28 THP Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on. WORD Axis to instruction WORD Teaching Data (changed value of the item to change among returned parameters to DINT origin) Item to change among returned parameters to origin...
  • Page 534 Chapter 6 Instruction Details 3) Program Example (1) If input signal M00000 is On, it instructions the positioning module’s axis ‘X’ installed on the slot number 1 to change Restart Time of Return to Origin Point to 100ms among returned parameters to origin point, with returned parameters teaching.
  • Page 535 Chapter 6 Instruction Details 6.51.29 TSP Area Available Flag Instruction Step Error Zero Carry D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on. WORD Axis to instruction WORD Teaching Data(changed value of input signal parameter) WORD [Flag Setting] Flag...
  • Page 536 Chapter 6 Instruction Details 6.51.30 TCP Area Available Flag Instruction Step Error Zero Carry D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on. WORD Axis to instruction WORD Teaching Data (changed value of the item to change among common parameters) DWORD Item to change among common parameters WORD...
  • Page 537 Chapter 6 Instruction Details 2) Error (1) If a value more than 2 is input in specified instruction axis ‘ax’, Error Flag (F110) will be set. (2) If there is no special module on the specified slot, or no address specified in S is available in the installed module, Error Flag (F110) will be set.
  • Page 538 Chapter 6 Instruction Details 6.51.31 WRT Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on. WORD Axis to instruction WORD Axis to save parameter in WORD [Flag Setting] Flag...
  • Page 539 Chapter 6 Instruction Details 6.51.32 SRD Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on. WORD Axis to instruction WORD Device name & number in CPU WORD [Flag Setting] Flag...
  • Page 540 Chapter 6 Instruction Details 6.51.33 TWR Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on. WORD Axis to instruction WORD Head address of Device which is saved data of plural teaching DWORD Number to plural teaching WORD...
  • Page 541 Chapter 6 Instruction Details 6.51.34 TMD Area Available Flag Instruction Step Error Zero Carry Z D.x R.x (F110) (F111) (F112) [Area Setting] Operand Description Data Size Slot number positioning module is installed on. WORD Axis to instruction (0: X-axis, 1: Y-axis, 2: Z-axis) WORD Operation data value to convert DINT...
  • Page 542 1) Function (1) This instruction is for PWM output. (2) While the input condition is On state, XGB postioning outputs pulse train in designated cycle time in n1 and designated Off duty rate in n2 at designated axis in ax (3) During PWM output, current address don’t change.
  • Page 543 Chapter 6 Instruction Details Program Example (1) Used Device Device Description M00000 PWM output reference signal K04201 X-axis error state (2) Program Operation • While M00000 is On which is used as output reference signal, PWM is operated. • (At this time, the X-axis is in operation or errorstatus, the instruction will not be executed.) •...
  • Page 544 Chapter 7 PID Function (Built-in Function) Chapter 7 PID Function (Built-in Function) 7.1 General 7.1.1 General This chapter covers the use of PID control, most often used in complex control design. PID control can be summarized in a simple description. The PV (Process Value) is measured through a sensing or measuring device and calculates the difference between the PV and SV (Set Value) also known as the Setpoint.
  • Page 545 Chapter 7 PID Function (Built-in Function) 7.1.2 Features The built-in PID Function of XGB (except XBC-E) Series provides the following functionality. 1. PID control is built into the PLC and controlled by ladder functions. 2. Any combination of PID loop control parameters can be configured. P, PI, or PID.
  • Page 546 (7.2.4) (7.2.5) PID control operation expressions of XGB series are more complicated than expression (7.2.1) through (7.2.5) mathematically but those are based on the above expressions. The following describes the characteristics of control process with an example that controls the output temperature of heating system in figure 7.2. If the heating system in figure 7.2 is expressed as second order system with transfer function like expression (7.2.6)
  • Page 547 Chapter 7 PID Function (Built-in Function) In this example system, we assume that the PID parameter is specified as shown below to describe the PID control operation. Items Value Items Value Output temperature of 0℃ Proportional Gain (K heating system (PV) Target temperature (SV) 50℃...
  • Page 548 Chapter 7 PID Function (Built-in Function) < Figure 7.2 Simulation of a proportional P control loop shown above > b. The result of the simulation has the maximum overshoot of about 23.4℃ at 0.62s and after 7s, it stabilizes at 48.49℃ with offset of 1.51℃ (about 3%). c.
  • Page 549 Chapter 7 PID Function (Built-in Function) < Figure 7.3 Temperature- P control > d. In table 7.3, as P decreases, offset increases but overshoot decreases. e. Typically, offset can’t be eliminated with only P control. To eliminate the offset, P control and I (integration) are used together.
  • Page 550 Chapter 7 PID Function (Built-in Function) Target Proportional Integral Time P Control PI Control temp. Gain time 46.96 49.70 47.12 50.38 47.03 49.76 47.07 50.14 47.06 49.94 47.06 50.02 47.06 49.99 47.06 50.00 47.06 50.00 47.06 50.00 47.06 50.00 < Table 7.4 Temperature- PI control. (continued from page 7-6) > d.
  • Page 551 Chapter 7 PID Function (Built-in Function) < Figure 7.5 overshoot relative to integral time > If I control is used, overshoot is greater. Depending on the process, large overshoot can be a problem. In this situation, PID control is used. 4.
  • Page 552 Chapter 7 PID Function (Built-in Function) Target Proportional Integral Derivative Time temp. Gain time time Control Control 74.41 55.50 40.63 56.33 52.99 52.50 49.67 50.92 49.70 50.34 50.38 50.12 49.76 50.05 50.14 50.02 49.94 50.01 50.02 50.00 49.99 50.00 50.00 50.00 50.00 50.00...
  • Page 553 Chapter 7 PID Function (Built-in Function) 7.2.2 Functional specifications of PID control 1. Functional Specifications The performance specifications of the built-in PID control function in XGB series are summarized in the below table 7.8. Item Specifications No. of loops 16 Loop...
  • Page 554 7.2.3 PID control parameter setting To use the built-in PID control function of XGB series, it is necessary to set PID control parameters with XG5000 software and operate it though the commands (functions) in the PLC program. The PID Settings window is shown below in Figure 7.9.
  • Page 555 Chapter 7 PID Function (Built-in Function) a. Shown below in figure 7.10 are the parameters available for setting up the PID control loops with XG5000 software. < Figure 7.10 Built-in PID function parameters setting window > XBC H-Type Main Unit 7-12 Ver.
  • Page 556 Chapter 7 PID Function (Built-in Function) b. Input items. The parameters in the built-in PID function parameter window and the available modes and ranges are summarized in below table 7.11. Items Description Option/Range Operational Mode Set the control mode of PID control. Auto/Manual Mode Operational Direction Set the operation direction of PID control.
  • Page 557 The PID function of XGB has the option to limit the integral windup. In addition, it can detect when the SV is suddenly decreased to prevent integral windup.
  • Page 558 10 volt temperature transducer is scaled from 0°C to 100°C, the analog count value is used as the AV for the PID loop. The XGB analog modules are scaled at 0 to 4000 for a resolution of 2.5mv. per count. For a SV of 50°C, a SV of 2000 would be used. Scaling instruction are available in the PLC to convert the analog counts to ranged values.
  • Page 559 Chapter 7 PID Function (Built-in Function) g. Proportional Gain Proportional Gain is the number the SV/PV error is multiplied by to provide an output value to the MV. Proportional Gain is expressed in real number format. h. Integral Time Integral Time (Ti) sets the reset interval for the summing of SV/PV errors in the PID loop.
  • Page 560 PV. The PID equation may generate a large response to an instantaneous change in the PV due to noise or other disturbance unassociated with the process. The XGB PLC mathematically filters the PV for Derivative control. The Derivative Filter value determines the degree of filtering. The lower the Derivative filter value is set, the more responsive the Derivative control is.
  • Page 561 Chapter 7 PID Function (Built-in Function) q. Set SV Ramp When making sudden, large changes in the SV, the PID loop will calculate a rapid change in the output MV to correct for the large error. Depending on the process, this could result in unacceptable operation or possible equipment damage.
  • Page 562 7.2.4 PID flag The parameter set by the XGB series built-in PID control function is saved into the flash memory of the basic unit. Such parameters are moved to K area for the built-in PID function as soon as PLC turns from STOP to RUN mode.
  • Page 563 K1200 ~ K1211 areas are the common bit areas of PID loops while each bit represents the status of each PID control loop. Therefore, each 16 bits, the max number of loops of XGB PID control represents loop status and setting respectively. K1216 ~ K1255 areas are K areas for PID control loop 0 and save the loop 0 setting and status.
  • Page 564  xxx : flag function Ex) _PID10_K_p : means K_p of loop 10. 2. PID flag function Each function of K area flags for XGB series built-in PID control function is summarized as follows. a. Common bit area The area is a flag collecting operation setting and information consisting of bits to each 16 loop.
  • Page 565 XGB series built-in PID function can be started by both run from command’s start bit and remote run bit setting. That is, XGB starts PID control if PIDRUN command’s start bit is on or remote run setting bit is on. Namely, if one of them is on, it executed PID control.
  • Page 566 Chapter 7 PID Function (Built-in Function) vii. _PID_STD (PID RUN status indication) Flag name Address Unit Setting _PID_STD K1209n Unavailable (PID RUN status indication) It indicates the PID control RUN status of ‘n’th loop. If a loop is running or paused, it is on while if it stops or has an error during RUN, it is off.
  • Page 567 Chapter 7 PID Function (Built-in Function) b. PID Flag area by loops PID flag areas by loops are allocated between K1216 ~ K1855 and total 16 loops, each 40 words is allocated per loop. Therefore, the individual data areas of ‘n’th loop are between K (1216+16*n) ~ K (1255+16*n).
  • Page 568 Chapter 7 PID Function (Built-in Function) v. _PIDxx_T_d (PID xx Loop time) derivative Flag name Address Unit Range _PIDxx_T_d K1222+16*xx REAL Real number (PID xx Loop time) derivative It sets/indicates time of PID control of ‘xx’th loop. The available range derivative is real number.
  • Page 569 K1231+16*xx Unavailable The area shows the MV of ‘xx’th PID control loop. As the area in which XGB built-in PID operation result is output every PID control cycle, it delivers the value in the area to U device every scan by using commands like MOV in the program and outputs to D/A output module, thus operating a drive.
  • Page 570 Chapter 7 PID Function (Built-in Function) xiii. _PIDxx_MV_p, _PIDxx_MV_i, _PIDxx_MV_d (P/I/D control components of MV) Flag name Address Unit Range _PIDxx_MV_p K1234+16*xx (MV proportional control component) _PIDxx_MV_i K1236+16*xx REAL Unavailable (MV integral control component) _PIDxx_MV_d K1238+16*xx control component) derivative It indicates ‘n’th loop MV by classifying proportional control MV, integral control maximum MV and control MV.
  • Page 571 Chapter 7 PID Function (Built-in Function) xvii. _PIDxx_PWM_Prd (PWM Output cycle setting) Flag name Address Unit Range _PIDxx_PWM_Prd (PWM output contact cycle K1243+16*xx WORD 100 ~ 65,535 setting) It sets the PWM output period contact cycle of ‘xx’th loop. The available range is between 100 ~ 65,535 at the unit of 0.1ms.
  • Page 572 Chapter 7 PID Function (Built-in Function) xxii. _PIDxx_ERR_CODE (Error code) Flag name Address Unit Range _PIDxx_ERR_CODE K1249+16*xx WORD Unavailable (error code) It indicates error code if an error occurs during ‘xx’th loop run. The flag, as a dedicated monitoring, is updated although a user directly enters it. For more information about warning code, refer to 7.6 Error/Warning Codes.
  • Page 573 Chapter 7 PID Function (Built-in Function) 7.3 PID Instructions It describes PID control commands used in XGB series. The command type of PID control used in XGB series built-in PID control is 4. 1. PIDRUN PIDRUN is used to execute PID control by loops.
  • Page 574 PV, y(s), so it can remove the influence from disturbance. XGB internal PID control connects two PID control loops each other, making cascade control possible. MV of external loop is automatically entered as the SV of internal loop, so it is not necessary to enter it through program.
  • Page 575 PID control enables the mixed forward/reverse control by connecting two PID control loops set as forward/reverse operations. It uses PIDHBD command. For more information about the command, refer to 7.2.5. The mixed forward/reverse run is executed as follows in the XGB built-in PID control.
  • Page 576 Chapter 7 PID Function (Built-in Function) c. Every control parameter uses the parameter of a loop set for forward operation while MV is output to the MV output area of a forward loop operation. Reversely, every control parameter uses the parameter of a loop set for reverse operation during reverse operation run while MV is also output to the MV output area of reverse operation loop.
  • Page 577 Oscillation period is called the boundary period. If boundary gain and period is specified, use Table 7.19, Ziegler & Nichols tuning table, to specify the PID values. This Relay tuning is relatively simple to configure. XGB built-in PID auto-tuning uses this method. Proportional gain...
  • Page 578 Chapter 7 PID Function (Built-in Function) 7.4.2 PID Auto-Tuning function specifications The specifications of XGB series built-in PID auto-tuning function are summarized as in Table 7.20. Item Specifications SV Range INT (-32,768 ~ 32,767) PV Range INT (-32,768 ~ 32,767)
  • Page 579 Chapter 7 PID Function (Built-in Function) 7.4.3 Auto-tuning parameter setting The XGB series auto-tuning function must be started by using a command after setting auto-tuning parameters by loops in the parameter window. 1. Auto-tuning parameter setting To set the parameters of XGB series auto-tuning function, follow these steps.
  • Page 580 Chapter 7 PID Function (Built-in Function) Table 7.23 shows the items to set in auto-tuning parameter window and the available ranges. Items Description Range RUN direction Set the run direction of auto-tuning. Forward/Reverse Set whether to set PWM output of MV enabled/ PWM output enable Disable/Enable disabled.
  • Page 581 PV around SV, yielding incorrect tuning result. To prevent this, hysteresis may be set. XGB auto- tuning converts output at SV + Hysteresis when PV increases or at SV – Hysteresis when it decreases once hysteresis is set.
  • Page 582 7.4.4 Auto-tuning flag The parameters set in the XGB series auto-tuning function are saved to the flash memory of base unit. Such parameters are moved to K area for auto-tuning function as soon as PLC enters RUN mode from STOP. Auto- tuning operation using auto-tuning command is achieved by data in K area.
  • Page 583 K area for auto-tuning loop 0. In the area, the parameters such as PV, operation cycle, and etc. set in the built-in parameter window are saved. The XGB built-in auto-tuning function executes auto-tuning by the device values and saves the results into the K areas.
  • Page 584 Chapter 7 PID Function (Built-in Function) b. Auto-tuning flag area by loops The auto-tuning flag areas by loops are K1860 ~ K2179 and each 20 words per loop are allocated to totally 16 loops. Therefore, individual data area of ‘n’th loop is between K (1860+16*n) ~ K (1879+16*n).
  • Page 585 Chapter 7 PID Function (Built-in Function) _ATxx_HYS_val (Hysteresis setting) Flag name Address Unit Range _ATxx_HYS_val (Hysterisis setting) K1866+16*xx WORD 0 ~ 65,535 It sets the hysteresis of ‘xx’ th loop. For more information about hysteresis function, refer to 7.4.3 Auto-Tuning Parameter Setting. If it is set as 0, it does not work.
  • Page 586 It is the area to output MV of ‘xx’th auto-tuning loop. Every auto-tuning cycle, it saves XGB auto-tuning and it delivers the value in the area by using commands such as MOV in a program and operates a drive every scan.
  • Page 587 Each mechanism is explained as follows. 1. XGB basic unit The XGB basic unit operates by PID control. It receives PV from A/D input module (XBF- AD04A), executes the built-in PID control operation, output the MV to D/A (XBF-DV04A) and executes PID control.
  • Page 588 4. Water Level Sensor A water level sensor plays a role to deliver the PV of an object to control to the XGB by measuring the water level of the tank and outputting it within 0 ~ 10V. Since the types and output ranges of water level sensors vary, the output range of a sensor should be identical with that of A/D input module’s input range.
  • Page 589 Chapter 7 PID Function (Built-in Function) • PWM output: disabled In the example, auto-tuning using PWM is not executed. Therefore, PWM output is set as disabled. • SV: 1000 (2.5V) It shows an example in which XBF-AD04A is set as the voltage input of 0~10V.
  • Page 590 Chapter 7 PID Function (Built-in Function) b. By selecting A/D module for a slot in A/D input module, it opens the setting window as illustrated in Figure 7.29. <Figure 7.29 Module Selection > c. Check A/D Module operation parameter and clock OK. The example is set as follows. •...
  • Page 591 Chapter 7 PID Function (Built-in Function) 3. D/A Output Module Parameter setting a. Set parameter of D/A output module (XBF-DV04A) that outputs MV to a drive. How to set them is as same as A/D input module. In the example, it is set as follows. •...
  • Page 592 Chapter 7 PID Function (Built-in Function) 4. Example of PID Auto-tuning program. The example of PID auto-tuning program is illustrated as Figure 7.30. <Figure 7.30 Auto-tuning example program> a. Devices used Device Data type Application F0099 It is always on, so it readily operates once PLC is RUN. U01.01.0 It starts operation of CH0 of Slot 1 A/D input module.
  • Page 593 D/A output module. c. Monitoring and changing PID control variables using K area In XGB series built-in auto-tuning, it can monitor and change RUN status of auto-tuning by using K area allocated as fixed area by loops. i. Variable registration Select “Register in Variable/Description”...
  • Page 594 Chapter 7 PID Function (Built-in Function) <Figure 7.32 Auto-tuning variables registered> XBC H-Type Main Unit 7-51 Ver. 1...
  • Page 595 Chapter 7 PID Function (Built-in Function) 5. Observing RUN status by using trend monitor function It is possible to monitor the operation status of XGB series built-in auto-tuning graphically. a. Select: Monitor – Trend monitor menu, to shows the trend monitor window as illustrated in Figure 7.33.
  • Page 596 Chapter 7 PID Function (Built-in Function) 7.5.3 Stand-along operation after PID Auto-Tuning Here, with example, it explains how to execute PID control followed by PID auto-tuning. 1. PID auto-tuning parameter setting a. PID auto-tuning parameters are set as same as examples of 7.4.2 “Example of PID Auto-tuning”.
  • Page 597 Chapter 7 PID Function (Built-in Function) iii. PWM Output: disabled In the example, auto-tuning using PWM is not executed. Therefore, PWM output is set as disabled. iv. SV: 1000(2.5V) It shows an example in which XBF-AD04A is set as the voltage input of 0~10V v.
  • Page 598 Chapter 7 PID Function (Built-in Function) c. Example of PID control program after PID auto-tuning. The program example for PID auto-tuning is illustrated as Figure 7.36. <Figure 7.36 Example program of PID control after auto-tuning> i. Devices used Device Data type Application F0099 It is always on, so it readily operates once PLC is RUN.
  • Page 599 Chapter 7 PID Function (Built-in Function) ii. Program explanation Since F0099 (always on) is ON if PLC is converted from STOP to RUN, CH0 of A/D and D/A starts operating. II. Once M0000 bit is on, the auto-tuning of loop 0 starts. PV entered to CH0 is moved to K1875, the PV input device of loop 0, and saved accordingly.
  • Page 600 Chapter 7 PID Function (Built-in Function) 7.6 Error/Warning Codes The error and warning codes that may occur during use of the XGB built-in PID function are summarized in the Table 7.37. 7.6.1 Error codes Error Indications Measures codes It occurs when max. MV is set lower than min. MV. Make H’0001...
  • Page 601 Chapter 7 PID Function (Built-in Function) 7.6.2 Warning codes Error Indications Measures codes H’0001 PV_MIN_MAX_ALM It occurs when the set PV is beyond the min./max. PV. It occurs when PID operation cycle is too short. It is H’0002 PID_SCANTIME_ALM desirable to set PID operation cycle longer than PLC scan time.
  • Page 602 Chapter 8 Built-in High-speed Counter Function Chapter 8 Built-in High-speed Counter Function XGB series have built-in High-speed counter functionality in main unit. This chapter describes the specifications and usage of High-speed counter’s function. 8.1 High-speed Counter Specifications It describes specifications, functions, settings, programming, and wiring with external device of built-in main unit.
  • Page 603 Chapter 8 Built-in High-speed Counter Function Description Classification “SU” type 2 point/channel (for each channel) Output points Use output contact point of main unit External Selects single-compared (>, >=, =, =<, <) or section-compared output output Type (included or excluded) (program setting) Output type Relay, Transistor Output Count Enable...
  • Page 604 Chapter 8 Built-in High-speed Counter Function 8.1.2 Designation of parts 1. Designation of parts a. “H” type Names Usage Terminal 1-phase 2-phase 1-phase 2-phase Counter input terminal Ch0 counter input Ch0 A-phase input A-phase input Counter input terminal Ch1 counter input Ch0 B-phase input B-phase input Counter input terminal...
  • Page 605 Chapter 8 Built-in High-speed Counter Function 2. Interface with external devices “H” type Signal On/Off Terminal Internal circuit guaranteed 1-phase 2-phase voltage Ch 0 Ch 0 20.4~28.8V Pulse A-phase 4.7 kΩ 6V or less input input Ch 1 Ch 0 20.4~28.8V 4.7 kΩ...
  • Page 606 Chapter 8 Built-in High-speed Counter Function 8.1.3 “H” type Functions 1. Counter mode a. High Speed counter module can count High Speed pulses which cannot be processed by CPU module’s counter instructions (CTU, CTD, CTUD, etc.), up to binary value of 32 bits (-2,147,483,648 ~ 2,147,483,647).
  • Page 607 Chapter 8 Built-in High-speed Counter Function II. Increasing/decreasing count operation from B-phase input signal a. 1-phase 2-input 1-multiplication operation mode b. A-phase input pulse counts at rising and increasing/decreasing will be selected by B-phase. A-phase input pulse A-phase input pulse Increasing/Decreasing classification rising falling...
  • Page 608 Chapter 8 Built-in High-speed Counter Function iii. CW(Clockwise)/CCW(Counter Clockwise) operation mode A-phase input pulse counts at rising, or B-phase input pulse counts at rising. Increasing operation executed when B-phase input pulse is Low with A-phase input pulse at rising, and Decreasing operation executed when A-phase input pulse is Low with B-phase input pulse at rising.
  • Page 609 Chapter 8 Built-in High-speed Counter Function Counter mode is saved at the following special K area. Area per each channel (word) Mode Ref. Ch.0 Ch.1 Ch.2 Ch.3 Ch.4 Ch.5 Ch.6 Ch.7 Counter 0 : linear K300 K330 K360 K390 K2220 K2250 K2280 K2310...
  • Page 610 Chapter 8 Built-in High-speed Counter Function b. Ring count Set Ring Counter Minimum Value and Maximum value. Preset value and compared set value should be in range of ring counter minimum value and maximum value. Ring counter maximum and minimum value is saved at the following special K area. Area per each channel (Double word) type Ref.
  • Page 611 Chapter 8 Built-in High-speed Counter Function i. During increasing count Even if count value exceeds user-defined maximum value during increasing count, Carry only occurs and count does not stop differently to Linear Count. Ring count max. value Input pulse : not included Count start : included Ring count min.
  • Page 612 Chapter 8 Built-in High-speed Counter Function iii. Operation when setting Ring Count based on present count value (during increasing count) If present count value exceeds user-defined range when setting Ring Count a. Error (code no. 27) occurs and it operates linear counter. II.
  • Page 613 Chapter 8 Built-in High-speed Counter Function iv. Operation when setting Ring Count based on present count value (during decreasing count) If present count value exceeds user-defined range when setting Ring Count a. Error (code no. 27) occurs and it operates linear counter. II.
  • Page 614 Chapter 8 Built-in High-speed Counter Function 3. Compared output a. High Speed counter module has a compared output function used to compare present count value with set value in size to output. b. Available compared outputs are 2 for 1 channel, which can be used separately. c.
  • Page 615 Chapter 8 Built-in High-speed Counter Function iii. In order to output the compared output signal, compared output enable flag must be set to ‘1’ after compared output condition is set. Area per channel Classification Operation Ch. 0 Ch. 1 Ch. 2 Ch.
  • Page 616 Chapter 8 Built-in High-speed Counter Function e. Detail of comparator output i. Mode 0 (Present value < Compared value) If counted present value is less than the minimum value of compared output 0, output is sent. If present value increases to be equal to or greater than the minimum value of compared output 0, output is not sent.
  • Page 617 Chapter 8 Built-in High-speed Counter Function Mode 2 (Count value = Compared value) II. If present count value is equal to compared value, output is sent. In order to turn the output Off, Compared output Enable and Compared output signal is to be On. Count 123456 123457...
  • Page 618 Chapter 8 Built-in High-speed Counter Function iii. Mode 4 (Count value > Compared value) IV. If present count value is greater than compared value, output is sent, and if count value decreases to be less than or equal to compared value, output is not sent.
  • Page 619 External output (in case of Enabled) Remark U Type XGB PLC checks present count value every 250㎲ and executes the compared output function. Therefore, it can take a maximum of 250㎲ delay to detect compared condition. 4. Carry signal a. Carry signal occurs i.
  • Page 620 Chapter 8 Built-in High-speed Counter Function 5. Borrow signal a. Borrow signal occurs i. When count range minimum value of -2,147,483,648 is reached during Linear Count. ii. When user-defined minimum value of Ring Count changed to the maximum value during Ring Count. b.
  • Page 621 Chapter 8 Built-in High-speed Counter Function Setting value is saved at the following special K are and user can designate it directly. Device per each channel (Word) Setting Class Ch.0 Ch.1 Ch.2 Ch.3 Ch.4 Ch.5 Ch.6 Ch.7 range Unit time K322 K352 K382...
  • Page 622 Chapter 8 Built-in High-speed Counter Function e. For example the number of pulses per 1 revolution is set to ‘10’ and time is set to 1000ms is as shown below. (Ch0) Command 1000 Revolution per time (K264) 1000㎳ 1000㎳ 1000㎳ 1000㎳...
  • Page 623 Chapter 8 Built-in High-speed Counter Function g. The example that number of pulse per 1 revolution set to ‘10’ and time is set to 60,000 ms is as shown below. Command 1000 Revolution per time 60000㎳ 60000㎳ 60000㎳ 60000㎳ 7. Count Latch a.
  • Page 624 Chapter 8 Built-in High-speed Counter Function 8. Preset function It changes the current value into preset value. There are two types of preset function, internal preset and external preset. External preset is fixed as input contact point (P0008 ~ P000F). a.
  • Page 625 Chapter 8 Built-in High-speed Counter Function 9. Frequency Measurement function This function measures and displays the frequency during each measurement cycle while the Frequency Measurement Enable flag is ‘On’. a. Setting: Setup Frequency Measure mode in the Special Module Parameter window. b.
  • Page 626 Chapter 8 Built-in High-speed Counter Function e. Frequency Input Mode is specified below. Update cycle and resolution is fixed within each mode. Frequency mode setting Unit[Hz] Updated cycle[ms] 1000 1000 If the frequency unit is set to 1Hz, the operation of the function is shown below Current count Count starting point Input frequency...
  • Page 627 Chapter 8 Built-in High-speed Counter Function 8.2 Internal High-speed Counter Memory 8.2.1 Special area for High-speed counter Parameter and operation command area of built-in high-speed counter use a special K device. If values set in parameter are changed, it uses the changed values. Makes sure to use WRT command to save the changed value to flash.
  • Page 628 Chapter 8 Built-in High-speed Counter Function 2. “H” type a. Parameter setting Description Device area per channel Remark Parameter Value Setting Ch 0 Ch 1 Ch 2 Ch 3 h0000 Linear count Counter K300 K330 K360 K390 Word mode h0001 Ring count 1 phase 1 input 1 multiplication h0000...
  • Page 629 Chapter 8 Built-in High-speed Counter Function Description Device area per channel Remark Parameter Value Setting Ch 0 Ch 1 Ch 2 Ch 3 HFFFF No use h0000 P0020 h0001 P0021 h0002 P0022 h0003 P0023 h0004 P0024 h0005 P0025 h0006 P0026 Comp.
  • Page 630 Chapter 8 Built-in High-speed Counter Function b. Operation command Device area per channel Parameter Ch 0 Ch 1 Ch 2 Ch 3 Counter enabling K2600 K2700 K2800 K2900 Internal preset K2601 K2701 K2801 K2901 designation of counter External preset enabling K2602 K2702 K2802...
  • Page 631 Chapter 8 Built-in High-speed Counter Function 8.2.2 Error code 1. Errors are saved in the following areas. Device area per channel Category Remark Error code K266 K276 K286 K296 Word 2. Error codes and descriptions Error code Description Remark (Decimal) Counter type is set out of range Pulse input type is set out of range Requesting #1(3,5,7)channel Run during the 2-phase operation of #0(2,4,6)
  • Page 632 Chapter 8 Built-in High-speed Counter Function 8.3 Examples: Using High-speed Counter 8.3.1Special K Area for High-speed Counter 1. Setting high-speed counter parameter How to set types of parameters to operate a high-speed counter is described as follows. a. Set 『Internal Parameters』 in the basic project window. b.
  • Page 633 Chapter 8 Built-in High-speed Counter Function c. Turn ‘ON’ the high-speed counter Enable signal (CH0:K2600) in the program. d. To use additional functions of the high-speed counter, you need to turn on the flag allowing an operation command. i. * Refer to 2) Operation Command, <8.3.1 Special K Area for High-speed Counter>...
  • Page 634 Chapter 8 Built-in High-speed Counter Function 2. Monitoring and setting command a. Start a monitor and click Special Module Monitoring. b. The following window will open. XBC H-Type Main Unit 8-33 Ver. 1...
  • Page 635 Chapter 8 Built-in High-speed Counter Function c. Clicking 『Monitor』 shows monitor and test window of high-speed counter. Item Description FLAG Monitor Show flag monitoring and command window of high-speed counter Start Monitoring Start monitoring each item (special K device area monitor). Write each item setting to PLC.
  • Page 636 Chapter 8 Built-in High-speed Counter Function d. Clicking 『Start Monitoring』shows the high-speed counter monitor display, in which you may set each parameter. Changed values are not saved if power is cycled or mode is changed. e. Clicking『FLAG Monitor』 shows the monitor of each flag in high-speed counter, in which you may direct operation commands by flags (clicking commands reverse turn).
  • Page 637 9.1 Classification and Type of Product Name 9.1.1 Classification and type of expansion module Name of expansion module is classified as follows. No. of IO point XGB series I/O expansion module Relay output (RY) Transistor output (TN/TP) Digital input (DC)
  • Page 638 Chapter 9 Discrete Expansion Modules 9.1.2 Classification and type of special module Special module is classified as follows Non-insulation type (A) Insulation type (S) XGB series High resolution (C) Expansion special module No. of Channels Analog input (AD) Analog voltage output (DC)
  • Page 639 Chapter 9 Discrete Expansion Modules 9.1.3 Classification and type of communication module Name of communication module is classified as follows. C21A Cnet 1 channel (RS-232C): C21A XGB series Cnet 1 channel (RS-422/485): C41A FEnet 1 port: EMTA Expansion communication RAPIEnet 2 port: EIMT/F/H...
  • Page 640 Chapter 9 Discrete Expansion Modules 9.1.4 Classification and type of option module Name of option module is classified as follows. No. of IO point XGB PLC Memory capacity DC input (DC) Option module TR output (TN) Analog input (AD) Analog output (DA)
  • Page 641 Chapter 9 Discrete Expansion Modules 9.2 Digital Input Module Specification 9.2.1 General I/O Specifications PCB Terminal Block General Specifications Cable and Terminals 30 - 16 AWG (0.05 - 1.5 mm ); Cu wire; PCB Terminal block Torque 1.8 in/lb (0.2 N/m) 9.2.2 XBE-DC08A, 8 point DC24V input module (Source/Sink type) Input Specifications Input point...
  • Page 642 Chapter 9 Discrete Expansion Modules 9.2.3 XBE-DC16A/B, 16 point DC24V input module (Sink/Source type) Input Specifications XBE-DC16A XBE-DC16B Input point 16 point, 1 COM Insulation method Photo-coupler isolation Rated input voltage DC24V DC12/24V Rated input current Operation voltage range DC20.4-28.8V (within ripple rate 5%) DC9.5~30V (ripple rate <...
  • Page 643 Chapter 9 Discrete Expansion Modules 9.2.4 XBE-DC32A, 32 point DC24V input module (Source/Sink type) Input Specifications Input point 32 point, 1 COM Insulation method Photo-coupler isolation Rated input voltage DC24V Rated input current Operation voltage range DC20.4-28.8V (within ripple rate 5%) On voltage / On current DC19V or higher / 3mA or higher Off voltage / Off current...
  • Page 644 Chapter 9 Discrete Expansion Modules 9.3 Digital Output Module Specification 9.3.1 XBE-RY08A, 8 point relay output module Output Specifications Output point 8 point Insulation method Relay isolation Rated load voltage/current DC24V 2A (resistive load) / AC220V 2A (COSΦ = 1), 5A/COM, 1 COM (Isolated) Min.
  • Page 645 Chapter 9 Discrete Expansion Modules 9.3.2 XBE-RY08B, 8 point relay output module Output Specifications Output point 8 point Insulation method Relay isolation Rated load voltage/current DC24V 2A (resistive load) / AC220V 2A (COSΦ = 1), 2A/COM, 8 COM (Isolated) Min. load voltage/current DC5V / 1mA Max.
  • Page 646 Chapter 9 Discrete Expansion Modules 9.3.3 XBE-RY16A, 16 point relay output module Output Specifications Output point 16 point Insulation method Relay isolation Rated load voltage/current DC24V 2A (resistive load) / AC220V 2A (COSΦ = 1), 5A/COM, 2 COM (Isolated) Min. load voltage/current DC5V / 1mA Max.
  • Page 647 Chapter 9 Discrete Expansion Modules 9.3.4 XBE-TN08A, 8 point transistor output module (Sink type) Output Specifications Output point 8 point Insulation method Photo-coupler isolation Rated load DC12-24V; 0.5A per point, 2A per COM, 1 COM voltage/current Load Voltage Range DC10.2 – 26.4V Off leakage current 0.1mA or less Max.
  • Page 648 Chapter 9 Discrete Expansion Modules 9.3.5 XBE-TP08A, 8 point transistor output module (Source type) Output Specifications Output point 8 point Insulation method Photo-coupler isolation Rated load DC12-24V; 0.5A per point, 2A per COM, 1 COM voltage/current Load Voltage Range DC10.2 – 26.4V Off leakage current 0.1mA or less Max.
  • Page 649 Chapter 9 Discrete Expansion Modules 9.3.6 XBE-TN16A, 16 point transistor output module (Sink type) Output Specifications Output point 16 point Insulation method Photo-coupler isolation Rated load DC12-24V; 0.2A per point, 2A per COM, 1 COM voltage/current Load Voltage Range DC10.2 – 26.4V Off leakage current 0.1mA or less Max.
  • Page 650 Chapter 9 Discrete Expansion Modules 9.3.7 XBE-TP16A, 16 point transistor output module (Source type) Output Specifications Output point 16 point Insulation method Photo-coupler isolation Rated load DC12-24V; 0.2A per point, 2A per COM, 1 COM voltage/current Load Voltage Range DC10.2 – 26.4V Off leakage current 0.1mA or less Max.
  • Page 651 Chapter 9 Discrete Expansion Modules 9.3.8 XBE-TN32A, 32 point transistor output module (Sink type) Output Specifications Output point 32 point Insulation method Photo-coupler isolation Rated load DC12-24V; 0.2A per point, 2A per COM, 1 COM voltage/current Load Voltage Range DC10.2 – 26.4V Off leakage current 0.1mA or less Max.
  • Page 652 Chapter 9 Discrete Expansion Modules 9.3.9 XBE-TP32A, 32 point transistor output module (Source type) Output Specifications Output point 32 point Insulation method Photo-coupler isolation Rated load DC12-24V; 0.2A per point, 2A per COM, 1 COM voltage/current Load Voltage Range DC10.2 – 26.4V Off leakage current 0.1mA or less Max.
  • Page 653 Chapter 9 Discrete Expansion Modules 9.4 Combined Digital I/O module Input Specification 9.4.1 XBE-DR16A, 8 point DC24V input (Source/Sink type) Input Specifications Input point 8 point, 1 COM Insulation method Photo-coupler isolation Rated input voltage DC24V Rated input current Operation voltage range DC20.4-28.8V (within ripple rate 5%) On voltage / On current DC19V or higher / 3mA or higher...
  • Page 654 Chapter 9 Discrete Expansion Modules 9.4.2 XBE-DN32A, 16 point DC24V input (Source/Sink type) Input Specifications Input point 16 point, 1 COM Insulation method Photo-coupler isolation Rated input voltage DC24V Rated input current Operation voltage range DC20.4-28.8V (within ripple rate 5%) On voltage / On current DC19V or higher / 3mA or higher Off voltage / Off current...
  • Page 655 Chapter 9 Discrete Expansion Modules XBC H-Type Main Unit 9-19 Ver. 1...
  • Page 656 Chapter 10 Built-in Positioning Chapter 10 Built-in Positioning 10.1 Purpose and Features 10.1.1 Basis of Positioning Positioning allows for the precise control over servo or stepper motors Applications include: machining tools, grinders, lifters, etc. 10.1.2 Features 1. Maximum of two axis, 100kpps positioning 2.
  • Page 657 Chapter 10 Built-in Positioning 10.2 Performance Specifications XGB Basic Unit (Transistor output ) Type Item Standard type (“H” type) No. of control axis 2 axes Interpolation 2 axes linear interpolation Pulse output method Open collector (DC 24V) Pulse output type...
  • Page 658 Chapter 10 Built-in Positioning 10.3 Positioning Operation Sequence XBM-DN**S: V1.2 or above XBC-DN**H: V2.2 or above XEC-DN**H: V3.0 or above XBC H-Type Main Unit 10-3 Ver. 1...
  • Page 659 Chapter 10 Built-in Positioning 10.3.1 Signal Flow Position 10.4 I/O Signal Allocation 10.4.1 Allocation of Input Signal 1. Allocation of external input signal Input contact point no. Signal name Operation content Reference Axis XBM-DN32H Detected at the falling edge of input X axis P0008 External lower...
  • Page 660 Chapter 10 Built-in Positioning 2. Wiring example of external input signal 10.4.2 Allocation of Output Signal 1. Allocation of Output Signal Operation content Input contact point no. Signal name Reference Pulse + Direction mode Axis XBM-DN32H Positioning X axis pulse string (Open X axis P00020 collector output)
  • Page 661 Chapter 10 Built-in Positioning 10.5 I/O Specifications 10.5.1 Input/Output Specifications Contact X axis P0008 P0009 P000C P000D point Y axis P000A P000B P000E P000F External External upper Signal name HOME lower limit limit Rated input DC24V (DC20.4~28.8V (-15/20%, ripple rate 5% or less)) voltage Rated input About 4㎃/24V...
  • Page 662 Chapter 10 Built-in Positioning 10.5.2 Positioning I/O Diagram XBM-DN32H Positioning Input/Output XBC H-Type Main Unit 10-7 Ver. 1...
  • Page 663 Chapter 10 Built-in Positioning 10.5.3 Output Pulse Level Output pulse consists of Pulse + Direction as shown in the table below. Low Active and High Active output levels can be specified using positioning parameters and K area flags dedicated for positioning: 1.
  • Page 664 Chapter 10 Built-in Positioning 10.7 Before Positioning 10.6.1 Position Control Methods Position control is moving the designated axis from the start address (present position) to the target address (movement). 1. Control by Absolute Coordinates a. Object moves from start address to target address. Position control is performed based on the address designated in Home Return (home address).
  • Page 665 Chapter 10 Built-in Positioning 2. Control by Incremental Coordinates a. Object moves from current position to as far as the address set in operation data. Target address is based on start address. b. Direction is determined by sign (+/-) i. If address is a positive number: forward positioning ii.
  • Page 666 Chapter 10 Built-in Positioning 4. Example: a. The example assumes operation data is as below: Step Address Speed Coord. Pattern Control Method Dwell [㎳] step [Pulse] Code [pls/s] Single b. Since Control is “SPD”, step number 1 will process the operation data of speed control. c.
  • Page 667 Chapter 10 Built-in Positioning 10.6.3 Speed/Position Switching Control 1. Changes Speed Control to Position Control by switching command (VTP instruction). 2. For speed/position switching, items affecting the operation are different according to control method. These items don’t affect the operation in speed control These items don’t affect the operation when changed into position control a.
  • Page 668 Chapter 10 Built-in Positioning b. If Step 1 starts, object moves forward using speed control because Control is set to “SPD” and the Address is a positive number. c. If speed/position switching command (VTP instruction) is executed during speed control, current position will be initialized as 0 and object moves by position control until 1000.
  • Page 669 Reverse Positioning: Start Address > Target Address c. Setting Operation Data: i. Determine the Main Axis Main Axis must be determined first when using linear interpolation. For XGB built-in positioning, this will be the axis with the largest amount of movement. XBC H-Type Main Unit 10-14 Ver.
  • Page 670 Chapter 10 Built-in Positioning ii. Determine Control Method Control methods of both axes should be specified as “position”, otherwise an error will occur and operation will not be executed. iii. Set Operation Pattern For main axis, operation pattern should be specified as END or KEEP. If it is specified as CONT, it will operate as KEEP.
  • Page 671 Chapter 10 Built-in Positioning iii. Since the X axis is the main axis, Operation pattern, speed, A/D number, and dwell time of Y axis will be ignored. 2. Incremental Coordinates a. When linear interpolation control is executed, the object moves based on current position.
  • Page 672 Chapter 10 Built-in Positioning ii. When linear interpolation is executed, the main axis is determined by the amount of movement in the X and Y axes. In this example, the X axis has more movement and therefore is the main axis. iii.
  • Page 673 Chapter 10 Built-in Positioning 10.6.7 Sync Control 1. Positing Sync Control a. Starting the operation step of subsidiary when position of the main axis is the same as position set in sync control (SSP instruction). Sync position Start Position sync Start main axis b.
  • Page 674 Chapter 10 Built-in Positioning 2. Speed Sync Control a. If main axis starts as in the figure below, the subsidiary axis will move with the speed of sync speed rate set in speed sync command (SSS instruction). Start sync control Start main axis b.
  • Page 675 Chapter 10 Built-in Positioning 10.6.8 Home Return Home return is used to find mechanical origin when starting the machine. Type Items Description Home Method Setting home method Home Direction Start direction when homing Home Address Origin address when detecting origin Home Home High/Low speed High/Low speed when homing...
  • Page 676 Chapter 10 Built-in Positioning 2. Origin Detection after DOG Off a. If home return command (ORG instruction) is executed, it moves toward a preset home return direction and with home high speed. b. During operating with Home Return High speed, if rising edge of DOG signal occurs, it operates with Home Return Low speed and monitors if there is falling edge of DOG signal.
  • Page 677 When stepping motor is used, this may cause out of operation. • If ‘On’ time of origin input signal is very short, XGB may not recognize the input signal. So ‘On’ time of origin should be larger than 0.2ms.
  • Page 678 Chapter 10 Built-in Positioning 3. Origin Detection after Deceleration and with DOG On a. If homing command (ORG instruction) is executed, it will move toward a set home direction at home high speed. b. If DOG signal is entered, it decelerates, and operates at home return low speed. c.
  • Page 679 Chapter 10 Built-in Positioning 4. Origin Detection by DOG a. If homing command (ORG instruction) is executed, it will move toward the home direction set in Home Parameter at high speed. (The above figure is when homing direction is forward) b.
  • Page 680 Chapter 10 Built-in Positioning 10.6.9 Position and Speed Override 1. Position Override a. Changing the target position during positioning operation by using position override command (POR instruction) b. Caution: If passing a position that will trigger a change during operation, movement decelerates, stops, and keeps the subsequent operation pattern.
  • Page 681 Chapter 10 Built-in Positioning 2. Speed Override a. Changing the operation speed during positioning operation by using speed override command (SOR instruction) b. Speed override command is available during acceleration and constant speed operation section. c. Executing speed override instruction in deceleration section or dwell section may cause Error 377 but the operation will continue.
  • Page 682 Chapter 10 Built-in Positioning 3. Speed Override with Position a. Changes the operation speed and continues operation once it reaches the set position by using the Speed Override with Position function. (PSO instruction) b. Positioning speed override instruction is available only in acceleration and regular speed sections.
  • Page 683 *4: Soft upper/lower limits by parameters are unavailable in speed control operation mode. *5: Sequence program refers to XGB program method. *6: Error 495 may occur depending on a rotation direction. XBC H-Type Main Unit 10-28 Ver.
  • Page 684 Chapter 10 Built-in Positioning 2. Stop Process and Priority a. Stop Process i. If stop process is initiated, positioning completion signal is not generated and M- code is not activated ii. After stopping, if indirect start instruction is executed (step number = current step number), then absolute positioning method will operate for the remaining distance of the current step.
  • Page 685 Chapter 10 Built-in Positioning e. Emergency Stop i. Immediately stops while performing start-related instructions (indirect start, direct start, simultaneous start, synchronic start, linear interpolation start, Home Return start, jog start and inching start) ii. Generates Error 481 iii. Since it is subject to no output and un-defined origin once emergency stop is executed, it may run positioning operation after executing origin determination (Home Return, floating origin, and the current position preset) if it is operated with absolute coordinate or undetermined origin.
  • Page 686 Chapter 10 Built-in Positioning 10.6.12 Stroke Upper/Lower Limits 1. External Input Stroke Upper/Lower Limits a. Used to immediately stop a positioning module before reaching stroke limit. When exceeding upper limit, error 492 is generated. When exceeding lower limit, error 493 is generated.
  • Page 687 Chapter 10 Built-in Positioning 10.6.13 Output of Positioning Completion Signal 1. Completion signal (X-axis: K4202, Y-axis: K4302) is turned on after positioning completion and turns off after 1 scan time after positioning is completed. 2. If operation pattern is KEEP or CONT, positioning completion signal is yielded when operation pattern stops completely.
  • Page 688 Chapter 10 Built-in Positioning 5. Sequential Operation Mode 10.7 Positioning Parameters 10.7.1 Positioning Parameter Setting Sequence Positioning parameters can be set in XG5000 V1.2 or higher. 1. Select [Parameter] -> [Embedded Parameter] -> [Positioning] and double-click to open positioning parameter setting window. XBC H-Type Main Unit 10-33 Ver.
  • Page 689 Chapter 10 Built-in Positioning 2. Setting Parameters a. Each item can be set independently. b. For detail setting of basic parameters, refer to 10.7.4. c. For detail setting of Home parameters, refer to 10.7.5. Type Item Description Positioning Set whether to use positioning function. Pulse output level Set pulse output mode (Low/High Active).
  • Page 690 Chapter 10 Built-in Positioning 3. Operation Data Setting a. If the user select ‘X Axis Data’ or ‘Y Axis Data’ tab on the positioning parameter setting window, the user can set operation data of up to 30 steps as shown below. Item Description Initial value...
  • Page 691 Chapter 10 Built-in Positioning 4. Writing to PLC a. After setting of positioning parameter and operation data per each axis, download them to PLC b. Select [Online] -> [Write], ‘Write’ dialog box is displayed. c. To download parameter, select ‘Parameter’ and click ‘OK’. Remark •...
  • Page 692 Changing PLC operation mode c. Restarting PLC by reset command 3. XGB built-in positioning is executed by using data of K area. Flags that indicate the current operation status and monitoring data are displayed in the K area. The user can change operation data easily by changing the K area data 4.
  • Page 693 Chapter 10 Built-in Positioning 10.7.3 Setting Basic Positioning Parameters K area for positioning X-axis Y-axis Data Item Range Initial value size XBM/XBC XBM/XBC Positioning 0: Disable, 1 : Enable K4870 K5270 0 : Low Active, Pulse output level 1 ∼ 100,000[pulse/ sec] K4871 K5271 1 : High Active...
  • Page 694 Chapter 10 Built-in Positioning 1. Positioning a. Setting to enable or disable positioning b. If instruction related to positioning is used when positioning is disabled, error code 105 will be generated. 2. Pulse Output Level XBC H-Type Main Unit 10-39 Ver.
  • Page 695 0, the initial speed is set during early operation to facilitate motor’s rotation and is used to save positioning time. The speed set in the case is called ‘bias speed’. b. For XGB built-in positioning, setting range of bias speed is 0 ~ 100,000 (unit:pps). c. Bias speed may be used for i.
  • Page 696 Chapter 10 Built-in Positioning 4. Speed Limit b. Range is between 1 ∼ 1,000,000 pps. a. The allowable max speed of positioning operation. c. During position operation, operation speed, home return speed, and jog operation speed are affected by speed limit. If they are set higher than speed limit, it generates an error.
  • Page 697 Chapter 10 Built-in Positioning 6. S/W Upper/Lower Limit a. A range of a machine’s movement is called ‘stroke limit’. It sets the upper/lower limits of stroke into software upper limit and software lower limit and does not execute positioning if it operates out of ranges set. b.
  • Page 698 Chapter 10 Built-in Positioning e. Backlash compensation outputs backlash compensation amount first and then, address of positioning operation, inching operation and jog operation move to the target positions. The above figure describes difference between backlash setting or no backlash setting. g.
  • Page 699 Chapter 10 Built-in Positioning h. The following table indicates real pulse output and stop position in case of setting backlash. (Absolute coordinates are used.) Operation Backlash setting Target Direction Real output Stop step amount address conversion pulse positio 10,000 10,000 10,000 30,000 20,000...
  • Page 700 Chapter 10 Built-in Positioning 9. Upper/Lower Limits a. To use upper/lower limits during operation, it should be set as “Enable”. b. Upper/Lower limit input contact point is fixed as the table below and it can be used as normally closed contact point (B contact point). c.
  • Page 701 Detects the origin by using DOG signal. d. For more detail of home return method, refer to 10.6.7. 2. Home Return Direction Setting Home Return Pulse output operation of XGB positioning module value direction Forward (CW) Executing forward home return.
  • Page 702 Chapter 10 Built-in Positioning 3. Origin Address a. Used to change the current address to a value set in home return address when home b. Range: -2,147,483,648 ∼ 2,147,483,647 pulses return is completed by home return instruction. 4. Home Return High Speed a.
  • Page 703 Chapter 10 Built-in Positioning 9. JOG Low Speed a. Jog low speed operation is operated with patterns of accelerating, regular speed, and b. The range of jog low speed is between 1 ∼ 100,000 pps decelerating sections. Remark • When setting JOG high speed, it should be “Speed limit ≥ JOG high speed ≥ Bias speed”. •...
  • Page 704 Chapter 10 Built-in Positioning 1. Step Number a. Range of positioning data serial number is between 1 ~ 30. b. When executing indirect start, simultaneous start, linear interpolation operation, position synchronization and etc., if you designate the step number of data to operate, it will operate according to positioning dedicated K area where operation data is saved.
  • Page 705 Chapter 10 Built-in Positioning d. END (Single) i. Execute the positioning to target address by using the data of operation step and complete the positioning after dwell time. ii. Generally, with END operation, position operation is executed according to pre- arranged speed and position like above picture as a ladder shape with accelerated, constant, and decelerated intervals.
  • Page 706 Chapter 10 Built-in Positioning iv. If operation speed is same as bias speed, target moves with regular speed (bias speed) and it stops without deceleration section. v. It assumes that operation data is as follows to describe END/Single operation. Step Repeat Address Speed...
  • Page 707 Chapter 10 Built-in Positioning iv. By first start command, target moves to 10,000 pulses at 1,000pps speed and stops. Since Method is Single, the next operation step becomes the no.2 step, current operation step +1. v. By second start command, target moves to 20,000 pulses at 500pps and stops. Method is Repeat, the next operation step becomes no.1 step set in Repeat Step, not no.3 step.
  • Page 708 Chapter 10 Built-in Positioning iv. The continued operation can be explained with the operation data in the following table. Target Dwell Step Operation Operation Repeating Acc./Dec. Speed Coord. Control position time pattern mode step code [pls/s] [Pulse] [㎳] Keep Position Single 10,000 1,000...
  • Page 709 Chapter 10 Built-in Positioning g. Incessant Operation i. Incessant operation refers to the operation that continues the steps set as continued operation by the operation instruction. ii. The continued operation can be explained with the operation data in the following table. Target Dwell Step...
  • Page 710 Chapter 10 Built-in Positioning 5. Target Position b. The setting range is -2,147,483,648 ∼ 2,147,483,647 pulses. a. Sets the movement of the operation of the step. c. The target position set in operation data setting can be freely changed in the program by changing the value of area K for positioning.
  • Page 711 Chapter 10 Built-in Positioning g. For example, the output timing of M code signals in case of After Mode can be illustrated as follows. Remark • With M code signal On, if you execute the next operation step number, error code 233 will occur and the operation will not happen.
  • Page 712 The dwell time is the standby time until the stable rest. d. The operation status of the XGB positioning function axis during dwell time maintains “Operation,” and if dwell time passes, the operation status signaling bit (axis X: K4200, axis Y: K4300) turns Off and the positioning completion signal turns On.
  • Page 713 Chapter 10 Built-in Positioning 10.9 Positioning Status Monitoring and K Area The XGB built-in positioning function controls positioning by using area K memory. XGB built-in positioning K area divides into bit, word, and double word flag. 10.9.1 Status Monitoring Flags (Read Only) 1.
  • Page 714 Chapter 10 Built-in Positioning 2. Status Monitoring Data Area Device Area Variables Status Axis X Axis X Address Properties Address Properties Double Double word Shows current position Current position K422 K432 word Double Double word Shows current speed Current speed K424 K434 word...
  • Page 715 Chapter 10 Built-in Positioning a. Starting Signals i. The starting signal conducts positioning operation according to the current operation step number (axis X: K426, axis Y: K436) without setting the step number unlike indirect or direct starting. ii. Since the current operation step area is read only, if you want to change the operation step number, you need to use the starting step number change instruction (SNS).
  • Page 716 (P0008, P0009) is On, it operates, and if Off, it carries out jog stop. iv. If both jog normal direction operation and backward direction operation are On, there is no error code in XGB built-in positioning, but it stops if it is currently in operation. Remark •...
  • Page 717 Chapter 10 Built-in Positioning 2. Data Area for Positioning Settings Device Area Variables Status Axis X Axis Y Address Properties Address Properties Bias speed K0450 Double word K0490 Double word Sets bias speed. Speed limit K0452 Double word K0492 Double word Sets maximum speed limit. Acceleration time 1 K0454 Word...
  • Page 718 Chapter 10 Built-in Positioning 3. Monitor Status and Command Flags by Operation Step Device area Variables Axis X Axis Y Properties Address Address Step 01 target position K0530 K0830 Double word Step 01 operation speed K0534 K0834 Double word Step 01 dwell time K0536 K0836 Word...
  • Page 719 Chapter 10 Built-in Positioning 10.10 Positioning Test Sequence This is used for checking if the XGB positioning system is operating normally by performing a normal and reverse direction jog operation. The sequence is as follows: 1. Power Off a. Be sure to check the PWR LED of XGB before moving to next step.
  • Page 720 Check Normal Direction of Jog i. Turn on the normal direction switch (P0010) of axis X, with jog reverse direction switch Off. ii. Check if the XGB positioning function generates a jog in the normal direction 1. Check Output LED P0020: Flashes Quickly P0022: Stays On 2.
  • Page 721 Chapter 10 Built-in Positioning 10.11 Creating Positioning Operation Check Program 1. Positioning Basic Parameters Items Range Set Values Data Size Positioning 0 : not used, 1 : used Pulse output level 0 : Low Active, 1 : High Active Pulse output mode 0 : CW/CC, 1 : PLS/DIR 1 ∼...
  • Page 722 Chapter 10 Built-in Positioning 3. Program Example XBC H-Type Main Unit 10-67 Ver. 1...
  • Page 723 2. If you use the positioning monitoring package, you can easily carry out test operation without the program, adjust parameter and operation data, and permanently save it in PLC after adjustment. 3. XGB positioning monitoring package is available with over XG5000 V3.4 and it is carried out in the following sequence.
  • Page 724 Chapter 10 Built-in Positioning 3. Positioning Monitor will display as below XBC H-Type Main Unit 10-69 Ver. 1...
  • Page 725 Chapter 10 Built-in Positioning 10.13 Functions of Positioning Monitor 10.13.1 Monitoring and Command The positioning monitoring package consists of the command window for positioning test operation and positioning monitoring window as shown above. If you click on the ‘Start Monitor’ button at the left bottom of the package, the monitoring and command function is activated to make various commands and monitors current status.
  • Page 726 Chapter 10 Built-in Positioning Item Description Command Details Spd override Overrides the speed at the set speed value 6-360 Pos override Overrides the position at the set position value 6-359 Spd override with Changes the operation speed at the speed value set in the set 6-361 position position...
  • Page 727 PLC. • If the PLC operation mode is Run mode, the positioning command is executed in the positioning monitoring package, and if a different command is executed in the instruction of the program, XGB PLC executes them both.
  • Page 728 Chapter 10 Built-in Positioning Related flag Item Displays Remark Axis X Axis Y speed, and dwell) K420F K430F Operation control pattern of each axis (position, speed, K4210~ K4310~ Control pattern interpolation) K4212 K4312 Home return Whether home return is being conducted K4215 K4315 Position Sync...
  • Page 729 If you change the parameter or operation data in the positioning monitor and write them to the PLC, be sure to save the project in the XG5000, otherwise the settings of XG5000 might be different from XGB. 2. Changing the Position Operation Data a.
  • Page 730 If you change the parameter or operation data in the positioning monitor and write them to the PLC, be sure to save the project in the XG5000, otherwise the settings of XG5000 might be different from XGB. XBC H-Type Main Unit 10-75 Ver.
  • Page 731 Chapter 10 Built-in Positioning 10.14 Example Positioning Programs 10.14.1 Floating Origin Settings / Single Operation 1. Ladder Diagram 2. Devices Used Device Description P0040 Axis X error reset, output inhibition cancel switch P0041 Axis X axis X floating origin switch P0047 Start switch of axis X K4200...
  • Page 732 Chapter 10 Built-in Positioning 4. Operation Sequence a. P0041 (floating origin) switch On: set as the floating origin at the current position b. 3 times of P0047 (start) switch On: 3 times of single operation (steps 1~3). If it is operating now, the start instruction is not executed.
  • Page 733 Chapter 10 Built-in Positioning 3. Operation Data Settings Operati Target Acc./D Dwell Axis Step Coord. Control Operation Operation Rep. position time pattern pattern type step code speed [pulse] [㎳] [pls/s] Single 10,000 1000 Single 5,000 1000 4. Operation Sequence a. P0009 (floating origin) switch On: set as the floating origin at the current position. b.
  • Page 734 Chapter 10 Built-in Positioning 2. Devices Used Device Description P0008 Axis X error reset, output inhibition cancel switch P0009 axis X floating origin switch P000A axis X deceleration stop switch P000F axis X start switch K4200 Signal during axis X operation K4201 Error signal of axis X 3.
  • Page 735 Chapter 10 Built-in Positioning 2. Devices Used Device Description P0008 Error reset, output inhibition cancel switch P0009 Floating origin switch P000C Operation step change switch P000F axis X start switch K4200 Signal during axis X operation K4201 Error signal of axis X 3.
  • Page 736 Chapter 10 Built-in Positioning 10.14.5 Operation Step / Speed Control 1. Ladder Diagram 2. Devices Used Device Description P0008 Error reset, output inhibition cancel switch P0009 floating origin switch P000C Operation step changing switch P000F axis X start switch P000A Deceleration stop switch of axis X K4200 Signal during axis X operation...
  • Page 737 Chapter 10 Built-in Positioning 4. Operation Sequence a. P0009 (floating origin) switch On: set as the floating origin at the current position. b. BCD switch input: enters the operation stop to change in P004 (enters 10 in this example). c. P000C (operation step change) switch On: the current operating step changes into 10. d.
  • Page 738 Chapter 10 Built-in Positioning 3. Operation Data Settings Target Operation Dwell Step Control Operation Operation Repeat Acc./Dec. Axis Coord. position speed time pattern pattern type step code [pulse] [pls/s] [㎳] Single 10,000 1000 Single 20,000 2000 4. Operation Sequence a. P0009 (floating origin) switch On: set as the floating origin at the current position. b.
  • Page 739 Chapter 10 Built-in Positioning 3. Operation Data Settings Target Operation Dwell Step Control Operation Operation Repeat Acc./Dec. Axis Coord. position speed time pattern pattern type step code [pulse] [pls/s] [㎳] Single 10,000 1000 Single 20,000 2000 4. Operation Sequence a. P0009 (floating origin) switch On: set as the floating origin at the current position. b.
  • Page 740 Chapter 10 Built-in Positioning 2. Devices Used Device Description P0008 axes X and Y error reset, output inhibition cancel switch P0009 Floating origin switch of axes X and Y P000A axis X deceleration stop switch P000B deceleration stop switch of axis X P000C axis X speed synchronous start switch P000F...
  • Page 741 Chapter 10 Built-in Positioning 2. Devices Used Device Description P0008 Error reset, output inhibition cancel switch in case of emergency stop P0009 axis X home return switch P000B emergency stop switch during home return K4200 Signal during axis X operation 3.
  • Page 742 Chapter 10 Built-in Positioning 2. Devices Used Device Description P0008 Axis X error reset, output inhibition cancel switch P0009 axis X floating origin switch P000D axis X jog normal direction start switch P000E axis X jog reverse direction start switch P000F Switch for low/high speed selection of axis X jog K4200...
  • Page 743 Chapter 10 Built-in Positioning 2. Devices Used Device Description P0008 Axis X error reset, output inhibition cancel switch P0009 axis X floating origin switch P000A axis X indirect start switch P000C axis X speed override switch K4200 Signal during axis X operation K4201 Error signal of axis X K420C...
  • Page 744 Chapter 10 Built-in Positioning 2. Devices Used Device Description P0008 Axis X error reset, output inhibition cancel switch P0009 axis X floating origin switch P000A axis X indirect start switch P000C axis X position override switch K4200 Signal during axis X operation K4201 Error signal of axis X K420D...
  • Page 745 Chapter 10 Built-in Positioning 2. Devices Used Device Description P0008 Axis X error reset, output inhibition cancel switch P0009 axis X floating origin switch P000A axis X indirect start switch P000D axis X positioning speed override switch K4200 Signal during axis X operation K4201 Error signal of axis X K420D...
  • Page 746 Chapter 10 Built-in Positioning 10.14.14 Speed, Position, and Parameter Teaching 1. Ladder Diagram 2. Devices Used Device Description P0008 Axis X error reset, output inhibition cancel switch P0009 axis X home return switch P000A axis X start switch P000E axis X speed teaching switch P000B axis X position teaching switch P000F...
  • Page 747 Chapter 10 Built-in Positioning 3. Operation Data Settings Target Operation Dwell Step Control Operation Operation Repeat Acc./Dec. Coord. position M code speed time pattern pattern type step [pulse] [pls/s] [㎳] Repeat 10,000 1000 4. Positioning Basic Parameter Settings Parameter Set value Speed limit 100,000 Acceleration time 1...
  • Page 748 • Remove the input and output lines, re-supply - Rated voltage/current set for the Flashing power and check again. XGB is not being supplied. - If there still is the same problem, contact tech - Problem with the PLC hardware support.
  • Page 749 Error and actions to take status • Pulse is being normally output by the positioning function. Fast • Check whether there is a problem with the lines of the XGB flashing and motor driver. • Pulse is not being output.
  • Page 750 • Direction signals are being output in the normal Active direction (normal). Remark • If PWR, RUN, and ERR LED are all off, there is a problem with the internal operation system of XGB. In such a case, contact technical support. XBC H-Type Main Unit 10-95 Ver. 1...
  • Page 751 1. Ensure connections between XGB and motor driver are secure and properly connected. 2. Check the motor driver settings to ensure compatibility with XGB. 3. Check if pulses are supplied to the motor driver from XGB. If pulses are being transmitted, check the troubleshooting manual for the motor driver.
  • Page 752 Chapter 10 Built-in Positioning 10.16 Positioning Error Codes Error codes specifically for positioning are listed here. For general PLC error codes, see Chapter 12 Maintenance. Error Resolution Operation Description code Exceeding the max speed range of basic parameter Stop Change the max speed value Exceeding the bias speed of basic parameter 1) bias speed ≥...
  • Page 753 Chapter 10 Built-in Positioning Error Resolution Operation Description code Home return ACC time setting error Stop Re-adjust home return ACC time lower than 10,000 • Home return ACC time > 10,000 Home return DEC time setting error Stop Re-adjust home return Dec time lower than 10,000. •...
  • Page 754 Chapter 10 Built-in Positioning Error Resolution Operation Description code Linear interpolation start is unavailable when main axis of Check if main axis was not in ‘Output disabled’ status at the time Stop linear interpolation is in ‘Output disabled’ status. of linear interpolation command. Linear interpolation start is unavailable when sub axis of Check if a sub axis was not in ‘Output disabled’...
  • Page 755 Chapter 10 Built-in Positioning Error Operation Resolution Description code Position/speed switching command is unavailable while not Check if an axis did not stop at the time of position/speed switching Stop operating. command. Position/speed switching command is unavailable On a sub Check if an axis was operating as a sync operation sub axis at the Stop axis of sync operation.
  • Page 756 Chapter 10 Built-in Positioning Error Operation Resolution Description code Position override command is unavailable for a synchronic Check if an axis was not operating as a sub axis of sync operation at Operate operation sub axis. the time of position override command. Speed override command is unavailable in any other status Stop Check if an axis did not stop at the time of speed override command.
  • Page 757 Chapter 10 Built-in Positioning Error Description Operation Resolution code Remove emergency stop causes and clear the error by executing emergency stop error Stop CLR command. Remove emergency stop causes and clear the error with CLR External emergency stop error Stop command.
  • Page 758 Chapter 10 Built-in Positioning 10.17 Positioning Dedicated K Area 10.17.1 Basic Positioning Parameter K Area K area for positioning Item Setting range Initial value Type Data size X axis Y axis Positioning 0 : Not use, 1 : use XBM/XBC K4870 K5270 0 : Low Active,...
  • Page 759 Chapter 10 Built-in Positioning 10.17.3 Positioning Operation Data K Area Dedicated K area Initial Step Item Setting range Data size value X axis Y axis Coord. 0 : ABS, 1 : INC K5484 K8484 Pattern 0 : END, 1 : KEEP, 2 : CONT K5482~83 K8482~83 Control...
  • Page 760 Chapter 10 Built-in Positioning Dedicated K area Initial Step Item Setting range Data size value X axis Y axis Coord. 0 : ABS, 1 : INC K5584 K8584 Pattern 0 : END, 1 : KEEP, 2 : CONT K5582~83 K8582~83 Control 0 : POS, 1 : SPD K5581...
  • Page 761 Chapter 10 Built-in Positioning Dedicated K area Initial Step Item Setting range Data size value X axis Y axis Coord. 0 : ABS, 1 : INC K5884 K8884 Pattern 0 : END, 1 : KEEP, 2 : CONT K5882~83 K8882~83 Control 0 : POS, 1 : SPD K5881...
  • Page 762 Chapter 10 Built-in Positioning Dedicated K area Initial Step Item Setting range Data size value X axis Y axis Coord. 0 : ABS, 1 : INC K6184 K9184 Pattern 0 : END, 1 : KEEP, 2 : CONT K6182~83 K9182~83 Control 0 : POS, 1 : SPD K6181...
  • Page 763 Chapter 10 Built-in Positioning Dedicated K area Initial Step Item Setting range Data size value X axis Y axis Coord. 0 : ABS, 1 : INC K6484 K9484 Pattern 0 : END, 1 : KEEP, 2 : CONT K6482~83 K9482~83 Control 0 : POS, 1 : SPD K6481...
  • Page 764 Chapter 10 Built-in Positioning Dedicated K area Initial Step Item Setting range Data size value X axis Y axis Coord. 0 : ABS, 1 : INC K6784 K9784 Pattern 0 : END, 1 : KEEP, 2 : CONT K6782~83 K9782~83 Control 0 : POS, 1 : SPD K6781...
  • Page 765 Chapter 10 Built-in Positioning Dedicated K area Initial Step Item Setting range Data size value X axis Y axis Coord. 0 : ABS, 1 : INC K7084 K10084 Pattern 0 : END, 1 : KEEP, 2 : CONT K7082~83 K10082~83 Control 0 : POS, 1 : SPD K7081...
  • Page 766 Chapter 10 Built-in Positioning Dedicated K area Initial Step Item Setting range Data size value X axis Y axis Coord. 0 : ABS, 1 : INC K7384 K10384 Pattern 0 : END, 1 : KEEP, 2 : CONT K7382~83 K10382~83 Control 0 : POS, 1 : SPD K7381...
  • Page 767 Chapter 10 Built-in Positioning Dedicated K area Initial Step Item Setting range Data size value X axis Y axis Coord. 0 : ABS, 1 : INC K7684 K10684 Pattern 0 : END, 1 : KEEP, 2 : CONT K7682~83 K10682~83 Control 0 : POS, 1 : SPD K7681...
  • Page 768 Chapter 10 Built-in Positioning Dedicated K area Initial Step Item Setting range Data size value X axis Y axis Coord. 0 : ABS, 1 : INC K7984 K10984 Pattern 0 : END, 1 : KEEP, 2 : CONT K7982~83 K10982~83 Control 0 : POS, 1 : SPD K7981...
  • Page 769 Chapter 10 Built-in Positioning Dedicated K area Initial Step Item Setting range Data size value X axis Y axis Coord. 0 : ABS, 1 : INC K8284 K11284 Pattern 0 : END, 1 : KEEP, 2 : CONT K8282~83 K11282~83 Control 0 : POS, 1 : SPD K8281...
  • Page 770 (Note3) Although origin, DOC, upper/lower limit signals are with fixed contact, it may be used for general input if they are not used. Emergency stop is available by the command (EMG). (Note4) In case of XGB standard type, since only pulse + direction mode is available, change input mode of stepping motor driver to 1 phase input mode.
  • Page 771 Less than Max. (Note1) The rating of XGB origin input is DC24V. Make sure to connect the open collector output of a driver. (Note2) Although origin, DOC, upper/lower limit signals are with fixed contact, it may be used for general input if they are not used.
  • Page 772 +24VIN (Note1) The rating of XGB is 24VDC. If it is line driver output, contact is not connected. In the case, use a convert from line driver output to open collector output or use home return only by DOG signal/origin sensor of origin signal.
  • Page 773 Chapter 10 Built-in Positioning 3. Connection to XGT Servo XDA-S XBC-DNxxSU Input Common Note2 Lower limit P0008 Upper limit P0009 Emergency Stop Origin Note1 P000D P000C External DC24V Input terminal P0040 Pulse P0042 Direction Output Common XBC H-Type Main Unit 10-118 Ver.
  • Page 774 Chapter 10 Built-in Positioning 4. Connection to XGT Servo SDL-S XBC-DNxxSU XBC H-Type Main Unit 10-119 Ver. 1...
  • Page 775 Chapter 11 Maintenance Chapter 11 Maintenance Be sure to perform periodic maintenance and inspection to maintain equipment reliability. 11.1 Preventive and Predictive Maintenance 11.1.1 Preventive and Predictive Maintenance & Inspection Operating Environment 1. Control Enclosure a. Ambient temperature: 0 to 55° C (31 to 131° F) b.
  • Page 776 Chapter 11 Maintenance 11.2 Diagnostics and Troubleshooting 11.2.1 Error and Warning Log The PLC CPU module logs warnings and errors during operation of the PLC. This log aids in troubleshooting problems with the PLC. The Error/Warning Log can be accessed from the Online > Diagnosis > PLC Errors/Warnings menu.
  • Page 777 Chapter 11 Maintenance • PLC system configuration errors When the PLC system is configured with the XG5000 programming software, parameters are set as well as expansion modules, depending on the PLC series. If an expansion module is added in the configuration but is removed or not included in the hardware setup, errors will occur.
  • Page 778 Chapter 11 Maintenance 11.2.3 Initial Troubleshooting Procedures The following sequence can shorten the time needed for troubleshooting a system failure. This sequence will vary depending on the system and equipment. 1. Visual checks a. Equipment operating condition i. Verify equipment is in a safe state before making visual inspection. Personal injury can occur if portions of the equipment is still energized and active.
  • Page 779 Chapter 11 Maintenance 11.2.4 Troubleshooting Flowcharts This section indicates which of the following troubleshooting flowcharts to use for an observed PLC system condition. Observed Symptoms PLC Power (PWR) LED Off Use Power (PWR) LED Off flowchart on page 10-6 PLC Error (ERR) LED Use Error (ERR) LED blinking flowchart on page 10-7 blinking PLC RUN LED Off...
  • Page 780 Chapter 11 Maintenance 1. Power (PWR) LED Off Troubleshooting Flowchart Is PWR LED Off? Supply incoming voltage to Incoming voltage at the PLC PLC power Terminals? Is PWR LED On? Is the incoming voltage Supply the power within specified range? properly.
  • Page 781 Chapter 11 Maintenance 2. Error (ERR) LED Blinking Troubleshooting Flowchart Is ERR LED blinking? Connect XG5000 software and check for error code(s) See Chapter 6.7 Flag list Are errors displayed in to troubleshoot error code. XG5000? Is ERR LED still Blinking? Complete Contact Tech Support for further...
  • Page 782 Chapter 11 Maintenance 3. RUN LED Off Troubleshooting Flowchart RUN LED is Off Cycle incoming power to the PLC Is RUN LED On Complete Check STOP/RUN Switch inside communication door Is STOP/RUN Switch in RUN Mode? Switch to RUN Mode Is RUN LED On? Complete Contact Tech...
  • Page 783 Chapter 11 Maintenance 4. I/O Module Troubleshooting Flowchart I/O modules are not correctly reading and/or controlling field devices Is Output module output to SOL1 LED on? Measure output voltage for Correct the wiring from Replace Output module Use XG5000 to monitor SOL1 at the module Output module to SOL1 terminal block...
  • Page 784 Chapter 11 Maintenance Input module troubleshooting Are the Input module LEDs for SWITCH1 and SWITCH2 On? Check the voltage from Check the voltage from SWITCH1 and SWITCH2 SWITCH1 and SWITCH2 at the Input module at the Input module Are the module screw Is the expected Is the expected terminals tightened?
  • Page 785 Chapter 11 Maintenance 11.4 Troubleshooting Examples Possible troubles with various circuits and their corrective actions are explained. 11.4.1 Input circuit troubles and corrective actions The following describe possible troubles with input circuits, as well as corrective actions. Cause Condition Corrective Actions Leakage current of external device ...
  • Page 786 Chapter 11 Maintenance  Use only one power supply.  Leakage current due to the use of two Input signal  Connect a blocking diode. doesn’t turn different power supplies. off. DC input DC input 11.4.2 Output circuit and corrective actions The following describes possible troubles with output circuits, as well as their corrective actions.
  • Page 787 Chapter 11 Maintenance  Leakage current due to the use of two different  Use only one power supply. The load does  Connect a blocking diode. not turn off. power supplies. Output Output Load Load If the load is inductive (i.e. relay, contactor, solenoid, transformer, etc.), install a diode to clamp the back EMF.
  • Page 788 Chapter 11 Maintenance Output circuit troubles and corrective actions (continued). Condition Cause Corrective actions  The characteristics of solid state switching  Use an interposing relay between the Latency in the de- devices can lead to a delayed Off time to the module output and the controlled load.
  • Page 789 Chapter 11 Maintenance 11.5 Error Code and Flag Lists 11.5.1 Error Codes Error Action Operation Diagnosis Error cause code (restart mode after taking an action) status status point Program execution 0.5 second In RUN Reload and restart the program Warning error Blink mode...
  • Page 790 Chapter 11 Maintenance Error Action Operation Diagnosis Error cause code (restart mode after taking an action) status status point Data memory backup Check battery, good, cycle power. 1 second Warning At Reset error Remote mode is switched to STOP mode. Blink 0.1 second During...
  • Page 791 Chapter 11 Maintenance Word Flag Name Function Description _LOGIC_RESULT Logic result Displays the logic result. It Is On during 1 scan in case of F0110 _LER Operational error operational error. F0111 _ZERO Zero flag It is On when the operational result is 0. F011 It is On when CARRY occurs during F0112...
  • Page 792 Chapter 11 Maintenance 11.6 Communications Diagnostics With XG-PD used, the status of the system and the network can be checked and diagnosed. Diagnosis function is composed as described below • CPU module information • Communication module information • Frame monitor •...
  • Page 793 Information of module kind under diagnosis Base information of communication module under diagnosis. It Base number is fixed as 0 at XGB PLC. Slot no. of communication module under diagnosis Slot number In case of built-in communication, it is fixed as 0.
  • Page 794 Chapter 11 Maintenance 11.6.4 Frame monitor The user can check whether frame is normal or not by monitoring TRX frame through Cnet I/F module by XG- PD’s frame monitor. Check list Detail result Frame monitor 1. Select [Online] – [System Diagnosis] or click the icon ( 2.
  • Page 795 Chapter 11 Maintenance 11.6.5 Status by service Check list Detail result Dedicated service 1. Select [Online] – [System Diagnosis] or click the icon ( 2. Click the right button on the the Cnet I/F module and click Status By Service. 3.
  • Page 796 Chapter 11 Maintenance 1. Select [Online]->[System diagnosis] or click the icon ( 2. Click the right button on the the Cnet I/F module and click Status By Service. 3. Click P2P service of Status by Service 4. Click mutiple reading and check Status by Service. Classification Item Contents...
  • Page 797 Chapter 11 Maintenance 11.7 Troubleshooting by Error 11.7.1 Troubleshooting when P2P parameter setting error occurs in case of XG5000 connection Anomaly Reason Trouble shooting P2P setting error warning in case of XG5000 connection 1. In Enable Link menu of In case of enabling XG5000, check P2P setting link, the user number and delete P2P...
  • Page 798 Chapter 11 Maintenance 11.7.4 Two response frame are dealt with as unknown when execution frame monitor Anomaly Reason Trouble shooting Communication Two response frame are dealt with as unknown when type in XG-PD is Change executing frame monitor set as RS-422 communication type but output wiring as RS-485 and write...
  • Page 799 Chapter 11 Maintenance 11.7.7 Communication is not normal or communication is not executed repeatedly Anomaly Reason Trouble shooting 1. Execute 1:1 communication with In case of multi drop, server and check if it works More than one server properly. sends frame 2.
  • Page 800 Chapter 11 Maintenance 11.8 Diagnosis of External Device This flag is provided for a user to diagnose any fault of external device and, in turn, execute halt or warning of the system. Use of this flag displays faults of external device without any complicated program prepared and monitors fault location without any specific device (XG5000 and etc) or source program.
  • Page 801 Chapter 11 Maintenance 3. Processing warning of external device a. When detecting any warning of external device in user program, it turns on a flag in the warning position of system flag ‘F203 (_ANC_WB) and if turning on the detection request flag, ‘F2003 (_CHK_ANC_WB)’...
  • Page 802 Chapter 11 Maintenance 11.9 Forced Input/Output On and Off Function The Force I/O function is to force physical Inputs and Outputs ON or OFF regardless of the PLC program logic results. USE EXTREME CAUTION WHEN FORCING I/O! THIS CAN CAUSE UNEXPECTED EQUIPMENT OPERATION, INCLUDING EQUIPMENT DAMAGE OR PHYSICAL INJURY.
  • Page 803 Chapter 11 Maintenance 11.9.2 Input/Output Forcing Description and Considerations Input and Output forcing allows for simulating a process with the PLC during program development. Forcing is also used when a field device is not available or defective. Forcing in only available for P Area memory (physical I/O).
  • Page 804 Chapter 11 Maintenance 11.10 Clear All PLC The Clear All PLC function completely clears the PLC back to an “out-of-box” state. 1. How to perform the Clear All PLC function. a. From XG5000 software, click Online > Reset/Clear > Clear All PLC b.
  • Page 805 Appendix 1 Numeric System & Data Structure Appendix 1 Number Systems & Data Structure 1) Expression of number (data) In PLC CPU, all information is saved and processed in the states of On & Off, or “1” & “0”. Numeric operation is also processed in 1 and 0, which are called Binary numbers (BIN).
  • Page 806 Appendix 1 Numeric System & Data Structure For example, the binary number “10011101” can be converted to decimal as follows; As the row number and the value weighted of row have been considered in decimal, bit number and bit value weighted will be added from the right.
  • Page 807 Appendix 1 Numeric System & Data Structure (3) Hexadecimal (HEX) Hexadecimal is a Base 16 number system, meaning that it uses 16 digits before needing to repeat them: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. The value of 16 will be two figures. Therefore in hexadecimal, “16” is represented as “10”.
  • Page 808 Appendix 1 Numeric System & Data Structure (4) Binary Coded Decimal (BCD) Binary coded decimal is “Decimal number of each row displayed in binary”. Each digit is represented in one byte, 0 through 9 per byte. For example, decimal 157 can be expressed as below: Thus, binary coded decimal can display decimal 0 ~ 9999 in 16 bits (a maximum of 4 rows).
  • Page 809 Appendix 1 Numeric System & Data Structure (5) Numeric System Table Binary coded Decimal (BCD) Binary (BIN) Decimal Hexadecimal (H) 00000000 00000000 00000000 00000000 0000 00000000 00000001 00000000 00000001 0001 00000000 00000010 00000000 00000010 0002 00000000 00000011 00000000 00000011 0003 00000000 00000100 00000000...
  • Page 810 Appendix 1 Numeric System & Data Structure 2) Expression of integer numbers XGB instructions are based on negative operation system (Signed). f the highest bit (MSB) is 0, it is a positive number; if it is 1, it is a negative number.
  • Page 811 Appendix 2 Measurement and Precision of Timer Appendix 2 Measurement and Precision of Timer The timer’s internal coil is On or Off if Timer instruction is executed and resets the present value after End instruction is executed to make contact point On or Off. If input condition is Off, timer’s internal coil will be Off, timer’s present value will be 0, and contact point Off after End Instruction is executed.
  • Page 812 Appendix 2 Measurement and Precision of Timer Supplement * In case of 1 First SCAN start Number of 10ms timers Present value at END T192 contact point Scan Actual present value position of 8 * In case of 2 First scan start Timer’s internal coil Scan...
  • Page 813 (emissions) and are not unduly affected by electromagnetic interference (immunity)”. This section summarizes the guidelines to conform with the EMC Directive. However, LSIS will not guarantee that the overall machinery manufactured according to these details conforms to the below-described directives. It is up to the manufacturer of the machinery to select the method of conforming with the EMC directive and ensure the machinery meets the EMC directive.
  • Page 814 1000VAC and 75V to 1500VDC to satisfy the safety requirements. Cautions and installation and wiring of the PLC XGB series to conform to the low-voltage directive are described in this section. However, LSIS will not guarantee that the overall machinery manufactured according to these details conforms to the above regulation.
  • Page 815 109 First Floor, Park Central, Sector-30, Gurgaon- 122 002, Haryana, India Tel : +0091-124-493-0070 Fax : 91-1244-930-066 E-Mail : hwyim@lsis.com ※ LSIS constantly endeavors to improve its product so that 2016. 12 information in this manual is subject to change without notice.

This manual is also suitable for:

Xbc-hXbm-dn32hXbe-dc08aXbe-dc16aXbe-dc16bXbe-dc32a ... Show all