Omron CJ1M-CPU21 Operation Manual

Omron CJ1M-CPU21 Operation Manual

Cj-series built-in i/o cpu units
Hide thumbs Also See for CJ1M-CPU21:
Table of Contents

Advertisement

Quick Links

Cat. No. W395-E1-03
CJ-series Built-in I/O
CJ1M-CPU21/22/23
CJ1M CPU Units

Advertisement

Table of Contents
loading

Summary of Contents for Omron CJ1M-CPU21

  • Page 1 Cat. No. W395-E1-03 CJ-series Built-in I/O CJ1M-CPU21/22/23 CJ1M CPU Units...
  • Page 2 CJ-series Built-in I/O CJ1M-CPU21/22/23 CPU Units Operation Manual Revised August 2004...
  • Page 4 OMRON. No patent liability is assumed with respect to the use of the information contained herein. Moreover, because OMRON is con- stantly striving to improve its high-quality products, the information contained in this manual is subject to change without notice.
  • Page 5 Unit version Example for Unit version 3.0 Lot No. 040715 0000 Ver.3.0 OMRON Corporation MADE IN JAPAN • CS1-H, CJ1-H, and CJ1M CPU Units (except for low-end models) manu- factured on or before November 4, 2003 do not have a unit version given on the CPU Unit (i.e., the location for the unit version shown above is...
  • Page 6 Unit version Use the above display to confirm the unit version of the CPU Unit. Unit Manufacturing Information In the IO Table Window, right-click and select Unit Manufacturing informa- tion - CPU Unit. The following Unit Manufacturing information Dialog Box will be displayed.
  • Page 7 Unit version Use the above display to confirm the unit version of the CPU Unit connected online. Using the Unit Version The following unit version labels are provided with the CPU Unit. Labels These labels can be attached to the front of previous CPU Units to differenti- ate between CPU Units of different unit versions.
  • Page 8 Units on which a version is given (Ver. @.@) given Lot No. XXXXXX XXXX Ver. @ @ .@ Lot No. XXXXXX XXXX OMRON Corporation MADE IN JAPAN Meaning Designating individual Pre-Ver. 2.0 CS1-H CPU Units CS1H-CPU67H CPU Unit Ver. @.@ CPU Units (e.g., the...
  • Page 9 Unit Versions and Lot Numbers Series Model Data of manufacture Earlier Sept. 2003 Oct. 2003 Nov. 2003 Dec. 2003 Jun. 2004 Later CS1 CPU Units CS1@- Series CPU@@ No unit version CS1-V1 CPU CS1@- Units CPU@@-V1 No unit version CS1-H CPU Units CS1@- CPU@@H CPU Units Ver.
  • Page 10 Function Support by Unit Version CJ1-H/CJ1M CPU Units Function CJ1-H CPU Units CJ1M CPU Units, CJ1M CPU (CJ1@-CPU@@H) except low-end models Units, low-end (CJ1M-CPU@@) models (CJ1M- CPU11/21) Pre-Ver. 2.0 CPU Units Ver. Pre-Ver. 2.0 CPU Units Ver. CPU Units Ver. CPU Units CPU Units Downloading and Uploading...
  • Page 11 Functions Supported by Unit Version 3.0 or Later CJ1-H/CJ1M CPU Units (CJ1@-CPU@@H, CJ1G-CPU@@P, CJ1M-CPU@@) Function Unit version Pre-Ver. 2.0, Ver. 2.0 Ver. 3.0 Function blocks (supported for CX-Programmer Ver. 5.0 or higher) Serial Gateway (converting FINS commands to CompoWay/F com- mands at the built-in serial port) Comment memory (in internal flash memory) Expanded simple backup data...
  • Page 12 Unit Versions and Programming Devices CX-Programmer version 4.0 or higher must be used to enable using the func- tions added for CPU Unit version 2.0. CX-Programmer version 5.0 or higher must be used to enable using function blocks added for CPU Unit version 3.0. The following tables show the relationship between unit versions and CX-Pro- grammer versions.
  • Page 13 Troubleshooting Problems with Unit Versions on the CX-Programmer Problem Cause Solution An attempt was made using CX- Check the program or change Programmer version 4.0 or higher the CPU Unit being down- to download a program contain- loaded to a CPU Unit Ver. 2.0 ing instructions supported only by or later.
  • Page 14: Table Of Contents

    TABLE OF CONTENTS PRECAUTIONS ........xxi Intended Audience .
  • Page 15: Table Of Contents

    TABLE OF CONTENTS PULSE OUTPUT: PLS2(887)..........ACCELERATION CONTROL: ACC(888).
  • Page 16 Name Cat. No. Contents SYSMAC CJ Series W395 Describes the functions of the built-in I/O for CJ1M-CPU21/22/23 CJ1M CPU Units. (This manual) Built-in I/O Operation Manual SYSMAC CJ Series W393 Provides an outlines of and describes the design, CJ1G-CPU@@, CJ1M-CPU@@, CJ1G-CPU@@P, CJ1G/H-...
  • Page 17 This manual describes the installation and operation of the built-in I/O supported by the CJ1M-CPU21, CJ1M-CPU22, and CJ1M-CPU23 CPU Units and includes the sections described below. Please read this manual carefully and be sure you understand the information provided before attempting to install or operate the built-in I/O Be sure to read the precautions provided in the following section.
  • Page 18 Section 6 provides examples of programming built-in I/O The Appendices provides a table shown which pulse control instructions can be used together, a table of pulse control instruction support in other PLCs, and instruction execution times. !WARNING Failure to read and understand the information provided in this manual may result in per- sonal injury or death, damage to the product, or product failure.
  • Page 20 PRECAUTIONS This section provides general precautions for using the CJ-series Programmable Controllers (PLCs) and related devices. The information contained in this section is important for the safe and reliable application of Programmable Controllers. You must read this section and understand the information contained before attempting to set up or operate a PLC system.
  • Page 21 It is extremely important that a PLC and all PLC Units be used for the speci- fied purpose and under the specified conditions, especially in applications that can directly or indirectly affect human life. You must consult with your OMRON representative before applying a PLC System to the above-mentioned appli- cations.
  • Page 22 Safety Precautions !WARNING Do not touch any of the terminals or terminal blocks while the power is being supplied. Doing so may result in electric shock. !WARNING Do not attempt to disassemble, repair, or modify any Units. Any attempt to do so may result in malfunction, fire, or electric shock.
  • Page 23 Operating Environment Precautions !Caution A CJ1M CPU Unit automatically back up the user program and parameter data to flash memory when these are written to the CPU Unit. I/O memory (including the DM, EM, and HR Areas), however, is not written to flash mem- ory.
  • Page 24 Application Precautions Application Precautions Observe the following precautions when using the PLC System. • You must use the CX-Programmer (programming software that runs on Windows) if you need to program more than one cyclic task. A Program- ming Console can be used to program only one cyclic task plus interrupt tasks.
  • Page 25 Application Precautions • Fail-safe measures must be taken by the customer to ensure safety in the event of incorrect, missing, or abnormal signals caused by broken signal lines, momentary power interruptions, or other causes. • Interlock circuits, limit circuits, and similar safety measures in external cir- cuits (i.e., not in the Programmable Controller) must be provided by the customer.
  • Page 26 Application Precautions • Wire all connections correctly. • Always use the power supply voltages specified in the operation manuals. An incorrect voltage may result in malfunction or burning. • Take appropriate measures to ensure that the specified power with the rated voltage and frequency is supplied.
  • Page 27 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 standards (see the following note).
  • Page 28 Conformance to EC Directives Conformance to EC Directives The CJ-series PLCs comply with EC Directives. To ensure that the machine or device in which the CJ-series PLC is used complies with EC Directives, the PLC must be installed as follows: 1,2,3...
  • Page 29 Conformance to EC Directives Countermeasure Examples When switching an inductive load, connect an surge protector, diodes, etc., in parallel with the load or contact as shown below. Circuit Current Characteristic Required element If the load is a relay or solenoid, there is The capacitance of the capacitor must be 1 to 0.5 µF per contact current of a time lag between the moment the cir-...
  • Page 30: Features

    SECTION 1 Features This section describes the features and applications of the functions of the built-in I/O. Features ............1-1-1 Built-in I/O Functions.
  • Page 31 Features Section 1-1 Features 1-1-1 Built-in I/O Functions The CJ1M CPU Units are high-speed, advanced, micro-sized PLCs equipped with built-in I/O. The built-in I/O have the following features. General-purpose I/O Immediate Refreshing The CPU Unit's built-in inputs and outputs can be used as general-purpose inputs and outputs.
  • Page 32 Features Section 1-1 Triangular Control Triangular control (trapezoidal control without a constant-speed plateau) will be performed during positioning executed by an ACC(888) instruction (inde- pendent) or PLS2(887) instruction if the number of output pulses required for acceleration/deceleration exceeds the specified target pulse Output Amount. (The number of pulses required for acceleration/deceleration equals the time required to reach the target frequency x the target frequency.) Previously, an error would have occurred under these conditions and the...
  • Page 33 1 Hz to 100 kHz Variable Duty Ratio Pulse Outputs (PWM Outputs) 2 outputs (CJ1M-CPU22/23) 1 output (CJ1M-CPU21) Allocated bits 04 and 05 of CIO 2961. Variable duty ratio pulse outputs • Duty ratio 0% to 100% CJ1M Pre-Ver. 2.0 CPU Units: 0% to 100% in 1% increments CJ1M CPU Units version 2.0:...
  • Page 34: Version Upgrades For Cj1M Cpu Units

    Version Upgrades for CJ1M CPU Units Section 1-2 Version Upgrades for CJ1M CPU Units This section describes the upgrades accompanying unit version 3.0 of the CJ1M CPU Units. 1-2-1 Improved Functionality of CJ1M CPU Units with Unit Version 3.0 The following improvements have been made in the upgrade from unit version 2.0 to unit version 3.0 of the CJ1M CPU Units.
  • Page 35: Functions Listed By Purpose

    Functions Listed by Purpose Section 1-3 Continued Comparisons The comparison operation can be set to stop or continue when a high-speed when Resetting Counters counter is reset. This enables applications where the comparison operation can be restarted from a counter PV of 0 when the counter is reset. For the previous version, the comparison operation stopped when the counter was reset, requiring that the comparison operation be restarted from the ladder program whenever resetting the counter.
  • Page 36 Functions Listed by Purpose Section 1-3 1-3-2 Controlling Pulse Outputs Purpose I/O used Function Description Perform simple posi- Built-in Pulse out- Pulse output functions The built-in outputs (bits 00 to 03 of tioning by outputting Outputs puts 0 and CIO 2961) can be used as pulse outputs 0 •...
  • Page 37 CIO 2961) can be used as PWM(891) out- tional temperature con- and 1 duty ratio pulse output puts 0 and 1 by executing the PWM(891) trol. (See note.) function (PWM(891)) instruction. Note PWM(891) output 1 is not supported by the CJ1M-CPU21.
  • Page 38 Functions Listed by Purpose Section 1-3 1-3-3 Receiving Pulse Inputs Purpose Function Description used Receive incremental rotary encoder inputs to calculate length or position. • Counting at low- Built-in Interrupt inputs Interrupt inputs (Counter Built-in inputs (bits 00 to 03 of speed frequen- Inputs...
  • Page 39 Functions Listed by Purpose Section 1-3 1-3-4 Comparison with CJ1W-NC Pulse Outputs Item CJ1M CJ1W-NC Position Control Unit Control method Controlled with the ladder program's Pulse Controlled with the Start Command Bit (Rel- Output instructions (SPED(885), ACC(888), ative Movement Command Bit or Absolute and PLS2(887)).
  • Page 40: Overview

    SECTION 2 Overview This section provides an overview of the functions of built-in I/O. Allocations for Built-in CPU Unit Inputs ......Allocations for Built-in CPU Unit Outputs.
  • Page 41: Allocations For Built-In Cpu Unit Inputs

    Allocations for Built-in CPU Unit Inputs Section 2-1 Allocations for Built-in CPU Unit Inputs Select 1) General-purpose inputs, 2) Interrupt inputs, 3) Quick-response inputs, or 4) High-speed counters with the PLC Setup. Inputs IN0 to IN3 can each be set to 1) General-purpose inputs, 2) Interrupt inputs, or 3) Quick- response inputs with the input operation settings.
  • Page 42 Allocations for Built-in CPU Unit Inputs Section 2-1 puts IN2, IN3, and IN5 are used for the origin search function when the or- igin search function for pulse output 1 is enabled in the PLC Setup. • General-purpose inputs 0 and 1, interrupt inputs 0 and 1, and quick- response inputs 0 and 1 cannot be used when the origin search function for pulse output 0 is being used.
  • Page 43 Allocations for Built-in CPU Unit Inputs Section 2-1 Item Specifications 4) High-speed Gate (stop The CPU Unit's built-in inputs can be The status of the high-speed counter PV counter inputs count) function used as high-speed counters. (High- can be controlled (maintained or speed counter 0 uses bits 03, 08, 09 of refreshed) with the High-speed Counter (2 inputs max.)
  • Page 44: Allocations For Built-In Cpu Unit Outputs

    Allocations for Built-in CPU Unit Outputs Section 2-2 Allocations for Built-in CPU Unit Outputs Select 1) General-purpose outputs, 2) Fixed duty ratio pulse outputs, or 3) Variable duty ratio pulse outputs by executing the appropriate instruction, as shown in the following table. Instruction/PLC Setup Settings other Function set by execution of a Origin search function...
  • Page 45: Allocations For Origin Search Function

    Allocations for Origin Search Function Section 2-3 Functions Item Specifications 1) General-purpose outputs The CPU Unit's built-in outputs (bits Note The outputs can be refreshed immediately with the immedi- 00 to 05 of CIO 2961) can be used as (6 outputs) ate refreshing variation (! pre- general-purpose outputs.
  • Page 46 0 (direction) 1 (direction) Pulse output with PWM(891) PWM(891) variable duty output 0 output 1 (See note.) Note PWM(891) output 1 cannot be used on the CJ1M-CPU21. ■ Origin Search Code IN6 to OUT0 to OUT4 OUT5 OUT3 Address Word...
  • Page 47 Allocations for Origin Search Function Section 2-3 Functions Item Specifications Origin search If the ORG(889) (ORIGIN SEARCH) instruction is executed and the origin search function is enabled in the PLC Setup, the origin search operation will start and the origin location will be determined based on the Origin Proximity Input Sig- nal and Origin Input Signal.
  • Page 48: I/O Specifications And Wiring

    SECTION 3 I/O Specifications and Wiring This section provides I/O specifications and wiring instructions for the built-in I/O. I/O Specifications ..........3-1-1 Input Specifications .
  • Page 49: I/O Specifications

    I/O Specifications Section 3-1 I/O Specifications 3-1-1 Input Specifications General-purpose Input Specifications Inputs IN0 to IN5 IN6 to IN9 IN0 to IN5 IN6 to IN9 Input type Two-wire Sensor Line driver inputs Input current 6.0 mA typical 5.5 mA typical 13 mA typical 10 mA typical 24 V DC +10%, −15% Input voltage...
  • Page 50 I/O Specifications Section 3-1 High-speed Counter Input Specifications (IN6 to IN9) Input 24-V DC inputs Line driver inputs Set to 60 kHz Phase-A/Phase-B encoder input, Single-phase Phase-A/Phase-B encoder input, Single-phase 60-kHz pulse input with 50% duty ratio 60-kHz pulse input with 50% duty ratio Rise time and fall time: 3.0 s max.
  • Page 51 I/O Specifications Section 3-1 Note In order for the counter inputs to satisfy the specifications shown in the table above, it will be necessary to check the factors that can affect the pulses, such as the type of output driver in the encoder, encoder cable length, and count pulse frequency.
  • Page 52: Wiring

    Wiring Section 3-2 PWM(891) Output Specifications (OUT4 and OUT5) Item Specifications Max. switching capacity 300 mA, 4.75 to 26.4 V DC Max. output frequency 1 kHz PWM(891) output accuracy ON duty: +5%/−0% for a 1-kHz pulse output Output waveform ON duty = X 100% Note The CJ1W-CPU21 supports only OUT4.
  • Page 53 Wiring Section 3-2 *1: These are the pins on the XW2D-@@G@ Terminal Block. *2: PWM(891) output 1 can be used only with the CJ1M-CPU22/CPU23. 3-2-2 Connector Pins Used by Each Function Built-in Inputs General-purpose Inputs Input number Code Pin No. Content General-purpose input 0 24 V DC...
  • Page 54 Wiring Section 3-2 High-speed Counters High-speed Counters Using Differential-phase Inputs Encoder with phases A, B, and Z Input number Code Pin No. Content High-speed counter 0 Phase A, 24 V Phase A, 0 V Phase B, 24 V Phase B, 0 V Phase Z, 24 V Phase Z, 0 V High-speed counter 1...
  • Page 55 Wiring Section 3-2 High-speed Counters Using Up/Down Pulse Inputs Input number Code Pin No. Content High-speed counter 0 Increment input, 24 V Increment input, 0 V Decrement input, 24 V Decrement input, 0 V Reset input, 24 V Reset input, 0 V High-speed counter 1 Increment input, 24 V Increment input, 0 V...
  • Page 56 Wiring Section 3-2 Output number Code Pin No. Content General-purpose output 5 OUT5 Output 5 Power supply input (+V) for the output 39 or 40 Output COM Pulse Outputs Pulse Outputs Using CW/CCW Outputs Output number Code Pin No. Content Pulse output 0 OUT0 CW pulse output...
  • Page 57 39 or 40 Output COM 3-2-3 Wiring Methods To connect to a Terminal Block, use an OMRON Cable preassembled with the special connector or attach the special connector (sold separately) to a cable yourself. Note 1. Do not supply a voltage to the input terminals that exceeds the I/O circuit's specified input voltage range.
  • Page 58 Connector Models Compatible Connector MIL Flat Cable Connectors (40-pin Pressure-fitted Connectors) Specifications Socket Stain relief Name OMRON model number Daiichi Electronics model number Socket XG4M-4030 FRC5-AO40-3TON Stain Relief XG4M-4004...
  • Page 59 XW2B-40G4 (Standard) Connecting to an OMRON Servo Driver The following cable and Relay Unit can be used when connecting an OMRON Servo to the CJ1M CPU Unit's built-in I/O. The configurations shown in the fol- lowing diagrams will make the necessary Servo Driver connections for the positioning and origin search functions (Origin Input Signal, Origin Proximity Input Signal, Positioning Completed Signal, and Error Counter Reset Output).
  • Page 60 Wiring Section 3-2 OMRON OMNUC W-series, UP-series, or UT-series Servo Driver CJ1M CPU Unit • XW2Z-@@@J-B4 W-series XW2Z-100J-A27 Connecting Cable Connecting Cable (1 m) • XW2Z-@@@J-B1 UP-series Connecting Cable • XW2Z-@@@J-B4 UT-series Connecting Cable; XW2B-20J6-8A OMNUC W-series Relay Unit or UP/UT-series...
  • Page 61: Wiring Examples

    Wiring Examples Section 3-3 OMRON OMNUC W-series, UP-series, or UT-series Servo Drivers • XW2Z-@@@J-B4 W-series Connecting Cable CJ1M CPU Unit • XW2Z-@@@J-B1 UP-series XW2Z-100J-A27 Connecting Cable • XW2Z-@@@J-B4 UT-series OMNUC W-series or Connecting UP/UT-series Cable (1 m) Connecting Cable Servomotor Driver •...
  • Page 62 Wiring Examples Section 3-3 Note Do not use the following wiring with voltage-output devices. Sensor power supply Output IN (24 V DC) CJ1M CPU Unit's built-in I/O IN (0 V) Note The CJ1M CPU Unit's inputs have a set polarity, so the inputs will not go ON if the wiring is reversed.
  • Page 63 The sensor's power supply status is read with CIO 000000. The timer pro- vides a delay until the sensor's operation has stabilized (100 ms for an OMRON Proximity Sensor.) Once TIM 0000 goes ON, output CIO 000100 will be turned ON when a sen- sor input is received in input bit CIO 000001.
  • Page 64 Wiring Examples Section 3-3 3-3-2 Pulse Input Connection Examples Encoders with 24-V DC Open-collector Outputs This example shows how to connect an encoder that has phase-A, phase-B, and phase-Z outputs. CJ1M CPU Unit Differential-phase input mode High-speed counter 0: Phase A, 24 V Black High-speed counter 0: Encoder...
  • Page 65 Wiring Examples Section 3-3 Encoders with Line Driver Outputs (Conforming to Am26LS31) CJ1M CPU Unit Differential-phase input mode Black High-speed counter 0: Phase A, LD+ A− Black (with stripe) High-speed counter 0: Encoder Phase A, LD− White High-speed counter 0: Phase B, LD+ B−...
  • Page 66 3.6 kΩ 1/7 5/11 Signal Switch circuit Origin Input Signal (Line Driver Input) CJ1M CPU Unit Example: OMRON R88D-WT 3.6 kΩ Servomotor Driver −Z 5/11 3-3-4 Pulse Output Connection Examples This section provides examples of connections to motor drivers. Refer to the specifications for the motor driver being used before actually connecting a motor driver.
  • Page 67 Wiring Examples Section 3-3 CW/CCW Pulse Output and Pulse plus Direction Output Using a Motor Driver with 24-V DC Photocoupler Inputs 24-V DC power CJ1M CPU Unit supply Motor driver (24-V input type) − 24-V DC power supply for outputs (−) 31/33 CW pulse...
  • Page 68 Wiring Examples Section 3-3 Connection Example 2 24-V DC 5-V DC power power CJ1M CPU Unit supply supply Motor driver − − (5-V input type) 24-V DC power supply for outputs (−) CW pulse 31/33 output (31/32) (Pulse output) (−) 32/34 CCW pulse (33/34)
  • Page 69 Wiring Examples Section 3-3 3-3-5 Error Counter Reset Output Connection Examples CJ1M CPU Unit 24-V DC Output DC24V 37/38 power power supply OMRON R88D-WT Servo supply − Driver input 5-V DC 35/36 power supply − +ECRST 39, 40 −ECRST OMRON R88D-WT Servo...
  • Page 70 Wiring Examples Section 3-3 Connection Example for Operating Mode 0 In operating mode 0, the origin location is determined when the rising edge of the Origin Input Signal is detected (up-differentiation.) The Error Counter Reset Output and Positioning Completed Signal are not used. In this example, a stepping motor driver is used and a sensor is connected to the Origin Input Signal terminal.
  • Page 71 Origin Input Signal. In this example, a servo driver is used and the encoder's phase-Z output is used as the Origin Input Signal terminal. The servo driver is an OMRON W- series Servo Driver.
  • Page 72 Wiring Examples Section 3-3 Connecting an OMRON W-series Servo Driver W-series Servomotor Driver Operation Mode 1 CW output 1.6 kΩ −CW (pulse output 0) +CCW output (pulse 1.6 kΩ output 0) −CCW Output +24 V IN power supply input 24 V DC N.C.
  • Page 73 Wiring Examples Section 3-3 Connecting a SMARTSTEP A-series Servo Driver SMARTSTEP A-series Servomotor Driver Operation Mode 1 CW output 1.6 kΩ (pulse output 0) −CW +CCW output (pulse 1.6 kΩ output 0) −CCW Output power sup- +24 V IN ply input 24 V DC N.C.
  • Page 74 Positioning Completed Signal. In this example, a servo driver is used and the encoder's phase-Z output is used as the Origin Input Signal terminal. The servo driver is an OMRON Servo Driver (W-series, U-series, or SMART STEP A-series. Set the Servo Driver so that the Positioning Completed Signal is OFF when the motor is operating and ON when the motor is stopped.
  • Page 75 Wiring Examples Section 3-3 Connecting an OMRON W-series or U-series (UP or UT) Servo Driver W-series or U-series Servomotor Driver Operation Mode 2 CW output 1.6 kΩ −CW (pulse output 0) +CCW output (pulse 1.6 kΩ output 0) −CCW Output pow-...
  • Page 76 Wiring Examples Section 3-3 Connecting an OMRON U-series (UE) or SMART STEP A-series Servo Driver U-series (UE) or SMART STEP A-series Servo Driver Operation Mode 2 CW output 1.6 kΩ −CW (pulse output 0) +CCW output (pulse 1.6 kΩ output 0) −CCW...
  • Page 77 Wiring Examples Section 3-3 Origin Search Operation The origin search operation is completed at the first phase-Z signal after the rising edge of the Origin Proximity Input Signal is detected, deceleration is completed, and the falling edge of the Origin Proximity Input Signal is detected.
  • Page 78 Wiring Examples Section 3-3 3-3-7 Variable Duty Ratio Pulse Output (PWM(891) Output) Connection Example This example shows how to use pulse output 0 to control the brightness of a light bulb. Refer to Output Wiring Precautions on page 34 for details on suppressing the load's inrush current and modify the circuit if necessary.
  • Page 79 Wiring Examples Section 3-3...
  • Page 80: Data Area Allocation And Plc Setup Settings

    SECTION 4 Data Area Allocation and PLC Setup Settings This section describes the allocation of words and bits for usage with the built-in I/O and PLC Setup settings related to built-in I/O. Data Area Allocation for Built-in I/O ....... PLC Setup Settings .
  • Page 81: Data Area Allocation For Built-In I/O

    Output) Output) Signal) Signal) Note PWM(891) output 1 cannot be used on the CJ1M-CPU21. PLC Setup Settings 4-2-1 Built-in Inputs The following tables show the CX-Programmer's settings. These settings are for CJ1M CPU Units equipped with the built-in I/O functions.
  • Page 82 PLC Setup Settings Section 4-2 High-speed Counter 0 Counting Mode Programming Settings Default Function Related Time when Console setting Auxiliary setting is read address Area flags/ by CPU Unit bits Word Bits 08 to 11 0 hex: 0 hex Specifies the counting mode for high- When operation speed counter 0.
  • Page 83 PLC Setup Settings Section 4-2 High-speed Counter 0 Pulse Input Setting (Pulse Input Mode) Programming Settings Default Function Related Time when Console setting Auxiliary setting is read address Area flags/ by CPU Unit bits Word Bits 00 to 03 0 hex: Differential 0 hex Specifies the pulse-input method for When power is...
  • Page 84 PLC Setup Settings Section 4-2 High-speed Counter 1 Circular Max. Count (Ring Counter Maximum Value) Programming Settings Default Function Related Time when Console setting Auxiliary setting is read address Area flags/ by CPU Unit bits Word Bits 00 to 15 00000000 to Sets the max.
  • Page 85 PLC Setup Settings Section 4-2 Input Operation Settings for Built-in Inputs IN0 to IN3 Input Operation Setting for IN0 Programming Settings Default Function Related Time when Console setting Auxiliary setting is read address Area flags/ by CPU Unit bits Word Bits 00 to 03 0 hex: 0 hex...
  • Page 86 PLC Setup Settings Section 4-2 Input Operation Setting for IN3 Programming Settings Default Function Related Time when Console setting Auxiliary setting is read address Area flags/ by CPU Unit bits Word Bits 12 to 15 0 hex: 0 hex Specifies the kind of input that is When power is being received at built-in input IN3 turned ON...
  • Page 87 PLC Setup Settings Section 4-2 Pulse Output 0 Settings Pulse Output 0 Use Origin Operation Settings (Origin Search Function Enable/Disable) Programming Settings Default Function Related Time when Console setting Auxiliary setting is read address Area flags/ by CPU Unit bits Word Bits 00 to 03 0 hex: Disabled...
  • Page 88 PLC Setup Settings Section 4-2 Pulse Output 0 Origin Detection Method Programming Settings Default Function Related Time when Console setting Auxiliary setting is read address Area flags/ by CPU Unit bits Word Bits 08 to 11 0 hex: Method 0 0 hex Specifies the origin detection method When operation...
  • Page 89 PLC Setup Settings Section 4-2 Pulse Output 0 Origin Proximity Input Signal Type Programming Settings Default Function Related Time when Console setting Auxiliary setting is read address Area flags/ by CPU Unit bits Word Bits 04 to 07 0 hex: NC 0 hex Specifies whether the Origin Proxim- When operation...
  • Page 90 PLC Setup Settings Section 4-2 Pulse Output 0 Search Compensation Value (Origin Compensation) Programming Settings Default Function Related Time when Console setting Auxiliary setting is read address Area flags/ by CPU Unit bits Word Bits 00 to 15 80000000 to Sets the pulse output 0 origin com- When operation 7FFFFFFF hex...
  • Page 91 PLC Setup Settings Section 4-2 Pulse Output 1 Settings Note CX-Programmer Tabs CX-Programmer Ver. 3.1 or lower: Define Origin Operation Settings Field of Define Origin 2 CX-Programmer Ver. 3.2 or higher: Pulse Output 1 Pulse Output 1 Use Origin Operation Settings (Origin Search Function Enable/Disable) Programming Settings Default...
  • Page 92 PLC Setup Settings Section 4-2 Pulse Output 1 Origin Detection Method Programming Settings Default Function Related Time when Console setting Auxiliary setting is read address Area flags/ by CPU Unit bits Word Bits 08 to 11 0 hex: Method 0 0 hex Specifies the origin detection method When operation...
  • Page 93 PLC Setup Settings Section 4-2 Pulse Output 1 Origin Proximity Input Signal Type Programming Settings Default Function Related Time when Console setting Auxiliary setting is read address Area flags/ by CPU Unit bits Word Bits 04 to 07 0 hex: NC 0 hex Specifies whether the Origin Proxim- When operation...
  • Page 94 PLC Setup Settings Section 4-2 Pulse Output 1 Search Compensation Value 1 (Origin Compensation) Programming Settings Default Function Related Time when Console setting Auxiliary setting is read address Area flags/ by CPU Unit bits Word Bits 00 to 15 80000000 to Sets the pulse output 1 origin com- When operation 7FFFFFFF hex...
  • Page 95 PLC Setup Settings Section 4-2 4-2-3 Origin Return Function The following tables show the settings for the origin return function in the CX- Programmer. These settings are for CJ1M CPU Units equipped with the built- in I/O functions. Note CX-Programmer Tabs CX-Programmer Ver.
  • Page 96 PLC Setup Settings Section 4-2 Pulse Output 1 Settings Note CX-Programmer Tabs CX-Programmer Ver. 3.1 or lower: Define Origin Operation Settings Field of Define Origin 2 CX-Programmer Ver. 3.2 or higher: Pulse Output 1 Speed (Target Speed for Pulse Output 1 Origin Return) Programming Settings Default...
  • Page 97: Auxiliary Area Data Allocation

    Auxiliary Area Data Allocation Section 4-3 Auxiliary Area Data Allocation 4-3-1 Auxiliary Area Flags and Bits for Built-in Inputs The following tables show the Auxiliary Area words and bits that are related to the CJ1M CPU Unit's built-in inputs. These allocations apply to CPU Units equipped with the built-in I/O functions only.
  • Page 98 Auxiliary Area Data Allocation Section 4-3 Name Address Description Read/Write Times when data is accessed High-speed Counter A27400 These flags indicate whether the PV is within the Read only • Cleared when power is turned specified ranges when high-speed counter 0 is being operated in range-comparison mode.
  • Page 99 Auxiliary Area Data Allocation Section 4-3 Name Address Description Read/Write Times when data is accessed High-speed Counter A27410 This flag indicates whether the high-speed Read only • Setting used for high-speed counter is currently being incremented or decre- counter, valid dur- mented.
  • Page 100 Auxiliary Area Data Allocation Section 4-3 Name Address Description Read/Write Times when data is accessed High-speed Counter A27509 This flag indicates when an overflow or under- Read only • Cleared when power is turned flow has occurred in the high-speed counter 1 PV.
  • Page 101 Auxiliary Area Data Allocation Section 4-3 4-3-2 Auxiliary Area Flags and Bits for Built-in Outputs The following tables show the Auxiliary Area words and bits that are related to the CJ1M CPU Unit's built-in outputs. These allocations apply to CPU Units equipped with the built-in I/O functions only.
  • Page 102 Auxiliary Area Data Allocation Section 4-3 Name Address Description Read/Write Times when data is accessed Pulse Output 0 Out- A28003 ON when the number of output pulses set with Read only • Cleared when power is turned put Completed Flag the PULS/PLS2 instruction has been output through pulse output 0.
  • Page 103 Auxiliary Area Data Allocation Section 4-3 Name Address Description Read/Write Times when data is accessed Pulse Output 1 A28101 This flag indicates when an overflow or under- Read only • Cleared when power is turned flow has occurred in the pulse output 1 PV. Overflow/Underflow Flag 0: Normal...
  • Page 104 Auxiliary Area Data Allocation Section 4-3 Name Address Description Read/Write Times when data is accessed Pulse Output 1 Out- A28107 ON when an error occurred while outputting Read only • Cleared when power is turned put Stopped Error pulses in the pulse output 1 origin search func- Flag tion.
  • Page 105: Flag Operations During Pulse Output

    Flag Operations during Pulse Output Section 4-4 Flag Operations during Pulse Output The flags related to pulse outputs are refreshed at the following times. • When PULS is executed • When pulse output operation is started or stopped by SPED, ACC, PLS2, INI, or ORG •...
  • Page 106: High-Speed Counter/Pulse Output Instructions

    SECTION 5 High-speed Counter/Pulse Output Instructions This section describes the allocation of words and bits for usage with the built-in I/O and PLC Setup settings related to built-in I/O. MODE CONTROL: INI(880) ........HIGH-SPEED COUNTER PV READ: PRV(881) .
  • Page 107: Mode Control: Ini(880)

    Section 5-1 MODE CONTROL: INI(880) MODE CONTROL: INI(880) Purpose INI(880) can be used to execute the following operations for built-in I/O of CJ1M CPU Units: • To start comparison with the high-speed counter comparison table • To stop comparison with the high-speed counter comparison table •...
  • Page 108 Section 5-1 MODE CONTROL: INI(880) NV: First Word with New PV NV and NV+1 contain the new PV when changing the PV. If C is 0002 hex (i.e., when changing a PV), NV and NV+1 contain the new PV. Any values in NV and NV+1 are ignored when C is not 0002 hex. Lower word of new PV Upper word of new PV For Pulse Output or High-speed Counter Input:...
  • Page 109 Section 5-1 MODE CONTROL: INI(880) P: Port specifier C: Control data 0000 hex: 0001 hex: 0002 hex: 0003 hex: Start Stop Change PV Stop pulse comparison comparison output 0100, 0101, 0102, or Not allowed. Not allowed. Not allowed. 0103 hex: Interrupt input in counter mode 1000 or 1001 hex: Not allowed.
  • Page 110: High-Speed Counter Pv Read: Prv(881)

    Section 5-2 HIGH-SPEED COUNTER PV READ: PRV(881) Flags Name Label Operation Error Flag ON if the specified range for P, C, or NV is exceeded. ON if the combination of P and C is not allowed. ON if a comparison table has not been registered but starting comparison is specified.
  • Page 111 Section 5-2 HIGH-SPEED COUNTER PV READ: PRV(881) • Range comparison results. • High-speed counter frequency for high-speed counter input 0. • Pulse output frequency for pulse output 0 or 1 (CJ1M CPU Units with unit version 3.0 or later only). Ladder Symbol PRV(881) P: Port specifier...
  • Page 112 Section 5-2 HIGH-SPEED COUNTER PV READ: PRV(881) C = 0023 hex: 100-ms sampling method for high frequency (supported only by CJ1M CPU Units Ver. 3.0 or later) C = 0033 hex: 1-s sampling method for high frequency (supported only by CJ1M CPU Units Ver.
  • Page 113 Section 5-2 HIGH-SPEED COUNTER PV READ: PRV(881) Description PRV(881) reads the data specified in C for the port specified in P. The possi- ble combinations of data and ports are shown in the following table. P: Port specifier C: Control data 0000 hex: 0001 hex: 0002 hex:...
  • Page 114 Section 5-2 HIGH-SPEED COUNTER PV READ: PRV(881) ■ Reading Status (C = 0001 hex) If C is 0001 hex, PRV(881) reads status as shown in the following table. Port and Operation Results of reading mode Pulse out- The pulse output sta- D 0 0 0 0 0 0 0 0 tus is stored in...
  • Page 115 Section 5-2 HIGH-SPEED COUNTER PV READ: PRV(881) ■ Reading Pulse Output or High-speed Counter Frequency (C = 00@3 hex) If C is 00@3 hex, PRV(881) reads the frequency being output from pulse out- put 0 or 1 or the pulse frequency (Hz) being input to high-speed counter 0 and stores it in D and D+1.
  • Page 116 Section 5-2 HIGH-SPEED COUNTER PV READ: PRV(881) Applicable Program Areas Block program areas Step program areas Subroutines Interrupt tasks Flags Name Label Operation Error Flag ON if the specified range for P or C is exceeded. ON if the combination of P and C is not allowed. ON if reading range comparison results is specified even though range comparison is not being executed.
  • Page 117: Counter Frequency Convert: Prv2(883)

    Section 5-3 COUNTER FREQUENCY CONVERT: PRV2(883) COUNTER FREQUENCY CONVERT: PRV2(883) Purpose PRV2(883) reads the pulse frequency input from a high-speed counter and either converts the frequency to a rotational speed or converts the counter PV to the total number of revolutions. The result is output to the destination words as 8-digit hexadecimal.
  • Page 118 Section 5-3 COUNTER FREQUENCY CONVERT: PRV2(883) Area Auxiliary Bit Area A000 to A959 A448 to A958 Timer Area T0000 to T4095 T0000 to T4094 Counter Area C0000 to C4095 C0000 to C4094 DM Area D00000 to D32767 D00000 to D32766 EM Area without bank EM Area with bank Indirect DM/EM...
  • Page 119 Section 5-3 COUNTER FREQUENCY CONVERT: PRV2(883) • Counter input method: 4 × differential phase mode Conversion result = 00000000 to 00030D40 hex (0 to 200,000) (If a frequency higher than 200 kHz has been input, the output will re- main at the maximum value of 00030D40 hex.) 2.
  • Page 120: Register Comparison Table: Ctbl(882)

    CTBL(882) is used to register a comparison table and perform comparisons for a high-speed counter PV. Either target value or range comparisons are possible. An interrupt task is executed when a specified condition is met. This instruction is supported by the CJ1M-CPU21/CPU22/CPU23 CPU Units only. Ladder Symbol...
  • Page 121 Section 5-4 REGISTER COMPARISON TABLE: CTBL(882) Operands P: Port Specifier P specifies the port for which pulses are to be counted as shown in the follow- ing table. Port 0000 hex High-speed counter 0 0001 hex High-speed counter 1 C: Control Data The function of CTBL(882) is determined by the control data, C, as shown in the following table.
  • Page 122 Section 5-4 REGISTER COMPARISON TABLE: CTBL(882) For range comparison, the comparison table always contains eight ranges. The table is 40 words long, as shown below. If it is not necessary to set eight ranges, set the interrupt task number to FFFF hex for all unused ranges. Lower word of range 1 lower limit 0000 0000 to FFFF FFFF hex (See note.) Upper word of range 1 lower limit...
  • Page 123 Section 5-4 REGISTER COMPARISON TABLE: CTBL(882) Each time CTBL(882) is executed, comparison is started under the specified conditions. When using CTBL(882) to start comparison, it is normally suffi- cient to use the differentiated version (@CTBL(882)) of the instruction or an execution condition that is turned ON only for one scan.
  • Page 124 Section 5-4 REGISTER COMPARISON TABLE: CTBL(882) • If the PV is within more than one range when the comparison is made, the interrupt task for the range closest to the beginning of the table will be given priority and other interrupt tasks will be executed in following cycles. •...
  • Page 125: Speed Output: Sped(885)

    PULS(886). SPED(885) can also be executed during pulse output to change the output frequency, creating stepwise changes in the speed. This instruction is supported by the CJ1M-CPU21/CPU22/CPU23 CPU Units only. Ladder Symbol...
  • Page 126 Section 5-5 SPEED OUTPUT: SPED(885) Operand Specifications Area CIO Area CIO 0000 to CIO 6142 Work Area W000 to W510 Holding Bit Area H000 to H510 Auxiliary Bit Area A000 to A958 Timer Area T0000 to T4094 Counter Area C0000 to C4094 DM Area D00000 to D32766 EM Area without bank...
  • Page 127 Section 5-5 SPEED OUTPUT: SPED(885) ■ Continuous Mode Speed Control When continuous mode operation is started, pulse output will be continued until it is stopped from the program. Note Pulse output will stop immediately if the CPU Unit is changed to PROGRAM mode.
  • Page 128 Section 5-5 SPEED OUTPUT: SPED(885) Operation Purpose Application Frequency changes Description Procedure/ instruction Starting To output Positioning Starts outputting PULS(886) Specified number of Pulse frequency pulse output with spec- without accel- pulses at the speci- ↓ pulses (Specified with ified eration or fied frequency and SPED(885)
  • Page 129: Set Pulses: Puls(886)

    PULS(886) is used to set the pulse output amount (number of output pulses) for pulse outputs that are started later in the program using SPED(885) or ACC(888) in independent mode. This instruction is supported by the CJ1M-CPU21/CPU22/CPU23 CPU Units only. Ladder Symbol...
  • Page 130 Section 5-6 SET PULSES: PULS(886) T: Pulse Type T specifies the type of pulses that are output as follows: Pulse type 0000 hex Relative 0001 hex Absolute N and N+1: Number of Pulses N and N+1 specify the number of pulses for relative pulse output or the abso- lute target position for absolute pulse in 8-digit hexadecimal.
  • Page 131: Pulse Output: Pls2(887)

    PLS2(887) can thus be used for sloped speed changes with different acceler- ation and deceleration rates, target position changes, target and speed changes, or direction changes. This instruction is supported by the CJ1M-CPU21/CPU22/CPU23 CPU Units only.
  • Page 132 Section 5-7 PULSE OUTPUT: PLS2(887) Ladder Symbol PLS2(887) P: Port specifier M: Output mode S: First word of settings table F: First word of starting frequency Variations Variations Executed Each Cycle for ON Condition PLS2(887) Executed Once for Upward Differentiation @PLS2(887) Executed Once for Downward Differentiation Not supported Immediate Refreshing Specification...
  • Page 133 Section 5-7 PULSE OUTPUT: PLS2(887) S: First Word of Settings Table The contents of S to S+5 control the pulse output as shown in the following diagrams. • CJ1M Pre-Ver. 2.0 CPU Units Acceleration rate 1 to 2,000 Hz (0001 to 07D0 hex) Deceleration rate S1+1 •...
  • Page 134 Section 5-7 PULSE OUTPUT: PLS2(887) Area Index Registers Indirect addressing ,IR0 to ,IR15 ,IR0 to ,IR15 using Index Registers –2048 to +2047 ,IR0 to –2048 to +2047 ,IR0 to –2048 to +2047 ,IR15 –2048 to +2047 ,IR15 DR0 to DR15, IR0 to IR15 DR0 to DR15, IR0 to IR15 ,IR0+(++) to ,IR15+(++) ,IR0+(++) to ,IR15+(++)
  • Page 135 Section 5-7 PULSE OUTPUT: PLS2(887) ■ Independent Mode Positioning Note Pulse output will stop immediately if the CPU Unit is changed to PROGRAM mode. Opera- Purpose Application Frequency changes Description Procedure/ tion instruction Start- Complex Positioning with Accelerates and decel- PLS2(887) Pulse frequency Specified number...
  • Page 136 Section 5-7 PULSE OUTPUT: PLS2(887) Opera- Purpose Application Frequency changes Description Procedure/ tion instruction Chang- Changing the tar- PLS2(887) can be exe- PULS(886) Number of pulses ing set- change get position and cuted during position- ↓ Number of changed with Pulse tings, target...
  • Page 137 Section 5-7 PULSE OUTPUT: PLS2(887) Note Triangular Control If the specified number of pulses is less than the number required to reach the target frequency and return to zero, the function will automatically reduce the acceleration/deceleration time and perform triangular control (acceleration and deceleration only.) An error will not occur.
  • Page 138: Acceleration Control: Acc(888)

    For positioning, ACC(888) is used in combination with PULS(886). ACC(888) can also be executed during pulse output to change the target frequency or acceleration/deceleration rate, enabling smooth (sloped) speed changes. This instruction is supported by the CJ1M-CPU21/CPU22/CPU23 CPU Units only. Ladder Symbol ACC(888)
  • Page 139 Section 5-8 ACCELERATION CONTROL: ACC(888) Variations Variations Executed Each Cycle for ON Condition ACC(888) Executed Once for Upward Differentiation @ACC(888) Executed Once for Downward Differentiation Not supported Immediate Refreshing Specification Not supported Applicable Program Areas Block program areas Step program areas Subroutines Interrupt tasks Operands...
  • Page 140 ACCELERATION CONTROL: ACC(888) Section 5-8 Area Indirect DM/EM @ D00000 to @ addresses in binary D32767 Indirect DM/EM *D00000 to *D32767 addresses in BCD Constants See description See description of operand. of operand. Data Registers Index Registers Indirect addressing ,IR0 to ,IR15 using Index Registers –2048 to +2047 ,IR0 to –2048 to +2047 ,IR15...
  • Page 141 ACCELERATION CONTROL: ACC(888) Section 5-8 ■ Continuous Mode Speed Control Pulse output will continue until it is stopped from the program. Note Pulse output will stop immediately if the CPU Unit is changed to PROGRAM mode. Operation Purpose Application Frequency changes Description Procedure/ instruction...
  • Page 142 Section 5-8 ACCELERATION CONTROL: ACC(888) Operation Purpose Application Frequency changes Description Procedure/ instruction Stopping To stop Immediate stop Immediately stops ACC(888) pulse output pulse out- Pulse frequency pulse output. (Continu- ous) Present frequency ↓ INI(880) (Continu- ous) Time Execution of ACC(888) Execution of INI880) To stop Immediate stop Immediately stops...
  • Page 143 ACCELERATION CONTROL: ACC(888) Section 5-8 4. The direction set in the ACC(888) operand will be ignored if the number of pulses is set with PULS(881) as an absolute value. Opera- Purpose Application Frequency changes Description Procedure/ tion instruction Starting Simple trap- Positioning with Accelerates and PULS(886)
  • Page 144 Section 5-8 ACCELERATION CONTROL: ACC(888) Note Triangular Control If the specified number of pulses is less than the number required to reach the target frequency and return to zero, the function will automatically reduce the acceleration/deceleration time and perform triangular control (acceleration and deceleration only.) An error will not occur.
  • Page 145: Origin Search: Org(889)

    ACC(888) executed. ACC(888) executed. ORIGIN SEARCH: ORG(889) Purpose ORG(889) performs an origin search or origin return operation. This instruction is supported by the CJ1M-CPU21/CPU22/CPU23 CPU Units only. ■ Origin Search Pulses are output using the specified method to actually drive the motor and establish the origin based on origin proximity input and origin input signals.
  • Page 146 ORIGIN SEARCH: ORG(889) Section 5-9 Operands P: Port Specifier The port specifier specifies the port where the pulses will be output. Port 0000 hex Pulse output 0 0001 hex Pulse output 1 C: Control Data The value of C determines the origin search method. Always 0 hex.
  • Page 147 Section 5-9 ORIGIN SEARCH: ORG(889) Description ORG(889) performs an origin search or origin return operation for the port specified in P using the method specified in C. The following parameters must be set in the PLC Setup before ORG(889) can be executed.
  • Page 148 Section 5-9 ORIGIN SEARCH: ORG(889) ■ Origin Return (Bits 12 to 15 of C = 1 hex) ORG(889) starts outputting pulses using the specified method at the Origin Return Initial Speed (1 in diagram). Pulse output is accelerated to the Origin Return Target Speed using the Origin Return Acceleration Rate (2 in diagram) and pulse output is continued at constant speed (3 in diagram).
  • Page 149: Pulse With Variable Duty Factor: Pwm(891)

    5-10 PULSE WITH VARIABLE DUTY FACTOR: PWM(891) Purpose PWM(891) is used to output pulses with the specified duty factor from the specified port. This instruction is supported by the CJ1M-CPU21/CPU22/CPU23 CPU Units only. Ladder Symbol P: Port specifier F: Frequency...
  • Page 150 PULSE WITH VARIABLE DUTY FACTOR: PWM(891) Section 5-10 Operand Specifications Area CIO Area CIO 0000 to CIO 6143 CIO 0000 to CIO 6143 Work Area W000 to W511 W000 to W511 Holding Bit Area H000 to H511 H000 to H511 Auxiliary Bit Area A000 to A959 A000 to A959...
  • Page 151 PULSE WITH VARIABLE DUTY FACTOR: PWM(891) Section 5-10 Example When CIO 000000 turns ON in the following programming example, PWM(891) starts pulse output from pulse output 0 at 200 Hz with a duty factor of 50%. When CIO 000001 turns ON, the duty factor is changed to 25%. 000000 Duty factor: 50% Duty factor: 25%...
  • Page 152: Built-In I/O Function Descriptions

    SECTION 6 Built-in I/O Function Descriptions This section describes the application of built-in I/O in detail. Built-in Inputs ..........6-1-1 Overview.
  • Page 153: Built-In Inputs

    Built-in Inputs Section 6-1 Built-in Inputs 6-1-1 Overview There are 4 kinds of built-in inputs: • General-purpose inputs • Interrupt inputs (direct mode or counter mode) • High-speed counter inputs (with the frequency measurement function) • Quick-response inputs The built-in inputs are allocated bits 00 to 09 of CIO 2960. The PLC Setup set- tings specify which kind of input is used for each bit.
  • Page 154 Built-in Inputs Section 6-1 Procedure • IN0 to IN9 (CIO 2960 bits 00 to 09) Select general purpose • Connect to the selected terminals between IN0 and IN9. Wire inputs. PLC Setup settings • When IN0 to IN3 are used as general-purpose inputs, make the necessary "input operation settings"...
  • Page 155 Built-in Inputs Section 6-1 Specifications Item Specifications Number of inputs 10 inputs Allocated data area CIO 2960 bits 00 to 09 Input time constant Default: 8 ms (ON response time) The following settings can be made in the PLC Setup: 0 ms (no filter), 0.5 ms, 1 ms, 2 ms, 4 ms, 8 ms, 16 ms, or 32 ms.
  • Page 156 Built-in Inputs Section 6-1 Restrictions on Interrupt • Interrupt inputs 0 to 3 cannot be used when built-in inputs IN0 to IN3 are Inputs (Direct Mode) being used as general-purpose inputs or quick-response inputs. • Interrupt input 3 cannot be used when high-speed counter input 0 is being used and the high-speed counter 0 reset method is set to Phase-Z signal + Software reset.
  • Page 157 Built-in Inputs Section 6-1 Procedure • IN0 to IN3 (CIO 2960 bits 00 to 03) Select interrupt inputs. • Connect to the selected terminals between IN0 and IN3. Wire inputs. • When IN0 to IN3 are used as interrupt inputs in counter PLC Setup settings mode, make the necessary "input operation settings"...
  • Page 158 Built-in Inputs Section 6-1 Specifications Item Specifications Number of inputs 4 inputs (The 4 input terminals are shared with the quick-response inputs, high-speed counter (Phase-Z signal), and general-purpose inputs.) Allocated data area CIO 2960 bits 00 to 03 Count pulse detection Up differentiation or down differentiation Count method Incrementing or decrementing (Set with the...
  • Page 159 Built-in Inputs Section 6-1 Bit Allocations Code Word Pulse input mode address Differential phase Pulse + direction Up/down input Increment CIO 2960 High-speed counter High-speed counter High-speed counter High-speed counter 1 Phase A 1 Count input 1 Increment input 1 Count input High-speed counter High-speed counter High-speed counter...
  • Page 160 Built-in Inputs Section 6-1 Procedure Select high-speed counter 1 and/or 2. • Pulse input methods: Differential phase (4x), Pulse + direction, Up/Down, or Increment Select the pulse input method, reset • Reset methods: Phase-Z + Software reset or Software method, and counting range. reset •...
  • Page 161 Built-in Inputs Section 6-1 Restrictions on High-speed Counter Inputs • The Phase-Z signal + Software reset method cannot be used when high speed counters 0/1 are operating in Differential Phase or Pulse + Direc- tion Input Modes and the origin search function is enabled for pulse out- put 1.
  • Page 162 Built-in Inputs Section 6-1 Item Specification Control Target value comparison Up to 48 target values and corresponding interrupt task numbers can be regis- method tered. Range comparison Up to 8 ranges can be registered, with a separate upper limit, lower limit, and interrupt task number for each range.
  • Page 163 Built-in Inputs Section 6-1 Conditions for Incrementing/Decrementing the Count Direction Pulse Count value signal signal ↑ No change ↑ Increment ↓ No change ↓ No change ↑ Decrement ↑ No change ↓ No change ↓ No change • The count is incremented when the direction signal is ON and decre- mented when it is OFF.
  • Page 164 Built-in Inputs Section 6-1 • Only up-differentiated pulses (rising edges) can be counted. Note With CJ1M CPU Unit Ver. 2.0, the count of the high-speed counter can be monitored to see if it is currently being incremented or decremented. The count in the current cycle is compared with the count in the previous cycle to determine if it is being incremented or decremented.
  • Page 165 Built-in Inputs Section 6-1 Restrictions • There are no negative values in ring mode. • If the max. ring count is set to 0 in the PLC Setup, the counter will operate with a max. ring count of FFFFFFFF hex. Reset Methods Phase-Z Signal + Software The high-speed counter's PV is reset when the phase-Z signal (reset input)
  • Page 166 Built-in Inputs Section 6-1 • Use either the CTBL(882) instruction or INI(880) instruction to start the comparison operation. • Use either the INI(880) instruction to stop the comparison operation. Target Value Comparison The specified interrupt task is executed when the high-speed counter PV matches a target value registered in the table.
  • Page 167 Built-in Inputs Section 6-1 number. The specified interrupt task will be executed once when the high- speed counter PV is in the range (Lower limit ≤ PV ≤ Upper limit). • A total of 8 ranges (upper and lower limits) are registered in the compari- son table.
  • Page 168 Built-in Inputs Section 6-1 The frequency can be measured while a high-speed counter 0 comparison operation is in progress. Frequency measurement can be performed at the same time as functions such as the high-speed counter and pulse output with- out affecting the performance of those functions. Procedure 1,2,3...
  • Page 169 Built-in Inputs Section 6-1 Procedure 1,2,3... 1. High-speed Counter Enable/Disable Setting (Required) Set the High-speed Counter 0 Enable/Disable setting to 1 or 2 (use high- speed counter) in the PLC Setup. 2. Pulse Input Mode Setting (Required) Set the High-speed Counter 0 Pulse Input Mode in the PLC Setup. 3.
  • Page 170 Built-in Inputs Section 6-1 Restrictions on Quick-response Inputs • Quick-response inputs 0 to 3 cannot be used when built-in inputs IN0 to IN3 are being used as general-purpose inputs or high-speed counter inputs. • Quick-response input 3 cannot be used when high-speed counter input 0 is being used.
  • Page 171: Built-In Outputs

    Built-in Outputs Section 6-2 Built-in Outputs 6-2-1 Overview There are 3 kinds of built-in outputs: • General-purpose outputs • Pulse outputs • Variable duty ratio pulse outputs (PWM(891) outputs) The built-in outputs are allocated bits 00 to 05 of CIO 2961. The Pulse Output Instructions must be executed to specify which kind of input is used for each bit.
  • Page 172 Built-in Outputs Section 6-2 Specifications Item Specifications Number of outputs 6 outputs Allocated data area CIO 2961 bits 00 to 05 6-2-3 Pulse Outputs Overview The pulse output function outputs fixed duty ratio (duty ratio: 50%) pulse sig- nals from the built-in output terminals. Both speed control (outputting pulses continuously at specified frequencies) and positioning (outputting a specified number of pulses) are supported.
  • Page 173 Built-in Outputs Section 6-2 Bit Allocations Code Word CW/CCW inputs Pulse + direction inputs address OUT0 CIO 2961 Pulse output 0 (CW) Pulse output 0 (pulse) OUT1 Pulse output 0 (CCW) Pulse output 1 (pulse) OUT2 Pulse output 1 (CW) Pulse output 0 (direction) OUT3 Pulse output 1 (CCW)
  • Page 174 Built-in Outputs Section 6-2 Item Specifications Pulse output PV's storage The following Auxiliary Area words contain the pulse location output PVs: Pulse output 0: A277 (leftmost 4 digits) and A276 (rightmost 4 digits) Pulse output 1: A279 (leftmost 4 digits) and A278 (rightmost 4 digits) The PVs are refreshed during regular I/O refreshing.
  • Page 175 Built-in Outputs Section 6-2 Instruction Function Positioning (independent mode) Speed control Origin (continuous mode) search Pulse Pulse output with Pulse Pulse output acceleration/deceler- output output without ation without with accelera- accelera- accelera- Trapezoi- Trapezoi- tion/ tion/ tion/ dal, equal dal, sepa- decelera- decelera- decelera-...
  • Page 176 Built-in Outputs Section 6-2 Pulse Output Patterns The following tables show the kinds of pulse output operations that can be performed by combining various pulse output instructions. Continuous Mode (Speed Starting a Pulse Output Control) Operation Example Frequency changes Description Procedure application Instruction...
  • Page 177 Built-in Outputs Section 6-2 Operation Example applica- Frequency changes Description Procedure tion Instruction Settings Change Not supported. direction Change Not supported. pulse out- put method Stopping a Pulse Output Operation Example Frequency changes Description Procedure application Instruction Settings Stop pulse Immediate Stops the pulse out- SPED(885)
  • Page 178 Built-in Outputs Section 6-2 Independent Mode Starting a Pulse Output (Positioning) Operation Example Frequency changes Description Procedure application Instruction Settings Output with Positioning Starts outputting PULS(886) •Number Specified number of specified without accel- Pulse frequency pulses at the speci- ↓ of pulses pulses (Specified with speed...
  • Page 179 Built-in Outputs Section 6-2 Specified number Specified number of pulses of pulses Pulse frequency Pulse frequency (Specified with (Specified with PULS(887).) PULS(886).) Target Target frequency frequency Time Execution of Execution of PLS2(887) ACC(888) Changing Settings Operation Example Frequency changes Description Procedure application Instruction...
  • Page 180 Built-in Outputs Section 6-2 Operation Example Frequency changes Description Procedure application Instruction Settings Change Changing PLS2(887) can be PULS(886) •Number Specified number of Pulse speed the target executed during ↓ of pulses pulses (Specified frequency smoothly speed (fre- positioning to •Relative ACC(888) with PULS(886).)
  • Page 181 Built-in Outputs Section 6-2 Operation Example Frequency changes Description Procedure application Instruction Settings Change tar- Change the PLS2(887) can be PULS(886) •Number Number of pulses get position target posi- executed during ↓ of pulses Number of not change with Pulse and speed tion and tar- positioning to...
  • Page 182 Built-in Outputs Section 6-2 Stopping a Pulse Output Operation Example applica- Frequency changes Description Procedure tion Instruction Settings Stop pulse Immediate stop Stops the pulse out- PULS(886) •Stop Pulse frequency output put immediately ↓ pulse out- (Number of and clears the num- ACC(888) or pulses set- Present...
  • Page 183 Built-in Outputs Section 6-2 Switching from Continuous Mode (Speed Control) to Independent Mode (Positioning) Example applica- Frequency changes Description Procedure tion Instruction Settings Change from speed PLS2(887) can be ACC(888) •Port Outputs the number of control to fixed dis- executed during a (Continu- •Acceleration rate pulses specified in...
  • Page 184 Built-in Outputs Section 6-2 With the CJ1M CPU Unit, it is possible to execute a pulse control instruction during acceleration/deceleration or execute a positioning instruction to over- ride another positioning instruction that is in progress. Instruction being executed Overriding instruction (Yes: Can be executed;...
  • Page 185 Built-in Outputs Section 6-2 6. ACC(888) (Ind.) to PLS2(887) • The number of output pulses can be changed (even during acceleration or deceleration.) • The frequency can be changed (even during acceleration or decelera- tion.) • The acceleration/deceleration rate can be changed (even during acceler- ation or deceleration.) •...
  • Page 186 Built-in Outputs Section 6-2 Relationship between the The following table shows the pulse output operation for the four possible Coordinate System and combinations of the coordinate systems (absolute or relative) and the pulse Pulse Specification specifications (absolute or relative) made when PULS(886) or PLS2(887) is executed.
  • Page 187 Built-in Outputs Section 6-2 Coordinate Relative coordinate system Absolute coordinate system system Path specification Origin not established: Origin established: made with The Pulse Output 0 Origin Established Flag The Pulse Output 0 Origin Established Flag instruction (A28005) or Pulse Output 1 Origin Established (A28005) or Pulse Output 1 No-origin Flag (PULS(886) or Flag (A28105) will be ON.
  • Page 188 Built-in Outputs Section 6-2 Current status PROGRAM mode RUN mode or MONITOR mode Operation Origin Origin not Origin Origin not established established established established Instruc- Origin search Status Status tion exe- performed by changes to changes to cution ORG(889) “Origin “Origin established.”...
  • Page 189 Built-in Outputs Section 6-2 Single-phase Pulse Output with Acceleration/Deceleration ■ PULS(886) and ACC(888) • CW/CCW method Pulse output 0 uses OUT0 (CIO 296100) and OUT1 (CIO 296101). Pulse output 1 uses OUT2 (CIO 296102) and OUT3 (CIO 296103). Determine the pulse •...
  • Page 190 Built-in Outputs Section 6-2 Pulse Output with Trapezoidal Acceleration/Deceleration (Using PLS2(887)) • CW/CCW method Pulse output 0 uses OUT0 (CIO 296100) and OUT1 (CIO 296101). Pulse output 1 uses OUT2 (CIO 296102) and OUT3 (CIO 296103). Determine the pulse output •...
  • Page 191 Built-in Outputs Section 6-2 Pulse Output 1 Limit Input Signal Operation (CJ1M CPU Unit Ver. 2.0 Only) Programming Settings Default Function Related Time when Console setting Auxiliary setting is read address Area flags/ by CPU Unit bits Word Bits 04 to 07 0 hex: Search 0 hex Specifies whether to use the CW/ When power is...
  • Page 192 Built-in Outputs Section 6-2 Output Pattern The output pattern for S-curve acceleration/deceleration is shown below. Example for PLS2(887) Pulse frequency Max. acceleration is 1.5 times set acceleration Deceleration Target specified Acceleration frequency for S-curve specified deceleration for S-curve acceleration deceleration acceleration Specified number of...
  • Page 193 Built-in Outputs Section 6-2 Restrictions The following restrictions apply when using S-curve acceleration/deceleration. Starting Frequency The starting frequency must be 100 Hz or greater. If the starting frequency is set to less than 100 Hz, it will automatically be increased to 100 Hz if S-curve acceleration/deceleration is set.
  • Page 194 Built-in Outputs Section 6-2 Procedure • PWM output 0 uses OUT4 (CIO 296104) PWM output 1 uses OUT5 (CIO 296105) Determine the pulse output port. Note: PMW output 1 is supported by the CJ1M-CPU22/CPU23 only. • Connect to OUT4 or OUT5. Wire the outputs.
  • Page 195: Origin Search And Origin Return Functions

    Origin Search and Origin Return Functions Section 6-3 Origin Search and Origin Return Functions 6-3-1 Overview The CJ1M CPU Units have two functions that can be used to determine the machine origin for positioning. 1,2,3... 1. Origin Search The origin search function outputs pulses to turn the motor according to the pattern specified in the origin search parameters.
  • Page 196 Origin Search and Origin Return Functions Section 6-3 motor is decelerated to the origin search low speed and run at that speed until the origin position is detected. The motor is stopped at the origin position. Origin search Origin search Pulse frequency deceleration rate high speed...
  • Page 197 Origin Search and Origin Return Functions Section 6-3 Origin Search for Pulse Output 1 Code Word CW/CCW Pulse + Bits used when address inputs direction origin search inputs function is enabled. OUT1 Pulse output 1 2961 (pulse) OUT2 Pulse output 1 (CW) OUT3 Pulse output 1...
  • Page 198 Origin Search and Origin Return Functions Section 6-3 Procedure • Output: Connect the outputs using the CW/CCW method or pulse + direction method. The same method must be used for both pulse output 0 and pulse output 1. Power supply for outputs: 24 V DC •...
  • Page 199 Origin Search and Origin Return Functions Section 6-3 PLC Setup Settings Origin Search Function These PLC Setup settings indicate whether or not the origin search function Enable/Disable Settings will be used for each pulse output. for Pulse Outputs 0 and 1 Pulse Output 0 Use Origin Operation Settings (Origin Search Function Enable/Disable) Programming...
  • Page 200 Origin Search and Origin Return Functions Section 6-3 Pulse Output 1 Limit Input Signal Operation (CJ1M CPU Unit Ver. 2.0 Only) Programming Settings Default Function Related Time when Console setting Auxiliary setting is read address Area flags/ by CPU Unit bits Word Bits...
  • Page 201 Origin Search and Origin Return Functions Section 6-3 Origin Search Parameters The various origin search parameters are set in the PLC Setup. Name Settings Time when read Operating mode Operating mode 0, 1, or 2 Start of opera- tion Origin search operation 0: Reversal mode 1 Start of opera- setting...
  • Page 202 Origin Search and Origin Return Functions Section 6-3 Explanation of the Origin Search Parameters Operating Mode The operating mode parameter specifies the kind of I/O signals that are used in the origin search. The 3 operating modes indicate whether the Error Counter Reset Output and Positioning Completed Input are used.
  • Page 203 Origin Search and Origin Return Functions Section 6-3 Origin Input Signal goes from OFF to ON while motor is decelerating. Origin Proximity Input Signal Origin Input Signal Original pulse output pattern Pulse output Origin Input Signal Starts when Error (error code ORG(889) is 0202) executed.
  • Page 204 Origin Search and Origin Return Functions Section 6-3 Verify that the Origin Proximity Input Signal's dog setting is long enough Origin Proximity (longer than the deceleration time.) Input Signal Origin Input Signal (Phase-Z signal) Origin Input Signal is ignored during Motor stopped by an Origin deceleration.
  • Page 205 Origin Search and Origin Return Functions Section 6-3 being applied, the Positioning Completed Signal is checked after the compen- sation operation is completed. Pulse output Time Stop Error Counter Reset Output Positioning Completed Signal Origin Search Operation Select either of the following two reverse modes for the origin search opera- Setting tion at the limit in the origin search direction.
  • Page 206 Origin Search and Origin Return Functions Section 6-3 Origin Detection Method 1: Origin Proximity Input Signal Reversal Not Required Deceleration starts when Origin Proximity Input Signal goes OFF→ON. Origin Proximity Input Signal After the Origin Proximity Input Signal has gone from OFF→ON→OFF, the motor is stopped when the Origin Input Signal goes OFF→ON.
  • Page 207 Origin Search and Origin Return Functions Section 6-3 Using Reversal Mode 1 Origin search 0: Reversal mode 1 operation Origin detection method 0: Origin Prox- Origin Proximity imity Input Sig- Input Signal nal reversal Origin Input required. Signal High speed for origin search Pulse output Proximity speed for origin search Stop...
  • Page 208 Origin Search and Origin Return Functions Section 6-3 Using Reversal Mode 2 Origin search 1: Reversal mode 2 operation Origin detection method 0: Origin Proximity Input Origin Proximity Signal reversal required. Input Signal Origin Input Signal Pulse output Stop Start CW limit input signal Stop (See note.)
  • Page 209 Origin Search and Origin Return Functions Section 6-3 Origin search 1: Reversal mode 2 operation Origin detection method 2: Origin Proximity Input Origin Input Signal not used. Signal Proximity speed for origin search Pulse output Stop Start CW limit input signal (See note.) Stop Start Start...
  • Page 210 Origin Search and Origin Return Functions Section 6-3 Setting range: 80000000 to 7FFFFFFF hex ( − 2,147,483,648 to 2,147,483,647) pulses I/O Settings Limit Input Signal Type Specifies the type of input signal (normally closed or normally open) being used for the limit inputs. 0: NC 1: NO Origin Proximity Input Signal Type...
  • Page 211 Origin Search and Origin Return Functions Section 6-3 An origin search will not be started unless the origin search proximity speed is less than the origin search high speed and unless the origin search/return ini- tial speed is less than the origin search proximity speed. 6-3-3 Origin Search Error Processing The CJ1M CPU Unit's pulse output function performs a basic error check...
  • Page 212 Origin Search and Origin Return Functions Section 6-3 Error name Error code Likely cause Corrective action Operation after error Origin Input Signal 0202 During an origin search in oper- Take one or both of the following Decelerates to a Error ating mode 0, the Origin Input steps so that the Origin Input stop,...
  • Page 213 Origin Search and Origin Return Functions Section 6-3 6-3-4 Origin Search Examples Operation Connect a Servo Driver and execute an origin search based on the Servomo- tor's built-in encoder phase-Z signal and a Origin Proximity Input Signal. Conditions • Operating mode: 1 (Uses the Servomotor encoder's phase-Z signal as the Origin Input Sig- nal.) •...
  • Page 214 Origin Search and Origin Return Functions Section 6-3 Outputs Built-in I/O terminal Bit address Name OUT0 CIO 296100 Pulse Output 0 (CW) OUT1 CIO 296101 Pulse Output 0 (CCW) Operation Origin Proximity Input (IN1: CIO 26001) Origin Signal Input (IN0: CIO 26000) Pulse Origin search frequency...
  • Page 215 Origin Search and Origin Return Functions Section 6-3 Ladder Program CW limit detection CCW limit sensor detection sensor 000000 A54008 CW Limit CCW Limit Input Signal Input Signal 000001 A54009 Execution condition Origin search 0: @ORG #0000; Origin #0000 search and CW/CCW #0000 method: #0000...
  • Page 216 Origin Search and Origin Return Functions Section 6-3 Procedure 1. Starting Speed for Origin Search and Origin Return 2. Origin return target speed Determine the origin return parameters. 3. Origin return acceleration rate 4. Origin return deceleration rate • Outputs: Use either the CW/CCW method or Pulse + direction method.
  • Page 217 Origin Search and Origin Return Functions Section 6-3...
  • Page 218: Programming Examples

    SECTION 7 Programming Examples This section provides examples of programming built-in I/O. Built-in Outputs..........7-1-1 Using Interrupts to Read Input Pulses (Length Measurement) .
  • Page 219 Built-in Outputs Section 7-1 Built-in Outputs 7-1-1 Using Interrupts to Read Input Pulses (Length Measurement) Specifications and Operation This example program reads the number of encoder pulses input with high- speed counter 1 and also reads sensor inputs 1 and 2 as interrupt inputs at terminals IN1 (2960.01) and IN3 (2960.03).
  • Page 220 Built-in Outputs Section 7-1...
  • Page 221 Built-in Outputs Section 7-1 Ladder Program Cyclic Task (Task 0) P_First_Cycle_Task MOVL(498) Task Start Flag Used to clear the high- D00000 speed counter PV. MSKS(690) Built-in interrupt input 1 Unmask (Enable interrupts.) MSKS(690) Built-in interrupt input 3 Unmask (Enable interrupts.) Built-in Input 1 Interrupt Task (Interrupt Task 141) P_On INI(880)
  • Page 222 Built-in Outputs Section 7-1 7-1-2 Outputting Pulses after a Preset Delay Specifications and Operation This example program waits for a preset time (0.5 ms) after the interrupt input (2960.03) goes ON and then outputs 100,000 pulses at 100 kHz from pulse output 0.
  • Page 223 Built-in Outputs Section 7-1 Scheduled Interrupt Time Unit Setting PLC Setup setting details Address Data Set the scheduled interrupt time units to 0.1 ms. 0002 hex Ladder Program Cyclic Task (Task 0) P_First_Cycle_Task MSKS(690) Task Start Flag Built-in interrupt input 3 Unmask (Enable interrupts.)
  • Page 224 Built-in Outputs Section 7-1 Built-in Input 3 Interrupt Task (Interrupt Task 143) A280.04 MSKS(690) Pulse Output 0 Scheduled interrupt 0 Output In-progress (Reset start) Flag Scheduled interrupt time #0005 (5 x 0.1 ms = 0.5 ms) Scheduled Interrupt Task 0 (Interrupt Task 2) P_On PULS(886) Always ON...
  • Page 225 Built-in Outputs Section 7-1 Preparation PLC Setup Settings There are no settings that need to be made in the PLC Setup. DM Area Settings PLS2(887) Settings (D00000 to D00007) Setting details Address Data Acceleration rate: 300 Hz/4 ms D00000 #012C Deceleration rate: 200 Hz/4 ms D00001 #00C8...
  • Page 226 Built-in Outputs Section 7-1 7-1-4 Jog Operation Specifications and Operation • Low-speed jog operation (CW) will be executed from pulse output 1 while input 2960.06 is ON. • Low-speed jog operation (CCW) will be executed from pulse output 1 while input 2960.07 is ON. Target frequency 1,000 Hz CW Low-speed...
  • Page 227 Built-in Outputs Section 7-1 Preparation PLC Setup Settings There are no settings that need to be made in the PLC Setup. DM Area Settings Settings to Control Speed while Jogging (D00000 to D00001 and D00010 to D00015) Setting details Address Data Target frequency (low speed): 1,000 Hz D00000...
  • Page 228 Built-in Outputs Section 7-1 2960.08 A281.04 ACC(888) High-speed Pulse Output Pulse output 1 CW Start in Progress Specifies CW/CCW output method, #0000 CW side, and continuous mode. Acceleration rate and target frequency D00010 SET 0.02 0.02 2960.08 ACC(888) High-speed High-speed CW output in CW Start progress...
  • Page 229 Built-in Outputs Section 7-1 System Configuration Jogging switch IN0: CIO 296000 Positioning switch IN1: CIO 296001 Cutter start Emergency stop switch OUT3: CIO 296103 IN2: CIO 296002 Cutter finished Cut operation finished IN3: CIO 296003 OUT2: CIO 296100 Pulse output (CW/CCW) Built-in I/O other than pulse outputs are used.
  • Page 230 Built-in Outputs Section 7-1 Setting details Address Data Target frequency: 10,000 Hz D00012 #2710 D00013 #0000 Number of output pulses: 50,000 pulses D00014 #C350 D00015 #0000 Starting frequency: 0000 Hz D00016 #0000 D00017 #0000 Counter setting: 100 times D00020 #0100 Ladder Program Jog Operation Frequency Setting...
  • Page 231 Built-in Outputs Section 7-1 Remarks 1,2,3... 1. PLS22(887) used a relative pulse setting. This enables operation even if the origin is not defined. The present position in A276 (lower 4 digits) and A277 (upper 4 digits) is set to 0 before pulse output and then contains the specified number of pulses.
  • Page 232 Built-in Outputs Section 7-1 3. The system is returned to the original position. Origin (servo Origin limit phase Z) proximity limit 1. Origin search 2. Fixed-distance positioning repeated 50,000 Hz (C350 hex) 10000 (2710 hex) Acceleration/ 3. Return to start deceleration: 1,000 Hz/4 ms (03E8 hex)
  • Page 233 Built-in Outputs Section 7-1 Wiring Example Using SmartStep A-series Servo Driver, XW2Z Cables, and XW2B I/O Terminal Origin Search Switch (CIO 000000) Emergency Stop Switch (CIO 000001) PCB Storage Completed (CIO 000002) Stocker Moving (CIO 000101) PCB Storage Enable (CIO 000100) Stocker Movement Completed (CIO 000003) SmartStep A-series Servo Driver...
  • Page 234 Built-in Outputs Section 7-1 Preparation PLC Setup Settings Setting details Address Data Enable origin search function for pulse output 0. 0001 hex Note The origin search enable setting is read when the power supply is turned ON. DM Area Settings Settings for PLS2(887) for Fixed-distance Positioning (D00000 to D00007) Setting details Address...
  • Page 235 Built-in Outputs Section 7-1 Ladder Program Origin Search Origin search in progress Origin search Origin Search Switch completed Origin Search Origin search in progress Port setting Control data Origin search completed No Origin Flag PCB storage enabled Origin search Lift completed positioning start...
  • Page 236 Built-in Outputs Section 7-1 7-1-7 Palletize: Two-axis Multipoint Positioning Specifications and Operation Outline Y axis Cyli X axis Workpieces and moved. Operation Pattern 1,2,3... 1. An origin search is performed. 2. A workpiece is grasped and moved to position A. 3.
  • Page 237 Built-in Outputs Section 7-1 Wiring Example Using SmartStep A-series Servo Driver, XW2Z Cables, and XW2B I/O Terminal Origin Search Switch (CIO 000000) Emergency Stop Switch (CIO 000001) SmartStep A-series Servo Driver XW2Z-100J-B5 (1 m) XW2Z-200J-B5 (2 m) ID211 OD211 (CIO 0) (CIO 1) XW2Z-100J-B5 (1 m) XW2Z-200J-B5 (2 m) XW2Z-100J-A26 (1 m)
  • Page 238 Built-in Outputs Section 7-1 Preparation PLC Setup Settings CX-Programmer version Tab name Setting Ver. 3.1 or lower Define Origin Operation Origin search data Settings Field of Define Origin Ver. 3.2 or higher Pulse Output 0 Origin search data Note The Use Origin Operation Setting is read when the power supply is turned DM Area Settings Starting Frequency Setting details...
  • Page 239 Built-in Outputs Section 7-1 PLS2(887) Settings to Move from Origin to Position A Setting details Address Data X axis Acceleration rate: 2,000 Hz/4 ms D00010 #07D0 Deceleration rate: 2,000 Hz/4 ms D00011 #07D0 Target frequency: 100,000 Hz D00012 #86A0 D00013 #0001 Number of output pulses: 5,000 pulses D00014...
  • Page 240 Built-in Outputs Section 7-1 PLS2(887) Settings to Move from Position A to Position D Setting details Address Data X axis Acceleration rate: 2,000 Hz/4 ms D00070 #07D0 Deceleration rate: 2,000 Hz/4 ms D00071 #07D0 Target frequency: 100,000 Hz D00072 #86A0 D00073 #0001 Number of output pulses: 25,000 pulses...
  • Page 241 Built-in Outputs Section 7-1 Ladder Program Origin Search for X and Y Axes Setting Origin Search Switch Bit address Origin search start Resetting Origin search completed Bit address Operation 1: Positioning to A Setting Bit address Positioning to A start Resetting Positioning to A completed Bit address...
  • Page 242 Built-in Outputs Section 7-1 Origin Search Start and Completion for X and Y Axes Origin Search Origin search Port setting start Control data Origin Search Port setting Control data Origin search completed No Origin Flag No Origin Flag Positioning to A Start and Completion for X and Y Axes Positioning Positioning to A start...
  • Page 243 Built-in Outputs Section 7-1 Positioning to C Start and Completion for X and Y Axes Positioning Positioning to Port setting C start Control data First word containing parameters First word containing start frequency Positioning Port setting Control data First word containing parameters First word containing start frequency Positioning to C completed Pulse output completed Pulse output completed...
  • Page 244 Built-in Outputs Section 7-1 7-1-8 Feeding Wrapping Material: Interrupt Feeding Specifications and Operation Feeding Wrapping Material in a Vertical Pillow Wrapper Start Switch (CIO 000000) Speed control Marker sensor (Built-in input IN0) Position control Pulse output (CW/CCW) Operation Pattern Speed control is used to feed wrapping material to the initial position. When the marker sensor input is received, fixed-distance positioning is performed before stopping.
  • Page 245 Built-in Outputs Section 7-1 DM Area Settings Speed Control Settings to Feed Wrapping Material to Initial Position Setting details Address Data Acceleration rate: 500 Hz/4 ms D00000 #01F4 Target frequency: 10,000 Hz D00001 #2710 D00002 #0000 Positioning Control Settings for Wrapping Material Setting details Address Data...
  • Page 246 Built-in Outputs Section 7-1 Ladder Program Cyclic Task Program (Executed at Startup) Enabling Input Interrupt 0 (IN0) Interrupt Mask Setting First Cycle Flag Control data 1 Control data 2 Feeding Material with Speed Control Material being fed Material feed start Material positioning completed...
  • Page 247 Built-in Outputs Section 7-1...
  • Page 248 Appendix A Combinations of Pulse Control Instructions Starting Instructions: SPED(885) and ACC(888), Independent Instruc- Pulse Starting instruction tion being status INI(880) SPED(885) SPED(885) ACC(888) executed (Independent) (Continuous) (Independent) × × SPED(885) Steady Change PV Output method Output method Output method (Indepen- speed ❍...
  • Page 249 Combinations of Pulse Control Instructions Appendix A Instruc- Pulse Starting instruction tion being status INI(880) SPED(885) SPED(885) ACC(888) executed (Independent) (Continuous) (Independent) × × × × ORG(889) Steady Change PV Output method Output method Output method speed ❍ × × ×...
  • Page 250 Combinations of Pulse Control Instructions Appendix A Starting Instructions: ACC(888), Continuous, PLS2(887), and ORG(889) Instruction Pulse status Starting instruction being exe- ACC(888) (Continuous) PLS2(887) ORG(889) cuted × × × SPED(885) Steady Output method Output method Output method (Independent) speed × ×...
  • Page 251 Combinations of Pulse Control Instructions Appendix A...
  • Page 252 Appendix B Using Pulse Instructions in other CPU Units PLC Compatibility Table Instruction Function CJ1M CQM1H CPM2C Customizable Counter Units ❍ ❍ ❍ PULS(886) Specifying the number of output pulses (absolute or relative) ❍ Specifying the CW/CCW direction (Specified by (Specified by SPED(885) or SPED(885) or...
  • Page 253 Using Pulse Instructions in other CPU Units Appendix B Instruction Function CJ1M CQM1H CPM2C Customizable Counter Units ❍ ❍ PLS2(887) Specifying the number of output pulses (absolute or relative) (Instruction not supported) ❍ Switching between CW/CCW and Pulse + direction output methods (Instruction not supported) ❍...
  • Page 254 Using Pulse Instructions in other CPU Units Appendix B Instruction Function CJ1M CQM1H CPM2C Customizable Counter Units PRV(881) Reading PVs •High-speed •High-speed •High-speed •High-speed counter PV counter PV counter PV counter PV (PVs that can be read.) •Interrupt input •Interrupt input •Pulse output (counter mode) (counter mode)
  • Page 255 Using Pulse Instructions in other CPU Units Appendix B...
  • Page 256: C Interrupt Response Times

    Software response time Interrupt task execution Built-in interrupt input response time Built-in interrupt input response time = Hardware interrupt response time + Software interrupt response time Item CJ1M-CPU22/23 CJ1M-CPU21 Interrupt response Counter interrupts Interrupt response Counter interrupts time time Up-differentiation 30 µs Up-differentiation 30 µs...
  • Page 257 The startup time depends on the pulse output instruction being used and the selected operation. Instruction execution Startup time Pulse output Pulse output instruction Startup time CJ1M-CPU22/23 CJ1M-CPU21 46 µs 63 µs SPED(885) (Continuous) 50 µs 68 µs SPED(885) (Independent) 60 µs 85 µs...
  • Page 258: Index

    Index absolute coordinates CJ Series selecting definition xvii absolute pulse outputs CJ1W-NC comparison of pulse output functions acceleration rate changing comparing tables setting comparison allocations resetting counters Auxiliary Area data allocation connector pin allocations built-in CPU Unit inputs connectors built-in CPU Unit outputs flat cable connectors connector pin allocations loose wire crimp connectors...
  • Page 259 Index Count Direction Flag High-speed Counter Gate Bit EC Directives xxviii high-speed counter inputs encoders details connecting 24-V DC open-collector outputs reset methods connecting line driver outputs restrictions error codes high-speed counters pulse output stop error codes allocations Error Counter Reset Output Auxiliary Area data allocation connection example connector pin usage...
  • Page 260 Index counter mode details details examples direct mode PLC Setup settings restrictions Origin Return Parameters interrupt response times origin search error processing examples executing Origin Search Acceleration Rate jog operation programming example Origin Search Deceleration Rate Origin Search Direction specifying origin search function length measurement program allocations...
  • Page 261 Index intended audience xxii operating environment xxiv safety xxii quick-response inputs safety precautions xxii allocations connector pin usage programming examples details pulse + direction mode restrictions details pulse + direction outputs connection example pulse control instructions range comparison combinations receiving pulse inputs pulse frequency conversion refreshing pulse input modes...
  • Page 262 Index pulse outputs variable duty ratio pulses PWM(891) output vertical conveyor quick-response input specifications quick-response inputs transistor outputs (sinking) wiring speed control connector pin allocations speed outputs examples stocker DC input devices instructions methods W-series or U-series (UP or UT) Servo Driver connection example target position changing...
  • Page 263 Index...
  • Page 264: 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. W395-E1-03 Revision code The following table outlines the changes made to the manual during each revision. Page numbers refer to the previous version.
  • Page 265 Revision History...
  • Page 266 Wegalaan 67-69, NL-2132 JD Hoofddorp The Netherlands Tel: (31)2356-81-300/Fax: (31)2356-81-388 OMRON ELECTRONICS LLC 1 East Commerce Drive, Schaumburg, IL 60173 U.S.A. Tel: (1)847-843-7900/Fax: (1)847-843-8568 OMRON ASIA PACIFIC PTE. LTD. 83 Clemenceau Avenue, #11-01, UE Square, Singapore 239920 Tel: (65)6835-3011/Fax: (65)6835-2711...
  • Page 267 Authorized Distributor: Cat. No. W395-E1-03 Note: Specifications subject to change without notice Printed in Japan This manual is printed on 100% recycled paper.

This manual is also suitable for:

Cj1m-cpu23Cj1m-cpu22

Table of Contents