Omron CP1E CPU UNIT SOFTWARE User Manual

Omron CP1E CPU UNIT SOFTWARE User Manual

Cp1e cpu unit software
Table of Contents

Advertisement

Quick Links

Cat. No. W480-E1-04
SYSMAC CP Series
CP1E-E@@D@-@
CP1E-N@@D@-@
CP1E-NA@@D@-@
CP1E CPU Unit Software
USER'S MANUAL

Advertisement

Table of Contents
loading

Summary of Contents for Omron CP1E CPU UNIT SOFTWARE

  • Page 1 Cat. No. W480-E1-04 SYSMAC CP Series CP1E-E@@D@-@ CP1E-N@@D@-@ CP1E-NA@@D@-@ CP1E CPU Unit Software USER’S MANUAL...
  • Page 3 © OMRON, 2009 All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, mechanical, electronic, photocopying, recording, or otherwise, without the prior written permission of OMRON.
  • Page 4 SYSMAC CP Series CP1E-E@@D@-@ CP1E-N@@D@-@ CP1E-NA@@D@-@ CP1E CPU Unit Software User’s Manual Revised June 2010...
  • Page 5: Introduction

    An application model of CPU Unit that supports connections to Programmable Terminals, invert- ers, and servo drives. The CP Series is centered around the CP1H, CP1L, and CP1E CPU Units and is designed with the same basic architecture as the CS and CJ Series.
  • Page 6: Cp1E Cpu Unit Manuals

    CP1E CPU Unit Manuals Information on the CP1E CPU Units is provided in the following manuals. Refer to the appropriate manual for the information that is required. This Manual CP1E CPU Unit Hardware CP1E CPU Unit Instructions CP1E CPU Unit Software User’s Manual(Cat.
  • Page 7: Overview

    Manual Configuration The CP1E CPU manuals are organized in the sections listed in the following tables. Refer to the appro- priate section in the manuals as required. CP1E CPU Unit Software User’s Manual (Cat. No. W480) (This Manual) Section Contents...
  • Page 8 This section describes the basic system configuration and unit models tion and Devices of the CP1E. Section 3 Part Names and Functions This section describes the part names and functions of the CPU Unit, Expansion I/O Units, and Expansion Units in a CP1E PLC . Section 4 Programming Device...
  • Page 9: Manual Structure

    Gives the number Release of the section. Fit the back of the Units onto the DIN Track by catching the top of the Units on the Track and then pressing in at the bottom of the Units, as shown below. DIN Track Press in all of the DIN Track mounting pins to securely lock the Units in place.
  • Page 10: Terminology And Notation

    Term Description E-type CPU Unit A basic model of CPU Unit that support basic control applications using instructions such as basic, movement, arithmetic, and comparison instructions. Basic models of CPU Units are called “E-type CPU Units” in this manual. N-type CPU Unit An application model of CPU Unit that supports connections to Programmable Terminals, inverters, and servo drives.
  • Page 11 CPU Unit Operation PWM Outputs Understanding Serial Programming Communications Analog I/O Function I/O Memory I/O Allocation Other Functions Ethernet PLC Setup Option Board Overview of Built-in Programming Functions and Device Operations Allocations Quick-response Appendices Inputs Interrupts CP1E CPU Unit Software User’s Manual(W480)
  • Page 12: Table Of Contents

    Internal Memory in the CPU Unit.................... 2-2 2-1-1 CPU Unit Memory Backup Structure ..................2-2 2-1-2 Memory Areas and Stored Data ....................2-3 2-1-3 Transferring Data from a Programming Device ................2-4 2-1-4 Backup ............................2-4 Section 3 CPU Unit Operation CPU Unit Operation ......................... 3-2 3-1-1 Overview of CPU Unit Operation ....................
  • Page 13 I/O Allocation..........................6-2 6-1-2 I/O Allocation Concepts....................... 6-3 6-1-3 Allocations on the CPU Unit......................6-3 6-1-4 Allocations to Expansion Units and Expansion I/O Units ............6-4 Section 7 PLC Setup Overview of the PLC Setup..................... 7-2 PLC Setup Settings ......................... 7-3 7-2-1 Startup and CPU Unit Settings ....................
  • Page 14 Section 8 Overview of Built-in Functions and Allocations Built-in Functions ........................8-2 Overall Procedure for Using CP1E Built-in Functions ............8-3 Terminal Allocations for Built-in Functions .........8-4 8-3-1 Specifying the Functions to Use....................8-4 8-3-2 Selecting Functions in the PLC Setup..................8-4 8-3-3 Allocating Built-in Input Terminals ....................
  • Page 15 Origin Search Operations ....................... 12-23 12-4-6 Origin Return .......................... 12-30 12-4-7 Changing the Present Value of the Pulse Output ..............12-31 12-5 Reading the Pulse Output Present Value ................12-32 12-6 Related Auxiliary Area Flags ....................12-33 12-7 Application Examples ......................12-34 12-7-1 Vertically Conveying PCBs (Multiple Progressive Positioning) ..........
  • Page 16 14-5-3 PLC Setup..........................14-21 14-5-4 Operating Specifications ......................14-23 14-5-5 Example Application........................ 14-28 14-6 Connecting the Host Computer (Not Including Support Software) ........ 14-30 14-6-1 Overview ..........................14-30 14-6-2 Flow of Operation........................14-30 14-6-3 Command/response Format and List of Commands .............. 14-31...
  • Page 17 Inputting a Ladder Program ...................... 18-7 18-3-2 Saving and Reading Ladder Programs................... 18-14 18-3-3 Editing Ladder Programs ......................18-15 18-4 Connecting Online to the CP1E and Transferring the Program ........18-18 18-4-1 Connecting Online ........................18-18 18-4-2 Changing Operating Modes....................18-19 18-4-3 Transferring a Ladder Program and the PLC Setup..............
  • Page 18 A-3-2 Interrupt Response Time ......................A-82 A-3-3 Serial PLC Link Response Performance...................A-83 A-3-4 Pulse Output Start Time......................A-84 A-3-5 Pulse Output Change Response Time..................A-84 A-4 PLC Operation for Power Interruptions ................A-85 Index ..........................Index-1 Revision History ................Revision-1 CP1E CPU Unit Software User’s Manual(W480)
  • Page 19 WHETHER SUCH CLAIM IS BASED ON CONTRACT, WARRANTY, NEGLIGENCE, OR STRICT LIABILITY. In no event shall the responsibility of OMRON for any act exceed the individual price of the product on which liability is asserted. IN NO EVENT SHALL OMRON BE RESPONSIBLE FOR WARRANTY, REPAIR, OR OTHER CLAIMS REGARDING THE PRODUCTS UNLESS OMRON’S ANALYSIS CONFIRMS THAT THE PRODUCTS...
  • Page 20 The following are some examples of applications for which particular attention must be given. This is not intended to be an exhaustive list of all possible uses of the products, nor is it intended to imply that the uses listed may be suitable for the products: •...
  • Page 21 PERFORMANCE DATA Performance data given in this manual is provided as a guide for the user in determining suitability and does not constitute a warranty. It may represent the result of OMRON’s test conditions, and the users must correlate it to actual application requirements.
  • Page 22: Safety Precautions

    Safety Precautions Definition of Precautionary Information The following notation is used in this manual to provide precautions required to ensure safe usage of a CP-series PLC. The safety precautions that are provided are extremely important to safety. Always read and heed the information provided in all safety precautions.
  • Page 23 With an E-type CPU Unit or with an N/NA-type CPU Unit without a Battery, the con- tents of the DM Area (D) *, Holding Area (H), the Counter Present Values (C), the sta- tus of Counter Completion Flags (C), and the status of bits in the Auxiliary Area (A) related to clock functions may be unstable when the power supply is turned ON.
  • Page 24 If an indirect specification causes the address to exceed the area of the start address, the system will access data in other area, and unexpected operation may occur.
  • Page 25: Precautions For Safe Use

    • To initialize the DM Area, back up the initial contents for the DM Area to backup memory using one of the following methods. • Set the number of words of the DM Area to be backed up starting with D0 in the Number of CH of DM for backup Box in the Startup Data Read Area.
  • Page 26 • If the I/O Hold Bit is turned ON, the outputs from the PLC will not be turned OFF and will maintain their previous status when the PLC is switched from RUN or MONITOR mode to PROGRAM mode. Make sure that the external loads will not produce dangerous conditions when this occurs.
  • Page 27: Regulations And Standards

    CX-One is a registered trademark for Programming Software made by OMRON Corporation. Windows is a registered trademark of Microsoft Corporation. Other system names and product names in this document are the trademarks or registered trademarks of their respective companies. CP1E CPU Unit Software User’s Manual(W480)
  • Page 28: Related Manuals

    Related Manuals The following manuals are related to the CP1E. Use them together with this manual. Manual name Cat. No. Model numbers Application Contents SYSMAC CP Series W480 CP1E-E To learn the software Describes the following information for CP1E CP1E CPU Unit Soft- specifications of the PLCs.
  • Page 29: Overview

    1-2 Basic Operating Procedure ........
  • Page 30: Cp1E Overview

    • Auxiliary Area related to clock functions(A) Mount the CP1W-BAT01 Battery (sold separately) to an N/NA-type CPU Unit if data in the above areas need to be retained after a power interruption. A Battery cannot be mounted to an E-type CPU Unit.
  • Page 31: Basic Operating Procedure

    Connect the CPU Unit, Expansion I/O Units, and Expansion Units. Set the DIP switches on the Option Board and Expansion Units as required. Refer to Section 3 Part Names and Functions and Section 5 Installation and Wiring in the CP1E CPU Unit Hardware User’s Manual (Cat. No. W479).
  • Page 32 1 Overview CP1E CPU Unit Software User’s Manual(W480)
  • Page 33: Internal Memory In The Cpu Unit

    2-1 Internal Memory in the CPU Unit ........
  • Page 34: Cpu Unit Memory Backup Structure

    Internal Memory in the CPU Unit 2-1-1 CPU Unit Memory Backup Structure The internal memory in the CPU Unit consists of built-in RAM and built-in EEPROM. The built-in RAM is used as execution memory and the built-in EEPROM is used as backup memory. CPU Unit...
  • Page 35: Memory Areas And Stored Data

    With an E-type CPU Unit or with an N/NA-type CPU Unit without a Battery, the con- tents of the DM Area (D) *, Holding Area (H), the Counter Present Values (C), the sta- tus of Counter Completion Flags (C), and the status of bits in the Auxiliary Area (A) related to clock functions may be unstable when the power supply is turned ON.
  • Page 36: Transferring Data From A Programming Device

    • If the power is interrupted when the program or PLC Setup are being backed up, memory error may occur the next time power is turned ON. • If the power is interrupted when the DM area is being backed up, the reading of backed up DM area will fail the next time power is turned ON.
  • Page 37: Cpu Unit Operation

    CPU Unit Memory Configuration ........3-5...
  • Page 38: Overview Of Cpu Unit Operation

    Peripheral servicing is used to communicate with devices connected to the communications port or for exchanging data with the CX-Programmer. Cycle Time The cycle time is the time between one I/O refresh and the next. The cycle time can be determined beforehand for SYSMAC PLCs. CP1E CPU Unit Software User’s Manual(W480)
  • Page 39: Cpu Unit Operating Modes

    I/O memory. It can be accessed by specifying instruction operands. There are words in the I/O memory area where data is cleared and words where data is retained when recovering from a power interruption. There are also words that can be set to be cleared or retained. Refer to Section 5 I/O Memory.
  • Page 40: Operating Modes And Operation

    MONITOR to RUN * The data is cleared when the IOM Hold Bit is OFF. The outputs from the Output Units will be turned OFF when a fatal error is occurred, regardless of the status of the IOM Hold Bit, and the status of the output bits in CPU Unit’s I/O memory is retained.
  • Page 41: Backing Up Memory

    Automatically backed up to the built-in EEPROM whenever changed. DM Area in the I/O memory Data in specified words of the DM Area can be backed up to the built-in EEPROM by using bits in the Auxiliary Area. Other words are not backed up.
  • Page 42: Backing Up Ladder Programs And Plc Setup

    I/O memory are retained. backup time. * The values will be cleared to all zeros at startup if the Clear retained memory area (HR/DM/CNT) Check Box is selected in the PLC Settings. CP1E CPU Unit Software User’s Manual(W480)
  • Page 43: I/O Memory Backup Time

    Precautions for Correct Use Use an N/NA-type CPU Unit with a Battery mounted if it is necessary to retain the contents of the DM Area (D) and Holding Area (A), the Counter Present Values (C), the status of Counter Com- pletion Flags (C), and the status of bits in the Auxiliary Area (A) related to clock functions when the power supply is turned ON after the power has been OFF for a period of time.
  • Page 44: Initializing I/O Memory At Startup

    Select the Clear retained memory area (HR/DM/CNT) Check Box in the PLC Settings. Note If the Restore D0- from backup memory Check Box is selected, only the specified words in the DM Area will be restored from the built-in EEPROM backup memory when the power supply is turned ON.
  • Page 45: Understanding Programming

    4-2 Tasks, Sections, and Symbols........
  • Page 46: Programming

    A program consists of more than one instruction and ends with an END instruction. • Tasks (Smallest Executable Unit) A program is assigned to an interrupt task to execute it. (In the CX-Programmer, the interrupt task number is specified in the program properties.)
  • Page 47: Program Capacity

    Basic Concepts of Ladder Programming Instructions are executed in the order that they are stored in memory (i.e., in the order of the mnemonic code). Be sure you understand the concepts of ladder programming, and write the programs in the proper order.
  • Page 48 Number of Times Bits Can be Used and Connection Method • There is no limit to the number of I/O bits, work bits, timers, and other input bits that can be used. Program structure should be kept as clear and simple as possible to make the programs easier to understand and maintain even if it means using more input bits.
  • Page 49 One output bit can be used in one instruction only. Instructions in a ladder program are executed in order from the top rung in each cycle. The result of an OUT instruction in a lower rung will be eventually saved in the output bit. The results of any previous instructions controlling the same bit will be overwritten and not output.
  • Page 50: Tasks, Sections, And Symbols

    Overview of Symbols Symbols I/O memory area addresses or constants can be specified by using character strings registered as symbols. The symbols are registered in the symbol table of the CX-Programmer. Programming with symbols enables programming with names without being aware of the addresses.
  • Page 51 Note “Global” and “local” indicate only the applicable scope of the symbol. They have nothing to do with the applicable scope of memory addresses. Therefore, a warning but not an error will occur in the following cases, and it will be possible to transfer the user program.
  • Page 52: Programming Instructions

    (destinations) I/O memory Power Flow The power flow is the execution condition that is used to control the execution and instructions when programs are executing normally. In a ladder program, power flow represents the status of the exe- cution condition.
  • Page 53: Operands

    (except for jump instruction instruction, such as a numbers). subroutine number. Operands are also called the first operand, second operand, and so on, starting from the top of the instruction. First operand Second operand CP1E CPU Unit Software User’s Manual(W480)
  • Page 54: Instruction Variations

    Input Instructions (Logical Starts and Intermediate Instructions) These instructions read bit status, make comparisons, test bits, or perform other types of processing every cycle. If the results are ON, the input condition is output (i.e., the execution condition is turned ON).
  • Page 55: Input-Differentiated Instructions

    Input-differentiated Instructions Upwardly Differentiated Instructions (Instructions Preceded by @) • Output Instructions The instruction is executed only during the cycle in which the execution condition changes from OFF to ON. The instruction is not executed in the following cycle. 1.02...
  • Page 56: Specifying Data In Operands

    Area addresses can be used regardless of whether a physical address or symbol is used. A constant or word address in I/O memory can be used for the offset. If a word address is specified, the contents of the word is used as the offset. Specifying...
  • Page 57: Data Formats

    Specify D100 Add an asterisk (*) at the front to specify an indirect address in BCD Mode. Add * Note For Timer Completion Flags and Counter Completion Flags, there is no distinction between word addresses and bit addresses. 4-3-6 Data Formats The following table shows the data formats that the CP1E CPU Units can handle.
  • Page 58 Value = (-1) ×1.[Mantissa] × 2 · Sign bit (bit 31): 1: Negative, 0: Positive · Mantissa: The 23 bits from bit 00 to bit 22 contain the mantissa, i.e., the portion below the decimal point in 1..,in binary.
  • Page 59: I/O Refresh Timing

    I/O in CP-series Expansion I/O and Expansion Unit during the cycle. IORF instruction can also refresh actual I/O data in an NA-type CPU Unit at CIO 90, CIO 91 and CIO 190. Precautions for Correct Use...
  • Page 60: Constants

    4 Understanding Programming Constants Overview Constants are numeric values expressed in 16 or 32 bits and can be specified as instruction operands. The following types of constants are supported. • Bit Strings or Numeric Values (Integers) Decimal values (with & symbol), hexadecimal values (with # symbol), BCD values (with # symbol), or signed decimal values (with + or - symbol) •...
  • Page 61 Stores #FFF6 hex (10 decimal) in D0. Precautions for The input will be treated as an address in • An error will occur and the left bus bar will be correct use the CIO Area and the contents of that...
  • Page 62 Programmer. Additional Information • Zero suppression can be used when inputting any data type. For example, “&2” and “&02”, “#000F” and “#F” are treated as the same. • “BIN” indicates binary data. • BCD data is binary coded decimal. 4-18...
  • Page 63: Specifying Offsets For Addresses

    Starting bit address A Start Bit Address It is possible to specify the start bit address with a bit address or with a symbol (except the NUMBER data type cannot be used). Offsetting is possible for all addresses except the DM Areas.
  • Page 64 If a word address or symbol is specified, the contents of the specified word is used as the offset. If the offset exceeds bit 15 in the specified word, offsetting will continue from bit 00 in the next word. If the offset is specified indirectly, make sure that the final bit address does not exceed the upper limit of the memory area by using input comparison or other instruction.
  • Page 65: Application Examples For Address Offsets

    Application Examples for Address Offsets It is possible to dynamically specify the offset by specifying a word address in I/O memory for the offset in the brackets. The contents of the specified word address will be used as the offset.
  • Page 66: Ladder Programming Precautions

    FOR-NEXT sections Subroutines Place all the subroutines together just after all of the main program and before the END instruction. A subroutine cannot be placed in a step ladder, block program, or FOR-NEXT section. If instructions other than those in a subroutine are placed after a subroutine (SBN to RET), those instructions will not be executed.
  • Page 67 SBN and RET SUBROUTINE ENTRY and SUBROUTINE RETURN Note A step ladder program section can be used in an interlock section (between IL and ILC). The step ladder section will be completely reset when the interlock condition is ON. CP1E CPU Unit Software User’s Manual(W480)
  • Page 68 4 Understanding Programming 4-24 CP1E CPU Unit Software User’s Manual(W480)
  • Page 69 5-1-2 I/O Memory Area Address Notation ....... . . 5-5 5-1-3 I/O Memory Areas .
  • Page 70: Overview Of I/O Memory Areas

    For NA-type CPU Units, built-in analog input terminals are CIO 90 and CIO 91, built-in analog output terminal is CIO 190. The bits and words in the CIO Area are allocated to built-in I/O terminals on the CP1E CPU Unit and to the Expansion Units and Expansion I/O Units.
  • Page 71 Work Area (W) The Word Area is part of the internal memory of the CPU Unit. It is used in programming. Unlike the input bits and output bits in the CIO Area, I/O to and from external devices is not refreshed for this area.
  • Page 72 Values (PVs). Up to 256 counters with counter numbers C0 to C255 can be used. These words retain their content when the PLC is turned ON or the operating mode is switched between PROGRAM mode and RUN or MONITOR mode.
  • Page 73: I/O Memory Area Address Notation

    (00 to 15) On the CX-Programmer, addresses in the CIO Area (including addresses for Serial PLC Links) are given with no I/O memory area designator. “CIO” is used as the I/O memory area designator in this manual for clarity. CIO 0...
  • Page 74: I/O Memory Areas

    Unit the DM Area can be Area (D). retained in the built-in EEPROM in the backup memory by using a bit in the Auxiliary Area. Applica- ble words: D0 to D1499 (One word can be speci- fied at a time.)
  • Page 75: Overview Of Built-In Functions And

    • When the CIO Area is cleared from the CX-Programmer • When PLC operation is stopped due to a fatal error other than an FALS error occurs. (The con- tents of the CIO Area will be retained when FALS is executed.)
  • Page 76: Work Area (W)

    The Work Area is part of the internal memory of the CPU Unit. It is used in programming. Unlike the input bits and output bits in the CIO Area, I/O to and from external devices is not refreshed for this area.
  • Page 77: Holding Area (H)

    The Holding Area is part of the internal memory of the CPU Unit. It is used in programming. Unlike the input bits and output bits in the CIO Area, I/O to and from external devices is not refreshed for this area.
  • Page 78 • When a self-maintaining bit is programmed with a Holding Area bit, the self-maintaining bit will not be cleared even when the power is reset. • If a Holding Area bit is not used for the self-maintaining bit, the bit will be turned OFF and the self- maintaining bit will be cleared when the power is reset.
  • Page 79: Data Memory Area (D)

    DM Area (D) *, Holding Area (H), the Counter Present Values (C), the status of Counter Comple- tion Flags (C), and the status of bits in the Auxiliary Area (A) related to clock functions may be unstable when the power supply is turned ON.
  • Page 80 ON the DM Backup Start bit (A751.15). • Specify in the PLC Setup whether to read the data in the DM Area words to the RAM as the initial values when the power supply is turned ON.
  • Page 81: Timer Area (T)

    Timer Area (T) Overview The Timer Area contains Timer Completion Flags (1 bit each) and timer PVs (16 bits each). The Com- pletion Flag is turned ON when a decrementing timer PV reaches 0 (counting out) or an increment- ing/decrementing timer PV reaches the set value or 0.
  • Page 82 Retained lock conditions *1 If the IOM Hold Bit (A500.12) is ON, the PV and Completion Flag will be retained when a fatal error occurs (including execution of FALS instructions) or the operating mode is changed from PROGRAM mode to RUN or MONITOR mode or vice-versa.
  • Page 83: Counter Area (C)

    DM Area (D) *, Holding Area (H), the Counter Present Values (C), the status of Counter Comple- tion Flags (C), and the status of bits in the Auxiliary Area (A) related to clock functions may be unstable when the power supply is turned ON.
  • Page 84 • Counter PVs cannot be force-set or force-reset, although the PVs can be refreshed indirectly by force-setting/resetting the Counter Completion Flag. • There are no restrictions in the order of using counter numbers or in the number of N.C. or N.O. conditions that can be programmed.
  • Page 85: Auxiliary Area (A)

    Precautions for Safe Use • With an E-type CPU Unit or with an N/NA-type CPU Unit without a Battery, the contents of the DM Area (D) *, Holding Area (H), the Counter Present Values (C), the status of Counter Com- pletion Flags (C), and the status of bits in the Auxiliary Area (A) related to clock functions may be unstable when the power supply is turned ON.
  • Page 86 Details • Some words or bits are set automatically by the system and others are set and manipulated by the user. The Auxiliary Area includes error flags set by self-diagnosis, initial settings, control bits, and status data.
  • Page 87: Condition Flags

    Condition Flags Overview These flags include the flags that indicate the results of instruction execution, as well as the Always ON and Always OFF Flags. These bits are specified with symbols rather than addresses. The CX-Programmer treats condition flags as system-defined symbols (global symbols) beginning with P_.
  • Page 88 The Condition Flags are shared by all of the instructions. This means that program operation can be changed from its expected course by interruption of a single task. Be sure to consider the effects of interrupts when writing ladder programs to prevent unexpected operation.
  • Page 89: Clock Pulses

    5-10 Clock Pulses Overview The Clock Pulses are turned ON and OFF by the CPU Unit’s internal timer. These bits are specified with symbols rather than addresses. The CX-Programmer treats condition flags as system-defined symbols (global symbols) beginning with P_.
  • Page 90 5 I/O Memory Using the Clock Pulses The following example turns a bit ON and OFF at 0.5-s intervals. 100.00 P_1s Instruction Operand P_1s 100.00 100.00 0.5s 0.5s 5-22 CP1E CPU Unit Software User’s Manual(W480)
  • Page 91: I/O Allocation

    Be sure you understand the information in the section before attempting to write ladder diagrams. 6-1 Allocation of Input Bits and Output Bits ......6-2 6-1-1 I/O Allocation .
  • Page 92: Allocation Of Input Bits And Output Bits

    6-1-1 I/O Allocation OMRON calls allocating I/O bits in memory “I/O allocation.” The I/O on Expansion I/O Units are allocated I/O bits in the words following the allocated words to the built-in I/O on the CPU Units. Allocated 12 bits...
  • Page 93: I/O Allocation Concepts

    For a CPU Unit with 40 I/O points, a total of 24 input bits are allocated to the input terminal block. The bits that are allocated are input bits CIO 0.00 to CIO 0.11 (i.e., bits 00 to 11 in CIO 0) and input bits CIO 1.00 to CIO 1.11 (i.e., bits 00 to 11 in CIO 1).
  • Page 94: Allocations To Expansion Units And Expansion I/O Units

    CPU Unit. For example, if a CPU Unit with 40 I/O points is used, CIO 0 and CIO 1 are allocated for inputs and CIO 100 and CIO 101 are allocated for outputs. Thus, words from CIO 2 onward for inputs and words from CIO 102 onward for outputs are automatically allocated to the Expansion I/O Units and Expansion Units in the order that the Units are connected.
  • Page 95 Twenty-four input bits in two words are allocated (bits 00 to 11 in CIO m and bits 00 to 11 CIO m+1). Sixteen output bits in two words are allocated in two words (bits 00 to 07 in CIO n and bits 00 to 07 in CIO n+1).
  • Page 96: Allocations For Expansion Units

    Allocations for Expansion Units I/O Word Allocations to Expansion Units m: Indicates the next input word after the input word allocated to the Expansion Unit, Expansion I/O Unit, or CPU Unit connected to the left of the current Unit. n: Indicates the next output word after the output word allocated to the Expansion Unit, Expansion I/O Unit, or CPU Unit connected to the left of the current Unit.
  • Page 97: Plc Setup

    Startup and CPU Unit Settings ........
  • Page 98: Overview Of The Plc Setup

    7 PLC Setup Overview of the PLC Setup The PLC Setup contains basic CPU Unit software parameter settings that the user can change to cus- tomize PLC operation. These settings can be changed from a CX-Programmer. Change the PLC Setup in the following case.
  • Page 99: Plc Setup Settings

    Read D0- from backup memory Do not read. Do not read. When power is turned ON Read. Number of CH of DM for backup E-type CPU Unit: 0 to 1,499 When power is turned ON N/NA-type CPU Unit: 0 to 6,999 Startup Mode Setting...
  • Page 100: Input Constant Settings

    11CH: CIO 11 12CH: CIO 12 13CH: CIO 13 14CH: CIO 14 15CH: CIO 15 16CH: CIO 16 17CH: CIO 17 Note The input constants of CP1W-40EDR/EDT/EDT1 are always 16ms regardless of the settings. CP1E CPU Unit Software User’s Manual(W480)
  • Page 101: Built-In Rs-232C Port

    The settings are applicable to the N/NA-type CPU Units. Since this setting is reflected by power OFF and ON, the PLC Setup and the actual operation settings may be different. The actual operation settings can be confirmed in words A617/A618.
  • Page 102 When power is turned ON (data length, stop bits, par- 7 bits, 2 bits, odd ity) 7 bits, 2 bits, no parity 7 bits, 1 bit, even 7 bits, 1 bit, odd 7 bits, 1 bit, no parity 8 bits, 2 bits, even...
  • Page 103 When power is turned ON (data length, stop bits, par- 7 bits, 2 bits, odd ity) 7 bits, 2 bits, no parity 7 bits, 1 bit, even 7 bits, 1 bit, odd 7 bits, 1 bit, no parity 8 bits, 2 bits, even...
  • Page 104: Serial Option Port

    The setting are applicable to N30/40/60 or NA20 CPU Units. Since this setting is reflected by power OFF and ON, the PLC Setup and the actual operation settings may be different. The actual operation settings can be confirmed in words A617/A618.
  • Page 105 When power is turned ON (data length, stop bits, par- 7 bits, 2 bits, odd ity) 7 bits, 2 bits, no parity 7 bits, 1 bit, even 7 bits, 1 bit, odd 7 bits, 1 bit, no parity 8 bits, 2 bits, even...
  • Page 106 When power is turned ON (data length, stop bits, par- 7 bits, 2 bits, odd ity) 7 bits, 2 bits, no parity 7 bits, 1 bit, even 7 bits, 1 bit, odd 7 bits, 1 bit, no parity 8 bits, 2 bits, even...
  • Page 107: Built-In Inputs

    Z phase, software reset Z phase, software reset (stop When power is turned ON (stop comparing) comparing) Note Only a software reset can be set if an increment pulse Software reset input is set for the input set- (stop comparing) ting.
  • Page 108: Interrupt Input Settings

    Normal Normal When power is turned ON Interrupt Quick IN6: CIO 0.06 Normal Normal When power is turned ON Interrupt Quick IN7: CIO 0.07 Normal Normal When power is turned ON Interrupt Quick 7-12 CP1E CPU Unit Software User’s Manual(W480)
  • Page 109: Pulse Output 0 Settings

    7 PLC Setup 7-2-7 Pulse Output 0 Settings The settings are applicable to the N/NA-type CPU Units with transistor outputs. Base Settings When setting is read by Name Default Possible settings CPU Unit Undefined Origin (operation for limit signal Hold...
  • Page 110: Pulse Output 1 Settings

    0 (disabled) 1 (pulse/4 ms) At start of operation 65,535 (pulse/4 ms) 7-2-8 Pulse Output 1 Settings The settings are applicable to the N/NA-type CPU Units with transistor outputs. Base Settings When setting is read by Name Default Possible settings...
  • Page 111 65,535 (pulse/4 ms) 1-11 Origin Search Deceleration Ratio 0 (disabled) 1 (pulse/4 ms) At start of operation (Rate) 65,535 (pulse/4 ms) 1-12 Positioning Monitor Time 0 (ms) 0 (ms) At start of operation 9,999 (ms) CP1E CPU Unit Software User’s Manual(W480) 7-15...
  • Page 112: Built-In Ad/Da: Built-In Analog I/O Settings

    65,535 (pulse/4 ms) Deceleration rate 0 (disabled) 1 (pulse/4 ms) At start of operation 65,535 (pulse/4 ms) 7-2-9 Built-in AD/DA: Built-in Analog I/O Settings AD 0CH/AD 1CH: Analog Input Settings When setting is read by Name Default Possible settings CPU Unit Analog Input 0: Use Do not use.
  • Page 113: Cp1E Cpu Unit Software User's Manual(W480)

    8-3-3 Allocating Built-in Input Terminals........8-6 8-3-4 Allocating Built-in Output Temrinals .
  • Page 114: Pwm Outputs 5

    8 Overview of Built-in Functions and Allocations Built-in Functions The following built-in functions are provided by the CP1E E-type and N/NA-type CPU Units. Type CP1E Basic Models CP1E Application Models Reference Function E-type CPU Units N-type CPU Units NA-type CPU Units...
  • Page 115: Input Interrupts

    8 Overview of Built-in Functions and Allocations Overall Procedure for Using CP1E Built-in Functions The overall procedure for using built-in CP1E functions is described in this section. Select the functions to use. Select Functions Example: Interrupts, high-speed counter inputs, and pulse outputs.
  • Page 116: Terminal Allocations For Built-In Functions

    • Input functions can be selected by selecting the Use high speed counter Check Box in a High- speed Counter Area on the Built-in Input Tab Page or by setting an input to Interrupt or Quick in the Interrupt Input Area of the same page.
  • Page 117 8 Overview of Built-in Functions and Allocations • The input and output terminals used by the origin search function can be enabled by selecting the Use define origin operation Check Box on a Pulse Output Tab Page. Select the Use define origin operation Check Box.
  • Page 118: Allocating Built-In Input Terminals

    Allocating Built-in Input Terminals Allocating Functions to Built-in Input Terminals Input terminals are allocated functions by setting parameters in the PLC Setup. Set the PLC Setup so that each terminal is used for only one function. E20/30/40, N20/30/40/60 or NA20 CPU Units...
  • Page 119 Note 1 The same pulse inputs must be used for high-speed counter 0 and high-speed counter 1. 2 High-speed counter 2 cannot be used if the input setting of high-speed counter 0 or high-speed counter 1 is set for differential phase inputs (4×), pulse + direction inputs, or up/down pulse inputs.
  • Page 120: Allocating Built-In Output Temrinals

    Therefore, do not use the input terminals repeatedly. For example, if quick-response input 2 is used, then input terminal 02 is occupied, so it cannot be used for normal input 2, input interrupt 2, quick-response input 2, counter 2 (increment), counter 1 (phase- A/increment) or counter 0 (direction).
  • Page 121: Quick-Response Inputs

    9-1 Quick-response Inputs ........
  • Page 122: Overview

    9-1-1 Overview The quick-response inputs can read pulses with an ON time as short as 50 µs even if they are shorter than the cycle time. Use the quick-response inputs to read signals shorter than the cycle time, such as inputs from photomicrosensors.
  • Page 123 CIO 0.05 CIO 0.06 CIO 0.07 Note 1 The power supply must be restarted after the PLC Setup is transferred in order to validate the quick- response input settings. 2 IN6 and IN7 are not supported by E10 CPU Units.
  • Page 124: Creating Ladder Programs

    • The minimum pulse width (ON time) that can be read for a quick-response input is 50 µs. • The status of the input that is stored in the I/O memory for a short input will be cleared during the next I/O refresh period.
  • Page 125: Application Example

    Flow of Operation ..........10-11 10-4 Precautions for Using Interrupts ....... 10-13 10-4-1 Interrupt Task Priority and Order of Execution .
  • Page 126: Interrupts

    I/O refreshing, peripheral servicing. During the program execution stage, cyclic tasks (ladder programs) are executed. The interrupt function, on the other hand, allows a specified condition to interrupt a cycle and execute a specified program. Interrupts can thus be used to perform high-speed processing that is not restricted by the cycle time.
  • Page 127: Input Interrupts

    10-2 Input Interrupts Input interrupts can be used with any model of CP1E CPU Unit. 10-2-1 Overview A corresponding interrupt task can be executed when a built-in input on the CPU Unit turns ON or turns OFF. Interrupt input Built-in input...
  • Page 128: Flow Of Operation

    Precautions for Correct Use A built-in input cannot be used as a normal input, high-speed counter input, or quick-response input if it is being used as an interrupt input. Refer to 8-3-3 Allocating Built-in Input Terminals for details. PLC Setup Click the Built-in Input Tab and select Interrupt in the interrupt intput settings.
  • Page 129 CIO 0.05 CIO 0.06 CIO 0.07 Note 1 The power supply must be restarted after the PLC Setup is transferred in order to enable the interrupt input settings. 2 IN6 and IN7 are not supported by E10 CPU Units. Assigning Interrupt Input Terminals The following input terminals can be used for interrupt inputs.
  • Page 130 The MSKS instruction must be executed only once to make the settings, so in general execute MSKS in just one cycle using the upwardly differentiated variation of the instruction. The first MSKS instruction can be omitted. If it is omitted, an interrupt will be created when the input turns ON by default.
  • Page 131: Application Example

    Interrupt task 2 10-2-3 Application Example In this example, bent parts are detected in a moving workpiece, such as an IC component. When the sensor input (terminal 02 on terminal block 0CH = CIO 0.02) changes from OFF to ON, the interrupt task is executed.
  • Page 132 10 Interrupts PLC Setup Set IN2 to Interrupt in the interrupt input settings on the Built-in Input Tab Page. Connecting Interrupt Input Terminals Terminal 2 on terminal block 0CH is interrupt input IN2. Interrupt task 2 corresponds to interrupt input 2.
  • Page 133: Interrupt Task

    Cyclic Task P_First_Cycle Interrupt input 2 The MSKS instruction is used to specify an interrupt when the Specifies executing input turns ON and then it is interrupt when input used to unmask the input turns ON. interrupt. Interrupt input 2 Unmasks the input interrupt.
  • Page 134: Scheduled Interrupts

    10-3 Scheduled Interrupts Scheduled interrupts can be used with any model of CP1E CPU Unit. 10-3-1 Overview Scheduled interrupts can be used to execute interrupt tasks at fixed time intervals measured by the CPU Unit’s internal timer. Minimum interval: 1 ms...
  • Page 135: Flow Of Operation

    CX-Programmer and select Properties. Select Interrupt Tasks 01 (scheduled inter- rupt) in Task Type Field of the Program Properties Dialog Box. Execute MSKS in a Cyclic Task The MSKS instruction must be executed from the ladder program in a cyclic task in order to use scheduled interrupts. Execution condition...
  • Page 136 Precautions for Correct Use Precautions for Correct Use • Set a scheduled interrupt interval is longer than the time required to execute the correspond- ing interrupt task. • If you shorten the scheduled interrupt interval and increase the execution frequency of the scheduled interrupt task, the cycle time will increase, and this will affect the execution timing of cyclic tasks.
  • Page 137: Precautions For Using Interrupts

    When the processing time of an interrupt task exceeds 0.1ms, the processing time of the interrupt task and the task number of the interrupt with the maximum processing time can be found in the Auxiliary Area. The actual processing time can also be checked.
  • Page 138 10 Interrupts 10-14 CP1E CPU Unit Software User’s Manual(W480)
  • Page 139: High-Speed Counters

    Pulse Input Methods Settings ........
  • Page 140: Overview

    • High-speed processing according to the workpiece’s position data. The present value of the high-speed counter is stored in the Auxiliary Area and can be used as posi- tion data. When it reaches preset values, interrupts can be generated. The count can be started and stopped.
  • Page 141: Flow Of Operation

    Precautions for Correct Use Precautions for Correct Use A built-in input cannot be used as a normal input, interrupt input, or quick-response input if it is being used as a high-speed counter input. Refer to 8-3-3 Allocating Built-in Input Terminals for details.
  • Page 142 • Increment pulse input * Only a software reset can be used if an increment pulse input is specified. Note The power supply must be restarted after the PLC Setup is transferred in order to enable the high-speed counter settings.
  • Page 143 Note 1 The same pulse input must be used for high-speed counter 0 and high-speed counter 1. 2 High-speed counter 2 cannot be used if the input setting of high-speed counter 0 or high-speed counter 1 is set for differential phase inputs (4x), pulse + direction inputs, or up/down pulse inputs.
  • Page 144 11 High-speed Counters Wiring Example for High-speed Counter Input Terminals Using a 24-VDC Open-collector Encoder The following example shows the connections of an encoder with phase-A, phase-B, and phase-Z inputs to high-speed counter 0. CP1E CPU Unit (Differential Phase Input Mode) Black Phase A 0.00...
  • Page 145: Specifications

    Up to 6 target values and corresponding interrupt task numbers can be registered. method comparison Range Up to 6 ranges can be registered, with a separate upper limit, lower limit, and inter- comparison rupt task number for each range. Counter reset method •...
  • Page 146: High-Speed Counter Inputs

    • Differential phase input (4×) • Up/Down pulse input • Pulse+direction input Increment Pulse Input The Increment Pulse Input counts signals on a single-phase pulse input. Only incrementing the count is possible in this mode. Conditions for Incrementing the Count...
  • Page 147: Pulse + Direction Input

    11 High-speed Counters Pulse + Direction Input The Pulse + Direction Input uses a direction signal and a pulse signal. The count is incremented or dec- remented depending on the status (ON or OFF) of the direction signal. Conditions for Incrementing/...
  • Page 148: Counting Ranges Settings

    Circular (Ring) Mode that counts in a set range of any maximum value. Linear Mode Input pulses can be counted in the range between the lower limit and upper limit values. If the pulse count goes beyond the lower/upper limit, an underflow/overflow will occur and counting will stop.
  • Page 149: Reset Methods

    Precautions for Correct Use • There are no negative values in Ring Mode. • If the maximum ring count is set to 0 in the PLC Setup, the counter will operate with a maxi- mum ring count of FFFF FFFF hex.
  • Page 150: Reading The Present Value

    • Value updated when a ladder program is executed → Read PV by executing a PRV instruction. Reading the Value Refreshed at the I/O Refresh Timing The PV that is stored in the following words can be read using the MOVL instruction or other instructions. Read PV...
  • Page 151: Frequency Measurement

    This function measures the frequency of the high-speed counter (input pulses.) The input pulse frequency can be read by executing the PRV instruction. The measured frequency is output in 8-digit hexadecimal and expressed in Hz. The frequency measurement function can be used with high-speed counter 0 only.
  • Page 152: High-Speed Counter Interrupts

    This function counts input pulses with the CPU Unit’s built-in high-speed counter and executes an inter- rupt task when the count reaches the preset value or falls within a preset range (target-value or zone comparison). An interrupt task between 0 and 15 can be allocated with the CTBL instruction.
  • Page 153 Precautions for Correct Use Precautions for Correct Use A built-in input cannot be used as a normal input, interrupt input, or quick-response input if it is being used as a high-speed counter input. Refer to 8-3-3 Allocating Built-in Input Terminals for details.
  • Page 154 11 High-speed Counters PLC Setup Click the Built-in Input Tab and select the Use high-speed counter Check Box for high-speed counters 0 to 5, and then set the counting mode, reset method, and input setting. Refer to 11-1-2 Flow of Operation in Page 11-3 for details.
  • Page 155: Present Value Comparison

    • Comparison is executed in the order set in the comparison table. Once comparison has cycled through the comparison table, it will return and wait for a match with the first target value again. The following examples show the operation of an interrupt task for a comparison table.
  • Page 156 • A different interrupt task can be registered for each target value. • If the PV is changed, the changed PV will be compared with the target values in the table, even if the PV is changed while the target value comparison operation is in progress.
  • Page 157 The sum of execution time for interrupt tasks in one cycle is stored in A442. (For CPU Unit version 1.0 or earlier, the interval must be longer than 6 ms plus the sum of execution time for interrupt tasks that may possibly happen at the same time and the data in A442 is unsta- ble.)
  • Page 158: Range Comparison

    Precautions for Correct Use When more than one comparison condition is met in a cycle, the first interrupt task in the table will be executed in that cycle. The next interrupt task in the table will be executed in the next cycle.
  • Page 159: High-Speed Counter Interrupt Instruction

    11-3-3 High-speed Counter Interrupt Instruction COMPARISON TABLE LOAD Instruction: CTBL The CTBL instruction compares the PV of a high-speed counter (0 to 5) to target values or ranges and executes the corresponding interrupt task (0 to 15) when the specified condition is met.
  • Page 160 The range comparison table requires a continuous block of 30 words for comparison conditions 1 to 6 require 5 words each (two words for the upper range value, two words for the lower range value, and one word for the interrupt task number).
  • Page 161 11 High-speed Counters Example 1: Target Value Comparison In this example, high-speed counter 0 operates in linear mode and starts interrupt task 10 when the PV reaches 30,000 (0000 7530 hex) and starts interrupt task 11 when the PV reaches 20,000 (0000 4E20 hex).
  • Page 162 Software reset (continue comparing) Input Setting Up/Down inputs Set the range comparison table starting at word D2000. Even though range 1 is the only range being used, all 30 words must still be dedicated to the range comparison table. Word...
  • Page 163 First comparison table word. When execution condition W0.00 turns ON, the comparison starts with high-speed counter 1. When the PV of high speed counter 1 is between 25,000 and 25,500, cyclic task execution is interrupted, and interrupt task 12 is executed.
  • Page 164: Related Auxiliary Area Bits And Words

    A321.10 A326.10 A327.10 tion Flags 1: Incrementing High-speed ON at a software A531.00 A531.01 A531.02 A531.03 A531.04 A531.05 Counter reset Reset Flags * High-speed counter 5 is not supported by E10 CPU Units. 11-26 CP1E CPU Unit Software User’s Manual(W480)
  • Page 165: Application Example

    Functions Used: High-speed Counting for a Built-in Input A high-speed counter input can be used by connecting a rotary encoder to a built-in input. A CP1E CPU Unit is equipped with more than one high-speed counter input, making it possible to control devices for multiple axes with a single PLC.
  • Page 166: System Configuration

    CIO 100.03 (indicator) Example: Inverter Normal stop position output: CIO 100.02 (indicator) PLC Setup Use the following procedure to enable high-speed counter 0. Open the PLC Settings Dialog Box. Click the Built-in Input Tab. 11-28 CP1E CPU Unit Software User’s Manual(W480)
  • Page 167: Programming Example

    The changes made to the PLC Setup is applied. Programming Example 1 In this example, the CTBL (COMPARISON TABLE LOAD) instruction is used to create an interrupt when the target value is reached. Slowing and stopping are executed as interrupt tasks, allowing high-speed processes to be executed without affecting the cycle time.
  • Page 168 11 High-speed Counters When the PV of the high-speed counter matches target value 1 (3000), interrupt task 4 is executed. Interrupt task 4 Turns ON the motor low speed output When the present vale of the high-speed counter matches target value 2 (3500), interrupt task 5 is executed.
  • Page 169 12-6 Related Auxiliary Area Flags ........
  • Page 170: Overview

    Pulse outputs can be output from the CPU Unit's built-in outputs using instructions to perform position- ing or speed control with a servomotor or a stepping motor that accepts pulse inputs. It is also possible to perform origin searches or origin returns.
  • Page 171: Flow Of Operation

    PLC Setup To perform an origin search or to use a Limit Input Signal as an input to a function other than origin search, set the parameters on the Pulse Output 0 and Pulse Output 1 Tab Pages in the PLC Setup.
  • Page 172 12 Pulse Outputs Setting the Pulse Output Port Number, Assigning Pulse Output Terminals, and Wiring Pulse Output Method Only the following pulse output plus a direction output can be used as the pulse output method. Pulses ON (=CW) OFF (=CCW)
  • Page 173: Pulse Outputs

    Pulse 1, Error counter reset output Normal output 5 Note When the origin search is in operating mode 0, normal output 4 and 5 can be used at the same time. Connecting the Servo Drive and External Sensors Connections for Pulse Output 0...
  • Page 174 Connections for Pulse Output 1 Terminal block Origin search Terminal Addresses Signal Terminal block Operating mode 0 Operating mode 1 Operating mode 2 number label CIO 100 CIO 100.01 Stored in A278 Pulse Connect to Servo Drive’s pulse input (PULS). and A279 CIO 100.03...
  • Page 175 G Series (pulse string input) R88A-CPG Set the Servo Drive’s command pulse mode to feed pulse and forward/reverse signals because the method of pulse output from a CP1E CPU Unit is pulse + direction. Connecting to a SmartStep2-series Servo Drive...
  • Page 176 Orange (Black 3) 10126-3000PE Connector Plug (3M) 10326-52AD-008 Connector Plug (3M) AWG24 × 13P UL20276 Cable Each twisted pair has wires of the same color and number of marks. R7A-CPZ S Cables for SmartStep Junior Servo Drives Wire / mark colors...
  • Page 177 Outputting to the Auxiliary Area Using the OUT Instruction The OUT instruction in the ladder program is used to write signals received from the CW limit sensor and CCW limit sensor connected to normal inputs to the Auxiliary Area bits.
  • Page 178: Specifications

    ORG instruction. Relative coordinates are used when the origin location is undefined. Relative pulse/absolute pulse specifica- The pulse type can be specified with an operand in the PULS or PLS2 instruc- tions tion. Note The absolute pulse specification can be used when absolute coordi- nates are specified for the pulse output PV, i.e.
  • Page 179: Positioning Control

    12 Pulse Outputs 12-2 Positioning Control This section describes how to use pulse outputs with trapezoidal acceleration and deceleration when using the PLS2 instruction. 12-2-1 Positioning Control Configuration If the target frequency, starting frequency, acceleration and deceleration rate, direction are set before- hand, the following time chart will perform trapezoidal positioning control.
  • Page 180 12 Pulse Outputs Relationship between the Coordinate System and Pulse Specification The following table shows the pulse output operation for the four possible combinations of the coor- dinate systems (absolute or relative) and the pulse output (absolute or relative) specified when the PULS or PLS2 instruction is executed.
  • Page 181: Application Example

    Additional Information The origin position is undefined in the following case. Please define the origin position by per- forming the origin searches again. • When the pulse output reset flag is turned ON •...
  • Page 182 • Absolute pulses can be specified when the origin position has been defined. • If a target frequency that cannot be reached has been set, the target frequency will be reduced automatically, i.e., triangular control will be performed. In some cases where the acceleration rate is substantially greater than the deceleration rate, the operation will not be true triangular control.
  • Page 183: Jogging

    12-3-1 High-speed Jogging Start pulse output with acceleration or deceleration using the ACC instruction. In this case, acceleration and deceleration rate must be the same. Set the target frequency of the ACC instruction to 0 Hz to stop the pulse output.
  • Page 184 The example shows jogging with acceleration and deceleration executed using an ACC instruction. It is used for high-speed jogging. • Clockwise high-speed jogging will be executed from pulse output 1 while CIO 0.04 is ON. • Counterclockwise high-speed jogging will be executed from pulse output 1 while CIO 0.05 is ON.
  • Page 185 RSET W0.03 Additional Information The PLS2 instruction can be used to set a starting frequency or separate acceleration and decel- eration rates, but there are limitations on the operating range because the end point must be specified in the PLS2 instruction.
  • Page 186: Defining Origin Position

    After the Origin Proximity Input is detected, the motor is decelerated to the origin search low speed and run at that speed until the origin position is detected. The motor is stopped at the origin position.
  • Page 187: Flow Of Operation

    12-4-3 Settings in PLC Setup To perform an origin search or to use a Limit Input Signal as an input to a function other than origin search, set the parameters on the Pulse Output 0 and Pulse Output 1 Tab Pages in the PLC Setup.
  • Page 188 Opera- tion tion Search Direc- Set the direction for detecting the Origin Input Signal. An origin search is performed so Settings tion that the Origin Input Signal’s rising edge is detected when moving in the origin search direction.
  • Page 189 * The actual monitoring time will be the Positioning Monitor Time rounded up to the nearest 10-ms unit + 10 ms max. If the Positioning Monitor Time is set to 0, the function will be disabled and the Unit will continue waiting for the Positioning Completed Signal to come ON.
  • Page 190: Origin Search Instructions

    Create a program that can identify the limit sensor when using the origin search. The OUT instruction is used in the ladder program to write signals received from the CW limit sensor and CCW limit sensor connected to normal inputs to the Auxiliary Area bits.
  • Page 191: Origin Search Operations

    * There are stepping motor drivers that are equipped with a Positioning Completed Signal like a servomotor. Oper- ating modes 1 and 2 can be used with these stepping motor drivers. The use of an error counter reset output and positioning completed input depends on the mode as described in the following table.
  • Page 192 In this operating mode, the Origin Input Sig- nal will be detected if it is received during this deceleration and an Origin Input Signal Error (error code 0202) will be generated. In this case, the motor will decelerate to a stop.
  • Page 193 Connect the phase-Z signal from the Servo Drive to the Origin Input Signal. When the Origin Input Signal is received, the pulse output will be stopped and the Error Counter Reset Signal will be output for about 20 to 30 ms.
  • Page 194 Completed Input) This operating mode is the same as mode 1, except the Positioning Completed Signal (INP) from the Servo Drive is used. Connect the Positioning Completed Signal from the Servo Drive to a normal input. If origin compensation is not being applied, the Positioning Completed Signal is checked after the Error Counter Reset Output.
  • Page 195 12 Pulse Outputs Origin Detection Method Setting Origin Detection Method 0: Origin Proximity Input Signal Reversal Required (Recommended Method) Deceleration starts when Origin Proximity Input Signal turns ON. Origin Proximity Input Signal After the Origin Proximity Input Signal turns ON and then OFF, the motor is stopped when the Origin Input Signal turns ON.
  • Page 196 The following examples show how the operation patterns are affected by the origin detection method and origin search operating mode. These examples have a CW origin search direction. (The search direction and Limit Input Signal direc- tion would be different for an origin search in the CCW direction.) Method 0 is the recommended method for reversal mode 1 (Inverse 1).
  • Page 197 Stop CW Limit Input Signal (See note.) Start Start Limit stop (error code:0200) Note When the Limit Input Signal is received, the motor stops without deceleration. 1: Origin Proximity Input Signal Origin Proximity reversal not required. Input Signal Origin Input Signal...
  • Page 198: Origin Return

    ORG. The origin return operation returns the motor to the origin by starting at the specified speed, accelerat- ing to the target speed, moving at the target speed, and then decelerating to a stop at the origin posi- tion.
  • Page 199: Changing The Present Value Of The Pulse Output

    12-4-7 Changing the Present Value of the Pulse Output The present value of the pulse output can be changed by using the INI instruction. To define the present value as the origin, set the pulse output PV to 0 using the INI instruction.
  • Page 200: Reading The Pulse Output Present Value

    • Value updated when a program is executed Read PV by executing a PRV instruction. Reading the PV Refreshed at the I/O Refresh Timing The PV that is stored in the following words can be read using the MOVL instruction or other instruc- tions. Read PV...
  • Page 201: Related Auxiliary Area Flags

    A540.00 A541.00 Reset Bit this bit is turned ON. 1: Clear PV. CW Limit Input This flag shows the status of the CW Limit ON when turned ON A540.08 A541.08 Signal Flag Input Signal, which is used in the origin from an external input.
  • Page 202: Application Examples

    12-7-1 Vertically Conveying PCBs (Multiple Progressive Positioning) Specifications and Operation Outline PCBs with components mounted are stored in a stocker. When a stocker becomes full, it is moved to the conveyance point. Positioning Operation for Vertical Conveyor Stocker conveyance position...
  • Page 203 Completed Input (CIO 0.03). Storing PCBs is repeated until the stocker is full. The number of PCBs in the stocker is counted with counter C0 by counting the number of times the stocker is raised. When the stocker is full, it is moved (CIO 100.01) and only the conveyor is lowered (absolute positioning) when stoker movement is completed (CIO 0.04).
  • Page 204 Setting Use define origin operation for pulse output 0. Note The Use define origin operation setting is read from the PLC Setup when the power supply is turned ON. DM Area Settings • Settings for PLS2 for Fixed-distance Positioning (D0 to D7)
  • Page 205 @PLS2 W0.03 #0000 #0100 Lift positioning in progress W0.04 A280.03 Lift positioning completed Pulse Output Completed Flag Counter for number of lifts (number of PCBs stored) W0.04 CNTX Lift positioning completed 0000 W0.09 Lower positioning completed P_First_Cycle First Cycle Flag CP1E CPU Unit Software User’s Manual(W480)
  • Page 206 12 Pulse Outputs When the stocker is not full (C0 = OFF), store PCB, and repeat lift positioning after PCB storage is completed. W0.05 W0.04 C000 PCB stored Lift positioning Stocker full completed When the stocker is full (C0 = ON), move the stocker, and start lower positioning after stocker movement is completed.
  • Page 207: Feeding Wrapping Material: Interrupt Feeding

    Position control Pulse output Operation Pattern Speed control is used to feed wrapping material to the initial position. When the marker sensor input is received, fixed-distance positioning is performed before stopping. 10,000 Hz (2710 Hex) 500 Hz/4ms (01F4 Hex)
  • Page 208 Setting Enable using built-in input IN4 as an interrupt input. Note The interrupt input setting is read from the PLC Setup when the power supply is turned ON. DM Area Settings • Speed Control Settings to Feed Wrapping Material to Initial Position...
  • Page 209 Completed Flag Emergency Stop 0.01 @INI Emergency stop switch #0000 #0003 Program for Interrupt Task 4 Interrupt Task for Marker Sensor Input IN4 Starting interrupt feed P_ON PLS2 Always ON Flag #0000 #0100 CP1E CPU Unit Software User’s Manual(W480) 12-41...
  • Page 210: Precautions When Using Pulse Outputs

    Pulse outputs will stop according to the PLC Setup when either the CW or CCW Limit Input Signals turns ON. It is also possible to select whether or not the defined origin will be cleared when a CW or CCW Limit Input Signal turns ON for a pulse output function.
  • Page 211 9.996 Combinations of Pulse Control Instructions The following tables show when a second pulse control instruction can be started if a pulse control operation is already being executed. A second independent-mode positioning instruction can be started if an independent-mode positioning instruction is being executed, and a second continuous-mode speed control instruction can be started if a continuous-mode speed control instruction is being executed.
  • Page 212 If an error occurs that stops pulse output, the pulse output’s Output Stopped Error Flag will be turned ON and the Pulse Output Stop Error Code will be written to Error Code word. Use these flags and error codes to identify the cause of the error.
  • Page 213 1: Stop error occurred. origin search function. Stop Error Codes A444 A445 When a Pulse Output Stop Error occurs, the error code is stored in that pulse outputs corresponding Stop Error Code word. Pulse Output Stop Error Codes Error Operation after...
  • Page 214 Proximity Input Signal, Origin Input Signal, No effect on other Origin Reverse performed, the Limit Input Sig- and Limit Input Signal as well as the PLC port Error nal in the search direction was Setup’s I/O settings. Also check the PLC input while the Origin Proxim- Setup’s Signal Type settings (NC or NO) for...
  • Page 215: Pulse Output Pattern

    The CP1E CPU Unit’s pulse output function enables operation in Continuous Mode, for which the num- ber of output pluses is not specified, or in Independent Mode, for which the number of output pulses is specified. Continuous Mode is used for speed control and Independent Mode is used for positioning.
  • Page 216 Execution of ACC * If an ACC instruction started the operation, the original acceleration/deceleration rate will remain in effect. If a SPED instruction started the operation, the acceleration/deceleration rate will be invalid and the pulse output will stop immediately. 12-48...
  • Page 217: Positioning Control (Independent Mode)

    12 Pulse Outputs 12-9-2 Positioning Control (Independent Mode) The following operations can be performed in Independent Mode by combining instructions. Starting a Pulse Output Procedure Example Operation Frequency changes Description Instruc- application Settings tion Output with Positioning Starts outputting PULS •...
  • Page 218 12 Pulse Outputs * Triangular Control If the specified number of pulses is less than the number required just to reach the target frequency and return to zero, the function will automatically reduce the acceleration/deceleration time and perform triangu- lar control (acceleration and deceleration only.) An error will not occur.
  • Page 219 Execution of ACC tion and (different quency. PLS2 (independent mode) • Port PLS2 executed to change the target decelera- accelera- To prevent the tar- frequency and acceleration/deceleration PLS2 • Pulse + tion rates) tion and rates.(The target position is not...
  • Page 220 • Port Execution of ACC positioning PLS2 (Independent mode) When the settings cannot • Pulse + PLS2 executed to change the target (multiple be changed without main- position, target frequency, and Direction start func- acceleration/deceleration rates taining the same speed •...
  • Page 221 Instruction Settings Stop pulse Immediate Stops the pulse output immedi- PULS Stop pulse Pulse frequency output stop ately and clears the number of output ↓ (Number of output pulses setting. Present ACC or SPED frequency pulses set- (Independent) ting is not ↓...
  • Page 222 Time Execution of ACC (continuous) Execution of PLS2 with the following settings Number of pulses = number of pulses until stop Relative pulse specification Target frequency = present frequency Acceleration rate = Not 0 Deceleration rate = target deceleration rate * The starting frequency is ignored.
  • Page 223: Pwm Outputs

    Ladder Program Example........
  • Page 224: Pwm Outputs (Variable-Duty-Factor Pulse Outputs)

    PWM outputs can be used only with the CP1E N/NA-type CPU Unit with transistor outputs. A PWM (Pulse Width Modulation) pulse can be output with a specified duty factor. The duty factor is the ratio of the pulse’s ON time and OFF time in one pulse cycle. Use the PWM instruction to generate PWM pulses from a built-in output.
  • Page 225: Flow Of Operation

    Specifications and Operation When the start input (CIO 0.00) turns ON in this example, pulses with a duty factor of 40% at a fre- quency of 2,000 Hz are output from PWM output 0. When the stop input (CIO 0.01) turns ON, PWM output 0 is stopped.
  • Page 226 Frequency: 2,000.0 Hz #4E20 Duty factor: 40.0% #0190 Ladder Diagram 0.00 @PWM PWM output 0 (Duty factor in increments of 0.1%, Frequency in increments of 0.1 Hz) #1000 Start input Frequency setting Duty factor setting 0.01 @INI PWM output 0...
  • Page 227 14-1-1 Types of CPU Units and Serial Ports ....... 14-2 14-1-2 Overview of Serial Communications .
  • Page 228: Types Of Cpu Units And Serial Ports

    • N14/20 CPU Units have one built-in RS-232C port. There are no option slots. • N30/40/60 or NA20 CPU Units have one built-in RS-232C port and one option slot. An RS-232C or RS-422A/485 Option Board can be mounted for serial communications.
  • Page 229: Overview Of Serial Communications

    14 Serial Communications 14-1-2 Overview of Serial Communications The CP1E CPU Units support the following types of serial communications. Communications Built-in Optional Connected devices Description protocol RS-232C serial port Programmable Terminal Data can be exchanged with 1:N NT Links PTs without using a communi-...
  • Page 230 CPU Unit. *1 A PT cannot be included in the Serial PLC Links. *2 Connecting to the CX-Programmer is not possible with this protocol. Use the USB port. Additional Information Refer to A-3 Wiring for Serial Communications in the CP1E CPU Unit Hardware User’s Manual (Cat.No.W479) for Serial communication wiring.
  • Page 231: Program-Free Communications With Programmable Terminals

    • Communications are not possible for CP1E CPU Units using the 1:1 NT Link protocol. Do not connect more than one PT to a CP1E CPU Unit even if the 1:N NT Link protocol is used. • SAP (Smart Active Parts) on NS-series PTs cannot be used for CP1E CPU Units.
  • Page 232: Flow Of Connection

    Settings Tab Page in the system menu. Set the same communications settings in the CP1E CPU Unit’s PLC Setup and in the NS-series PT. Connect the CP1E CPU Unit and external devices using the RS-232C or RS-422A/485 ports. 14-2-3 PLC Setup and PT System Settings Set the parameters in the PLC Setup and the PT’s System Menu.
  • Page 233 Select NT Links (1:N) from Serial Port A or Serial Port B on the Memory Switch Menu under the System Menu on the PT. Press the SET Touch Switch to set the baud rate to high speed. (A baud rate of 115,200 bps in the PLC Setup is the same as setting high speed for the PT.) Connection with Other Company’s Display Devices...
  • Page 234: No-Protocol Communications With General Components

    General component (e.g., barcode reader) No-protocol communications are used to send data in one direction to or from general external devices that have an RS-232C or RS-422A/485 port using TXD or RXD. For example, simple (no-protocol) communications can be used to input data from a barcode reader or output data to a printer.
  • Page 235: Flow Of Operation

    1 to 256. • To use CR+LF as the end code, set CR+LF. • To set the end code to any value between 00 to FF hex, set a value between 0x0000 and 0x00FF. CP1E CPU Unit Software User’s Manual(W480)
  • Page 236: Related Auxiliary Area Bits And Words

    (No-protocol mode) • When the number of bytes was specified: ON when the specified number of bytes is received. • When the end code was specified: ON when the end code is received or 256 bytes are received. A392.07 Built-in RS-232C Port...
  • Page 237: Modbus-Rtu Easy Master Function

    3G3JV, 3G3MV, or 3G3RV CP1E N/NA-type CPU Unit Modbus-RTU commands can be sent simply by turning ON a software switch after setting the Modbus slave address, function, and data in the DM fixed allocation words for the Modbus-RTU Easy Master.
  • Page 238: Setting And Word Allocation

    14 Serial Communications 14-4-3 Setting and Word Allocation DM fixed allocation words and Auxiliary Area words are allocated for the Modbus-RTU Easy Master according to the CPU Unit type and connected port as shown below. CP1E CPU Unit serial port...
  • Page 239: Error Codes

    Other FINS response code was received. Related Auxiliary Area Words and Bits The Modbus-RTU command set in the DM fixed allocation words for the Modbus-RTU Easy Master is automatically sent when the Modbus-RTU Master Execution Bit is turned ON. The results (normal or error) will be given in corresponding flags.
  • Page 240: Programming Examples

    14-4-4 Programming Examples A bobbin winder on a spinning machine will be used in the following example. The speed of the bobbin winder must be controlled as the thread is wound because the speed of the thread is constant. Constant thread speed...
  • Page 241 RS control for RD Enabled RS control for SD Enabled 3G3MV Settings Set the DIP switch as follows: • SW2, pin 1 : ON (terminating resistance connected) Terminating resistance for RS422/485 communications • Set the following parameters. Name Setting Description...
  • Page 242 Set the Modbus communications settings to match those of the Settings Inverter. If the Inverter is set to 9,600 bps, one stop bit, and even parity, select the Custom Option and set the baud rate to 9,600. Set the format to 8,1,E.
  • Page 243 Frequency reference: 50.00Hz(1388 Hex) D1307 Contact Z D1306 RUN command (0: Stop) Frequency reference: 00.00Hz D1307 Start and continue Modbus communications from 1 second after turning ON the power supply. A641.00 Modbus-RTU Master Execution Bit A641.01 CP1E CPU Unit Software User’s Manual(W480) 14-17...
  • Page 244 Flags for Modbus-RTU Easy Master for Serial Option Port A641.00 Execution Bit A641.01 Execution Normal Flag A641.02 Execution Error Flag (1)Turn ON A641.00 (Execution Bit) to send command data stored starting at D1300. For details, refer to DM Area Data on page 14-19. Words Bits...
  • Page 245 DM Area data in words D1301 to D1305 are set before the execution of the ladder program. D1306 and D1307 do not need to be set. They are modified by MOV instructions, and are used to change, start, and stop frequency references.
  • Page 246: Serial Plc Links

    Shared data CP1E or CP1L CPU Unit (Polled Unit) Precautions for Correct Use Precautions for Correct Use With the CP1E CPU Units, a Programmable Terminal (PT) cannot be included in a Serial PLC Link. 14-20 CP1E CPU Unit Software User’s Manual(W480)
  • Page 247: Flow Of Operation

    Both serial ports cannot be used for PLC Links at the same time. If both serial ports are set for PLC Links (either as polling or polled nodes), a PLC Setup setting error (nonfatal error) will occur and the PLC Setup Setting Error Flag (A402.10) will turn ON.
  • Page 248 Communications Settings Set the communications settings to the same values as the connected PLCs. If the connected PLCs are set to 115,200 bps, select the Custom Option, set the baud rate to 115200. The format can be set to any value. Mode Select PC Link (Master).
  • Page 249: Operating Specifications

    14 Serial Communications 14-5-4 Operating Specifications Serial PLC Links can be used for both built-in RS-232C ports and serial option ports for N30/40/60 or NA20 CPU Units. However, two serial ports cannot be used simultaneously for Serial PLC Links. Item...
  • Page 250 14 Serial Communications Complete Link The data from all nodes in the Serial PLC Links are reflected in both the Polling Unit and the Polled Units. The only exceptions are the addresses of Polled Units that are not present in the network. These data areas are undefined in all nodes.
  • Page 251 14 Serial Communications Polling Unit Link Method The data for all the Polled Units in the Serial PLC Links are reflected in the Polling Unit only, and each Polled Unit reflects the data of the Polling Unit only. The advantage of the Polling Unit link method is that the addresses allocated for the local Polled Unit data are the same in each Polled Unit, allowing data to be accessed using common ladder program- ming.
  • Page 252: Allocated Words

    CIO 210 to No. 6 Polled Unit CIO 201 CIO 202 to CIO 203 to CIO 210 to No. 7 CIO 289 Not used. CIO 202 to CIO 204 to CIO 206 to 14-26 CP1E CPU Unit Software User’s Manual(W480)
  • Page 253: Serial Option Port

    Bit 11: Framing error * In the same way as for the existing 1:N NT Link, the status (communicating/not communicating) of the Polled Unit in Serial PLC Links can be checked from the Polling Unit (CPU Unit) by reading the Built-in RS-232C Port Com- municating with Polled Unit Flag (A393.00 to A393.07 for unit numbers 0 to 7) or the Serial Option Port Commu-...
  • Page 254: Example Application

    14-5-5 Example Application Operation The present temperature information is exchanged between the boilers. This information is used to adjust the temperature control of one boiler depending on the status of the other boilers and for moni- toring individual boilers. Boiler A...
  • Page 255 PC Link Unit No. Programming Example Data in the Serial PLC Link Areas are transferred using data links by the Serial PLC Link and without using any special programming. The ladder program is used to transfer the data that needs to be linked to the data link area.
  • Page 256: Connecting The Host Computer (Not Including Support Software)

    Host computers can be connected using this method only with the CP1E N/NA-type CPU Unit. 14-6-1 Overview Commands are sent from a host computer (not including Support Software) to the CP1E CPU Unit to read and write data. The serial communications mode is set to Host Link.
  • Page 257: Command/Response Format And List Of Commands

    14-6-3 Command/response Format and List of Commands The outline of command/response format and each command are listed below. For the details of the host link commands and FINS commands, refer to Communication Instructions Reference Manual (Cat.No.W342). List of C Mode Commands C mode commands (host link commands) are shown below.
  • Page 258 Parameter area write (clear) all at Replenish the specified ranges of parameter area once with the same data Operating Operating mode change (Operation Change the operating mode of CPU Unit to RUN or mode start) MONITOR mode change Operating mode change (Operation...
  • Page 259 Analog Output Signal Ranges ........
  • Page 260: Overview

    I/O point. • The input range can be set to -10 to 10 V, 0 to 10 V, 1 to 5 V, 0 to 5 V, 0 to 20 mA or 4 to 20 mA.
  • Page 261 CIO 100 CIO 190 Note 1 Use 2-conductor shielded twisted-pair cable for the I/O wiring, and do not connect the shield AG terminal. 2 If an input is not being used, connect (short) the input’s + and - terminals. 3 Wire I/O lines apart from power lines (AC power supply lines, three-phase power lines, etc.).
  • Page 262 (1) Countermeasure 1 • Turn ON the power supply for the CP1E CPU Unit first, and then turn ON the power supply for the load after confirming correct operation. • Turn OFF the power supply for the load before turning OFF the power supply for the CP1E CPU Unit.
  • Page 263 If a CPU error occurs, the analog output will be set to is set to 0 V or 0 mA even if the output range is 1 to 5 V or 4 to 20 mA. For any other fatal errors in the CPU Unit, 1 V or 4 mA will be output if the output range is 1 to 5 V or 4 to 20 mA.
  • Page 264: Analog I/O Specifications

    D/A conversion data -10 to 10 V F448 to 0BB8 hex FS Other ranges 0000 to 1770 hex FS * When the analog current output is 0 to 20 mA, the accuracy cannot be ensured at 0.2 mA or less. Shared I/O Specifications Item Specification Conversion time 2 ms/point (6 ms total for 2 analog inputs and 1 analog output.)
  • Page 265: Analog Input And Output Signal Ranges

    15-2 Analog Input and Output Signal Ranges Analog I/O data is digitally converted according to the analog I/O signal range as shown below. Note When the input exceeds the specified range, the AD converted data will be fixed at either the lower limit or upper limit.
  • Page 266 15 Analog I/O Function 0 to 5 V Input When the resolution is set to 1/6,000, the 0 to 5-V range corresponds to hexadecimal values 0000 to 1770 (0 to 6,000). The entire data range is FED4 to 189C (-300 to 6,300).
  • Page 267: Analog Output Signal Ranges

    0000 to 1770 (0 to 6,000). The entire data range is FED4 to 189C (-300 to 6,300). Inputs between 3.2 and 4 mA are expressed as two’s complements. If the input falls below 3.2 mA, open-circuit detection will activate and converted data will be 8000.
  • Page 268 15 Analog I/O Function 0 to 5 V Outputs When the resolution is set to 1/6,000, the hexadecimal values 0000 to 1770 (0 to 6,000) correspond to an analog voltage range of 0 to 5 V. Specify a negative voltage as a two’s complement.
  • Page 269: Special Functions

    The open-circuit detection function is activated when the input range is set to 1 to 5 V and the volt- age drops below 0.8 V, or when the input range is set to 4 to 20 mA and the current drops below 3.2 mA.
  • Page 270: I/O Allocation And Related Auxiliary Area Flags

    15-3-1 I/O Allocation Word I/O Points Description Values CIO 90 CIO words that I/O conversion data for AD0 is -10V to 10V range: F448 to stored in. 0BB8 hex CIO 91 CIO words that I/O conversion data for AD1 is Other ranges: 0000 to 1770 hex stored in.
  • Page 271 16-4-1 Ladder Program Read Protection ....... . 16-12 CP1E CPU Unit Software User’s Manual(W480)
  • Page 272: Pid Temperature Control

    Temperature Sensor Additional Information The sampling cycle set for a PIDAT instruction is between 10 ms to 99.99 s in increments of 10 ms. The actual calculation cycle is determined by the relationship with cycle time. Refer to the CP1E CPU Unit Instructions Reference Manual (Cat. No. W483) for the PIDAT instruction.
  • Page 273: Flow Of Operation

    Example: 100°C is stored as 0064 hex. • When the range code is a decimal number to one decimal point, the value is multiplied by a factor of 10 and converted to a hexadecimal number without a sign, then stored as binary data.
  • Page 274: Application Example

    Set the PID parameter in words C to C+10. Word C is specified by the second operand. Example: Place the set value (SV) in C and place the input range in bits 08 to 11 of C+6. Turn ON bit 15 of C+9 (AT Command Bit).
  • Page 275: Other Functions

    However, the PIDAT instruction can only handle unsigned hexadecimal data as the PV. The value is thus converted from the range FF38 to 0514 to the PIDAT instruction input range of 0000 to 1FFF hex (0 to 8191) using the APR instruction.
  • Page 276 • When W0.00 is ON, the Thermocouple’s PV (-200 to 1300) is scaled to the PIDAT instruction input range (#0 to #1FFF hex). The set values must be input according to the scaled PV. For example, if the PV is 160°C, it is set as [8191/(1300+200)] × (160+200) = 1966].
  • Page 277: Clock

    00: Sunday, 01: Monday, 02: Tuesday, 03: Wednesday, 04: Thursday, 05: Friday, 06: Saturday Additional Information The clock cannot be used if a battery is not installed or the battery voltage is low. Related Auxiliary Area Bits and Words Name...
  • Page 278: Dm Backup Function

    RAM to the built-in EEPROM backup memory during operation by turning ON a bit in the Auxiliary Area. The number of DM Area words to back up is specified in the Number of CH of DM for backup Box in the PLC Setup.
  • Page 279: Related Auxiliary Area Bits

    16 Other Functions Number of Words to Back Up The number of words to back up starting from D0 is set in the Number of CH of DM for backup Box in the Startup Data Read Area in the PLC Setup.
  • Page 280: Procedure

    PLC Setup from the CX-Programmer. Also, set the number of words to be backed up starting from D0 in the Number of CH of DM for backup Box. Transfer the PLC Setup to the CPU Unit and turn ON the power supply.
  • Page 281 Precautions for Safe Use Power Interruptions during Backup The BKUP indicator on the front of the CPU Unit will be lit when DM Area data is being saved to the built-in EEPROM backup memory. Do not turn OFF the power supply to the PLC while the indicator is lit. If the power supply to the PLC is turned OFF while the BKUP indicator is lit, data will not be backed up.
  • Page 282: Security Functions

    With the CX-Programmer, it is possible to set read protection using a password for the whole ladder program. When the program is read-protected using a password, it is not possible to display or edit any of the lad- der programs using the CX-Programmer unless the password is entered in the Disable Password Dia- log Box from the CX-Programmer.
  • Page 283 UM Read Protection A99.00 Indicates whether or not the whole ladder pro- Hold Hold Status grams are read-protected. OFF: UM read protection is not set. ON: UM read protection is set. CP1E CPU Unit Software User’s Manual(W480)
  • Page 284 16 Other Functions 16-14 CP1E CPU Unit Software User’s Manual(W480)
  • Page 285: Ethernet Option Board

    Ethernet Option Board Setup ........17-11...
  • Page 286: Features And Specifications

    Use the TCP/IP version of the FINS communications service (i.e., FINS/TCP). It provides automatic recovery at the TCP/IP layer from communications errors (such as packet loss) that occur during multilevel routing. For CX-Programmer, FINS/TCP can be used to directly connect to the PLC online.
  • Page 287: Features

    IP addresses in the UDP/IP version of the FINS communi- cations service or use the TCP/IP version of the FINS communications service. It is possible to connect online to a PLC using the CX-Programmer from a computer serving as a temporarily connected node or a permanent DHCP client.
  • Page 288 TCP/IP with up to 2 simultaneous connections . → Previously it is enabled in TCP/IP with up to 16 simultaneous connections and all can be set to cli- ent. • Multiple FINS applications, such as the CX-Programmer, on the same computer can be connected online to the PLC via Ethernet.
  • Page 289: Specifications

    36.4×36.4×28.2 mm (W×H×D) 17-1-4 Software Configuration The software supported by the Ethernet Option Board runs in the layers shown in the following diagram. It is necessary to set the communications settings before connecting the Ethernet Option Board to the CP1E CPU Unit by the Host Link protocol. Refer to Serial Communications Settings of the Option Board in section 17-2-1.
  • Page 290: Fins Communications

    Using TCP/IP makes FINS communications highly reliable. • Even if the IP address and UDP port number of the host computer (a DHCP client computer) are changed, it is still possible for the host computer to send FINS commands to PLCs on the Ether- net network and to receive responses.
  • Page 291 TCP/UDP, and remote port numbers. It is created automatically when power is turned ON to the PLC or when the unit is restarted, and it is automatically changed when a connection is established by means of the FINS/TCP method or when a FINS command received.
  • Page 292: Differences In Version Of The Ethernet Option Board

    Unit through the Ethernet Option Board. When accessing to the CP1E CPU Unit and reading 269 words from the DM area, if the cycle time of the CPU Unit is 10 ms, the processing time will be more than 225 ms and less than 356 ms.
  • Page 293: Startup Procedure

    Set the local IP address to 0.0.0.0 Set any value from the Web from the Web browser browser 192.168.250.1 Set in the allocated words in the DM area (set by the ladder programmer transfer the PLC memory with the CX-Programmer to make settings) Start communication CP1E CPU Unit Software User’s Manual(W480)
  • Page 294 CPU Unit and the Ethernet Option Board. Check and change the settings. If setting the mode to Host Link and the baud rate to any value except 9,600 or 115,200, the CP1E CPU Unit cannot be connected with Ethernet. Change the PLC Settings by USB.
  • Page 295: Settings

    Ethernet. The setting values are saved in the Ethernet Option Board’s EEPROM. The settings will be read from the allocated words when the power of the CP1E CPU Unit is turned ON again. Web browser of Internet Explorer...
  • Page 296: Transferring Data From The Cpu Unit

    Status Port (right) Each cycle Note The initial settings of the Ethernet Option Board cannot be set in the allocated words in the DM area or in the CX-Programmer’s system settings. Confirmation on the Settings of the Ethernet Option Board The settings of the Ethernet Option Board can be confirmed by the following two methods.
  • Page 297: Default Settings

    17-3-3 Default Settings The default settings of the Ethernet Option Board are shown in the following tables. Make the initial settings by the Web browser function if the settings are not as follows. • Common Settings of the FINS/UDP and FINS/TCP Methods...
  • Page 298 Local IP address can be set by the following two methods. Method 1: Set in the Settings from the Web browser Method 2: Set to 0.0.0.0 from the Web browser, and then set in the allocated words in the DM area (D1355 and D1356) by the ladder programmer If the local IP address is set neither by method 1 nor by method 2 (at default settings), it remains 192.168.250.1.
  • Page 299: Web Browser Setting Function

    Chinese page: http://(Ethernet Option Board’s IP address)/C00.htm Japanese page: http://(Ethernet Option Board’s IP address)/J00.htm In this example, use the following procedure to set the IP address using Internet Explorer version 6.0 and the Ethernet Option Board’s English Web pages. Connect to the Ethernet Option Board from the Web browser using the Ethernet Option Board’s default IP address.
  • Page 300 17 Ethernet Option Board Select Settings from the menu on the left side of the window to display the Settings Menu. Select 1. IP address and Protocols - System to display System menu. Make the required settings (i.e., the IP address in this example).
  • Page 301 After entering the correct values, click the Transfer Button to transfer the settings to the Ethernet Option Board. To enable the new settings, turn the power to the Ethernet Option Board OFF and ON again, or click the Restart Button.
  • Page 302 (i.e., the FINS communications service in this case). • Setting range: 1 to 65,535 • Make the settings so that the TCP port number 80 for HTTP does not overlap. • The port number setting only has an effect on the FINS/TCP server function, not on the FINS/TCP client function.
  • Page 303 IP Address Table Set the IP address table that defines the relationship between FINS node addresses and IP addresses. With FINS/UDP, this is enabled only when the IP address table method is set to the IP address conver- sion method.
  • Page 304 Shows the connection number. This is a network API used when TCP is used for the FINS communica- tions service. Up to 2 can be used at a time, and they are identified by connection numbers 1 to 2. The Ethernet Option Board can thus simultaneously execute the FINS communications service by TCP with up to 2 remote nodes.
  • Page 305: Unit Information

    Version Show the version information of the Ethernet Option Board. IP Address Show the IP address of the Ethernet Option Board. Subnet Mask Show the subnet mask of the Ethernet Option Board. FINS/UDP Port Number Show the FINS/UDP port number of the Ethernet Option Board.
  • Page 306: Unit Status

    Error Flags Indicate the operating status and errors that occurred when the Ethernet Option Board is turned ON. Total Number of Packets Show the total number of packets received by the Ether- Received net Option Board. Total Number of Receive...
  • Page 307: Fins Status

    If the connection is the FINS/TCP, show the connection number (1 to 4). TCP Status If the connection is the FINS/TCP, show the current con- nection status. The details of TCP status are listed as the following table. Status Meaning CLOSED Connection closed...
  • Page 308 Show the error recorder number. Error Code Show the error code of the error recorder. Detail Code Show the detail error code of the error recorder. Date Show the date of the error recorder. The functions of the buttons are as follows.
  • Page 309: Memory Allocations

    Using IP Address Display/Setting Area (2 words) D1456 Note 1 D1300 to D1454 can only display all of the settings stared in the unit. Modification in this area is invalid to the CP1W-CIF41 Ethernet Option Board. 2 D1455 and D1456 will display the IP address used by the CP1W-CIF41 when the power is turned ON.
  • Page 310: Mode Setting

    FINS/TCP and FINS/UDP Port Number 15 14 13 12 11 10 9 FINS/TCP port number (hex) D1301 FINS/UDP port number (hex) D1302 When displaying 0000, the port number is 9600. IP Address 15 14 13 12 11 10 9 (1)(2) (3)(4) D1303...
  • Page 311: Subnet Mask

    Pointer of IP Router Table Point to the last recorder in IP router table. For example, if the last recorder number in IP router table is 6, the value of this word is 6. IP Router Table Records Each IP router table record has 8 bytes.
  • Page 312 6 to 15 Reserved Always 0. FINS/TCP Connection No.1 to 2 Each FINS/TCP connection number has 5 bytes. The configuration of the 5 bytes of data in each number is as shown in the following diagram. Destination IP address Auto-allocated...
  • Page 313 The IP address is (1)(2).(3)(4).(5)(6).(7)(8) (hex) If the local IP address in the system setup is set to a value other than 0.0.0.0, this area will act as an IP address display area and the local IP address in the system setup will be read and stored here when the power is turned ON or the Ethernet Option Board restarted.
  • Page 314: Cio Area Allocation

    Always 1. Precautions for Correct Use Precautions for Correct Use Bit 15 is used for detect power condition of PLC, so do not change it at any time. Otherwise the CP1W-CIF41 Ethernet Option Board will generate error. 17-30 CP1E CPU Unit Software User’s Manual(W480)
  • Page 315: Error Status

    17 Ethernet Option Board Error Status The status of errors that occur at the Ethernet Option Board is reflected as shown in the following dia- gram. 15 14 13 12 11 10 CIO 81 IP address setting error Band rate disagreement...
  • Page 316: Trouble Shooting

    Error Log Table Each error is recorded as one record in an error log table. Up to 20 records can be saved. If more than 20 errors occur, the oldest errors will be deleted from the error log and the most recent error will be recorded.
  • Page 317: Error Codes

    17 Ethernet Option Board 17-5-2 Error Codes The error codes and ERR LED are described in the following table. The detailed error code will provide detailed information on an error. Detailed error code Error Meaning Correction EEPROM code 1st byte...
  • Page 318 Set the PLC Settings on Communications Set- the Serial Option Port Tab tings error as follows, and then turn the power ON again. Communications Settings • Baud: 115200 • Format: 7, 2, E • Mode: Host Link 17-34 CP1E CPU Unit Software User’s Manual(W480)
  • Page 319: Error Status

    17 Ethernet Option Board 17-5-3 Error Status The Ethernet Option Board will output error status to the following word in CIO 80 of the CPU Unit. This information can be used in troubleshooting errors. Error Correction IP address setting The following cannot be used as the IP address of the Ethernet Option Board.
  • Page 320: Connection Method With The Cx-Programmer

    Confirm the Communications Settings on the Serial Option Port Tab in the PLC Settings Dialog Box of the CP1E CPU Unit. If the mode is set to Host Link and the baud rate to 9,600 or other values except 115,200, the CP1E CPU Unit cannot be connected with Ethernet. ERR LED of the Ethernet Option Board will be lit.
  • Page 321 (2) Network Settings [Ethernet] Dialog Box (a) The settings in the Netwok Tab are as follows. • Set the network address to 0 (default) and the node address to 1 in FINS Destination Address settings. • Set Frame Length to 540 bytes max.
  • Page 322 192.168.250.2 set by manual, and it is invalid to change the setting. • Set IP address to 192.168.250.1, which is the Ethernet Option Board's IP address. • Set FINS/UDP Port to 9600 (default), which is the UDP port number in the FINS communications service.
  • Page 323: Network Installation

    Precautions on Laying Twisted-pair Cable Basic Precautions • Press the cable connector in firmly until it locks into place at both the hub and the Ethernet Option Board. • After laying the twisted-pair cable, check the connection with a 10Base-T cable tester.
  • Page 324 • Connect the hubs using special cables or special racks. • Normally there is no limit to the number of hubs in a stack, and each stack is treated as one hub. Some hubs, however, are limited in the number of hubs per stack.
  • Page 325: Comparison With Previous Models

    Parallel Serial port Note Limited by the CP1W-CIF41 inner bus protocol (Host Link, 7,2,E, 115200 bps), the system response perfor- mance is longer than the existing Ethernet Unit. Please consider the FINS command processing time and buffer limitation when using the CP1W-CIF41 Ethernet Option Board.
  • Page 326 17 Ethernet Option Board 17-42 CP1E CPU Unit Software User’s Manual(W480)
  • Page 327 18-2 Overview of CX-Programmer ........
  • Page 328: Programming Devices Usable With The Cp1E

    CP1E CP1E- 30D - CP1E- 40D - Note 1 To use CX-Programmer version 8.2 with a CP1E CPU Unit, the CX-One version 3 auto-update must be installed. 2 Use the CX-Programmer version 9.12 or higher, when CP1W-CIF41 is applied.
  • Page 329: Overview Of Cx-Programmer

    The CX-Programmer is a programming application for creating the ladder programs that are executed in a CP1E CPU Unit. In addition to ladder program creation, the CX-Programmer also has functions that are needed to set up and operate the CP1E, including functions for debugging ladder programs, displaying addresses and present values, monitoring, setting the connected PLC, programming, and monitoring.
  • Page 330 Names and Functions of Parts of the Main Window This section describes the names and functions of each part of the Main Window of the CX-Programmer. For details on the functions and operation of CX-Programmer, refer to the CX-Programmer Online Help.
  • Page 331 Displays information such as the PLC name, online/offline status, and position of the active cell. Ladder Section Window Rung Number Program Address Rung Header If a rung is incomplete, a red line will be displayed on the right side of the rung header. Bus Bar CP1E CPU Unit Software User’s Manual(W480) 18-5...
  • Page 332: Help

    The CX-Programmer Instruction Reference Window will be displayed. Displaying the Instruction Reference while Creating a Ladder Program While creating an instruction in a ladder program in Smart Input Mode, press the F1 Key to display the Instruction Reference page for the instruction being edited.
  • Page 333: Creating A Ladder Program

    Creating a New Project To use the CX-Programmer, the first step is to create a new project. To create a new project, we must specify the PLC type and CPU Unit model for which the ladder program and data to be created will be used.
  • Page 334 Additional Information If “USB” is not displayed for the network type, refer to 4-2-2 Installing the USB Driver in the CP1E CPU Unit Hardware User’s Manual (Cat.No.W479), and check that the USB driver has been installed correctly.
  • Page 335 O or W Key and select OR. • For a NC input condition, press the L or / Key, and then select LD NOT. For an OR NOT input condi- tion, press O or X and select OR NOT.
  • Page 336 • To input an OUTPUT instruction, press the O Key and select OUT. • To input an OUTPUT NOT instruction, press the O or Q Key, and then select OUT NOT. • Press the Enter Key, and then enter the address.
  • Page 337 When you enter the first letter, a list of candidate mnemonics will be displayed. Use the Up Cursor and Down Cursor Keys to move up and down through this list, and then press the Enter Key to make a selection. Then, input the operands.
  • Page 338 Select the above rung and then select Address Increment Copy from the Edit Menu. The following dialog box will be displayed. In the Offset Area set the Bit Field to 16 and the CH Field to 10 for this example. Click the Paste Button.
  • Page 339: Automatic Symbol Name Creation

    Example: D100 is incremented to D110. Automatic Creation of Symbol Names and I/O Comments If there are symbol names or I/O comments in the rung that was copied, executing the Address Increment Copy Command will automatically create symbol names and I/O comments.
  • Page 340: Saving And Reading Ladder Programs

    The same I/O comment is used for the copy. 18-3-2 Saving and Reading Ladder Programs Always save the ladder program that you have created. This section describes how to check, save, and read a ladder program. Checking a Ladder Program for Errors You can check for errors in a program by compiling it.
  • Page 341: Editing Ladder Programs

    Inputting and Editing I/O Comments Inputting an I/O Comment with the Ladder Editor In Smart Input Mode, an I/O comment can be input after an operand has been input using the Com- ment Dialog Box. Note The Comment Dialog Box shown above is displayed only when the Show with comment dialog Option is selected on the Options - Diagrams Dialog Box.
  • Page 342 18 Programming Device Operations Inputting by Editing I/O Comments Multiple I/O comments can be input or changed from an address list. Select Edit I/O Comment from the Edit Menu. The I/O Comment Editing Window will be displayed. Input I/O comments or double-click the address for which the I/O com- ments are to be changed.
  • Page 343: Inputting Rung Comments

    18 Programming Device Operations Inputting Rung Comments Comments can be added to rungs in the program. Double-click the header of the rung to which a comment is to be attached. The Rung Properties Dialog Box will be displayed. Input a comment into the Comment Field on the General Tab Page.
  • Page 344: Connecting Online To The Cp1E And Transferring The Program

    CP1E. 18-4-1 Connecting Online To enable transferring programs from the CX-Programmer to the CP1E, it is first necessary to place the CX-Programmer online with the CP1E. Online is the state in which communications is possible between the computer and the CP1E.
  • Page 345: Changing Operating Modes

    Additional Information If it is not possible to establish an online connection, check the PLC type setting and the commu- nications settings. To check them, double-click New PLC1 [CP1E] Offline in the project tree. For details on these settings, refer to Creating a New Project in 18-3-1 Inputting a Ladder Program.
  • Page 346: Transferring A Ladder Program And The Plc Setup

    18-4-3 Transferring a Ladder Program and the PLC Setup A ladder program created with the CX-Programmer can be transferred to the CP1E. Change to PROGRAM mode, select Operating Mode - Program from the PLC Menu, and then click the Yes Button.
  • Page 347: Starting Operation

    Precautions for Correct Use Precautions for Correct Use Operation will not be started when the power is turned ON if the PLC Setup is set so that the PLC enters PROGRAM mode at startup. Use the following procedure to change the operating mode to RUN mode. To perform trial operation for debugging or adjustments, change the operating mode to MONITOR mode.
  • Page 348 Additional Information PROGRAM mode cannot be changed to MONITOR or RUN mode when the user program, PLC Setup settings and DM area data in the CPU Units are being backed up. Change the operating mode after the backup is completed.
  • Page 349: Online Monitoring And Debugging

    18-5-1 Monitoring Status Displaying Execution Status It is possible to display the execution status of a ladder program. This enables checking the execution of the ladder program. Change the CP1E’s operating mode to MONITOR mode to display the execution status.
  • Page 350 18 Programming Device Operations Window Frames You can drag the frames in the window to display different views of the program in the Ladder Sec- tion Window. The window can be split into up to four sections. Monitoring Specified Addresses You can specify addresses to check bit status and word contents.
  • Page 351: Force-Set/Reset Bits

    18-5-2 Force-set/Reset Bits Input bits can be controlled from CX-Programmer regardless of input status from the input devices. This is used to establish input and output conditions when performing trial operation, or to see the effect of establishing conditions when debugging.
  • Page 352: Online Editing

    This can be done while the CP1E is in MONITOR mode or PROGRAM mode. Using the CX-Programmer, it is possible to either change part of a ladder program running on the CP1E , or make an addition to the program.
  • Page 353 18 Programming Device Operations Online Editing Procedure Change the CP1E’s operating mode to MONITOR or PROGRAM mode. Click the header of the rung to be edited. Select Online Edit - Begin from the PLC Menu. The gray color will be cleared from...
  • Page 354 18 Programming Device Operations 18-28 CP1E CPU Unit Software User’s Manual(W480)
  • Page 355: Appendices

    Sequence Control Instructions ........A-5...
  • Page 356: Instruction Functions

    Appendices Instruction Functions The CP1E CPU Units support the following instructions. Refer to the CP1E CPU Unit Instructions Reference Manual (Cat. No. W483) for details. A-1-1 Sequence Input Instructions Instruction Mnemonic Variations Symbol/Operand Function LOAD @/%/!/!@/!% Indicates a logical start and creates an ON/OFF execution condi- Bus bar tion based on the ON/OFF status of the specified operand bit.
  • Page 357: A-1-2 Sequence Output Instructions

    ON to OFF (falling edge). Execution condition B: Bit Status of B One cycle @/%/!/!@/!% SET turns the operand bit ON when the execution condition is ON. Execution condition of SET B: Bit Status of B CP1E CPU Unit Software User’s Manual(W480)
  • Page 358 Instruction Mnemonic Variations Symbol/Operand Function RESET RSET @/%/!/!@/!% RSET turns the operand bit OFF when the execution condition is ON. RSET Execution condition of RSET B: Bit Status of B MULTIPLE BIT SETA SETA(530) turns ON the specified number of consecutive bits.
  • Page 359: A-1-3 Sequence Control Instructions

    MILH(517)/MILR(518) is OFF. JUMP When the execution condition for JMP(004) is OFF, program exe- JMP(004) cution jumps directly to the first JME(005) in the program with the same jump number. JMP(004) and JME(005) are used in pairs. N: Interlock number Execution condition...
  • Page 360 The operation of CJP(510) is the basically the opposite of CJP(510) JUMP JMP(004). When the execution condition for CJP(510) is ON, pro- gram execution jumps directly to the first JME(005) in the program with the same jump number. CJP(510) and JME(005) are used in N: Interlock number pairs.
  • Page 361: A-1-4 Timer And Counter Instructions

    TMHH(540) TIMER (BCD) units of 1-ms. The setting range for the set value (SV) is 0 to 9.999 s for TMHH(BCD) and 0 to 65.535 s for TMHHX(Binary). The timing charts for TMHH(540) and TMHHX(552) are the same as those given above for TIMH(015).
  • Page 362 TTIM(087)/TTIMX(555) operates an incrementing timer with units Timer TTIM(087) TIVE TIMER (BCD) of 0.1-s. The setting range for the set value (SV) is 0 to 999.9 s for input TTIM(BCD) and 0 to 6,553.5 s for TTIMX(Binary). Timer input Reset...
  • Page 363 CNR(545)/CNRX(547) resets the timers or counters within the TIMER/ (BCD) CNR(545) specified range of timer or counter numbers. Sets the set value COUNTER (SV) to the maximum of #9999 for CNR(BCD) and #FFFF for CNRX(Binary). N1: 1st number in range...
  • Page 364: Comparison Instructions

    C: Control Word AND: Bits 00 to 05 of C specify whether or not the time data will be masked for the comparison. Bits 00 to 05 mask the seconds, Symbol minutes, hours, day, month, and year, respectively. If all 6 val- ues are masked, the instruction will not be executed, the execu- tion condition will be OFF, and the Error Flag will be turned ON.
  • Page 365 Symbol/Operand Function DOUBLE CMPL Compares two double unsigned binary values (constants and/or CMPL(060) UNSIGNED the contents of specified words) and outputs the result to the Arith- COMPARE metic Flags in the Auxiliary Area. Unsigned binary comparison S1+1 S2+1 S1: Comparison data 1...
  • Page 366: A-1-6 Data Movement Instructions

    Compares the 16-bit unsigned binary value in CD (word contents ZCP(088) COMPARE or constant) to the range defined by LL and UL and outputs the results to the Arithmetic Flags in the Auxiliary Area. CD: Comparison data (1 word) LL: Lower limit of range...
  • Page 367 (0 to 15 decimal) Destination bit: 00 to 0F (0 to 15 decimal) MOVE DIGIT MOVD Transfers the specified digit or digits. (Each digit is made up of 4 MOVD(083) bits.) S: Source word or data C: Control word D: Destination word...
  • Page 368 D+(N 1) N: Number of words N: Number of Words S: 1st source word D: 1st destination word The possible range for N is 0000 to FFFF (0 to 65,535 decimal). S+(N-1) D+(N-1) BLOCK SET BSET Copies the same word to a range of consecutive words.
  • Page 369: A-1-7 Data Shift Instructions

    Shifts the contents of Wd one bit to the left. ASL(025) SHIFT LEFT Wd: 100CH 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 Wd: Word 0 0 1 0 0 0 1 0 0 0 1 0 0 0 ARITHMETIC Shifts the contents of Wd one bit to the right.
  • Page 370 SHIFT RIGHT Lost St: Starting word E: End word SHIFT N-BITS NASL Shifts the specified 16 bits(NASL) or 32 bits(NSLL) of word data to NASL(580) LEFT the left by the specified number of bits. Shift n-bits D: Shift word C: Control word...
  • Page 371: A-1-8 Increment/Decrement Instructions

    Instruction Mnemonic Variations Symbol/Operand Function SHIFT N-BITS NASR Shifts the specified 16 bits(NASR) or 32 bits(NSRL) of word data NASR(581) RIGHT to the right by the specified number of bits. D: Shift word Contents of C: Control word "a" or "0"...
  • Page 372: A-1-9 Symbol Math Instructions

    Appendices Instruction Mnemonic Variations Symbol/Operand Function DOUBLE ++BL Increments the 8-digit BCD content of the specified words by 1. ++BL(595) INCREMENT Wd+1 Wd+1 Wd: 1st word − −B DECREMENT Decrements the 4-digit BCD content of the specified word by 1.
  • Page 373 ON when Au: 1st augend word there is a Ad: 1st addend word carry. R: 1st result word BCD ADD Adds 4-digit (single-word) BCD data and/or constants with the +BC(406) WITH CARRY Carry Flag (CY). (BCD) (BCD) Au: Augend word...
  • Page 374 Mi: 1st minuend word there is a Su: 1st subtrahend word borrow. R: 1st result word − BC BCD SUB- Subtracts 4-digit (single-word) BCD data and/or constants with the BC(416) TRACT WITH Carry Flag (CY). CARRY (BCD) (BCD) Mi: Minuend word...
  • Page 375 Md: 1st multiplicand word R + 3 R + 2 R + 1 (BCD) Mr: 1st multiplier word R: 1st result word SIGNED Divides 4-digit (single-word) signed hexadecimal data and/or con- /(430) BINARY stants. DIVIDE (Signed binary) ÷ (Signed binary)
  • Page 376: A-1-10 Conversion Instructions

    BLE BINARY (BCD) (BIN) (BCD) (BIN) S: 1st source word R: 1st result word BINARY-TO- Converts a word of binary data to a word of BCD data. BCD(024) (BIN) (BCD) S: Source word R: Result word DOUBLE BCDL Converts 8-digit hexadecimal (32-bit binary) data to 8-digit BCD...
  • Page 377 Reads the numerical value in the specified digit (or byte) in the MLPX(076) DECODER source word, turns ON the corresponding bit in the result word (or 16-word range), and turns OFF all other bits in the result word (or 16-word range). 4-to-16 bit conversion S: Source word l=1 (Convert 2 digits.)
  • Page 378 Variations Symbol/Operand Function DATA DMPX FInds the location of the first or last ON bit within the source word DMPX(077) ENCODER (or 16-word range), and writes that value to the specified digit (or byte) in the result word. 16-to-4 bit conversion...
  • Page 379 Parity 0: None 1: Even 2: Odd ASCII TO HEX Converts up to 4 bytes of ASCII data in the source word to their HEX(162) hexadecimal equivalents and writes these digits in the specified destination word. C: 0021 First byte to convert...
  • Page 380: A-1-11 Logic Instructions

    (R, R+1) R, R+1 I1: Input 1 I2: Input 2 R: Result word LOGICAL OR Takes the logical OR of corresponding bits in single words of word ORW(035) data and/or constants. I1: Input 1 I2: Input 2 R: Result word...
  • Page 381: A-1-12 Special Math Instructions

    Turns OFF all ON bits and turns ON all OFF bits in Wd. COM(029) MENT Wd: 1 0 and 0 Wd: Word DOUBLE COML Turns OFF all ON bits and turns ON all OFF bits in Wd and Wd+1. COML(614) COMPLE- (Wd+1, Wd) (Wd+1, Wd) MENT Wd: Word A-1-12...
  • Page 382 Signed binary data (32 bits) S: 1st source word Floating-point data R: 1st result word (32 bits) FLOATING- Adds two 32-bit floating-point numbers and places the result in the +F(454) POINT ADD specified result words. Augend (floating-point Au+1 data, 32 bits)
  • Page 383 2 to 18 hex (2 to 24 characters, see note) D: Destination word Fractional digits 0 to 7 hex (see note) Note There are limits on the total number of characters and the number of fractional digits. ASCII TO FVAL...
  • Page 384: A-1-14 Table Data Processing Instructions

    Instruction Mnemonic Variations Symbol/Operand Function SWAP BYTES SWAP Switches the leftmost and rightmost bytes in all of the words in the SWAP(637) range. Byte position is swapped. N: Number of words R1: 1st word in range FRAME Calculates the FCS value for the specified range and outputs the...
  • Page 385: Data Control Instructions

    Data Control Instructions Instruction Mnemonic Variations Symbol/Operand Function PID CON- PIDAT Executes PID control according to the specified parameters. The PIDAT(191) TROL WITH PID constants can be auto-tuned with PIDAT(191). AUTOTUNING C: First Parameter Word Set value (SV) Proportional band (P)
  • Page 386 S: Input word word contains an input duty ratio or manipulated variable. (Set C: 1st parameter word these bits to 0 hex to specify a input duty ratio or to 1 hex to R: Pulse output bit specify a manipulated variable.) The following diagram shows the locations of the parameter data.
  • Page 387 Symbol/Operand Function SCALING 2 SCL2 Converts signed binary data into signed BCD data according to SCL2(486) the specified linear function. An offset can be input in defining the linear function. Positive Offset Negative Offset R (signed BCD) R (signed BCD)
  • Page 388 Symbol/Operand Function SCALING 3 SCL3 Converts signed BCD data into signed binary data according to SCL3(487) the specified linear function. An offset can be input in defining the linear function. Positive Offset Negative Offset R (signed binary) R (signed binary)
  • Page 389: Subroutine Instructions

    Appendices Instruction Mnemonic Variations Symbol/Operand Function AVERAGE Calculates the average value of an input word for the specified AVG(195) number of cycles. S: Source word S: Source word N: Number of cycles N: Number of cycles R: Result word Pointer...
  • Page 390: A-1-17 Interrupt Control Instructions

    Both I/O interrupt tasks and scheduled interrupt tasks are masked (disabled) when the PC is first turned on. MSKS(690) can be used to unmask or mask I/O interrupts and set the time inter- vals for scheduled interrupts. N: Interrupt number...
  • Page 391: A-1-18 High-Speed Counter/Pulse Output Instructions

    Stops pulse output. NV: First Word with New PV If C is 0002 hex (i.e., when changing a PV), NV and NV+1 con- tain the new PV. Any values in NV and NV+1 are ignored when C is not 0002 hex.
  • Page 392 Appendices Instruction Mnemonic Variations Symbol/Operand Function HIGH-SPEED Reads the High-speed counter PV and pulse output PV. PRV(881) COUNTER PV P: Port Specifier READ 0000 hex Pulse output 0 0001 hex Pulse output 1 0010 hex High-speed counter 0 P: Port specifier...
  • Page 393 CTBL Registers a comparison table and performs comparisons for a PV CTBL(882) COMPARISON of high-speed counter 0 to 5. An interrupt task between 0 to 15 will TABLE be executed when an execution condition is turned ON. Rotary Encoder Built-in input...
  • Page 394 • For range comparison, the comparison table always contains CTBL(882) COMPARISON six ranges. The table is 30 words long, as shown below. If it is TABLE not necessary to set six ranges, set the interrupt task number to FFFF hex for all unused ranges.
  • Page 395 Relative pulse output: 0 to 2, 147, 483, 647, (0000 0000 to 7FFF FFFF hex) Absolute pulse output: -2, 147, 483, 648 to 2, 147, 483, 647, (8000 0000 to 7FFF FFFF hex) PULSE OUT- PLS2 Performs trapezoidal positioning control as the following time PLS2(887) chart.
  • Page 396 P: Port specifier M: Output mode S: First word of settings table F: First word of starting frequency ACCELERA- Outputs pulses to the specified output port at the specified fre- ACC(888) TION CON- quency using the specified acceleration and deceleration rate. TROL...
  • Page 397 Indicated by the Proximity Input Signal Origin Input Signal (Example for reversal mode 1 and method 0 (described later)) The following parameters must be set in the PLC Setup before ORG(889) can be executed. Origin search Origin return • Origin Search Function •...
  • Page 398: A-1-19 Step Instructions

    1%, frequency 1 Hz) F: Frequency F specifies the frequency of the PWM output between 2.0 and 6,553.5 Hz (0.1 Hz units, 0014 to FFFF hex), or between 2 and 32,000 Hz (2 Hz units, 0002 to 7D00 hex). D: Duty Factor 0.0% to 100.0% (0.1% units, 0000 to 03E8 hex)
  • Page 399: A-1-20 Basic I/O Unit Instructions

    SDEC Converts the hexadecimal contents of the designated digit(s) into SDEC(078) DECODER 8-bit, 7-segment display code and places it into the upper or lower 8-bits of the specified destination words. Number of digits First digit to convert S: Source word...
  • Page 400 I: Input Word (Data Line D0 to D3 Inputs) Specify the input word allocated to the Input Unit and connect the digital switch’s D0 to D3 data lines to the Input Unit as shown in the following diagram. I: Data input word (D0 to D3)
  • Page 401 Mnemonic Variations Symbol/Operand Function Inputs up to 64 signals from an 8 × 8 matrix connected to an Input MATRIX INPUT MTR (213) Unit and Output Unit (using 8 input points and 8 output points) and stores that 64-bit data in the 4 destination words.
  • Page 402 C: Control Data The value of C indicates the number of digits of source data and the logic for the Input and Output Units, as shown in the fol- lowing table. (The logic refers to the transistor output’s NPN or PNP logic.)
  • Page 403: A-1-21 Serial Communications Instructions

    Outputs the specified number of bytes of data without conversion TXD(236) from the RS-232C port built into the CPU Unit or the serial Option Board according to the start code and end code specified for no-protocol mode in the PLC Setup.
  • Page 404: A-1-22 Clock Instructions

    R: 1st result word Seconds Minutes Hours Seconds Minutes Hour Month Year CLOCK DATE Changes the internal clock setting to the setting in the specified DATE(735) source words. ADJUSTMENT CPU Unit S: 1st source word Internal clock Minutes Seconds Hour setting...
  • Page 405: A-1-23 Failure Diagnosis Instructions

    STC(040) CLEAR Turns OFF the Carry Flag (CY). CLC(041) CARRY EXTEND Extends the maximum cycle time, but only for the cycle in which WDT(094) this instruction is executed. MAXIMUM CYCLE TIME T: Timer setting CP1E CPU Unit Software User’s Manual(W480)
  • Page 406: Auxiliary Area Allocations By Address

    Appendices Auxiliary Area Allocations by Address The following table lists the data provided in the Auxiliary Area in order of the addresses of the data. A-2-1 Read-only Words Address Status Related after Status at Write Name Function Settings flags, mode...
  • Page 407 0000 hex if there is Each error record occupies 5 words; no related word. the function of these 5 words is as fol- Seconds: 00 to 59, lows: First word: Error code (bits 0 to 15)
  • Page 408 Count Direction incremented or decremented. The counter, valid counter PV for the current cycle is com- during counter pared with the PV in last cycle to deter- operation. mine the direction. OFF: Decrementing ON: Incrementing A-54 CP1E CPU Unit Software User’s Manual(W480)
  • Page 409 Count Direction incremented or decremented. The counter, valid counter PV for the current cycle is com- during counter pared with the PV in last cycle to deter- operation. mine the direction. OFF: Decrementing ON: Incrementing A276 Pulse Out-...
  • Page 410 Pulse Output 0 ON when the number of output pulses Cleared • Refreshed for pulse output 0 has been set with the when the Output Amount Set PULS instruction. PULS Flag instruction is • Cleared when operation starts or executed.
  • Page 411 Pulse Output 1 ON when the number of output pulses Cleared • Refreshed for pulse output 1 has been set with the when the Output Amount Set PULS instruction. PULS Flag instruction is • Cleared when operation starts or executed.
  • Page 412 Note A298 and A299 contain the pro- gram address where program execution was stopped. A295 Instruction Processing This flag and the Error Flag (ER) will be ON: Error Flag ON Cleared Cleared When pro- A294,...
  • Page 413 Cleared When pro- A294, occurred gram error A298/ Flag (AER) will be turned ON when an ille- gal access error has occurred and the occurs. A299 OFF: Normal condi- PLC Setup has been set to stop opera- tion tion an illegal access error. (This error...
  • Page 414 Error Log Area (A100 to A199). Note 1 The data will be unstable if the capacitor becomes discharged. 2 The Error Log Pointer can be cleared to 00 by turning A500.14 (the Error Log Reset...
  • Page 415 Count Direction incremented or decremented. The counter, valid counter PV for the current cycle is com- during counter pared with the PV in last cycle to deter- operation. mine the direction. OFF: Decrementing ON: Incrementing A321 High-speed Counter 3...
  • Page 416 Contains the PV of high-speed counter Cleared • Refreshed A323 each cycle during the • The PV will be cleared at the start of overseeing operation. processes. A323 contains the upper four digits and • Refreshed A322 contains the lower four digits.
  • Page 417 Count Direction incremented or decremented. The counter, valid counter PV for the current cycle is com- during counter pared with the PV in last cycle to deter- operation. mine the direction. OFF: Decrementing ON: Incrementing A327 High-speed Counter 5...
  • Page 418 Count Direction incremented or decremented. The counter, valid counter PV for the current cycle is com- during counter pared with the PV in last cycle to deter- operation. mine the direction. OFF: Decrementing ON: Incrementing A339 to Maximum Differentia-...
  • Page 419 Words Bits settings change A392 Built-in RS-232C Port ON when an error has occurred at the ON: Error Retained Cleared Refreshed Error Flag (CP1E built-in RS-232C port. (Not valid in NT when error OFF: No error N/NA-type CPU Unit Link mode.)
  • Page 420 NT Link mode or Serial PLC normal cating N/NA-type CPU Unit Link mode. response to only) the token. Bits 0 to 7 correspond to Units 0 to 7. 00 to Built-in RS-232C Port Indicates (in binary) the number of Retained Cleared Refreshed Reception Counter...
  • Page 421 The CPU Unit will continue operating and the ERR/ALM indicator on the front of the CPU Unit will flash. • This flag can be used to control an external warning light or other indica- tor to indicate that the battery needs to be replaced.
  • Page 422 Words Bits settings change A402 PLC Setup Error Flag ON when there is a setting error in the ON: Error Cleared Cleared Refreshed PLC Setup. The CPU Unit will continue when error (non-fatal error) OFF: No error operating and the ERR/ALM indicator occurs.
  • Page 423 Hexadecimal values 8000 to task with the 800F correspond to task numbers 00 to max. process- 0F. Bit 15 is turned ON when an inter- ing time is exe- rupt has occurred. cuted. Note This value is cleared when PLC operation begins.
  • Page 424: A-2-2 Read/Write Words

    Always use this bit together with the IOM Hold Bit (A500.12), i.e., turn them ON at the same time. Error Log Reset Bit Turn this bit ON to reset the Error Log OFF to ON: Clear Retained Cleared A100 to Pointer (A300) to 00.
  • Page 425 A513.08 to A513.15: Day of month (01 to 31) Note 1 These words are not cleared at startup. 2 The data will be unstable if the capacitor becomes discharged. 3 In an E-type CPU Unit, or if the clock data is not set for an N/NA-type CPU Unit, the data will be for 1:01.01 on Sunday...
  • Page 426 31) A520.00 to A520.07: Month (01 to 12) A520.08 to A520.15: Year (00 to 99) Note 1 If an error occurs in operation, the time of the error will be stored. If the operating mode is then changed to...
  • Page 427 RS-232C port is Bit 03: ON for fram- restarted. ing error. • Only bit 5 (timeout error) is valid in Bit 04: ON for over- NT Link mode. run error. • Serial PLC Link Polling Unit: Bit 05: ON for time- Bit 05: ON for timeout error.
  • Page 428 A276 and A277) will be cleared when A277 Reset Bit this bit is turned ON. Pulse Output 0 This is the CW limit input signal for Retained Cleared pulse output 0, which is used in the CW Limit Input Signal origin search.
  • Page 429 Function when power is column. turned ON. 0 hex: Default (Host Link) 2 hex: NT link (1: N) 3 hex: Non-protocol 5 hex: Host Link 7 hex: Serial PLC Link (Slave) 8 hex: Serial PLC Link (Master) 9 hex: Modbus-RTU...
  • Page 430 9 hex: Modbus-RTU Easy Master Retained Cleared DM Area A640 Built-in RS-232C Port Turn ON this bit to send a command Turned ON: Execu- Modbus-RTU Easy and receive a response for the built-in tion started words for Master Execution Bit...
  • Page 431 A721.08 to A721.15: Day of month (01 to 31) A722.00 to A722.07: Month (01 to 12) A722.08 to A722.15: Year (00 to 99) Note 1 All of the clock data from A720 to A749 is cleared if the capacitor becomes discharged.
  • Page 432 Words Bits settings change A732 Power ON Clock Data These words contain the time at which See at left. Retained Retained Written when power is the power was turned ON five times A734 before the startup time stored in words turned ON.
  • Page 433 This bit will not turn OFF automatically even when saving the data has been completed. If this bit is turned ON and OFF while the DM Backup Save Flag (A751.14) is ON, it will be ignored and the data will not be backed up again.
  • Page 434: Response Performance

    Minimum I/O response time = Input ON delay + Cycle time + Output ON delay Note The input and output ON delays depend on the type of terminals used on the CPU Unit or the model number of the Unit being used.
  • Page 435 Cycle time: 20 ms Minimum I/O response time = 1 ms + 20 ms + 0.1 ms = 21.1 ms Maximum I/O response time = 1 ms + (20 ms × 2) + 0.1 ms = 41.1 ms Input Constant Setting Input constant setting can be set in the PLC Setup.
  • Page 436: A-3-2 Interrupt Response Time

    * The wait time occurs when there is competition with other interrupts. As a guideline, the wait time will be 0 to 3 ms. Note Input interrupt tasks can be executed during execution of the user program, I/O refresh, peripheral servicing, or overseeing.
  • Page 437: A-3-3 Serial Plc Link Response Performance

    The length of the interrupt response time for scheduled interrupt tasks is 0.1 ms max. There is also an error of 10 µs in the time to the first scheduled interrupt (1.0 ms min.). Note Scheduled interrupt tasks can be executed during execution of the ladder program (even while an instruction is being executed by stopping the execution of an instruction), I/O refresh, peripheral servicing, or overseeing.
  • Page 438: A-3-4 Pulse Output Start Time

    ACC: independent, triangular PLS2: trapezoidal PLS2: triangular * The wait time occurs when there is competition with other interrupts. As a guideline, the wait time will be 0 to 3 ms. A-3-5 Pulse Output Change Response Time The pulse output change response time is the time for any change made by executing an instruction during pulse output to actually affect the pulse output operation.
  • Page 439: Plc Operation For Power Interruptions

    Overview of Operation for Power Interruptions Power Supply Voltage Drop If the power supply voltage falls below the specified value (85% of rated voltage) while the CPU Unit is in RUN or MONITOR mode, operation will be stopped and all outputs will be turned OFF.
  • Page 440: Description Of Operation

    Malfunction Countermeasures If only a couple of Expansion I/O Units or Expansion Units are connected to the CPU Unit resulting in a light power supply circuit load and a small current consumption, the time required by the CPU Unit to detect a power interruption will be longer.
  • Page 441 If the external power supply input turns OFF before the power interruption is detected, the CPU Unit will read the input as being OFF The following diagram shows an example countermeasure for this situation. • Wiring Emergency stop input 100 VAC...
  • Page 442 Appendices A-88 CP1E CPU Unit Software User’s Manual(W480)
  • Page 443: Index

    CPU Unit ..............6-3 Defining origin position..........12-18 Expansion I/O Unit ........... 6-4 Operating mode............ 12-23 Allocating functions to built-in input terminals ....8-6 Operation pattern ..........12-28 Allocating functions to built-in output terminals....8-8 Origin return ............12-30 Allocations for Expansion I/O Units........ 6-4 Origin search operation setting ......12-27...
  • Page 444 Changing method ............ 3-3 Operands ..............4-9 Operating modes and operation ......3-4 Specifying addresses ..........4-12 The retaining of I/O memory when changing... 3-4 Variations ............... 4-10 Operation for power interruptions ........ A-85 Internal memory ............2-2 Timing Chart ............A-86 Interrupt input settings..........
  • Page 445 (independent mode)......12-54 Pulse outputs ............... 12-2 Symbols Application example ..........12-34 Global symbols............4-6 Changing the present value of the pulse output... 12-31 Local symbols............4-6 Defining origin position......... 12-18 Functions allocation ..........12-4 Jogging..............12-15 Target value comparison.........11-14, 11-17 Output pattern ............
  • Page 446 Index-4 CP1E CPU Unit Software User’s Manual(W480)
  • Page 447: Revision History

    Revision History A manual revision code appears as a suffix to the catalog number on the front cover of the manual. Cat. No. W480-E1-04 Revision code Revision code Date Revised content March 2009 Original production June 2009 • Information added on pulse outputs and PWM outputs.
  • Page 448 Revision-2 CP1E CPU Unit Software User’s Manual(W480)
  • Page 450 OMRON (CHINA) CO., LTD. OMRON ASIA PACIFIC PTE. LTD. In the interest of product improvement, Room 2211, Bank of China Tower, No. 438A Alexandra Road # 05-05/08 (Lobby 2), specifications are subject to change without notice. 200 Yin Cheng Zhong Road, Alexandra Technopark,...

Table of Contents