Omron CJ1W-CT021 Operation Manuals
Omron CJ1W-CT021 Operation Manuals

Omron CJ1W-CT021 Operation Manuals

For nj-series cpu unit. high-speed counter units.
Hide thumbs Also See for CJ1W-CT021:
Table of Contents

Advertisement

Quick Links

Machine Automation Controller
CJ-series
High-speed Counter Units
Operation Manual
for NJ-series CPU Unit
CJ1W-CT021
High-speed Counter Units
W492-E1-03

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ1W-CT021 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Omron CJ1W-CT021

  • Page 1 Machine Automation Controller CJ-series High-speed Counter Units Operation Manual for NJ-series CPU Unit CJ1W-CT021 High-speed Counter Units W492-E1-03...
  • Page 2 OMRON. No patent liability is assumed with respect to the use of the information contained herein. Moreover, because OMRON is constantly striving to improve its high-quality products, the information contained in this manual is subject to change without notice.
  • Page 3: Introduction

    Thank you for purchasing a CJ-series CJ1W-CT021 High-speed Counter Unit. This manual contains information that is necessary to use the CJ-series CJ1W-CT021 High-speed Counter Unit for an NJ-series CPU Unit. Please read this manual and make sure you understand the functionality and performance of the NJ-series CPU Unit before you attempt to use it in a control sys- tem.
  • Page 4: Relevant Manuals

    Relevant Manuals Relevant Manuals There are three manuals that provide basic information on the NJ-series CPU Units: the NJ-series CPU Unit Hardware User’s Manual, the NJ-series CPU Unit Software User’s Manual, and the NJ-series Instructions Reference Manual. Most operations are performed from the Sysmac Studio Automation Software. Refer to the Sysmac Studio Version 1 Operation Manual (Cat.
  • Page 5: Manual Configuration

    Manual Configuration Manual Configuration NJ-series CPU Unit Hardware User’s Manual (Cat. No. W500) Section Description Section 1 This section provides an introduction to the NJ-series Controllers and their features, Introduction and gives the NJ-series Controller specifications. Section 2 This section describes the system configuration used for NJ-series Controllers. System Configuration Section 3 This section describes the parts and functions of the configuration devices in the NJ-...
  • Page 6 Manual Configuration Sysmac Studio Version 1 Operation Manual (Cat. No. W504) Section Description Section 1 This section provides an overview and lists the specifications of the Sysmac Studio Introduction and describes its features and components. Section 2 This section describes how to install and uninstall the Sysmac Studio. Installation and Uninstallation Section 3 This section describes the basic concepts for designing an NJ-series System with the...
  • Page 7 Manual Configuration CJ-series High-speed Counter Units Operation Manual (Cat. No. W401) Section Description Section 1 This section describes the functionality and the specifications of the High-speed Introduction Counter Unit, and the operating procedure. Section 2 This section describes the details of the components and where and how to install Components, Installation and Wir- and wire the High-speed Counter Unit.
  • Page 8: Manual Structure

    Manual Structure Manual Structure Page Structure The following page structure is used in this manual. Level 1 heading 4 Installation and Wiring Level 2 heading Mounting Units Level 3 heading Level 2 heading Gives the current headings. Level 3 heading 4-3-1 Connecting Controller Components The Units that make up an NJ-series Controller can be connected simply by pressing the Units together...
  • Page 9 Manual Structure Precaution on Terminology In this manual, “download” refers to transferring data from the Sysmac Studio to the physical Controller and “upload” refers to transferring data from the physical Controller to the Sysmac Studio. For the Sysmac Studio, synchronization is used to both upload and download data. Here, “synchronize” means to automatically compare the data for the Sysmac Studio on the computer with the data in the physical Controller and transfer the data in the direction that is specified by the user.
  • Page 10 Manual Structure CJ-series High-speed Counter Units Operation Manual for NJ-series CPU Unit(W492)
  • Page 11: Sections In This Manual

    Sections in this Manual Sections in this Manual Introduction Components, Installation and Wiring Operation and Configuration Exchanging Data with CPU Error Processing, Maintenance and Inspection Application Examples Appendices Index CJ-series High-speed Counter Units Operation Manual for NJ-series CPU Unit(W492)
  • Page 12: Table Of Contents

    CONTENTS CONTENTS Introduction ....................... 1 Relevant Manuals ...................... 2 Manual Configuration ....................3 Manual Structure ....................... 6 Sections in this Manual .................... 9 CONTENTS....................... 10 Read and Understand this Manual ................ 13 Safety Precautions ....................16 Precautions for Safe Use..................21 Precautions for Correct Use...................
  • Page 13: Contents

    CONTENTS Installation..........................2-6 2-2-1 System Configuration Precautions ..................... 2-6 2-2-2 Installing Units ..........................2-6 Wiring ............................2-8 2-3-1 Connector Pin-layout ........................2-8 2-3-2 Connector Wiring Methods ......................2-9 2-3-3 Important Wiring Considerations ....................2-13 2-3-4 Internal Circuitry ........................2-13 2-3-5 Digital I/O Circuit Configurations....................
  • Page 14 CONTENTS Section 5 Error Processing, Maintenance and Inspection Error Indicators ........................5-2 5-1-1 Errors during initial processing....................5-2 5-1-2 Errors during normal operation ....................5-3 Error codes..........................5-4 5-2-1 DM-configuration errors ......................5-5 5-2-2 Overflow/Underflow errors......................5-6 5-2-3 Preset Error..........................5-7 5-2-4 System Errors ..........................
  • Page 15: Read And Understand This Manual

    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 16 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 17 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 18: Safety Precautions

    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 CJ-series High-speed Counter Unit. The safety precautions that are provided are extremely important to safety. Always read and heed the information provided in all safety precautions. The following notation is used.
  • Page 19 Safety Precautions Symbols The circle and slash symbol indicates operations that you must not do. The specific operation is shown in the circle and explained in text. This example indicates prohibiting disassembly. The triangle symbol indicates precautions (including warnings). The specific operation is shown in the triangle and explained in text. This example indicates a precaution for electric shock.
  • Page 20 Safety Precautions WARNING During Power Supply Do not touch any of the terminals or terminal blocks while the power is being supplied. Doing so may result in electric shock. Do not attempt to take any Unit apart. In particular, high-voltage parts are present in the Power Supply Unit while power is supplied or immediately after power is turned OFF.
  • Page 21 Safety Precautions WARNING Fail-safe Measures Unintended outputs may occur when an error occurs in variable memory or in memory used for CJ-series Units. As a countermeasure for such prob- lems, external safety measures must be provided to ensure safe operation of the system.
  • Page 22 Safety Precautions Caution Application Do not touch any Unit when power is being supplied or immediately after the power supply is turned OFF. Doing so may result in burn injury. Wiring Be sure that all terminal screws and cable connector screws are tightened to the torque specified in the relevant manuals.
  • Page 23: Precautions For Safe Use

    Precautions for Safe Use Precautions for Safe Use Disassembly and Dropping • Do not attempt to disassemble, repair, or modify any Units. Doing so may result in malfunction or fire. • Do not drop any Unit or subject it to abnormal vibration or shock. Doing so may result in Unit malfunc- tion or burning.
  • Page 24 Precautions for Safe Use • Do not apply voltages or connect loads to the Output Units or slaves in excess of the maximum rat- ings. • Surge current occurs when the power supply is turned ON. When selecting fuses or breakers for external circuits, consider the above precaution and allow sufficient margin in shut-off performance.
  • Page 25 Precautions for Safe Use • Connecting cables or wiring the system • Connecting or disconnecting the connectors The Power Supply Unit may continue to supply power to the rest of the Controller for a few seconds after the power supply turns OFF. The PWR indicator is lit during this time. Confirm that the PWR indicator is not lit before you perform any of the above.
  • Page 26 CAT slaves are cut off. During that period, the slave outputs behave according to the slave settings. The time that communications are cut off depends on the EtherCAT network configuration. If the EtherCAT network configuration contains only OMRON EtherCAT slaves, communications are cut off for a maximum of 45 seconds.
  • Page 27 Precautions for Safe Use • If the Fail-soft Operation parameter is set to stop operation, process data communications will stop for all slaves when an EtherCAT communications error is detected in a slave. For this reason, if Servo Drives are connected, the Servos for all axes will be turned OFF. Make sure that the Fail-soft Operation parameter setting results in safe operation when a device error occurs.
  • Page 28 Precautions for Safe Use • Apply power for at least five minutes before changing the Battery. Install a new Battery within five minutes (at 25°C) of turning OFF the power supply. If power is not supplied for at least 5 minutes, the saved data may be lost.
  • Page 29: Precautions For Correct Use

    Precautions for Correct Use Precautions for Correct Use Storage, Mounting, and Wiring • Do not operate or store the Controller in the following locations. Operation may stop or malfunctions may occur. • Locations subject to direct sunlight • Locations subject to temperatures or humidity outside the range specified in the specifications •...
  • Page 30 Precautions for Correct Use Error Processing • In applications that use the results of instructions that read the error status, consider the affect on the system when errors are detected and program error processing accordingly. For example, even the detection of a minor error, such as Battery replacement during operation, can affect the system depending on how the user program is written.
  • Page 31 Precautions for Correct Use Battery Replacement • Be sure to install a replacement Battery within two years of the production date shown on the Battery label. • Turn ON the power after replacing the Battery for a CPU Unit that has been unused for a long time. Leaving the CPU Unit unused again without turning ON the power even once after the Battery is replaced may result in a shorter Battery life.
  • Page 32: Regulations And Standards

    Concepts EMC Directive 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 standards.* Whether the products conform to the standards in the system used by the customer, however, must be checked by the customer.
  • Page 33 The NJ-series Controllers comply with the following shipbuilding standards. Applicability to the ship- building standards is based on certain usage conditions. It may not be possible to use the product in some locations. Contact your OMRON representative before attempting to use a Controller on a ship.
  • Page 34: Unit Versions

    Gives the lot number and serial number of the Unit. serial number DDMYY: Lot number, @: For use by OMRON, xxxx: Serial number “M” gives the month (1 to 9: January to September, X: October, Y: November, Z: December) MAC address Gives the MAC address of the built-in port on the Unit.
  • Page 35 Unit Versions Right-click any open space in the Unit Editor and select Production Information. The Production Information Dialog Box is displayed. Simple Display Detailed Display In this example, “Ver.1.00” is displayed next to the unit model. The following items are displayed. CPU Unit CJ-series Units Unit model...
  • Page 36: Related Manuals

    Studio. tions of the Sysmac Studio. CJ-series High-speed W492 CJ1W-CT021 Learning about the func- The functions and usage of the CJ-series High- Counter Units Operation tions and usage of CJ- speed Counter Unit for using it in an NJ-series...
  • Page 37: Revision History

    Revision History Revision History A manual revision code appears as a suffix to the catalog number on the front and back covers of the manual. W492-E1-03 Cat. No. Revision code Revision code Date Revised content July 2011 Original production March 2012 Corrected errors.
  • Page 38 Revision History CJ-series High-speed Counter Units Operation Manual for NJ-series CPU Unit(W492)
  • Page 39: Introduction

    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. 1-1 Features and Functions ......... 1-2 1-2 Basic Configuration .
  • Page 40: Features And Functions

    1 Introduction Features and Functions The CJ1W-CT021 High-speed Counter Unit is equipped with 2 Counters and counts over a maximum binary range of 32-bits. Accepting input pulse frequencies of up to 500 kHz allows precise control of fast motions. The Unit's bi-directional counting ability enables detecting movement in either direction.
  • Page 41 1 Introduction Digital Input Function This Unit supports two Digital Inputs (I0 and I1) which can be allocated freely for each Counter. A function can be selected from among eight types of functions and allocated for each Digital Input according to the user application. Function allocation makes it possible to use the Digital Inputs together with gates, presets, resets, etc.
  • Page 42 1 Introduction 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. The cut-off frequencies for the signal lines, A and B can be set to: •...
  • Page 43: Basic Configuration

    Other P ulse Generators Mounting Restrictions The CJ1W-CT021 High-speed Counter Unit is a Special I/O Unit that belongs to the CJ Series. The CJ1W-CT021 High-speed Counter Unit can be mounted in an NJ-series CPU rack or NJ-series Expansion Rack. Note If you want the CJ1W-CT021 High-speed Counter Unit to generate interrupts to activate external interrupt tasks in a CJ1-H CPU Unit, the Counter Unit must be in one of the five posi- tions immediately to the right of the CJ1-H CPU Unit on the CPU Rack.
  • Page 44 1 Introduction The maximum number of CJ1W-CT021 High-speed Counter Units that can be mounted on all CPU Racks and Expansion Racks is 24. Furthermore, the number of Units that can be mounted in one NJ-series CPU Rack or NJ- series Expansion Rack is decided by the maximum current that the Power Supply Unit can supply and the amount of current consumed by other Units.
  • Page 45: Specifications And Characteristics

    1 Introduction Specifications and Characteristics 1-3-1 General Specifications Item CJ1W-CT021 Unit type CJ-series Special I/O Unit General Specifications Conform to general specifications for Sysmac NJ-series 0 to 55 °C Ambient Operating Temperature −20 to 70 °C Ambient Storage Temperature Ambient operating Humidity...
  • Page 46: Functional Specifications

    1 Introduction 1-3-2 Functional Specifications Item CJ1W-CT021 Number of Counters Counter Type • Simple Counter (refer to 3-2-1 Simple Counter) • 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 Switch).
  • Page 47 1 Introduction Item CJ1W-CT021 Reset Signals Every Counter can be reset to zero by the following sources: • Software Counter Reset Bit • Digital Input* • Z-Input* Refer to 3-6 Reset Counter. Extra Functions • Programmable Output Pulse*: To every Digital Output an ON-delay and/or a Pulse Duration [1 to 9999 ms] can be applied (refer to 3-7-1 Programmable Output Pulses) •...
  • Page 48: Input Specifications

    1 Introduction 1-3-3 Input Specifications Digital Inputs Item Counter Inputs A and B (I0 and I1) Input Voltage 24 VDC 12 VDC 5 VDC Line Driver 24 VDC (19.6 to 26.4 V) (9.8 to 13.2 V) (4.5 to 5.5 V) (19.6 to 26.4 V) Input Current 8 mA...
  • Page 49 1 Introduction Counter Inputs A, B, Z and Digital Inputs 5-, 12- or 24- VDC input signals RS-422 Line Driver signals Counter inputs A and B Counter inputs A and B Input pulses with a duty factor of 50% Input pulses with a duty factor of 50% Relationship between A and B phases w ith phase Relationship between A and B phases w ith phase differential inputs...
  • Page 50: Output Specifications

    1 Introduction Additional Information As a general guideline, to satisfy the above timing specifications, you must pay attention to the type of output driver of the encoder being used, the length of the encoder cable and the fre- quency of the count pulses generated. For example, if 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.
  • Page 51 1 Introduction Maximum Switching Capacity The maximum switching current depends upon the power supply voltage, as shown below. 10. 2 20. 4 26. 4 External Supply Voltage (VDC) CJ-series High-speed Counter Units Operation Manual for NJ-series CPU Unit(W492) 1-13...
  • Page 52: Quick Start Up Reference Guide

    (refer to 1-5 Operating Procedure Guidelines for quick start up information). One CJ1W-CT021 High-speed Counter Unit occupies dedicated areas for four Units. Therefore, the maximum number of Units that can be mounted on all CPU Racks and Expansion Racks is 24.
  • Page 53 1 Introduction Reference Simple Counter Circular/Linear Counter section 3-3 Input Sig- Input Signal Types nal Types • Phase Differential (x1) (=default) • Phase Differential (x1, x2, x4) 3-3-1 Phase Differential • Up & Down 3-3-2 Up & Down Pulse • Pulse & Direction 3-3-3 Pulse &...
  • Page 54 1 Introduction Reference Simple Counter Circular/Linear Counter section Reset Signals 3-6 Reset Counter • Software Reset Bit • Software Reset Bit • Digital Input • Z-signal Programmable Output Pulses 3-7-1 Pro- grammable • Yes • No (=default) Output Pulses Hysteresis 3-7-2 Hyster- esis •...
  • Page 55: Configuring The High-Speed Counter Unit

    Specifying indirect addresses for Circular/Linear Counters and Allocating them to user-defined variables CJ1W-CT021 High-speed Counter Unit are set with the Edit Special Unit Settings of Sysmac Studio. When the contents of the Special Unit settings are transferred to the CPU Unit, they are reflected in the device variables for CJ-series Unit (for setting).
  • Page 56 1 Introduction Count operations are started with the gate open/close bit of the device variables for CJ-series Units or Digital Input, depending on the application. 1-18 CJ-series High-speed Counter Units Operation Manual for NJ-series CPU Unit(W492)
  • Page 57: Operating Procedure Guidelines

    1 Introduction Operating Procedure Guidelines The operating procedures for High-speed Counter Units are described here. There is no restriction regarding the sequence of "Programs and software settings" and "Hardware set- ting and Rack assembly." These tasks may be carried out concurrently or in the reverse order. Use Sysmac Studio to create and set programs.
  • Page 58 1 Introduction Details of Hardware Setting and Rack Assembly Set the Unit number Set the Machine Number. Refer to 2-1-4 Machine Number Switch for further details. Set the same unit number as in the Unit Configuration settings. Machine Number Switch: MACH ×...
  • Page 59 1 Introduction Create Initial Settings Data of the Unit Create the initial settings data for the Unit on the Edit Special Unit Settings of Sysmac Studio. When setting in Simple Counters, there is no need to create this data. When setting in Simple Counters: No Special Unit settings are necessary.
  • Page 60: Application Areas

    • Packaging and Sorting plants • Dosing or proportioning plants • Process Industry Typical applications in which the CJ1W-CT021 can be used: • (CAM)-Positioning • Position Monitoring • Flow Control (refer to 6-1 Flow Control) Section 6 Application Examples describes typical application examples in which the High-speed Counter can be used, including sample programs.
  • Page 61: 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. 2-1 Components and Switch Settings ....... . 2-2 2-1-1 Components .
  • Page 62: Components And Switch Settings

    2 Components, Installation and Wiring 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 CJ-series High-speed Counter Units Operation Manual for NJ-series CPU Unit(W492)
  • Page 63: Indicators

    2 Components, Installation and Wiring 2-1-2 Indicators CT021 The indicators on the LED-display show the operating status of the Unit. The following table shows the meaning of the indicators. Colour State Description Green Unit is in operation (i.e. Unit has initialized normally after the Controller is reset or the Unit is restarted).
  • Page 64: Counter Type Switch

    2 Components, Installation and Wiring 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. Example: Pin 1 set to ON and Default state pin 2 set to OFF...
  • Page 65: Machine Number Switch

    2 Components, Installation and Wiring 2-1-4 Machine Number Switch MACH Use the unit number switches to set the unit number specific for each Special I/O Unit mounted in a CPU Rack or Expansion Rack. The unit number must be the one registered in Unit Configurations. Turn OFF the Controller before changing the Unit number setting.
  • Page 66: Installation

    • Be sure to turn OFF the power of the controller before installing or removing units or connect- ing or disconnecting connecting lines. Use the following procedure to install CJ1W-CT021 High-speed Counter Units. Connect the Units before mounting them to DIN-rail.
  • Page 67 2 Components, Installation and Wiring Slide the yellow sliders on the top and bottom of the Units until they click into place, firmly lock- ing the Units together. Slide the sliders toward the back until they click into place. Slider Lock Release Attach an End Plate to the Unit on the right end of the Rack.
  • Page 68: Wiring

    2 Components, Installation and Wiring 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 Outputs, Digital Inputs and the Counter Inputs of the Unit are logically grouped together and allocated to the pins of connector 1.
  • Page 69: 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:...
  • Page 70 2 Components, Installation and Wiring External Connector The connector has to be assembled from the separate parts that it exists of and that are supplied together with the Unit. Most important part is the connector jack (FCN-361J040) that contains 40 soldering terminals to which the wires have to be soldered.
  • Page 71 This is easier and less time-consuming than soldering the wires to the external connector. For this purpose you should use a Terminal Block Unit. The following Ter- minal Block Units are recommended for using together with the CJ1W-CT021 High-speed Counter Unit: •...
  • Page 72 2 Components, Installation and Wiring Refer to A-2 Using Terminal Block Units with Screw-terminals for information 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. 2-12 CJ-series High-speed Counter Units Operation Manual for NJ-series CPU Unit(W492)
  • Page 73: Important Wiring Considerations

    2 Components, Installation and Wiring 2-3-3 Important Wiring Considerations Use the following guidelines when planning the system wiring of the Unit: • Disconnect the power to the controller before wiring the unit. • Make sure the PLC-system is properly grounded. •...
  • Page 74 2 Components, Installation and Wiring 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 75: Digital I/O Circuit Configurations

    2 Components, Installation and Wiring 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...
  • Page 76 2 Components, Installation and Wiring 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 2-16...
  • Page 77: Counter Input Configurations

    2 Components, Installation and Wiring 2-3-6 Counter Input Configurations The following examples make clear how to wire the Counter Inputs in different configurations 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 output-driver, can also be referred to in case you want to use other pulse generating equipment with similar output-drivers.
  • Page 78 2 Components, Installation and Wiring 5/12/24 VDC PNP Open Collector High-speed Counter Term inals (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)
  • Page 79 2 Components, Installation and Wiring 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 -...
  • Page 80 2 Components, Installation and Wiring 2-20 CJ-series High-speed Counter Units Operation Manual for NJ-series CPU Unit(W492)
  • Page 81 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. 3-1 Overview ........... . . 3-2 3-1-1 Summary .
  • Page 82: Overview

    CJ-series Unit (for setting). This section describes how to set the CJ1W-CT021 High-speed Counter Unit to meet the specific needs of the user application. (Refer to 1-4 Quick Start Up Reference Guide for an overview of the con- figuration items for every Counter).
  • Page 83 3 Operation and Configuration Name of Explanation of functions used device variable Name of device variable Purpose (reference) for CJ-series Unit for CJ-series Unit (for setting) (for input/output) To select functions for 3-4 Digital Input Functions • Digital Input Status •...
  • Page 84 3 Operation and Configuration Name of Explanation of functions used device variable Name of device variable Purpose (reference) for CJ-series Unit for CJ-series Unit (for setting) (for input/output) When used for Linear 3-2-3 Linear Counter • Ranges/Compari- • Output Control Mode/AND/OR Counter operation son Values active Counter Output Patterns...
  • Page 85 3 Operation and Configuration Using Convenient Functions Name of Explanation of functions used device variable Name of device variable Purpose (reference) for CJ-series Unit for CJ-series Unit (for setting) (for input/output) To make any desired 3-7-1 Programmable Output Pulses • Output Status •...
  • Page 86: Counter Types

    3 Operation and Configuration 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 87: Simple Counter

    3 Operation and Configuration 3-2-1 Simple Counter The advantage of using a Counter as a Simple Counter is that you do not have to set any device vari- ables for CJ-series Unit. Instead, all default settings are used. In other words, Simple Counters can only be used in a default configuration.
  • Page 88 3 Operation and Configuration Additional Information • The CPU exchanges data with the Simple Counter via the device variables for CJ-series Unit (for input/output). • If a Counter is set as a Simple Counter, it is indicated in the device variables for CJ-series Unit (for input).
  • Page 89 3 Operation and Configuration Gating of a Simple Counter You can start or stop the gate of a Simple Counter by using the following device variables for CJ- series Unit (for output) (Open Gate, Close Gate). A rising edge of the Open Gate or Close Gate trig- gers the corresponding action in the next I/O refresh.
  • Page 90: Circular Counter

    3 Operation and Configuration Manual Control of Digital Output If you select 1 for the following device variable Automan, then you can control two Digital Outputs by setting them to either 0 (OFF) or 1 (ON). Name of device variable Type Name Function...
  • Page 91 3 Operation and Configuration A Circular Counter has 32 bits (the full counting range) available to count up- or down over the pos- itive counting range between 0 and the Upper Count Limit. ≤ ≤ Upper Count Limit 4,294,967,295 Rollover Count Up Count Down Counter Value...
  • Page 92: Linear Counter

    3 Operation and Configuration 3-2-3 Linear Counter Additional Information A Linear Counter can uses all functions listed in 1-3-2 Functional Specifications. Configuring Linear Counters Linear Counters are set with the following device variables for CJ-series Unit (for setting). Name of device variable Type Name Function...
  • Page 93 3 Operation and Configuration Configuring Upper and Lower Count Limits The Upper Count Limit must be positive and the Lower Count Limit must be negative. (If either is set to 0, the upper count limit becomes 2,147,483,647 and the lower count limit becomes − 2,147,483,648.) To set the Upper and Lower Count Limits, refer to the following.
  • Page 94: Input Signal Types

    3 Operation and Configuration Input Signal Types Select the input type using the following device variables for CJ-series Unit (for setting). For every Counter, you can select the Signal Type. Name of device variable Type Name Function for CJ-series Unit *_Ch1_SigTypCfg UINT Signal Type...
  • Page 95: Up & Down Pulse

    3 Operation and Configuration Multiplication x2 To increase the resolution of the incremental encoder, the Counter can be configured for Multiplica- tion by 2. If the Counter counts up (signal A leads to signal B), pulses are taken into account by the Counter on the rising- and falling edges of signal A.
  • Page 96: Pulse & Direction

    3 Operation and Configuration 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 97: Digital Input Functions

    3 Operation and Configuration Digital Input Functions Assigning Plural Digital Inputs to a Single Counter The High-speed Counter Unit is equipped with two Digital Inputs, each of which can control a differ- ent Counter of the Unit. If a Counter has to be controlled by plural Digital Inputs, a maximum of two Digital Inputs can be assigned to the Counter.
  • Page 98 3 Operation and Configuration Gate Function The Gate Function should be assigned to a Digital Input in case you want to use that Digital Input as a Gate. When the Gate is open, the Counter is able to count pulses. When the Gate is closed, the Counter will not count pulses.
  • Page 99 3 Operation and Configuration This Unit has device variables for CJ-series Unit (for output) to store preset values for Counters. To change a preset value, set a preset value in this variable. Name of device variable Type Name Function for CJ-series Unit *_Ch1_Prst BOOL Preset...
  • Page 100 3 Operation and Configuration Enable, Disable Reset A Digital Input configured to have Enable Reset Functionality (Function 15) or Disable Reset Func- tionality (Function 16) can be used to Enable/Disable resetting a Counter by an external reset sig- nal. The external reset signal can originate from another Digital Input that is configured to have reset functionality (Function 05 or 06) or from the Z-input.
  • Page 101: Output Control

    3 Operation and Configuration Output Control Output Control Mode The 32 Outputs (2 external and 30 internal) of the High-speed Counter Unit can be controlled auto- matically in two ways: • Range Mode. In Range Mode you can define up to a maximum of 32 Ranges per Counter. The Outputs are controlled according to the Counter Value being within Range Limits.
  • Page 102 3 Operation and Configuration Output Status The status of the Digital Outputs is reflected in the device variables for CJ-series Unit (for input). There are two types of variables: one type has one variable for each bit status and the other has one variable that summarizes all 32 bit statuses.
  • Page 103: Range Mode

    3 Operation and Configuration 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 infor- mation).
  • Page 104 3 Operation and Configuration Example Range Mode with Circular Counter Range 2 Upper Count Limit 4,294,967,295 Range 1 Rollover Range 0 Range 3 Counter Value Range Lower Range Limit Upper Range Limit Output ON 60,000 80,500 45,000 1, 3 37,000,000 6,000 99,000 150,000...
  • Page 105 3 Operation and Configuration 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 106 3 Operation and Configuration 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 107 3 Operation and Configuration Additional Information • In Range Mode it is possible to apply a hysteresis to ranges in order to prevent Digital Out- puts from toggling due to unwanted oscillating of an Encoder. Refer to 3-7-2 Hysteresis for detailed information.
  • Page 108 3 Operation and Configuration Reflecting Active/Not Active Ranges The range conditions are met when Lower limit ≤ Counter value ≤ Upper limit. The state whether the range condition is active or not is reflected in the following device variable for CJ-series Unit (for input) for each Counter.
  • Page 109: Comparison Mode

    3 Operation and Configuration Name of device variable Type Name Function for CJ-series Unit *_OutCtlMdCfg WORD Output Control Bits 0 to 7: Output Control Mode Mode/AND/OR Sets the Output Control Mode. Counter Output 16#00: Range Mode Patterns 16#01: Comparison Mode Bits 8 to 15: Counter output pattern AND/OR selection For Range Mode, selects whether the...
  • Page 110 3 Operation and Configuration Example Comparison Mode with Linear Counter Lower Count Limit Upper Count Limit −2,147,483,648 +2,147,483,647 Counter Value Output 0 Output 1 Soft Output 2 Soft Output 3 = Set in positive (+) direction = Reset in positive (+) direction = Set in negative (−) direction = Reset in negative (−) direction Value...
  • Page 111 3 Operation and Configuration Example Comparison Mode with Circular Counter Upper Count Limit 4 ,2 9 4 ,9 6 7 ,2 9 5 Soft2 Out1 Soft3 Rollover Down-counting: negative (−) direction Out1 Soft3 Out0 Out0 Soft3 Soft2 Up-counting: positive (+) direction Counter Value Soft2 Out0...
  • Page 112 3 Operation and Configuration 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 Comparison Value 31...
  • Page 113 3 Operation and Configuration Configuration and Operation in Comparison Mode Specifying Comparison Data In Comparison Mode every Counter can be assigned up to a maximum of 32 Comparison data. A comparison data item contains 5 double words: • Comparison Value (CV) (can be set between −2,147,483,648 and 2,147,483,647 for a Linear Counter and between 0 and 4,294,967,295 for a Circular Counter) •...
  • Page 114 3 Operation and Configuration Additional Information Precautions When Setting Comparison Data • Comparison Stoppage When Comparison Value Reached When the High-speed Counter Value reaches a comparison value, comparison stops for 1.5 ms. The other Counters, however, do not stop comparisons. Set the Comparison Data considering the time when the comparison is stopped.
  • Page 115 3 Operation and Configuration Reflecting Active/Not Active Comparison Values A comparison condition is met when the Counter Value is equal to or larger than the comparison value. The comparison value active/inactive established status is reflected in the following device variable for CJ-series Unit (for input) for each Counter. Name of device variable Type Name...
  • Page 116: Manual Output Control

    3 Operation and Configuration Updating Unit Output Pattern with Preset or Reset Action Besides by crossing CV's the Unit Output Pattern can also be updated by a Preset or a Reset action. To trigger a Preset or Reset action refer to 3-4 Digital Input Functions and 3-6 Reset Counter. Every Preset or Reset Action will then update the Unit Output Pattern according to the predefined Output Set and Output Reset Patterns.
  • Page 117: Output Control Configuration

    3 Operation and Configuration 3-5-4 Output Control Configuration NPN or PNP Output Driver NPN output or PNP output can be set for each Digital Output (0, 1) to match the user application. NPN output or PNP output is selected by setting in bit 0 and bit 1 of the following device variable for CJ-series Unit (for setting).
  • Page 118: Reset Counter

    3 Operation and Configuration Reset Counter For every Counter a reset of the Counter Value to zero can be triggered by the following Sources: • Software Reset Bit • Digital Input (Function 05 or 06) • Z-signal In order for a Digital Input or the Z-Signal to trigger a reset, the Reset Enable Bit must be set to 1. Addi- tionally a Digital Input can be assigned the function of Reset Enable (Function 15, refer to 3-4 Digital Input Functions).
  • Page 119 3 Operation and Configuration Reset Enable Bit as Reset Enable Source To execute a reset (or preset a Counter Value to 0) by using either Digital Input or a Z phase signal, it is necessary to set the following device variables for CJ-series Unit (for output) to 1. Name of device variable Type Name...
  • Page 120: Extra Functions

    3 Operation and Configuration 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 Compari- son Mode.
  • Page 121 3 Operation and Configuration Output Pulse Duration A Digital Output that is configured to have an Output Pulse Duration turns ON immediately and will stay ON for the specified Pulse Duration. After the Pulse Duration has elapsed the Digital Output turns OFF.
  • Page 122: Hysteresis

    3 Operation and Configuration 3-7-2 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 particular value. If, for example, a Range Limit is in this area of fluctuation, the corresponding Range would become active and inactive in the rhythm of these fluctuations.
  • Page 123: Noise Filtering

    3 Operation and Configuration 3-7-3 Noise Filtering Configuring Input Noise Filter Counters For the purpose of suppressing noise on the signal lines A and B of every Counter a Noise Filter is available. A Noise Filter can be configured for Counter 1 & 2. Name of device variable Type Name...
  • Page 124: Initial Counter Value

    3 Operation and Configuration 3-7-4 Initial Counter Value Every Counter has device variables for CJ-series Unit (for setting) (double word) for the initial Counter Values. The settings for these variables are transferred from the CPU Unit to this unit when the Unit restarts or the Controller is reset, including when the power is turned ON.
  • Page 125: Exchanging Data With Cpu

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

    4 Exchanging Data with CPU Overview 4-1-1 Data Flow The CPU Unit and the high-speed Counters exchange data via the I/O port created for the High-speed Counter Unit. The table and figure below show the data exchange method for each data type. Data exchange type AT specification How to access...
  • Page 127 4 Exchanging Data with CPU NJ-series CPU Unit High-speed Counter Unit User program I/O port Inputs General Device variables for General Unit I/O Counter 1 AT specification CJ-series Unit Data Counter 2 I/O refresh Outputs General Counter Specific Device variables for AT specification Counter 1 I/O Data...
  • Page 128: Unit Restart

    4 Exchanging Data with CPU AT specification of variables used to access these parameters/data is determined with the following. Unit data type AT specification destination Setting Method For Inputs I/O port (for Inputs, Outputs) Created automatically when the Unit is registered to the Unit Configuration.
  • Page 129: Access From User Program

    4 Exchanging Data with CPU 4-1-3 Access from User Program Various data is exchanged from the user program using the following variables. Data type Access method Refresh timing For settings Device variable for CJ-series When the Controller is reset or Units the unit restarts For Outputs...
  • Page 130 4 Exchanging Data with CPU Additional Information For details on creation of device variables for CJ-series Unit, refer to Sysmac Studio Version 1 Operation Manual (Cat. No. W504). In the explanations from here on, the device name automatically created is used as the device variable for CJ-series Unit, for example *_Ch1_Prst.
  • Page 131: Memory Allocation

    4 Exchanging Data with CPU Memory Allocation 4-2-1 Memory Mapping When Range Mode and Comparison Mode are used, the data to be used are allocated to any DM or EM Area (bank 0). This allocation method is called extended allocation. For details, refer to 4-2-2 Allo- cating Ranges and Comparison Data.
  • Page 132 4 Exchanging Data with CPU Indirect Address Specification The High-speed Counter Unit can be used in Range Mode or Comparison Mode (refer to 3-5-1 Range Mode and 3-5-2 Comparison Mode for more information). The range or comparison data is allocated in DM or EM (bank 0).
  • Page 133 4 Exchanging Data with CPU Configuring Indirect Addressing An indirect address for the Unit in Range or Comparison Mode is specified with a device variable for a CJ-series Unit (for setting) for every Counter. You must specify the memory area (EM/DM) and the address (00000 to 32760) of the first word where the Range/Comparison data is to be stored.
  • Page 134 4 Exchanging Data with CPU Comparison data 0: EM520 Comparison data EM530 EM520 Comparison data Comparison Value EM521 EM540 EM522 5 x 10 words = Comparison data +Set Pattern EM523 50 words EM550 EM524 Comparison data +Reset Pattern EM525 EM560 EM526 Comparison data...
  • Page 135: Details Of Device Variables For Cj-Series Unit (For Input/Output)

    4 Exchanging Data with CPU Variable tables Variable name Array Data type CmpData [0..11] _sCJCT021_Ex_RngLin D01850 CmpData[0].LowLmt Range data Lower limit range 0 CmpData[0].UpLmt Upper limit CmpData[0].OutPat Output pattern CmpData[1].LowLmt Range data Lower limit range 1 6 × 12 = 72 words CmpData[11].LowLmt Range data Lower limit...
  • Page 136 4 Exchanging Data with CPU Name of device variable Type Name Function for CJ-series Unit *_Ch1_PrstLinCtVal DINT Preset Value Preset value Used for Simple Counter or Linear Counter. Data range: −2,147,483,648 to 2,147,483,647 Unit: Pulse Factory value: 0 *_Ch1_PrstRingCtVal UDINT Preset Value Preset value Used for Circular Counter.
  • Page 137 4 Exchanging Data with CPU For inputs Name of device variable Type Name Function for CJ-series Unit General *_OutStaDat DWORD R Output Status The current statuses of external and internal output (total of 32) are all displayed. 0: OFF 1: ON Bit 00: External output O0 Bit 01: External output O1 Bit 02: Internal output 2...
  • Page 138 4 Exchanging Data with CPU Name of device variable Type Name Function for CJ-series Unit *_Ch1_RngCmpSta0 BOOL Ranges 0 / Compari- 1: Met, 0: Not met son Values 0 active *_Ch1_RngCmpSta1 BOOL Ranges 1 / Compari- 1: Met, 0: Not met son Values 1 active *_Ch1_RngCmpSta2 BOOL...
  • Page 139 4 Exchanging Data with CPU Name of device variable Type Name Function for CJ-series Unit *_Ch2_RngCmpSta31 BOOL Ranges/Comparison 1: Met, 0: Not met Values 31 active *_Ch2_LinCtVal DINT Counter Value Shows the encoder Counter Value. Used for Simple Counter or Linear Counter. Data range: −2,147,483,648 to 2,147,483,647 Unit: Pulse...
  • Page 140: Details Of Device Variables For Cj-Series Unit (For Setting)

    4 Exchanging Data with CPU 4-2-4 Details of Device Variables for CJ-series Unit (for setting) Setting data can be set with the following two methods. • Set from Edit Special Unit Settings of Sysmac Studio. • Set the values for device variables for CJ-series Units. Unit settings are reflected only when the Controller is reset, or when the Unit restarts.
  • Page 141 4 Exchanging Data with CPU Name of device variable Type Name Function for CJ-series Unit *_NoiseFltCntCfg UINT Input Noise Filter Selects the Counter 1 and 2 noise filter. Counters 0: 50 kHz (factory value) 1: 500 kHz 2: 10 kHz *_NoiseFltInCfg UINT Input Noise Filter...
  • Page 142 4 Exchanging Data with CPU Name of device variable Type Name Function for CJ-series Unit *_DigiIn0FunCfg WORD Digital Input 0 Func- Bits 00 to 07: Sets the function for Digital Input 0. tion/Counter Number 16#00: No function (factory value) 16#01: Positive gate (Function 01) 16#02: Negative gate (Function 02) 16#03: Rising edge preset (Function 03) 16#04: Falling edge preset (Function 04)
  • Page 143 4 Exchanging Data with CPU Name of device variable Type Name Function for CJ-series Unit *_Ch1_SigTypCfg UINT Signal Type Sets the input type. 0: Phase differential (multiplication 1) (factory value) 1: Phase differential (multiplication 2) 2: Phase differential (multiplication 4) 4: Up &...
  • Page 144 4 Exchanging Data with CPU Name of device variable Type Name Function for CJ-series Unit *_Ch1_OutSetPatCfg DWORD R/W Output Set Pattern Sets the output (0 to 31) set pattern. Bits 0 to 31 correspond to output 00 to 31. Each bit is set for 1 and no change for 0. Data range: 16#00000000 to 16#FFFFFFFF Factory value: 0 *_Ch1_OutRstPatCfg...
  • Page 145 4 Exchanging Data with CPU Name of device variable Type Name Function for CJ-series Unit *_Ch2_ZOvfUdfCfg WORD Z-reset Mode/Over- Bits 00 to 03: This sets the Z phase input signal flow/Underflow error- function. code generation 16#0: No function (factory value) 16#1: Reset (Z phase input signal rising edge) Bits 04 to 07: Sets whether or not overflow/under- flow error codes are created.
  • Page 146 4 Exchanging Data with CPU Name of device variable Type Name Function for CJ-series Unit *_Ch2_OutRstPatCfg DWORD R/W Output Reset Pattern Sets the output (0 to 31) reset pattern. Bits 00 to 31 correspond to output 0 to 31. Each bit is reset for 1 and no change for 0. Data range: 16#00000000 to 16#FFFFFFFF Factory value: 0 *_Ch2_HystrsCfg...
  • Page 147: Memory Allocation For Ranges

    4 Exchanging Data with CPU 4-2-5 Memory Allocation for Ranges Range data are set in the user-defined variable. Refer to Allocation to User-defined Variable (P. 4-10) for more information. Two types of structure data are prepared beforehand for range data user-defined variables: one type for Linear Counters and one type for Circular Counters.
  • Page 148 4 Exchanging Data with CPU Variable name Data type Item Function c1D[10] _sCJCT021_Ex_ Range 10 Range 10 lower limit/upper limit values and out- RngLin put pattern c1D[11] _sCJCT021_Ex_ Range 11 Range 11 lower limit/upper limit values and out- RngLin put pattern c1D[12] _sCJCT021_Ex_ Range 12...
  • Page 149 4 Exchanging Data with CPU Variable name Data type Item Function c2D[0].OutPat DWORD Range 0 Output Pattern Range 0 output pattern c2D[1] _sCJCT021_Ex_ Range 1 Range 1 lower limit/upper limit values and output RngRing pattern c2D[2] _sCJCT021_Ex_ Range 2 Range 2 lower limit/upper limit values and output RngRing pattern c2D[3]...
  • Page 150 4 Exchanging Data with CPU Variable name Data type Item Function c2D[27] _sCJCT021_Ex_ Range 27 Range 27 lower limit/upper limit values and out- RngRing put pattern c2D[28] _sCJCT021_Ex_ Range 28 Range 28 lower limit/upper limit values and out- RngRing put pattern c2D[29] _sCJCT021_Ex_ Range 29...
  • Page 151: Memory Allocation For Comparison Data

    4 Exchanging Data with CPU 4-2-6 Memory Allocation for Comparison data Comparison data are set in the user-defined variable. Refer to "Allocation to User-defined Variable" (P. 4-10) for more information. Two types of structure data are prepared beforehand for comparison data user-defined variables: one type for Linear Counters and one type for Circular Counters.
  • Page 152 4 Exchanging Data with CPU Variable name Data type Item Function c1D[4] _sCJCT021_Ex_ Comparison data 4 Comparison value, output (+/−) set/reset pattern CmpLin c1D[5] _sCJCT021_Ex_ Comparison data 5 Comparison value, output (+/−) set/reset pattern CmpLin c1D[6] _sCJCT021_Ex_ Comparison data 6 Comparison value, output (+/−) set/reset pattern CmpLin c1D[7]...
  • Page 153 4 Exchanging Data with CPU Variable name Data type Item Function c1D[29] _sCJCT021_Ex_ Comparison data 29 Comparison value, output (+/−) set/reset pattern CmpLin c1D[30] _sCJCT021_Ex_ Comparison data 30 Comparison value, output (+/−) set/reset pattern CmpLin c1D[31] _sCJCT021_Ex_ Comparison data 31 Comparison value, output (+/−) set/reset pattern CmpLin * For details on set and reset patterns, refer to Configuration and Operation in Comparison Mode.
  • Page 154 4 Exchanging Data with CPU Variable name Data type Item Function c2D[16] _sCJCT021_Ex_ Comparison data 16 Comparison value, output (+/−) set/reset pattern CmpRing c2D[17] _sCJCT021_Ex_ Comparison data 17 Comparison value, output (+/−) set/reset pattern CmpRing c2D[18] _sCJCT021_Ex_ Comparison data 18 Comparison value, output (+/−) set/reset pattern CmpRing c2D[19]...
  • Page 155: Error Processing, Maintenance And Inspection

    Error Processing, Maintenance and Inspection This section provides details of the CJ1W-CT021 High-speed Counter Unit's error indi- cators and error codes and guidelines for maintenance and inspection of the Unit. 5-1 Error Indicators ..........5-2 5-1-1 Errors during initial processing .
  • Page 156: Error Indicators

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

    5 Error Processing, Maintenance and Inspection 5-1-2 Errors during normal operation Error Probable cause Remedy Unit error Overflow or underflow of Sim- Check the error code with *_ErrCode1 ple or Linear Counter (error code 1), *_ErrCode2 (error code 2), or Sysmac Studio. Apply appropriate Preset error remedy according to the cause of the error.
  • Page 158: Error Codes

    5 Error Processing, Maintenance and Inspection Error codes Reporting errors Errors occurring in the High-speed Counter Unit are divided into the following 4 types. • Allocated DM area setting error • Overflow/underflow error • Preset error • System error There is an error code for each error. These error codes are made up of error code 1 and error code If an error occurs, the state becomes as follows.
  • Page 159: Dm-Configuration Errors

    5 Error Processing, Maintenance and Inspection Variable names Type Name Function *_RdNxtErr BOOL Read Next Error When multiple errors occurred at the same time, at the rising edge from 0 to 1, the next error is read out from the error list in this Unit.
  • Page 160: Overflow/Underflow Errors

    5 Error Processing, Maintenance and Inspection Clearing DM-configuration Errors DM-configuration errors can be cleared by correcting the faulty settings in device variables for CJ- series Unit (for setting) and consecutively transferring the new configuration data again to the Unit. To transfer the configuration data you can choose from one out of two possibilities: •...
  • Page 161: Preset Error

    5 Error Processing, Maintenance and Inspection 5-2-3 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 for more information about presetting). The Preset Value is invalid if it is out- side the counting range of the Circular or Linear Counter.
  • Page 162: Event Logs

    5 Error Processing, Maintenance and Inspection Event Logs 5-3-1 Overview of the Event Logs You use the same methods to manage all of the events that occur on the NJ-series Controller. (The events include errors and information.) You can use the Sysmac Studio or an NS-series PT to confirm current Controller events and the logs of events that have occurred.
  • Page 163: Error Table

    5 Error Processing, Maintenance and Inspection 5-3-2 Error Table The errors that may occur for this Unit are listed below. Event levels are given in the table as follows: Maj: Major fault level Prt: Partial fault level Min: Minor fault level Obs: Observation Info: Information Refer to the NJ-series Troubleshooting Manual (Cat.
  • Page 164 5 Error Processing, Maintenance and Inspection 5-3-3 Error Descriptions This section describes the information that is given for individual errors. Controller Error Descriptions The items that are used to describe individual errors (events) are described in the following copy of an error table.
  • Page 165: Error Descriptions

    5 Error Processing, Maintenance and Inspection Error Descriptions Event name Unit Error Event code 68010000 hex Meaning An error occurred in the High-speed Counter Unit. Source PLC Function Module Source details CJ-series Unit Detection Depends on the timing nature of the error.
  • Page 166: Maintenance And Inspection

    5 Error Processing, Maintenance and Inspection Maintenance and Inspection This section describes the routine cleaning and inspection recommended as regular maintenance. 5-4-1 Cleaning Clean the High-speed Counter Unit regularly as described below in order to keep it in its optimal operat- ing condition.
  • Page 167 5 Error Processing, Maintenance and Inspection 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 168 5 Error Processing, Maintenance and Inspection 5-14 CJ-series High-speed Counter Units Operation Manual for NJ-series CPU Unit(W492)
  • Page 169: Application Examples

    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 men- tioned.
  • Page 170: Flow Control

    6 Application Examples Flow Control Overview Below is an application example of liquid flow control using a pulse output type flow meter and valve, and using a High-speed Counter Unit Simple Counter. Application Description CT021 RUN ERC ERH Push Button (= Open Valve) MODE Liquid Valve...
  • Page 171 6 Application Examples When the value counted by Counter 1 reaches 500,000 or higher, the liquid injection valve output (O0) is changed to OFF and Counter 1 is stopped (the gate is closed). Defined-variable The following device variables for CJ-series Unit (for input and output) are relevant to control the application.
  • Page 172 6 Application Examples Sample Program Counter_AutoMan P_First_RunMode Set Simple Counter 1 to Manual Output Control First Cycle Flag Counter_AutoMan Manual Output Control Counter_Ch1_Rst Counter_In0 Reset Simple Counter 1 to zero Push Button Counter_Ch1_Enbl Open gate of Simple Counter 1 Counter_OutCtl0 Open Valve Check if tank content is greater than or equal to...
  • Page 173: Appendices

    Appendices A-1 Differences of NJ Series from CJ Series ......A-2 A-1-1 Functional Difference ..........A-2 A-1-2 Differences in Access Methods from a User Program .
  • Page 174: Differences Of Nj Series From Cj Series

    Differences of NJ Series from CJ Series You can use the CJ1W-CT021 High-speed Counter Unit with the NJ-series Units. If this Unit is used with the NJ Series, some functions become unavailable compared to when it is used with the CJ Series.
  • Page 175 Appendices Item Function in CJ series Function in NJ series Output State Control Can select the method to control the output Same as on the left. states when the CPU operation mode is changed or when an error occurs. • Continue updating output states automati- cally.
  • Page 176: A-1-2 Differences In Access Methods From A User Program

    Appendices A-1-2 Differences in Access Methods from a User Program With the NJ Series, device variables for CJ-series Unit are used for the Counter Unit functions. The following tables show how the words and bits of CJ-series I/O memory or the NJ-series memory used for CJ-series Unit correspond to the NJ-series device variables for CJ-series Unit.
  • Page 177 Appendices Special I/O Units Area (Allocated CIO Area words) Allocated CIO Area words for outputs CJ-series I/O NJ-series device variables for CJ-series Unit memory address Word Variable name Description General *_OutCtl0 Manual Output Control (Output 0, 1) *_OutCtl1 02 to 14 Undefined *_AutoMan Automatic/Manual...
  • Page 178 Appendices Allocated CIO Area words for inputs CJ-series I/O NJ-series device variables for CJ-series Unit memory address Word Variable name Description General n+14, 00 to 15 32 outputs status (correspond to n+14, n+15) *_OutStaDat Output Status n+15 n+14 *_OutSta0 Digital Output 0 Status *_OutSta1 Digital Output 1 Status *_OutSta2...
  • Page 179 Appendices CJ-series I/O NJ-series device variables for CJ-series Unit memory address Word Variable name Description n+24 *_Ch1_CtOvf Counter Overflow *_Ch1_CtUdf Counter Underflow *_Ch1_CtRun Counter Running/Gate Open *_Ch1_CntDir Counter Direction *_Ch1_PrstSta Preset Activated *_Ch1_RstSta Reset Activated Undefined Capture Activated *_Ch1_ZSig Z-signal Activated 08 to 09 Undefined Undefined...
  • Page 180 Appendices Special I/O Unit DM Area (Allocated DM Area words) CJ-series I/O NJ-series device variables for CJ-series Unit memory address Word Variable name Description General 00 to 07 *_OutCtlMdCfg Output Control Mode Bits 00 to 07: Output Control Mode 08 to 15 Counter Output Pattern AND/OR Selection Bits 08 to 15: Counter output pattern AND/OR selection...
  • Page 181 Appendices CJ-series I/O NJ-series device variables for CJ-series Unit memory address Word Variable name Description m+31 00 to 03 *_Ch1_SigTypCfg Signal Type 04 to 15 m+32 00 to 03 *_Ch1_ZOvfUdfCfg Z-reset Mode Bits 00 to 03: Reset by Z phase 04 to 07 Overflow/Underflow error-code generation...
  • Page 182 Appendices CJ-series I/O NJ-series device variables for CJ-series Unit memory address Word Variable name Description m+68 to 00 to 15 Undefined m+74 Counter 2 m+75 00 to 15 *_Ch2_CtTypCfg Counter Type m+76 00 to 03 *_Ch2_SigTypCfg Signal Type 04 to 15 m+77 00 to 03 *_Ch2_ZOvfUdfCfg...
  • Page 183 Appendices CJ-series I/O NJ-series device variables for CJ-series Unit memory address Word Variable name Description m+110 00 to 03 *_Ch2_MemAreaCfg Memory Area 04 to 15 m+111, 00 to 15 *_Ch2_MemAdrCfg Memory Address (BCD) m+112 m+113 00 to 15 Undefined m+399 Range Data Range data is set in the user-defined variable.
  • Page 184 Appendices CJ-series I/O memory address NJ-series device variables for CJ-series Unit Word Variable name Description k+84 to k+89 00 to 15 aaaa[14] Range 14 k+90 to k+95 00 to 15 aaaa[15] Range 15 k+96 to k+101 00 to 15 aaaa[16] Range 16 k+102 to k+107 00 to 15...
  • Page 185 Appendices CJ-series I/O memory address NJ-series device variables for CJ-series Unit Word Variable name Description k to k+9 bbbb[0] Comparison data 0 k, k+1 00 to 15 bbbb[0].CmpVal Comparison data 0 Comparison Value k+2, k+3 00 to 15 bbbb[0].AddSetPat Comparison data 0 +Set Pattern k+4, k+5 00 to 15 bbbb[0].AddRstPat...
  • Page 186: Using Terminal Block Units With Screw-Terminals

    This section describes the signal layout of the screw terminals on the Connector Terminal Converter Unit (XW2B-40G4 or XW2B-40G5). The Unit is used to connect external signals such as power supply signals, digital I/O signals, and Counter input signals to a CJ1W-CT021 High-speed Counter Unit. Connector 1 (CN1)
  • Page 187 Appendicies Additional Information The top row of the Terminal Block Unit (numbered 1 to 39) corresponds to the pins numbered A1 to A20 of the associated connector (CN1) on the High-speed Counter Unit. The bottom row of the Terminal Block Unit (numbered 2 to 40) corresponds to the pins numbered B1 to B20 of the associated connector (CN1) on the Unit.
  • Page 188: 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 receiv- ing a count pulse (on one of the Counter inputs A or B) and the switching (ON or OFF) of a correspond- ing Digital Output.
  • Page 189: Application Restrictions

    Appendicies 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 190 Appendicies A-18 CJ-series High-speed Counter Units Operation Manual for NJ-series CPU Unit(W492)
  • Page 191 Index CJ-series High-speed Counter Units Operation Manual for NJ-series CPU Unit(W492) Index-1...
  • Page 192 Index Index Allocated CIO area word ..........A-5 Edit special unit settings ..........1-19 Allocated CIO area word for output .......A-5 Enable/Disable comparison values ......3-35 Allocated DM area word ..........A-8 Encoder ............... 2-17 Assumed cause ............. 5-9 Error code .............4-13, 5-4 Automatic/Manual ..........
  • Page 193 Index Memory allocation for range ........4-23 Memory area ............4-9, 4-20 _sCJCT021_Ex_CmpLin ........3-33, 4-27 _sCJCT021_Ex_CmpRing ......... 3-33, 4-27 _sCJCT021_Ex_RngLin ........3-26, 4-23 Noise filtering .............. 3-43 _sCJCT021_Ex_RngRing ........3-26, 4-23 Number of Ranges/Comparison values (BCD) ..4-9, 4-20 +Set Pattern ..............
  • Page 194 Index Index-4 CJ-series High-speed Counter Units Operation Manual for NJ-series CPU Unit(W492)
  • Page 196 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 2011 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