Omron CJ1W-CT021 Operation Manual

High-speed counter units
Hide thumbs Also See for CJ1W-CT021:
Table of Contents

Advertisement

Cat. No. W401-E1-04
CJ1W-CT021
High-speed Counter Units
OPERATION MANUAL

Advertisement

Table of Contents
loading

Summary of Contents for Omron CJ1W-CT021

  • Page 1 Cat. No. W401-E1-04 CJ1W-CT021 High-speed Counter Units OPERATION MANUAL...
  • Page 3 CJ1W-CT021 High-speed Counter Units Operation Manual Revised April 2011...
  • Page 5 OMRON Product References All OMRON products are capitalised in this manual. The word “Unit” is also capitalised when it refers to an OMRON product, regardless of whether or not it appears in the proper name of the product.
  • Page 6 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...
  • Page 7 Application Considerations SUITABILITY FOR USE OMRON shall not be responsible for conformity with any standards, codes, or regulations that apply to the combination of products in the customer's application or use of the products. At the customer's request, OMRON will provide applicable third party certification documents identifying ratings and limitations of use that apply to the products.
  • Page 8 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. Actual performance is subject to the OMRON Warranty and Limitations of Liability.
  • Page 9: Table Of Contents

    TABLE OF CONTENTS PRECAUTIONS ........xiii Intended Audience .
  • Page 10 TABLE OF CONTENTS SECTION 5 Error Processing, Maintenance and Inspection ..133 Error Indicators ............Error codes .
  • Page 11 Section 4 provides information on the data-exchange and the communication interface between the CJ1W-CT021 High-speed Counter Unit and the CPU. Section 5 provides details of the CJ1W-CT021 High-speed Counter Unit’s errors, error -codes and indica- tors and guidelines for troubleshooting.
  • Page 12 !WARNING Failure to read and understand the information provided in this manual may result in personal injury or death, damage to the product, or product failure. Please read each section in its entirety and be sure you understand the informa- tion provided in the section and related sections before attempting any of the pro- cedures or operations given.
  • Page 13: Precautions

    PRECAUTIONS This section provides general precautions for using the Programmable Controller (PLC) and the High-speed Counter Unit. The information contained in this section is important for the safe and reliable application of the High-speed Counter Unit. You must read this section and understand the information contained before attempting to set up or operate a High-speed Counter Unit and PLC system.
  • Page 14: Intended Audience

    It is extremely important that a PLC and all PLC Units be used for the specified purpose and under the specified conditions, especially in applications that can directly or indirectly affect human life. You must consult with your OMRON repre- sentative before applying a PLC system to the above mentioned applications.
  • Page 15 Safety Precautions • The PLC outputs may remain ON or OFF due to deposits on or burning of the output relays, or destruction of the output transistors. As a countermeasure for such problems, external safety measures must be provided to ensure safety in the system.
  • Page 16: Operating Environment Precautions

    Operating Environment Operating Environment Precautions !Caution Do not operate the control system in the following locations: • Locations subject to direct sunlight. • Locations subject to temperatures or humidity outside the range specified in the specifications. • Locations subject to condensation as the result of severe changes in tempera- ture.
  • Page 17: Application Precautions

    Application Precautions Application Precautions Observe the following precautions when using the High-speed Counter Unit or the PLC. !WARNING Failure to comply with the following precautions could lead to serious or possibly fatal injury. Always follow these precautions. • Always ground the system with 100 Ω or less when installing the system, to pro- tect against electrical shock.
  • Page 18 Application Precautions • Install the Units properly as specified in the operation manuals. Improper !Caution installation of the Units may result in malfunction. • Be sure that all the mounting screws, terminal screws, and cable connector screws are tightened to the torque specified in the relevant manuals. Incorrect tightening torque may result in malfunction.
  • Page 19: Ec Directives

    Concepts EMC Directives OMRON devices that comply with EC Directives also conform to the related EMC standards so that they can be more easily built into other devices or the overall machine. The actual products have been checked for conformity to EMC stand- ards (see the following note).
  • Page 21: Introduction

    SECTION 1 Introduction This section gives specifications of the CJ1W-CT021 and a brief description of the functions and features of the Unit and the areas of application. Features and Functions ......... .
  • Page 22: Features And Functions

    0.5 ms guarantees high-speed closed loop control of applications. Freely Configurable The CJ1W-CT021, a Special I/O Unit for CJ-series PLC-systems, is a freely con- figurable High-speed Counter Unit. Depending on the requirements of your appli- cation, the specific behaviour of the Unit can be adjusted by changing the configuration settings.
  • Page 23 Features and Functions Section 1-1 Digital Input Function The Unit is equipped with 2 Digital Inputs (I0 and I1) that can be freely assigned to any Counter. To meet the requirements of your application every Digital Input can be configured according to one out of 17 available functions. The functions make it possible to use a Digital Input with Gate-, Preset-, Reset- or Capture Func- tionality (among other functions).
  • Page 24 Features and Functions Section 1-1 Noise Filtering For the purpose of suppressing noise on the signal lines A and B of every Counter and on the Digital Input lines noise filters can be used. A noise filter can be con- figured.
  • Page 25: Basic Configuration

    Proximity Sensor Other P ulse Generators Mounting Restrictions The CJ1W-CT021 High-speed Counter Unit is a Special I/O Unit belonging to the CJ Series. A CJ1W-CT021 High-speed Counter Unit can be mounted to either a CJ CPU Rack or CJ Expansion Rack.
  • Page 26 No external interrupt tasks can be activated in CJ1-H or CJ1M CPU Units if the CJ1W-CT021 High-speed Counter Unit is in any other position (i.e., 6th Unit posi- tion or further away from the CJ1-H CPU Unit, or 4th Unit position or further away from the CJ1M CPU Unit), or if it is on a CJ-series Expansion Rack.
  • Page 27: Specifications And Characteristics

    Power Supply Unit and the current consumption of other Units on the Rack. 3. The CJ1W-CT021 Special I/O Unit is allocated words for 40 words in the Spe- cial I/O Unit (CIO) Area (refer to 4-2-3 "CIO-Memory Mapping").
  • Page 28 Specifications and Characteristics Section 1-3 1-3-2 Functional Specifications Item CJ1W-CT021 Number of Counters • Simple Counter (refer to 3-2-1 "Simple Counter") Counter Type • Circular Counter (refer to 3-2-2 "Circular Counter") • Linear Counter (refer to 3-2-3 "Linear Counter") The Counter Type can be chosen by DIP switch at the front of the Unit. By default the Counters are set to Simple Counter (refer to 2-1-3 "Counter Type...
  • Page 29 Specifications and Characteristics Section 1-3 Item CJ1W-CT021 Output State Control On changing the Operating Mode of the PLC from RUN/MONITOR → PROGRAM, an I/O Bus Error or an Overflow/Underflow Error, the Digital Outputs can be configured to: • Continue automatic updating Output States •...
  • Page 30 To activate external interrupt tasks, a CJ1-H or CJ1M CPU Unit must be used. CJ1 CPU Units do not support external interrupt tasks. To activate external interrupt tasks in a CJ1-H CPU Unit, the CJ1W-CT021 High-speed Counter Unit must be in one of the five positions immediately to the right of the CJ1-H CPU Unit.
  • Page 31 Specifications and Characteristics Section 1-3 If an IOWR- or IORD-instruction is used during operation, comparison will stop during instruction execution. Care must be taken, therefore, with the timing of executing instructions. (Refer to 3-5 "Output Control" for details.) 1-3-3 Input Specifications Item Counter Inputs A and B Digital Inputs...
  • Page 32 Specifications and Characteristics Section 1-3 Counter Inputs A, B, Z and Digital Inputs Counter Inputs A, B a nd Z 5/12/24V input signals RS-422 Line Driver signals 5/12/24V input signals RS-422 Line Driver signals Counter inputs A and B Counter inputs A and B Counter inputs A and B Counter inputs A and B Input pulses with a duty factor of 50%...
  • Page 33 Specifications and Characteristics Section 1-3 you use an Open Collector encoder (e.g. E6B2-CWZ6C) at 24 V with 10 m cable, you can typically generate count pulses up to 20 kHz. Therefore, if you want to generate count pulses with higher frequencies, you should use a different type of encoder (e.g.
  • Page 34 Specifications and Characteristics Section 1-3 Maximum Switching The maximum switching current depends upon the power supply voltage, as Capacity shown below. 10. 2 20. 4 26. 4 External Supply Voltage (VDC)
  • Page 35: Quick Start Up Reference Guide

    Quick Start Up Reference Guide Section 1-4 Quick Start Up Reference Guide Operation and Every Counter of the High-speed Counter Unit can be configured as Simple, Cir- Configuration cular or Linear Counter (refer to the section 1-5 "Operating Procedure Guidelines" for quick start up information).
  • Page 36 Quick Start Up Reference Guide Section 1-4 Exchanging data with CPU The diagram below shows you all the functional blocks that the Unit has available to you to exchange data with the CPU (refer to SECTION 4 "Exchanging Data with CPU").
  • Page 37 Quick Start Up Reference Guide Section 1-4 Simple Counter Circular / Linear Counter Reference section Input Signal Types • Phase Differential (x1) (=default) • Phase Differential (x1, x2, x4) 3-3-1 • Up & Down 3-3-2 • Pulse & Direction 3-3-3 Counter Control using CIO-software bits •...
  • Page 38 Quick Start Up Reference Guide Section 1-4 Simple Counter Circular / Linear Counter Reference section Reset Signals • Software Reset Bit • Software Reset Bit • Digital Input • Z-signal Programmable Output Pulses 3-7-1 • No (=default) • Yes 3-7-1 Rate Measurement 3-7-2 •...
  • Page 39 Counter. Refer to 3-7-2 "Rate Measurement". Indirect Addressing for The CJ1W-CT021 High-speed Counter Unit is allocated 400 DM-words in the Circular and Linear Special I/O Unit DM-Area and a block of 40 CIO-words in the Special I/O Unit Area Counters of the PLC.
  • Page 40 Quick Start Up Reference Guide Section 1-4 Depending on the Output Control Mode, Counter Range or Comparison Data can be set. Like this, for every Counter, up to a maximum of 32 Ranges or Comparison Values can be assigned. You can set the Range or Comparison Data in a part of DM or EM which is not being used.
  • Page 41: Operating Procedure Guidelines

    Operating Procedure Guidelines Section 1-5 Operating Procedure Guidelines The DIP switch at the front of the Unit can be used to operate every Counter as Simple Counter or as Circular/Linear Counter. Setting the DIP switch in the appro- priate position defines the Counter Type. The Operation Procedure Guidelines consists of 5 steps.
  • Page 42 Operating Procedure Guidelines Section 1-5 3. Install and wire the Unit. Refer to 2-2 "Installation" and 2-3 "Wiring" for further details. 4. Turn ON the Power to the PLC. Power ON 5. Create the I/O table. The I/O table can be created by using CX-Programmer Support Software or a Programming Console.
  • Page 43 Operating Procedure Guidelines Section 1-5 Refer to 3-2-1 "Simple Counter" for more details about the Simple Counter. Configuration 2 All Counters as Circular or Linear Counter: 1, 2, 3… 1. Every Counter can now be separately (DM-) configured. For this purpose you can use a Programming Console or CX-Programmer Support Software.
  • Page 44: Application Areas

    • Packaging and Sorting plants • Dosing or proportioning plants • Process Industry Typical applications in which the CJ1W-CT021 can be used: • (CAM)-Positioning (refer to 6-3 "Positioning" and 6-4 "CAM-positioning") • Position Monitoring • Length Measurement (refer to 6-2 "Length Measurement") •...
  • Page 45: Components, Installation And Wiring

    This section provides details of the components, switch settings and other information required to install and operate CJ1W-CT021 High-speed Counter Units. Components and Switch Settings ........
  • Page 46: Components And Switch Settings

    Components and Switch Settings Section 2-1 Components and Switch Settings 2-1-1 Components Front and Side View 66.5 CT021 RUN ERC ERH Indicators Machine Number Switch Counter Mode Switch MODE Dimensions with Connector (112.5) 66.5 Connecting Cable...
  • Page 47: Indicators

    Components and Switch Settings Section 2-1 2-1-2 Indicators CT021 The indicators on the LED-display show the operating status of the Unit. The fol- lowing table shows the meaning of the indicators. Colour State Description Green Unit is in operation (i.e. Unit has initialised normally after (re-) starting the Unit).
  • Page 48: Counter Type Switch

    Components and Switch Settings Section 2-1 2-1-3 Counter Type Switch The Counter Type Switch, at the front of the Unit, is used to set the Counter Type for every individual Counter separately. By default all Counters are set to Simple Counter.
  • Page 49: Machine Number Switch

    Components and Switch Settings Section 2-1 2-1-4 Machine Number Switch MACH The CPU Unit and the High-speed Counter Unit exchange data via the Special I/O Unit Area (CIO) and the Special I/O Unit DM Area. The High-speed Counter Unit is allocated the words for 4 Units. This means that 40 words in the Special I/O Unit Area (CIO) and 400 words in the Special I/O Unit DM Area are allocated.
  • Page 50: Installation

    2. The High-speed Counter Unit is allocated the words for 4 Units. If you use Spe- cial I/O Units that are allocated more than 100 DM-words and 10 CIO-words, like the CJ1W-CT021 High-speed Counter Unit, you should make sure that no memory overlapping occurs. If the Machine Number for the High-speed Coun- ter Unit is set to ‘n’...
  • Page 51 Installation Section 2-2 Use the following procedure to install CJ1W-CT021 High-speed Counter Units. Connect the Units before mounting them to DIN-rail. 1, 2, 3… 1. Align the connectors and hooks accurately and press the Units together firmly when connecting them.
  • Page 52: Wiring

    Wiring Section 2-3 Wiring 2-3-1 Connector Pin-layout The 40-pin connector (CN1) on the front of the Unit is divided in Row A and Row B, each row containing 20-pins as indicated on front of the Unit. The Digital Out- puts, Digital Inputs and the Counter Inputs of the Unit are logically grouped together and allocated to the pins of connector 1.
  • Page 53: Connector Wiring Methods

    Be sure that all the connectors are wired correctly and properly connected to the High-speed Counter Unit, to prevent the Unit from malfunctioning. To wire the CJ1W-CT021 in order to connect the external signals (Power Supply, the Digital I/O and the Counter Inputs) two methods are available: 1.
  • Page 54 Wiring Section 2-3 Wiring the soldering terminals Insulating tube Wire (cross section: 0. 3 m m m ax.) Connector (jack) with soldering terminals Numbering of the soldering terminals on connector (jack). For an overview of the connector Pin-layout refer to 2- 3-1 "Connector Pin-layout".
  • Page 55 For this pur- pose you should use a Terminal Block Unit. The following Terminal Block Units are recommended for using together with the CJ1W-CT021 High-speed Counter Unit: • XW2B-40G4, which has 40 screw -terminals (M2.4) available •...
  • Page 56: Important Wiring Considerations

    Wiring Section 2-3 Refer to Appendix A "Using Terminal Block Units with Screw-terminals" for infor- mation on the numbering of the screw-terminals. You need this information in case you want to connect the external signals via Terminal Block Units to the High- speed Counter Unit.
  • Page 57 Wiring Section 2-3 Counter Input Circuitry Counter 1: Counter 2: Phase A 24 V B9 (24 V) B16 (24 V) 5 V/12 V A9 (5 V) A16 (12 V) B8 (LD+) B15 (LD+) 0 V/LD− A8 (0 V/LD−) A15 (0 V/LD−) Counter 1: Counter 2: Phase B...
  • Page 58 Wiring Section 2-3 Digital Output Circuitry High-speed Counter Unit Fuse B1 : 12-24 VDC Power Supply for Digital Outputs O0 and O1 B2 : Digital Output O0 (PNP) B3 : Digital Output O1 (PNP) A2 : Digital Output O0 (NPN) A3 : Digital Output O1(NPN) Fuse A1 : 0V COM for Digital Outputs O0 and O1...
  • Page 59: Digital I/O Circuit Configurations

    Wiring Section 2-3 2-3-5 Digital I/O Circuit Configurations The following examples make clear how to wire the Digital Inputs and the Digital Outputs. 24 VDC NPN Sensor 24 VDC Power Supply +24 V High-speed Counter Shielded twisted-pair cable NPN Sensor Digital Input I0 on Connec tor CN1 24 VDC PNP Sensor +24 V...
  • Page 60 Wiring Section 2-3 Wiring example NPN/PNP Digital Output 12 to 24 VDC Power Supply Fuse(1A) B1: PS+ + 12 to 24 V Load B2 : O0 (PNP) A3 : O1 (NPN) Load Fuse(1A) A1: PS- Digital Output O0 (PNP) Digital Output O1 (NPN) Set the software switches for every Digital Output in the appropriate position...
  • Page 61: Counter Input Configurations

    Wiring Section 2-3 2-3-6 Counter Input Configurations The following examples make clear how to wire the Counter Inputs in different con- figurations according to the output-driver of the encoder or proximity switch that you want to use. The configurations that are shown here, related to a specific out- put-driver, can also be referred to in case you want to use other pulse generating equipment with similar output-drivers.
  • Page 62 Wiring Section 2-3 5/12/24 VDC PNP Open Collector High-speed Counter Terminals (CN1): Black: Phase A B9 (Phase A 24 V) A8 (Phase A 0 V) Encoder White: Phase B B11 (Phase B 24 V) A10 (Phase B 0 V) Orange: Phase Z B13 (Phase Z 24 V) A12 (Phase Z 0 V) Counter 1...
  • Page 63 Wiring Section 2-3 Line Driver (RS-422) High-speed Counter Terminals (CN1): Black: Phase A+ B15 (Phase A, LD+) Black/red: Phase A- A15 (Phase A, LD−) Encoder White: Phase B+ B17 (Phase B, LD+) White/red: Phase B- A17 (Phase B, LD−) Orange: Phase Z+ B19 (Phase Z, LD+) Orange /red: Phase Z - A19 (Phase Z, LD−)
  • Page 65: Operation And Configuration

    SECTION 3 Operation and Configuration This section describes how to configure the CJ1W-CT021 High-speed Counter Unit and how to operate the Unit according to the specific requirements of your application. Overview........... . .
  • Page 66: Overview

    DM-configured. For Simple Counters the default DM-settings are used and no DM-settings can be made. In this section you will learn how to configure the CJ1W-CT021 High-speed Coun- ter Unit in order to adjust the behaviour of the Unit according to the specific requirements of your application (refer to 1-4 "Quick Start Up Reference Guide"...
  • Page 67: Counter Types

    Counter Types Section 3-2 Counter Types Every single Counter of the High-speed Counter Unit can be set independently to one of the following Counter Types (for an overview of the differences between Simple and Circular/Linear Counters refer to 1-4 "Quick Start Up Reference Guide"): •...
  • Page 68: Simple Counter

    Counter Types Section 3-2 3-2-1 Simple Counter The advantage of using a Counter as a Simple Counter is that you do not have to make any DM-configuration settings. Instead, all default DM-settings are used. As a consequence Simple Counters can only be used in a default configuration. If you intend to use the High-speed Counter Unit only with Simple Counters the informa- tion as described in this section “Simple Counter”, covers all the default features and functions that are important and available to you.
  • Page 69 Counter Types Section 3-2 • The Digital Inputs cannot be assigned to individual Counters and the Function of the Digital Inputs cannot be configured. Only the status of the Digital Inputs is reported in CIO. For information on assigning Functions to Digital Inputs for Circular and Linear Counters refer to 3-4 "Digital Input Functions".
  • Page 70 Counter Types Section 3-2 received count pulses will have no effect. The Over- and Underflow flags can be cleared by forcing a Preset or a Reset. CNT1: CNT2: 15 14 13 12 11 10 9 n+24 n+29 Counter Overflow: 0 = No Overflow 1 = Overflow Counter Underflow: 0 = No Underflow...
  • Page 71 Counter Types Section 3-2 Counter. A rising edge of the Preset Counter Bit triggers a preset in the next I/O Refresh Cycle. CNT1: CNT2: 15 14 13 12 11 10 9 Preset Counter: 0→1 = Preset Counter CNT1: CNT1: 15 14 13 12 11 10 9 Preset Value Set Preset Value for Simple Counter between 80000000 and 7FFFFFFF...
  • Page 72 Counter Types Section 3-2 Forcing ON/OFF Digital After you have set the Automatic/Manual Selection bit to Manual Output Control Outputs (=1), the two Digital Outputs can be forced ON and OFF using the corresponding bits in CIO. General Setting: 15 14 13 12 11 10 9 O1 O0 Manual Output Control: 0 = Force Output OFF...
  • Page 73: Circular Counter

    Counter Types Section 3-2 3-2-2 Circular Counter Note All of the functions listed in 1-3-2 "Functional Specifications" can be used if a Cir- cular Counter is set. Configuring Circular Counters CNT1: CNT2: 15 14 13 12 11 10 9 m+30 m+75 Counter Type: 0 = Circular Counter...
  • Page 74: Linear Counter

    Counter Types Section 3-2 3-2-3 Linear Counter Note All of the functions listed in 1-3-2 "Functional Specifications" can be used if a Lin- ear Counter is set. Configuring Linear Counters CNT1: CNT2: 15 14 13 12 11 10 9 m+30 m+75 Counter Type: 1 = Linear Counter...
  • Page 75 Counter Types Section 3-2 Configuring Upper and The Upper Count Limit must be positive and the Lower Count Limit must be neg- Lower Count Limits ative (zero is not allowed as Count Limit). To set the Maximum and Minimum Count Limits refer to the following: CNT1: CNT2: 15 14 13 12 11 10 9...
  • Page 76: Input Signal Types

    Input Signal Types Section 3-3 Input Signal Types The type of input you require for your application is selected by means of four bits in the Signal Type Word in DM. For every Counter the Signal Type can be selected individually.
  • Page 77: Up & Down

    Input Signal Types Section 3-3 Multiplication x2 To increase the resolution of the incremental encoder the Counter can be config- ured for Multiplication by 2. If the Counter is up-counting (signal A leads to signal B) pulses are taken into account by the Counter on the rising- and falling edges of signal A.
  • Page 78: Pulse & Direction

    Input Signal Types Section 3-3 3-3-3 Pulse & Direction In this configuration, count pulses are applied to input A. The direction of counting is controlled by the level of the signal applied to input B. If input B is high, the Counter increments on the rising edges of input A.
  • Page 79: Digital Input Functions

    Digital Input Functions Section 3-4 Digital Input Functions Assigning multiple Digital The High-speed Counter Unit is equipped with two Digital Inputs allowing every Inputs to single Counters Counter to be controlled by a Digital Input. For applications that require a Counter to be controlled by more than one Digital Input, multiple Digital Inputs (i) can be assigned to a Counter (i ≤...
  • Page 80 Digital Input Functions Section 3-4 Note Every Digital Input can be configured to generate an Interrupt to the CPU. For details refer to 4-6-2 "Digital Inputs Generating Interrupts". Gate Function The Gate Function should be assigned to a Digital Input in case you want to use that Digital Input as a Gate.
  • Page 81 Digital Input Functions Section 3-4 the Preset Value at a rising edge of the Preset Counter Bit of the corresponding Counter. CNT1: CNT2: 15 14 13 12 11 10 9 Preset Counter: 0→1 = Preset Counter CNT1: CNT2: 15 14 13 12 11 10 9 Preset Value Set between 00000000 and FFFFFFFF...
  • Page 82 Digital Input Functions Section 3-4 Capture Function A Digital Input configured to have Capture functionality will capture the current Counter Value into the Capture Register on a rising edge (Capture Rising Edge, Function 07) or falling edge (Capture Falling Edge, Function 08) of the Digital Input signal.
  • Page 83 Digital Input Functions Section 3-4 Stop, Capture, Reset and A Digital Input configured to have Stop, Capture, Reset and Continue functionality Continue will Stop the Counter (= close the Gate) and Capture the Counter Value into the Capture Register on a rising edge of the signal applied to the Digital Input (Stop, Capture, Reset and Continue, Function 11).
  • Page 84 Digital Input Functions Section 3-4 Enable, Disable Reset A Digital Input configured to have Enable Reset Functionality (Function 15) or Dis- able Reset Functionality (Function 16) can be used to Enable/Disable resetting a Counter by an external reset signal. The external reset signal can originate from another Digital Input that is configured to have reset functionality (Function 5, 6, 11, 12, 13 or 14) or from the Z-input.
  • Page 85: Output Control

    Output Control Section 3-5 Counting Direction For every Counter the (up or down) counting direction is indicated and can be used in the Ladder Program. CNT1: CNT2: 15 14 13 12 11 10 9 n+24 n+29 Gate Open/Closed: 0 = Gate Closed 1 = Gate Open Counting Direction: 0 = Counter counts down...
  • Page 86 Output Control Section 3-5 Unit Output Pattern Both in Range and Comparison Mode the 32 Outputs of the Unit are represented by the Unit Output Pattern. The Unit uses the Unit Output Pattern internally to con- trol the Outputs. The Unit Output Pattern consists of 30 Soft (internal) Outputs and 2 Digital Outputs.
  • Page 87: Range Mode

    Output Control Section 3-5 3-5-1 Range Mode If the Unit is configured to control the Outputs in Range Mode, this Mode can be applied to Circular Counters or Linear Counters (refer to 3-2-2 "Circular Counter" and 3-2-3 "Linear Counter" for more information). Example Range Mode with Linear Counter Minimum Count Limit Maximum Count Limit...
  • Page 88 Output Control Section 3-5 Example Range Mode with Circular Counter Range 2 Maximum C ount L imit 4,294,967,295 (=00000000 ) (= FFFFFFFF Range 1 Rollover Range 0 Range 3 Counter Value Range Lower Range Limit Upper Range Limit Output ON 60,000 80,500 45000...
  • Page 89 Output Control Section 3-5 3-5-1-1 Range Mode Overview The following figure gives an overview on configuring Counters in Range Mode. Range 0 Counter 1 Upper Range Limit Output Pattern Lower Range Limit Output Pattern Range 31 Upper Range Limit Output Pattern Lower Range Limit Range 0 Counter 2...
  • Page 90 Output Control Section 3-5 3-5-1-2 Configuration and operation in Range Mode Specifying Range-Data In Range Mode every Counter can be assigned up to a maximum of 32 Ranges. The Data of every Range is contained by 3 double words: • Lower Range Limit, specifying the Lower Limit of the Range •...
  • Page 91 Output Control Section 3-5 the Range Data. However, the comparison does not stop for other Counters. Set the Range Data considering the time when the comparison is stopped. For example, for the Range table shown in the following diagram, approxi- mately 4.8 counts occur during 1.5 ms when a 3.2 kHz pulse is input.
  • Page 92 Output Control Section 3-5 A Range becomes active if: Lower Range Limit ≤ Counter Value ≤ Upper Range Reflecting Active / Not Active Ranges Limit. Whether or not a Range is active is reflected in CIO for each Counter. CNT1: CNT2: 15 14 13 12 11 10 9 n+20...
  • Page 93: Comparison Mode

    Output Control Section 3-5 Note The Counter Output Patterns of Counters which are configured to use no (i.e. zero) Ranges, are ignored in the AND-calculation of the Unit Output Pattern. Like this, Counters that you do not want to use, do not influence the AND-calculation of the Unit Output Pattern.
  • Page 94 Output Control Section 3-5 ing direction (-CV crossing), one or multiple Outputs can be Set (S) or Reset (R). For example Output 0 is Set on crossing CV5 in the positive counting direction and Reset on crossing CV7 in the negative counting direction. The crossing of CV3 in the positive counting direction results in the Setting of Output 2 and the Resetting of Output 1.
  • Page 95 Output Control Section 3-5 3-5-2-1 Comparison Mode Overview The following figure gives an overview on configuring Counters in Comparison Mode. Counter 1 +Set Pattern CV0 +Reset Pattern CV0 Comparison Value 0 -Set Pattern CV0 Output Set Pattern -Reset Pattern CV0 Output Reset Pattern +Set Pattern CV31 +Reset Pattern CV31...
  • Page 96 Output Control Section 3-5 3-5-2-2 Configuration and operation in Comparison Mode Specifying Comparison- In Comparison Mode every Counter can be assigned up to a maximum of 32 Com- Data parison Values. The Data of every Comparison Value (CV-Data) is contained by 5 double words: •...
  • Page 97 Output Control Section 3-5 Note Precautions When Setting Comparison Data • Comparison Stoppage When Comparison Target Reached When the High-speed Counter Value reaches the target value for Comparison Data, comparison stops for 1.5 ms. However, comparison for other counters does not stop. Set the Comparison Data considering the time when the comparison is stopped.
  • Page 98 Output Control Section 3-5 4. In case for a CV both a Set and a Reset in one and the same counting direction for a specific Output are defined, the Reset has priority. 5. The output can be set to Set, Reset, or No Change when a target value is reached both for incrementing and decrementing.
  • Page 99: Manual Output Control

    Output Control Section 3-5 Updating Unit Output Besides by crossing CV’s the Unit Output Pattern can also be updated by a Preset Pattern with Preset or Reset or a Reset action. To trigger a Preset or Reset action refer to 3-4 "Digital Input Action Functions"...
  • Page 100: Output Control Configuration

    Output Control Section 3-5 3-5-4 Output Control Configuration NPN or PNP Output Driver Every single Digital Output (0-1) can be used in a NPN- or PNP-configuration depending on your application needs. By setting the corresponding bit in DM a selection can be made between a NPN- or PNP Output Driver. By default the NPN Output Driver is selected.
  • Page 101: Reset Signals

    Reset Signals Section 3-6 Reset Signals For every Counter a reset of the Counter Value to zero can be triggered by the fol- lowing Sources: • Software Reset Bit • Digital Input • Z-signal In order for a Digital Input or the Z-Signal to trigger a Reset this must be enabled by the Software Reset Enable Bit.
  • Page 102 Reset Signals Section 3-6 Software Reset Enable Bit Resetting the Counter Value to zero by Digital Input or Z-Signal must be enabled. as Reset Enable Source Enabling can be done by setting the Software Reset Enable Bit in CIO for the cor- responding Counter to 1.
  • Page 103: Extra Functions

    Extra Functions Section 3-7 Extra Functions 3-7-1 Programmable Output Pulses Depending on the requirements of your application, the timing characteristics of the two Digital Outputs of the High-speed Counter Unit can be modified. The Unit can be either in Range Mode or in Comparison Mode. The following functionality can be assigned to the Digital Outputs: •...
  • Page 104: Rate Measurement

    Extra Functions Section 3-7 Note The status of the Outputs is reflected in CIO (words n+14, n+15). If a Digital Out- put is configured to have Programmable Output Pulse functionality, the actual physical status of the Output (Turn ON Delay and/or Pulse Duration included) is reflected in the corresponding bit in CIO.
  • Page 105 Extra Functions Section 3-7 Rate Value Calculation If you want to use Rate Measurement for a Counter you must start by defining the Time Window. You can set the Time Window between 1 ms and 9999 ms, in steps of 1 ms (BCD). The number of pulses which are received during the Time Window are automatically calculated by subtracting the Counter Value at the beginning of the Time Window from the Counter Value at the end of the Time Window.
  • Page 106 Extra Functions Section 3-7 Rate History Log File The Rate Values, which are calculated during consecutive Time Windows, are stored in the Rate History Log File inside the Unit. The Rate History Log File can contain a maximum number of 64 most recent Rate Values. Rate History Log File: Oldest Rate Value Rate Value 1...
  • Page 107 Extra Functions Section 3-7 Configuring Rate Rate Measurement can be configured by setting the Time-Window between 1 ms Measurement and 9999 ms (BCD). By default (=0) the Counters are configured to have no Rate Measurement. CNT1: CNT2: 15 14 13 12 11 10 9 m+39 m+84 Time-Window:...
  • Page 108 Extra Functions Section 3-7 Output Pattern of that Rate Range will be applied to the Unit Output Pattern when that Rate Range becomes active. A Rate Range becomes active if: Lower Rate Range Limit ≤ Rate Value ≤ Upper Reflecting Active / Not Active Rate Ranges Rate Range Limit.
  • Page 109 Extra Functions Section 3-7 Configuring Set & Reset Output Patterns CNT1: CNT2: 15 14 13 12 11 10 9 Rate Range 0: m+44 m+89 15 14 13 12 11 10 9 2 O1 O0 Output Set Pattern Rate Range 0 19 18 17 m+45 m+90...
  • Page 110: Hysteresis

    Extra Functions Section 3-7 3-7-3 Hysteresis An encoder can come to rest at a particular position and then “oscillate” around this position. This state means that the Counter Value fluctuates around a partic- ular value. If, for example, a Range Limit is in this area of fluctuation, the corre- sponding Range would become active and inactive in the rhythm of these fluctuations.
  • Page 111: Noise Filtering

    Extra Functions Section 3-7 3-7-4 Noise Filtering Configuring Noise Filter For the purpose of suppressing noise on the signal lines A and B of every Counter Counter Inputs a Noise Filter is available. A Noise Filter can be configured for Counter 1 & 2. 15 14 13 12 11 10 9 General Setting: m+7 Noise Filter Counter 1&2:...
  • Page 112: Initial Counter Value

    Extra Functions Section 3-7 3-7-5 Initial Counter Value Every Counter is equipped with the Initial Counter Value (double word) in DM. At a transfer of the DM-settings from the CPU to the Unit (triggered by a Power Up or Restart of the Unit) the Initial Counter Value is also transferred. The Initial Counter Value overwrites the Counter Value and becomes the new Counter Value.
  • Page 113: Exchanging Data With Cpu

    SECTION 4 Exchanging Data with CPU This section provides information on exchanging data between CJ1W-CT021 High Speed Counter Units and CJ-series CPU Units. Overview........... . .
  • Page 114: Overview

    Overview Section 4-1 Overview 4-1-1 Basic Setup The status information of the High-speed Counter Unit is exchanged with the CPU every cyclic I/O Refresh via the Special I/O Unit Area (CIO). The Unit configuration data is exchanged at Power ON or after the Unit has been restarted or after issu- ing the IOWR-instruction “(Re) Configure Unit”...
  • Page 115 Overview Section 4-1 Special I/O Unit Area and The Special I/O Unit Area and the Special I/O Unit DM Area are allocated to the Special I/O Unit DM Area Unit according to the Machine Number (=N) set. For the Special I/O Unit Area 40 CIO words are allocated and for the Special I/O Unit DM Area 400 DM words are allocated.
  • Page 116: Special I/O Units Restart Bits

    Overview Section 4-1 4-1-2 Special I/O Units Restart bits By turning the Unit Restart Bit from OFF to ON the Unit can be restarted. Restart- ing the Unit can be used to transfer the Unit configuration settings (e.g. after cor- rection of an error) from the CPU to the Unit.
  • Page 117: Memory Allocation

    Memory Allocation Section 4-2 Memory Allocation 4-2-1 Memory Mapping The following figure shows how the 40 words in the Special I/O Unit Area (CIO) and the 400 words in the Special I/O unit DM Area (DM) are mapped in the mem- ory of the CPU-Unit.
  • Page 118: Indirect Addressing

    Memory Allocation Section 4-2 data and to use this data for all two Counters by using two identical indirect addresses (k1=k2). General Setting: 15 14 13 12 11 10 9 n+19 Range/Comparison Blocks overlap: 0 = No overlapping 1 = One or more blocks overlap 4-2-2 Indirect Addressing The High-speed Counter Unit can be in Range Mode or Comparison Mode (refer...
  • Page 119 Memory Allocation Section 4-2 Unit in Comparison Mode In Comparison Mode Indirect Addressing can be used to define the Comparison Values per Counter that you want to use. The number of CV’s (M) defines the size of the CV Data block (size = M x 10 words). If you want to use multiple CV’s you are recommended to use consecutive CV’s starting from CV 0 (i.e.
  • Page 120 Memory Allocation Section 4-2 The Range/Comparison Data, as part of the Unit configuration data, is transferred to the Unit at Power Up or after the Unit has been restarted. CNT1: CNT2: 15 14 13 12 11 10 9 m+64 m+109 Total number of Ranges/CV’s: Set between 00 and 32...
  • Page 121: Cio-Memory Mapping

    Memory Allocation Section 4-2 Example Comparison Mode Unit is in Comparison Mode. You want to use 5 Comparison Values (CV 0 to Range 4) for Counter 1 and want to allocate them in Extended Memory starting from EM520. CNT1: 15 14 13 12 11 10 9 m+64 5 Comparison Values m+65...
  • Page 122 Memory Allocation Section 4-2 CIO Output Words The 14 Output Words (n to n+13) are divided in 3 groups: General, Counter 1, and Counter 2. Word Item Function (output) General 00, 01 Manual Output Force ON (=1) / OFF (=0) Digital Outputs [0-1] Control Bits 00 and 01 correspond to Digital Outputs O0 and O1.
  • Page 123 Memory Allocation Section 4-2 CIO Input Words The 26 Input Words (n+14 to n+39) are divided in 3 groups: General, Counter 1, and Counter 2. Word Item Function (input) General n+14, n+15 00-15 Output Status Current status of Digital and Soft Outputs n+14, bits 00 and 01: Digital Outputs O0 and O1 n+14, bits 02 and 15: Soft Outputs 2 to 15 n+15, bits 00 and 15: Soft Outputs 16 to 31...
  • Page 124 Memory Allocation Section 4-2 Word Item Function (input) Counter 2 n+25, n+26 00-15 Ranges / Ranges Active (=1) / Inactive (=0) / Comparison Values Comparison Values Active (=1) / Inactive (=0) active* n+27, n+28 00-15 Counter Value Counter Value n+29 Counter Overflow Counter Overflow (=1), Upper Count Limit of Linear Counter is reached...
  • Page 125: Dm-Memory Mapping

    Memory Allocation Section 4-2 4-2-4 DM-Memory Mapping The High-speed Counter Unit is allocated 400 Words in DM. These 400 Words are divided in 30 General DM-words (m to m+29) and 45 Counter Specific words for every Counter (Counter 1 = m+30 to m+74, Counter 2 = m+75 to m+119). Note Double words in DM are indicated as for example “m+2, m+3”.
  • Page 126 Memory Allocation Section 4-2 Word Item Function 00-07 Input Noise Filter Select Noise Filter for Counters 1 and 2: Counters 00 = 50 kHz (default) 01 = 500 kHz 02 = 10 kHz 08-15 Not used 00-07 Input Noise Filter Select Noise Filter for Digital Inputs 0 and 1: Digital Inputs 00 = 50 kHz (default)
  • Page 127 Memory Allocation Section 4-2 Word Item Function m+17 00-07 Digital Input 0 Function Digital Input 0 (all in BCD): Function 00 = No function 01 = Gate Positive 02 = Gate Negative 03 = Preset Rising Edge 04 = Preset Falling Edge 05 = Reset Rising Edge 06 = Reset Falling Edge 07 = Capture Rising Edge...
  • Page 128 Memory Allocation Section 4-2 Word Item Function Counter 1 m+30 00-15 Counter Type Counter Type: 0 = Circular (=default) 1 = Linear m+31 00-03 Signal Type Signal Type: 0 = Phase Differential (x1) (=default) 1 = Phase Differential (x2) 2 = Phase Differential (x4) 4 = Up &...
  • Page 129 Memory Allocation Section 4-2 Word Item Function m+48, m+49 00-15 Rate-Range 1 Rate-Range 1 Lower Limit Lower Limit m+50, m+51 00-15 Rate-Range 1 Rate-Range 1 Upper Limit Upper Limit m+52, m+53 00-15 Set Pattern Output Set Pattern Rate-Range 1 Rate-Range 1 m+54, m+55 00-15 Reset Pattern...
  • Page 130 Memory Allocation Section 4-2 Word Item Function Counter 2 m+75 00-15 Counter Type Counter Type: 0 = Circular (=default) 1 = Linear m+76 00-03 Signal Type Signal Type: 0 = Phase Differential (x1) (=default) 1 = Phase Differential (x2) 2 = Phase Differential (x4) 4 = Up &...
  • Page 131 Memory Allocation Section 4-2 Word Item Function m+93, m+94 00-15 Rate-Range 1 Rate-Range 1 Lower Limit Lower Limit m+95, m+96 00-15 Rate-Range 1 Rate-Range 1 Upper Limit Upper Limit m+97, m+98 00-15 Set Pattern Output Set Pattern Rate-Range 1 Rate-Range 1 m+99, m+100 00-15 Reset Pattern...
  • Page 132: Range Memory Mapping

    Memory Allocation Section 4-2 4-2-5 Range Memory Mapping Word Item Function Counter 1 k1, k1+1 00-15 Lower Limit Range 0 Lower Limit Range 0 k1+2, k1+3 00-15 Upper Limit Range 0 Upper Limit Range 0 k1+4, k1+5 00-15 Output Pattern Range 0 Output Pattern Range 0 k1+6 to k1+11 00-15...
  • Page 133 Memory Allocation Section 4-2 Word Item Function Counter 2 k2, k2+1 00-15 Lower Limit Range 0 Lower Limit Range 0 k2+2, k2+3 00-15 Upper Limit Range 0 Upper Limit Range 0 k2+4, k2+5 00-15 Output Pattern Range 0 Output Pattern Range 0 k2+6 to k2+11 00-15 Range Data Range 1...
  • Page 134: Comparison Memory Mapping

    Memory Allocation Section 4-2 4-2-6 Comparison Memory Mapping Word Item Function Counter 1 k1, k1+1 00-15 Comparison Value 0 Comparison Value 0 k1+2, k1+3 00-15 +Set Pattern Output Set Pattern crossing CV0 in + direction k1+4, k1+5 00-15 +Reset Pattern Output Reset Pattern crossing CV0 in + direction k1+6, k1+7 00-15...
  • Page 135 Memory Allocation Section 4-2 Word Item Function Counter 2 k2, k2+1 00-15 Comparison Value 0 Comparison Value 0 k2+2, k2+3 00-15 +Set Pattern Output Set Pattern crossing CV0 in + direction k2+4, k2+5 00-15 +Reset Pattern Output Reset Pattern crossing CV0 in + direction k2+6, k2+7 00-15 -Set Pattern...
  • Page 136: Iowr-Instruction

    IOWR-Instruction Section 4-3 IOWR-Instruction IOWR(223) @IOWR(223) C Control Code. The IOWR-instruction enables you to send messages to the High-speed Coun- ter Unit. The high-byte (=CC1) and the low-byte (=CC2) of the Control Code specify the type of message that is to be send. 15 14 13 12 11 10 9 CC2 (=Control Code 2) CC1 (=Control Code 1)
  • Page 137 IOWR-Instruction Section 4-3 Example ladder program Refer to the following structure for the ladder program if you want to use the IOWR- instruction. For an overview of the supported IOWR-instructions and how to set the C-, S- and D-operands, refer to 4-5 "Supported IOWR/IORD-Instructions". Start Data Transfer Busy IOWR(223)
  • Page 138: Iord-Instruction

    IORD-Instruction Section 4-4 IORD-Instruction IORD(222) @IORD(222) C Control Code. The IORD-instruction enables you to read data from the High-speed Counter Unit. The high-byte (=CC1) and the low-byte (=CC2) of the Control Code spec- ify the type of data that is to be read. 15 14 13 12 11 10 9 CC2 (=Control Code 2) CC1 (=Control Code 1)
  • Page 139 IORD-Instruction Section 4-4 Unit is ready to execute the IORD-instruction. If an error occurs during the execu- tion of the IORD-instruction the ER-flag turns ON. Note If you omit to include the Data Transfer Busy bit (CIO n+19, bit 02) in the ladder instruction and you start issuing an IORD-instruction while another IOWR/IORD- instruction is in progress the ER-flag turns ON.
  • Page 140: Supported Iowr/Iord-Instructions

    Supported IOWR/IORD-Instructions Section 4-5 Supported IOWR/IORD-Instructions 4-5-1 DM-data 4-5-1-1 DM-words Used for IOWR/IORD Memory Item IOWR IORD Control Code No. of Location Words General Output Control Mode AND/OR Counter Output Patterns Interrupt Task Offset (outputs) m+2, m+3 Interrupt Mask Outputs Interrupt Task Offset (inputs) Interrupt Mask Digital Inputs Physical Output NPN/PNP...
  • Page 141 Supported IOWR/IORD-Instructions Section 4-5 Memory Item IOWR IORD Control Code No. of Location Words m+68 to m+74 Not used Counter 2 m+75 Counter Type m+76 Signal Type m+77 Z-reset Mode Overflow/Underflow error-code generation m+78, m+79 Max. Count Value Circular/Linear m+80, m+81 Min.
  • Page 142: Range- And Comparison Data

    Supported IOWR/IORD-Instructions Section 4-5 Note Data written with the IOWR instruction is valid only until the Unit is restarted or the power supply is turned OFF. The settings in the DM and EM Area in the CPU Unit will be used after the next time the Unit is restarted or power is turned ON. If the settings made with IOWR instruction need to be used after the Unit is restarted or power is cycled, write the same settings to the DM and EM Area in the CPU Unit.
  • Page 143 Supported IOWR/IORD-Instructions Section 4-5 Note When transferring new Comparison Values to the Unit, be sure that the same Comparison Value is not used more than once in the same Counter. If the same Comparison Value exists more than once in the same Counter, an error will occur when the IOWR-instruction is executed.
  • Page 144 Supported IOWR/IORD-Instructions Section 4-5 Comparison Data If the Unit is in Comparison Mode for every Counter the Comparison Data of one or multiple Comparison Values can be read or written. For every Comparison Value the CV Data is contained in 10 words. Every IORD- and IOWR-instruction can transfer up to a maximum of 128 words.
  • Page 145: Special Data

    Supported IOWR/IORD-Instructions Section 4-5 4-5-3 Special data 4-5-3-1 Captured Counter Value The Counter Value can be captured into the Capture Register by using a Digital Input (Function 07 or 08) or by using the “Capture Counter Value bit” in CIO (refer to 3-4 "Digital Input Functions"...
  • Page 146 Supported IOWR/IORD-Instructions Section 4-5 Item IOWR IORD Control Code No. of Words Rate History Log File data 2 x R* c = Counter Number (1 or 2) * R = Number of Rate Values, 1 ≤ R ≤ 64 Example: The High-speed Counter Unit is assigned Machine Number 7.
  • Page 147 Supported IOWR/IORD-Instructions Section 4-5 4-5-3-4 (Re) Configure Unit During operation of the Unit (PLC is in RUN/MONITOR-mode), the Unit can be configured by using the IOWR-instruction from the PLC ladder program. Issuing the IOWR-instruction from the PLC ladder program results in transferring all the Unit configuration data to the Unit.
  • Page 148: Interrupts

    No external interrupt tasks can be activated for CJ1-H or CJ1M CPU Units if the CJ1W-CT021 High-speed Counter Unit is in any other position (i.e., 6th Unit posi- tion or further away from the CJ1-H CPU Unit, or 4th Unit position or further away from the CJ1M CPU Unit), or if it is on a CJ-series Expansion Rack.
  • Page 149: Outputs Generating Interrupts

    Interrupts Section 4-6 4-6-1 Outputs Generating Interrupts Enabling / Disabling The 32 Outputs, divided in 2 Digital Outputs and 30 Soft Outputs, can all be con- Interrupts figured to generate interrupts to the CJ-series CPU Unit. If an Output is configured to generate interrupts, an interrupt is issued to the CJ-series CPU Unit at a rising and at a falling edge of the corresponding bit in the Unit Output Pattern.
  • Page 150 Interrupts Section 4-6 Output Assigned External Interrupt executed at Interrupt Task Number rising/falling edge* Offset + 62 Rising Offset + 63 Falling * The assigned External Interrupt Task number is executed at a rising/falling edge of the corresponding Output bit in the Unit Output Pattern. For every Output the assigned External Interrupt Task number can be calculated with the following formula (‘O’...
  • Page 151: Digital Inputs Generating Interrupts

    Interrupts Section 4-6 4-6-2 Digital Inputs Generating Interrupts Enabling / Disabling The 2 Digital Inputs can all be configured to generate interrupts to the CJ-series Interrupts CPU Unit. If a Digital Input is configured to generate interrupts, an interrupt is issued to the CJ-series CPU Unit at a rising- or falling edge of the signal applied to the Digital Input.
  • Page 152 Interrupts Section 4-6 All 2 Digital Inputs are assigned in sequential order to consecutive External Inter- rupt Tasks starting from Digital Input 0. By defining an Offset you determine the External Interrupt Task number of the (first) External Interrupt Task that is assigned to Digital Input 0.
  • Page 153: Error Processing, Maintenance And Inspection

    SECTION 5 Error Processing, Maintenance and Inspection This section provides details of the CJ1W-CT021 High-speed Counter Unit’s error indicators and error codes and guidelines for maintenance and inspection of the Unit. Error Indicators ..........
  • Page 154: Error Indicators

    Error Indicators Section 5-1 Error Indicators CT021 The RUN-, ERC-, and ERH-LEDs, at the front panel of the High-speed Counter Unit, display the following errors. 5-1-1 Errors during initial processing Error Probable cause Remedy Setup error Incorrect Unit number Set correct Unit number and turn Cyclic initial error ON the power again DM-configuration...
  • Page 155: Errors During Normal Operation

    Error Indicators Section 5-1 5-1-2 Errors during normal operation Error Probable cause Remedy Unit error Invalid operands specified Check the Error Code(s) in CIO in IOWR-instruction (words n+17, n+18). Apply Overflow or underflow of appropriate remedy according to the Simple or Linear Counter cause of the error.
  • Page 156: Error Codes

    Error codes Section 5-2 Error codes Reporting errors The errors that can occur at the Unit are divided in 6 categories: DM-configuration errors, IOWR-instruction errors, overflow/underflow errors, Preset error, Interrupt- FIFO full error and System errors. Every error is assigned a unique error code. The error code consists of two words (error code 1 and error code 2).
  • Page 157: Dm-Configuration Errors

    Error codes Section 5-2 5-2-1 DM-configuration errors DM-configuration errors are detected during initialisation after the Unit has been powered up or restarted. DM-configuration errors can also be detected after the IOWR-instruction “(Re) Configure Unit” has been issued (refer to 4-5-3-4 “(Re) Configure Unit”).
  • Page 158: Iowr/Iord-Instruction Errors

    Error codes Section 5-2 Clearing DM-configuration DM-configuration errors can be cleared by correcting the faulty settings in Data errors Memory and consecutively transferring the new configuration data again to the Unit. To transfer the configuration data you can choose from one out of two possi- bilities: •...
  • Page 159: Overflow/Underflow Errors

    Error codes Section 5-2 Error Code 1 Error Code 2 Error Description 0420 Counter Range Invalid Upper Range Limit < Lower Range Limit. Range Limits Counter No. indicates the Linear Counter number and Range No. indicates the Range number. 0430 Counter Range Invalid...
  • Page 160: Preset Error

    Error codes Section 5-2 Note At overflow- and underflow errors it is possible to configure Output State Control (refer to 3-5-4 "Output Control Configuration"). 5-2-4 Preset error A Preset error is generated if a Circular or Linear Counter is preset with an invalid Preset Value (refer to 3-4 "Digital Input Functions"...
  • Page 161: System Errors

    Error codes Section 5-2 The error indicates that the load of interrupts on the CJ-series CPU Unit is too high. Clearing the error as mentioned before most probably needs additional measures to be taken in order to prevent this error from happening in the future: •...
  • Page 162: Maintenance And Inspection

    Maintenance and Inspection Section 5-3 Maintenance and Inspection This section describes the routine cleaning and inspection recommended as reg- ular maintenance. 5-3-1 Cleaning Clean the High-speed Counter Unit regularly as described below in order to keep it in its optimal operating condition. •...
  • Page 163 Maintenance and Inspection Section 5-3 Inspection Procedure Check the items in the following table and correct any items that are not according to the criteria. Item Criteria Equipment Environmental Ambient temperature 0°C to 55°C Thermometer conditions Ambient humidity 10% to 90% Hygrometer Dust/dirt accumulation None...
  • Page 164 Maintenance and Inspection Section 5-3...
  • Page 165: Application Examples

    SECTION 6 Application Examples This section gives information about the configuration of the CJ1W-CT021 High-speed Counter Unit and program samples, which can be used to operate the Unit according to five common application examples. At the beginning of each section that describes an application example, all configuration items that are covered in that section are mentioned.
  • Page 166: Flow Control

    Flow Control Section 6-1 Flow Control Covered configuration items in this example: • Simple Counter (for a Simple Counter no DM-configurations have to be made). Application Description In the following example a tank has to be filled with a fixed amount of liquid. Press- ing the push button resets the Simple Counter, opens the Gate of the Simple Counter and opens the valve.
  • Page 167 Flow Control Section 6-1 15 14 13 12 11 10 9 CIO 2002 (= n+2) Open Gate Simple Counter 1 0→1 = Open Gate Close Gate Simple Counter 1 0→1 = Close Gate Reset Simple Counter 1 0→1 = Reset Counter 15 14 13 12 11 10 9 CIO 2016 (= n+16) Status Digital Input 0:...
  • Page 168 Flow Control Section 6-1 Ladder Program A20011 Set Simple C ounter 1 t o 200015 Manual Output Control First Cycle F lag 200015 Manual Output Control 201600 Reset Simple Counter 1 200203 to zero Push Button Open Gate Counter 1 200200 Open Valve 200000...
  • Page 169: Length Measurement

    Length Measurement Section 6-2 Length Measurement Covered configuration items in this example: • Circular Counter • Range Mode, setting Range Data • Programmable Output Pulses (Output Pulse Duration) • Digital Input Function (Functions 5 and 11) • Capturing and reading Captured Values •...
  • Page 170 Length Measurement Section 6-2 To measure the length of objects the pulses of encoder E1 are counted by Linear/ Circular Counter 1 (corresponding DIP switch on the front of the Unit is in the ON- position). Photo-electric sensor D1 is connected to Digital Input I0. Digital Input I0 controls Counter 1 and is assigned Digital Input Function 11 (Reset, Stop, Capture and Continue).
  • Page 171 Length Measurement Section 6-2 Removing objects Timing the correct moment to remove an object for the pusher is done by the com- bination of encoder 2 and photo-electric sensor D2. Objects are removed by the pusher which is located at conveyor belt 2. Photo-electric sensor D2 is connected to Digital Input I1.
  • Page 172 Length Measurement Section 6-2 is also stored in DM starting from D600. To configure the Unit the following DM- settings must be made 15 14 13 12 11 10 9 :DM-word (The hyphen “-“ indicates that the contents of the corresponding digit is irrelevant and the value does not care) General DM-Settings: D 20000 (= m)
  • Page 173 Length Measurement Section 6-2 Ladder Program A short ladder program for the PLC is written to read and store the measured length of improper sized objects in EM starting from EM100 of the CJ-series CPU Unit. A2001 1 MO VR (560) Write physical memory address of First Cycle Flag EM 100...
  • Page 174: Positioning

    Positioning Section 6-3 Positioning Covered configuration items in this example: • Linear Counter • Comparison Mode, setting Comparison Data • Digital Input Function (Function 05) • Using IOWR-instruction to change Comparison Data Application Description In this example a hole is drilled into an object. The drill bit is spun by a single speed, single direction motor (motor 2) which can only be turned ON or OFF.
  • Page 175 Positioning Section 6-3 the feed-motor is switched to move slowly until it reaches the limit switch and is switched OFF (via the ladder program). At this moment a new object is placed in position again. At this moment the feed-motor stays switched OFF for as long as the proximity switch has detected a new object, initiating the whole cycle again.
  • Page 176 Positioning Section 6-3 CV 1 setti ngs of Counter 1 (in EM): EM 01510 Comparison Value 1 is 35000 (=000088B8 EM 01511 EM 01512 +Set Pattern: Set Soft Output 2 (i.e. startdrill-motor) in the positive (=+) EM 01513 counting direction EM 01514 +Reset Pattern: no outputs are reset at the crossing of CV0 in the positive counting direction...
  • Page 177 Positioning Section 6-3 Ladder Program A short ladder program for the PLC is written to start and stop the feed-motor. The feed-motor is connected to the Digital Output Unit and mapped on CIO 000000. The proximity switch is mapped on CIO 000200.
  • Page 178 Positioning Section 6-3 201600 000200 Turn ON feed-motor M1 if object is present AND if the drill-motor is in the home position (after the object Limit switch at Proximity switch 000000 is treated it is removed automatically Digital Input l0 by other machinery) 201600 Turn OFF feed-motor M1 if the drill-motor...
  • Page 179: Cam-Positioning

    CAM-positioning Section 6-4 CAM-positioning Covered configuration items in this example: • Circular Counter • Range Mode, setting Range Data • Interrupts (Outputs generating interrupts) • Hysteresis • Input Signal Type, Phase Differential, multiplication x4 • Resetting a Counter with the Z-input combined with the Software Reset Enable Application Description In this example 15 outputs of a machine are controlled according to the position angle of the “electronic CAM-shaft”...
  • Page 180 CAM-positioning Section 6-4 The encoder is connected to Circular Counter 1. The 15 outputs are controlled by 5 Ranges (Range 0 to 4). An Hysteresis of 20 counts is defined and will be applied to the Range Limits. The outputs are assigned to the Interrupt Tasks 10 to 39 respectively in the PLC ladder program (i.e.
  • Page 181 CAM-positioning Section 6-4 Range Data Counter 1 Range Data Counter 1 Range 0 settings of Counter 1 (in EM): EM 00100 Lower Range Limit is 500 (=000001F4 EM 00101 EM 00102 Upper Range Limit is 800 (=00000320 EM 00103 EM 00104 Output Pattern: 0, 1, 5 and 12 are ON (=00001023 EM 00105 Range 1 settings of...
  • Page 182 CAM-positioning Section 6-4 Ladder Program A short ladder program (consisting of 30 External Interrupt Tasks) for the PLC is written to control the outputs via the additional output module. All outputs are con- figured to generate interrupts. The Digital Output Unit is mapped in CIO starting from CIO 000000.
  • Page 183 CAM-positioning Section 6-4 Interrupt Task 24: Output 7 000007 Always ON flag Interrupt Task 25: Output 7 000007 Always OFF flag Interrupt Task 26: Output 8 000008 Always ON flag Interrupt Task 27: Output 8 000008 Always OFF flag Interrupt Task 28: Output 9 000009 Always ON flag...
  • Page 184: Speed Control

    Speed Control Section 6-5 Speed Control Covered configuration items in this example: • Circular Counter • Rate Ranges, setting Rate Range Data Application Description In this example logs are fed into a saw blade. A conveyor that has two speeds (fast/slow) transports the logs.
  • Page 185 Speed Control Section 6-5 Output O0 and the slow speed indicator is controlled by Digital Output O1 of the High-speed Counter Unit. Speed Saw Blade [ Hz] Conveyor Speed: Conveyor Speed: High frequencies are Fast Slow Slow Fast detected by Rate Range 0 5000 H z Critical speed Low frequencies are...
  • Page 186 Speed Control Section 6-5 DM-configuration The Machine Number of the High-speed Counter Unit is 0. The High-speed Coun- ter is allocated 40 CIO-words starting from CIO 2000 (n = CIO 2000 + 0 x 10) and 400 DM-words starting from D 20000 (m = D 20000 + 0 x 100). To configure the Unit the following DM-settings must be made.
  • Page 187: Using Terminal Block Units With Screw-Terminals

    The following table shows the numbering of the Screw-terminals when you use Terminal Block Units (XW2B-40G4 or XW2B-40G5) to connect the external signals (Power Supply, Digital I/O and Counter Input Signals) to the CJ1W-CT021 High-speed Counter Unit. Item Connector 1 (CN1)
  • Page 188 Using Terminal Block Units with Screw-terminals Appendix A sponds to the pins numbered B1 to B20 of the associated connector (CN1) on the Unit.
  • Page 189: Assigning External Interrupt Tasks To Outputs

    Appendix B Assigning External Interrupt Tasks to Outputs The following table shows which External Interrupt Task Numbers are assigned to rising- and falling edges of the corresponding Output bits in the Unit Output Pattern. Two External Interrupt Tasks are assigned to every Output if that Output has been enabled to generate interrupts.
  • Page 190 Assigning External Interrupt Tasks to Outputs Appendix B Output Assigned External Interrupt executed at rising/falling edge* Interrupt Task Number Offset + 32 Rising Offset + 33 Falling Offset + 34 Rising Offset + 35 Falling Offset + 36 Rising Offset + 37 Falling Offset + 38 Rising...
  • Page 191: Description Of The Response Time

    Description of the Response Time The Response Time of the CJ1W-CT021 High-speed Counter Unit is the time between the Unit receiving a count pulse (on one of the Counter inputs A or B) and the switching (ON or OFF) of a corresponding Digital Output.
  • Page 193: Application Restrictions

    Appendix D Application Restrictions The following restrictions apply when using CJ1W-CT021 High-speed Counter Units. Restriction Reference When a 50-kHz noise filter is configured, External Control Inputs cannot read signals 1-3-3 "Input Specifications" shorter than 10 µs. The time from signal input to resetting for External Control Inputs is 300 µs max.
  • Page 194 Application Restrictions Section D Restriction Reference The External Interrupt Task buffer stores up to 30 requests. 5-2-5 "Interrupt FIFO full error" For functions that cannot guarantee a response time of 0.5 ms or shorter, the Appendix C "Description of the approximate response time will be as follows: Response Time"...
  • Page 195: Iorf And Iowr/Iord-Instruction Execution Times

    Appendix E IORF and IOWR/IORD-instruction Execution Times Instruction Control data Execution conditions Execution time IORF 0.5 ms IOWR 0D01 10 s 0B01 0.8 ms 1A00 (See note.) Range comparison conditions are not set in the Unit and the following command is executed.
  • Page 197: Index

    Index Counter Types 47 Circular Counter 53 A-indicator 27 Linear Counter 54 Simple Counter 48 Allocating Memory 97 Digital Input Functionality 59 Application Areas 24 Hysteresis 90 Application Examples Inintial Counter Value 92 CAM-positioning 159 Input Signal Types 56 Flow Control 146 Phase Differential Signals (x1, x2, x4) 56 Length Measurement 149 Pulse &...
  • Page 198 Index Data Exchange, between CPU and CS1W-CT021/CT041 94 Enable Reset 81 Delay, turning ON an Output 83 ERC-indicator 27 Digital Input Functionality 59 ERH-indicator 27 Capture and Reset Funtion 63 Error Categories Capture Funtion 62 DM-configuration errors 137 Disable Reset Function 64 Interrupt FIFO full error 140 Enable Reset Function 64 IOWR/IORD-instruction errors 138...
  • Page 199 Index Frequency Measurement 86 Error Clear Command 127 Range- and Comparison data 122 Functional Specifications 8 Rate History Log File data 125 IOWR-Instruction 116 Gating 50 General specifications 7 LED-indicators 27 Length Measurement Example 149 Linear Counter 21 Example 154 Hysteresis 90 Logically AND/OR Counter Output Patterns 70 Example 159...
  • Page 200 Index Output Drivers Range-Data NPN 80 Allocation 100 PNP 80 Changing at run-time, using IORD/IOWR 122 Configuration 70 Output Pattern Examples 100 Logically AND/OR Counter Output Patterns 72 Predefined Output Pattern 80 Rate History Log File 86 Unit Output Pattern 66 Rate Measurement 84 Output Pulse Duration 83 Rate Ranges 87...
  • Page 201 Index Terminal Block Unit 35 Time Window 85 Troubleshooting 136 Underflow 55 Underflow Error-Code Generation 55 Unit Output Pattern 66 Up & Down Signals 57 Wiring 32 Connector Pin-layout 32 Connector Wiring Methods 33 External connector 33 Terminal Block Unit 35 Counter Input Circuitry Example 5/12/24 VDC NPN Open Collector 41 Example 5/12/24 VDC PNP Open Collector 42...
  • Page 203: 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. W401-E1-04 Revision code The following table outlines the changes made to the manual during each revision. Page numbers refer to the previous version.
  • Page 206 The Netherlands IL 60173-5302 U.S.A. Tel: (31)2356-81-300/Fax: (31)2356-81-388 Tel: (1) 847-843-7900/Fax: (1) 847-843-7787 © OMRON Corporation 2001 All Rights Reserved. OMRON (CHINA) CO., LTD. OMRON ASIA PACIFIC PTE. LTD. In the interest of product improvement, Room 2211, Bank of China Tower, No.

Table of Contents