Omron CP1L CPU Getting Started Manual
Hide thumbs Also See for CP1L CPU:
Table of Contents

Advertisement

CP1L-J14D@-@
Cat. No. W07E-EN-02
CP1L-J20D@-@
CP1L-L10D@-@
CP1L-L14D@-@
CP1L-L20D@-@
CP1L-M30D@-@
CP1L-M40D@-@
CP1L-M60D@-@
CP1L CPU Unit
GETTING STARTED GUIDE

Advertisement

Table of Contents
loading

Summary of Contents for Omron CP1L CPU

  • Page 1 CP1L-J14D@-@ Cat. No. W07E-EN-02 CP1L-J20D@-@ CP1L-L10D@-@ CP1L-L14D@-@ CP1L-L20D@-@ CP1L-M30D@-@ CP1L-M40D@-@ CP1L-M60D@-@ CP1L CPU Unit GETTING STARTED GUIDE...
  • Page 2 CP1L-J14D - CP1L-J20D - CP1L-L10D - CP1L-L14D - CP1L-L20D - CP1L-M30D - CP1L-M40D - CP1L-M60D - CP1L CPU Unit Getting Started Guide...
  • Page 3 Other brand and product names are trademarks or registered trademarks of their respective owners. © OMRON, 2007 All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, mechanical, electronic, photocopying, recording, or otherwise, without the prior written permission of OMRON.
  • Page 4: Table Of Contents

    Part Names and Functions ..................15 SECTION 2Designing Systems........19 Organization of this Manual..................20 About the Shutter Control System ................22 I/O Allocation for the Shutter Control System ............24 Example Ladder Program..................26 SECTION 3Mounting and Wiring ........27 Installation Notes ...................... 28 Mounting onto DIN Tracks ..................
  • Page 5: About This Manual

    Section 2 explains how to construct a CP1L system, using a shutter control system as an example. Section 3 explains the how to install CP1L onto a DIN track, how to wire power supply and I/O lines, and how to test operation.
  • Page 6: Related Manuals

    Related Manuals The following manuals are used for the CP-series CPU Units. Refer to these manuals as required. Cat. No. Manual name Description W462 SYSMAC CP Series CP1L Explains the system configuration, installation, wir- CPU Unit User’s Manual ing, I/O allocation, pulse/counter functions, and expansion unit connections in details.
  • Page 7 Read and Understand this Manual Please read and understand this manual before using the product. Please consult your OMRON representative if you have any questions or comments. Warranty and Limitations of Liability WARRANTY OMRON's exclusive warranty is that the products are free from defects in materials and workmanship for a period of one year (or other period if specified) from date of sale by OMRON.
  • Page 8 The following are some examples of applications for which particular attention must be given. This is not intended to be an exhaustive list of all possible uses of the products, nor is it intended to imply that the uses listed may be suitable for the products: •...
  • Page 9 PERFORMANCE DATA Performance data given in this manual is provided as a guide for the user in determining suitability and does not constitute a warranty. It may represent the result of OMRON's test conditions, and the users must correlate it to actual application requirements.
  • Page 10: Precautions

    General Precautions........
  • Page 11: Intended Audience

    Safety Precautions Caution When power is ON or has just been turned OFF, do not touch the power supply, I/O terminals, or the surrounding areas. Doing so may result in burns. After turning the power OFF, wait for the unit to cool down sufficiently before touching it.
  • Page 12: Section 1Cp1L Overview

    SECTION 1 CP1L Overview This section introduces the types of CP1L, as well the part names used during operation. 1-1 CP1L Models ................ 12 1-2 Part Names and Functions ........... 15...
  • Page 13: Cp1L Models

    CP1L Overview 1-1 CP1L Models CP1L programmable controller is a PLC package type, available with 10, 14, 20, 30, 40, or 60 I/O points. For application examples that use CP1L, refer to appendix A-4 CP1L Programming Examples. 10-point I/O Units (CP1L-L10D - ) •...
  • Page 14 20-point I/O Units (CP1L-L20D - /CP1L-J20D - ) • CPU unit has 12 input points and 8 output points. • CP-series expansion I/O units can be used to add I/O points, up to a total of 60 I/ O points.
  • Page 15 40-point I/O Units (CP1L-M40D - ) • CPU unit has 24 input points and 16 output points. • CP-series expansion I/O units can be used to add I/O points, up to a total of 160 I/O points. 60-point I/O Units (CP1L-M60D - ) •...
  • Page 16: Part Names And Functions

    1-2 Part Names and Functions 1-2 Part Names and Functions This section describes the part names and functions, using the 14-point I/O unit as an example. 14-point I/O Unit Memory cassette slot Used to attach a memory cassette (15). Memory cassettes can be used to store backups for CP1L programs, parameters, and data memory.
  • Page 17 (13) External power supply and output terminal block • External power supply terminal: Units that use AC power supply have a 24VDC external power supply terminal with a maximum capacity of 300mA.This can be used as a service power supply for input devices.
  • Page 18 • User programs, parameters, and data memory are being restored following a PLC power-on. Note: Do not turn the PLC power supply OFF while this indicator is lit. Not lit Any other state.
  • Page 19 1-2 Part Names and Functions SYSMAC CP1L Getting Started Guide...
  • Page 20: Section 2Designing Systems

    SECTION 2 Designing Systems This section explains how to construct a CP1L system, using a shutter control system as an example. All subsequent sections are written based on the sample program used in this section. 2-1 Organization of this Manual ..........20 2-2 About the Shutter Control System ........
  • Page 21: Organization Of This Manual

    Designing Systems 2-1 Organization of this Manual Sections 2 through 5 of this manual explain the construction process of a CP1L system, from design to operation, using a shutter control system as an example. Section contents are as follows: Section 2: Workflow from design to operation, shutter control system specifications, components, and I/O allocation.
  • Page 22 2-1 Organization of this Manual Workflow from Design to Operation The workflow for constructing a CP1L shutter control system is shown below. For details, refer to the respective sections of the manual. Refer to 2-3 I/O Allocation for the Shutter Control I/O allocation System.
  • Page 23: About The Shutter Control System

    • The shutter can also be opened, closed, and stopped with buttons. • When a sensor detects full car entrance into the garage, the shutter closes. • When pulling the car out of the garage, use the buttons to operate the shutter. SYSMAC CP1L Getting Started Guide...
  • Page 24: System Components

    2-2 About the Shutter Control System 2-2-2 System Components This section defines components to be used in the shutter control system. The following components are to be used. • CP1L (14-point I/O unit with AC power supply) Equipment and Software for Programming •...
  • Page 25: I/O Allocation For The Shutter Control System

    2-3 I/O Allocation for the Shutter Control System 2-3 I/O Allocation for the Shutter Control System I/O relays on CP1L are allocated to contacts as defined by following. Inputs Device Contact Address OPEN button 0.00 STOP button 0.01 CLOSE button 0.02...
  • Page 26 Output area : 6 outputs Allocate On 14-point I/O units, 8 inputs, from 0.00 to 0.07 (bits 00 to 07 on 0CH), are allocated to the input terminal block. Also, 6 output relays, from 100.00 to 100.05 (bits 00 to 05 on 100CH), are allocated to the output terminal block.
  • Page 27: Example Ladder Program

    2-4 Example Ladder Program 2-4 Example Ladder Program An example ladder program for the shutter control system is shown below. Program creation is explained in SECTION 4. 0.04 T0000 W0.00 Light detection Timer Work area sensor W0.00 Work area W0.00...
  • Page 28: Section 3Mounting And Wiring

    SECTION 3 Mounting and Wiring This section explains how to install CP1L onto a DIN track, how to wire power supply and I/O lines, and how to test operation. 3-1 Installation Notes ..............28 3-2 Mounting onto DIN Tracks ............ 31 3-3 Wiring Devices ..............
  • Page 29: Installation Notes

    • Provide adequate space for air flow. • Do not install above equipment, which generates significant heat (i.e. heaters, transformers, high-capacity resistors). • If the ambient temperature is to exceed 55 °C , install a cooling fan or air conditioner. SYSMAC CP1L Getting Started Guide...
  • Page 30 • For safety during operation and maintenance, separate the unit as far as possible from high-voltage equipment and power machinery. • For ease of operation, mount the unit onto the control panel at a height of 1,000 to 1,600mm. Caution When power is ON or has just been turned OFF, do not touch the power supply, I/O terminals, or the surrounding areas.
  • Page 31: External Dimensions

    DIN Track Secure the DIN track onto the control panel, using at least 3 screws. • Use M4 screws at intervals of 210mm (6 holes) or less. Screw torque is 1.2N · m. For details on installing CP1L, refer to SECTION 3 Installation and Wiring of CP Series CP1L CPU Unit User’s Manual (W462).
  • Page 32: Mounting Onto Din Tracks

    This section explains how to mount CP1L onto a DIN track. Pull out the DIN track mounting pin (1) . Hook the rear panel of CP1L onto the DIN track (1) , as shown. Push in the DIN track mounting pin (1) to secure CP1L.
  • Page 33: Wiring Devices

    Protective Label Wire scraps may be scattered during wiring. To prevent them from entering the unit, leave the protective label (adhered on the top surface of the unit) on until wiring is done. When wiring is complete, remove the label to ensure proper heat dissipation.
  • Page 34: Connecting I/O Lines

    When wiring the AC power supply, use ring-type crimp terminals to prevent unintended disconnection. Secure the AC power supply line to the terminal block with 0.5N · m of torque. WARNING Loosening the screw may result in a fire or malfunction.
  • Page 35 Wire the outputs as shown, while referring to 2-3 I/O Allocation for the Shutter Control System. For details on wiring, refer to 3-5-4 I/O Wiring for CPU Units with 14 I/O Points of CP Series CP1L CPU Unit User’s Manual (W462).
  • Page 36: Power Testing Cp1L

    Turn the power ON for CP1L. Wait 2 seconds for the CP1L to initialize. Check the indicators on CP1L. If [POWER] and [RUN] are lit, CP1L is operating normally. Note When CP1L is turned ON, it will go into RUN mode automatically.
  • Page 37 Parts of CP Series CP1L CPU Unit User’s Manual (W462). • Battery-free operation If there is no need to reference the PLC clock and RAM data, CP1L can be used without a battery (battery-free operation). For details, refer to 6-5 Battery-free Operation of CP Series CP1L CPU Unit User’s Manual (W462).
  • Page 38: Section 4Creating Programs

    SECTION 4 Creating Programs In this section, the steps for creating ladder programs essential to CP1L operation will be shown, using CX-Programmer. In creating the ladder program for the shutter control system, the basic functions of CX-Programmer will be explained.
  • Page 39: Preparing For Programming

    Creating Programs 4-1 Preparing for Programming This section explains the necessary preparations, such as connecting CP1L to a computer and installing the USB driver, in order to begin creating ladder programs. 4-1-1 What is CX-Programmer? CX-Programmer is a programming tool (software) for creating the ladder programs that are to be executed by CP1L.
  • Page 40: Connecting To A Computer And Installing The Usb Driver

    Due to limitations of the USB specifications, the following restrictions apply when connecting CP1L to a computer. • Only 1 CP1L can be connected to a computer at any given time. You cannot connect multiple CP1Ls simultaneously. • Do not disconnect the USB cable while the system is online. Before disconnecting the USB cable, switch the application to offline status.
  • Page 41 CPU Unit User’s Manual (W462). Turn the power ON for CP1L and the computer. Using a USB cable (2) , connect the peripheral USB port (3) on CP1L to a USB port on the computer (1) . When the computer detects CP1L, the following message will be displayed.
  • Page 42 Confirm that [Include this location in the search] is checked, and that [C:\Program Files\OMRON\CX-Server\USB\Win2000_XP\Inf] is displayed in the location field. Click [Next]. Driver installation will begin. When the installation is complete, a dialog box will be displayed, confirming that installation is complete. SYSMAC CP1L Getting Started Guide...
  • Page 43 4-1 Preparing for Programming If the Hardware Installation dialog box is displayed, click [Continue Anyway]. Click [Finish]. USB driver installation is now complete. SYSMAC CP1L Getting Started Guide...
  • Page 44 If [OMRON SYSMAC PLC Device] is not displayed, reinstall the USB driver. For details on reinstalling the USB driver, refer to 1-3-1 Connecting with a Commercially Available USB Cable of CP Series CP1L CPU Unit User’s Manual (W462).
  • Page 45: Creating Ladder Programs

    4-2 Creating Ladder Programs 4-2 Creating Ladder Programs A ladder program can now be created for the example introduced in SECTION 2 System Design. First, however, the functions of the ladder program will be described. 4-2-1 Operation The ladder program to be created will open and close a garage shutter.
  • Page 46 Push-buttons: • When pulling the car out of the garage, use the buttons to operate the shutter. • When pulling the car out of the garage, a differentiated up contact should be used as the car detection sensor, so that the shutter does not close immediately upon fully opening.
  • Page 47: Ladder Program

    CLOSE button Escalation De-escalation limit LS motor motor 100.01 De-escalation motor 0.03 Car detection sensor *8 *8 Refer to 4-5-7 Inputting Differentiated Up Contacts. Creating the program in CX-Programmer will be explained in the next section. SYSMAC CP1L Getting Started Guide...
  • Page 48: Using Cx-Programmer

    4-3 Using CX-Programmer This section explains CX-Programmer start-up and operation screens.. 4-3-1 Starting CX-Programmer On the desktop, select [Start] - [All Programs] - [OMRON] - [CX-One] - [CX- Programmer] - [CX-Programmer]. CX-Programmer will start. The title screen will be displayed, followed by the main window.
  • Page 49: Operation Screens

    Select View - Toolbars from the main menu to show/hide toolbars. Drag the toolbars to change their position. Project tree / (6) Project workspace Used to manage programs and settings. Drag & drop items to copy the data. Select [View] - [Windows] - [Workspace] from the main menu to show/hide the workspace.
  • Page 50 Diagram Workspace Rung number Program address Rung header If a rung is incomplete, a red line will be displayed to the right of its rung header. Bus bar Information Window Displays basic shortcut keys used in CX-Programmer. Select [View] - [Windows] - [Information Window] from the main menu to show/hide the information window.
  • Page 51: Using The Help

    4-4 Using the Help 4-4 Using the Help CX-Programmer Help provides information on the CX-Programmer screens, and explains all operations including basic functions, program creation, and monitoring. Instructions, as well as formats and operand functions, are also explained. Referencing CX-Programmer Help While using CX-Programmer, press the [F1] key.
  • Page 52 4-4 Using the Help From CX-Programmer Select [Help] - [Help Contents] from the main menu. CX-Programmer Help will be displayed. Referencing PLC Instruction Sets For details on instructions used in ladder programs, refer to PLC Instruction Sets. SYSMAC CP1L Getting Started Guide...
  • Page 53 Select [Help] - [Instruction Reference] - [CS/CJ-Series and CP-Series] from the main menu. CP-Series PLC Instruction Sets will be displayed. While Creating Ladder Programs While creating a ladder program instruction, click [Instruction Help] on the New Instruction dialog box. CP-Series PLC Instruction Sets will be displayed. Note When selecting a special instruction, Instruction Help will be displayed.
  • Page 54: Inputting Programs

    4-5-1 Creating New Projects When using CX-Programmer for the first time, you will need to create a new project. When creating a new project, you must set the target device type and CPU type for the program and data being created.
  • Page 55 4-5 Inputting Programs Click [Settings]. The Device Type Settings dialog box will be displayed. Select the CPU from the CPU Type drop-down list. Click [OK]. The Device Type Settings dialog box will be closed. SYSMAC CP1L Getting Started Guide...
  • Page 56 4-5 Inputting Programs Confirm that [USB] is displayed for Network Type. Click [OK]. The Change PLC dialog box will be closed. Main window for the new project will be displayed. If [USB] is not displayed for Network Type, refer to 4-1-2 Connecting to a Computer and Installing the USB Driver and confirm that the USB driver has been installed properly.
  • Page 57: Inputting Contacts

    "4" is entered. The Edit Comment dialog box will be displayed. Input "Light detection sensor" as the I/O comment. Press the [Enter] key. A contact representing input from the light detection sensor will be displayed on the ladder program. Next, input an OR circuit.
  • Page 58 Input address " W0 " . Press the [Enter] key. "W0" is entered. The Edit Comment dialog box will be displayed. Input " Work Area " as the I/O comment. Press the [Enter] key. An OR circuit representing the work area contact will be displayed.
  • Page 59 Input address " T0 " . Press the [Enter] key. "T0" is entered. The Edit Comment dialog box will be displayed. Input " Timer " as the I/O comment. Press the [Enter] key. An AND circuit representing the timer closed contact will be displayed.
  • Page 60: Inputting Output Coils

    Press the [O] key. The New Coil dialog box will be displayed. Input address " W0 " . Press the [Enter] key. "W0" is entered. The Edit Comment dialog box is displayed with the I/O comment already entered. Press the [Enter] key.
  • Page 61 4-5 Inputting Programs Press the down arrow key 2 times. When the cursor is positioned on the next rung, the current rung input is complete. Next, input a timer instruction. Note Duplicated Coils Do not duplicate coils. If the same address is specified for multiple outputs, only the rung closer to the END instruction will be valid.
  • Page 62: Inputting Timers

    4-5 Inputting Programs 4-5-4 Inputting Timers Press the [C] key. Input contact " W000 " . Then, press the [Enter] key while the Edit Comment dialog box is up. For details on inputting a contact, refer to 4-5-2 Inputting Contacts.
  • Page 63 A timer instruction will be displayed on the ladder program. Press the down arrow key 3 times. When the cursor is positioned on the next rung, timer instruction input is complete. Next, input a counter instruction. SYSMAC CP1L Getting Started Guide...
  • Page 64: Inputting Counters

    4-5 Inputting Programs 4-5-5 Inputting Counters Press the [C] key. Input contact " 004 " . Then, press the [Enter] key while the Edit Comment dialog box is up. For details on inputting a contact, refer to 4-5-2 Inputting Contacts.
  • Page 65 4-5 Inputting Programs Input " Counter " as the I/O comment. Press the [Enter] key. A counter instruction will be displayed on the ladder program. Next, input a reset input for the counter instruction. The timer contact (TIM 0000) will be used as the reset input.
  • Page 66 4-5 Inputting Programs Input contact " T0000 " . Press the down arrow key 2 times. When the cursor is positioned on the next rung, counter instruction input is complete. Next, input an auxiliary area. SYSMAC CP1L Getting Started Guide...
  • Page 67: Inputting Auxiliary Areas

    Auxiliary area is a relay with a specific purpose. The first cycle flag will be ON for only 1 cycle after the PLC has been powered ON. Here, it will be used to reset the counter when CP1L is powered ON.
  • Page 68 Press the left arrow key. Press the [W] key. The New Contact OR dialog box will be displayed. Input address " A20011 " . Press the [Enter] key. A first cycle flag will be displayed on the ladder program. SYSMAC CP1L Getting Started Guide...
  • Page 69: Inputting Differentiated Up Contacts

    Input address " 3 " . Press the [Enter] key. The Edit Comment dialog box will be displayed. Input " Car detection sensor " as the I/O comment. Press the [Enter] key. A contact representing input from the car detection sensor will be displayed as an OR circuit.
  • Page 70: End Instruction

    4-5-8 END Instruction Ladder programs must be terminated with an END instruction. When a new program is created in CX-Programmer, a section inclusive of an END instruction will be inserted automatically. Hence, there is no need to input an END instruction manually.
  • Page 71: Saving/Loading Programs

    4-6 Saving/Loading Programs 4-6 Saving/Loading Programs Created ladder programs must be saved. This section explains how to check, save, and load ladder programs. 4-6-1 Compiling Programs By compiling, you can check for errors in the program. Select [PLC] - [Compile All PLC Programs] from the main menu.
  • Page 72: Saving Programs

    4-6 Saving/Loading Programs 4-6-2 Saving Programs Save the created ladder program. Programs are saved in groups for each project. Select [File] - [Save As] from the main menu. The Save CX-Programmer File dialog box will be displayed. Specify the save location, and input a file name. Click [Save].
  • Page 73: Loading Programs

    Select [File] - [Open] from the main menu. The Open CX-Programmer Project dialog box will be displayed. Specify the save location and file. Click [Open]. The CX-Programmer project file will be opened, and the saved programs will be displayed. SYSMAC CP1L Getting Started Guide...
  • Page 74: Editing Programs

    4-7 Editing Programs 4-7 Editing Programs Created ladder programs can be edited in CX-Programmer. I/O comments and rung comments can also be added or edited. 4-7-1 Editing I/O Comments I/O comments can be added and edited via a list of addresses.
  • Page 75: Inputting Rung Comments

    4-7-2 Inputting Rung Comments Comments can be added to each rung of a ladder program. Double-click the rung header for the rung you wish to add a comment to. The Rung Properties dialog box will be displayed. On the General tab, input the comment into the comment field.
  • Page 76: Editing Rungs

    4-7-3 Editing Rungs Created ladder programs can be edited. Deleting Contacts/Instructions Place the cursor on a contact or on an instruction. Press the [Delete] key. The selected contact or instruction will be deleted. Rungs Click a rung header. The whole rung will be selected.
  • Page 77 Hold down the [Ctrl] key and press the [C] key. The selected contact or instruction will be copied to the clipboard. Move the cursor to where you wish to paste. Hold down the [Ctrl] key and press the [V] key.
  • Page 78: Section 5Transferring And Debugging Programs

    SECTION 5 Transferring and Debugging Programs To transfer data from a computer to CP1L, the computer and CP1L must first be online. Monitoring and debugging programs executed on CP1L are also performed with the computer and CP1L online. 5-1 Going Online ................. 78 5-1-1 Setting the CP1L Clock ..........
  • Page 79: Going Online

    Transferring and Debugging Programs 5-1 Going Online To configure CP1L settings, transfer programs, or execute programs, the computer and CP1L must first be online. In CX-Programmer, open the program to be transferred. Select [PLC] - [Work Online] from the main menu.
  • Page 80: Setting The Cp1L Clock

    5-1-1 Setting the CP1L Clock The CP1L clock should be set to match your time zone. Use CX-Programmer to set the time. If the time on CP1L is not set properly, the error log will not be displayed correctly. In CX-Programmer, open an existing project.
  • Page 81: Changing The Operating Mode

    5-1-2 Changing the Operating Mode Change to PROGRAM mode. The procedure for changing to the PROGRAM operation mode is as follows. Select [PLC] - [Operating Mode] - [Program] from the main menu. A dialog box will be displayed to confirm the operating mode change.
  • Page 82 5-1 Going Online Click [Yes]. The operating mode will be changed. The operating mode will be displayed on the title bar and on the project tree. CP1L Operating Mode CP1L has 3 operating modes: PROGRAM, MONITOR, and RUN. Change the operating mode to reflect the operation to be performed.
  • Page 83: Transferring Programs

    5-1 Going Online The following table lists the status and available operations for each mode. Operating Mode PROGRAM MONITOR Program status Stopped Running Running I/O refreshing Execute Execute Execute External I/O status Depends on Depends on program program I/O memory...
  • Page 84 Click [OK]. A dialog box will be displayed to confirm the transfer. Note For details on the transfer options, refer to SECTION 9 Transferring/Monitoring/ Debugging Programs of CX-Programmer Operation Manual (W446). Click [Yes]. If the following dialog box is displayed, click [Yes].
  • Page 85: Executing Operations

    To perform a trial run for adjustments and debugging, change to MONITOR mode. Caution Confirm that the facility will not be affected by changing to MONITOR or RUN mode. Select [PLC] - [Operating Mode] - [Run] from the main menu.
  • Page 86: Adjusting/Debugging Online

    This section explains functions used for debugging and for adjustments during test runs. 5-2-1 Monitoring Displaying Conduction Status The conduction status of the program rungs will be displayed. This will allow you to confirm program execution. Change CP1L to the MONITOR operating mode.
  • Page 87 5-2 Adjusting/Debugging Online Displaying Conduction Status at Multiple Sections The diagram workspace can be split. Multiple sections of the program can be viewed simultaneously. Window divider Drag the window divider to split the diagram workspace. The workspace can be split in up to 4 sections.
  • Page 88 The I/O value will be displayed. For Boolean values, "0" indicates OFF. Note • Input the address as the channel followed by a period and the bit. For example, "0 CH 04 bit" should be input as "0.04". • You can input addresses by dragging & dropping items from the diagram workspace to the watch window.
  • Page 89: Force-Setting/Force-Resetting

    5-2 Adjusting/Debugging Online 5-2-2 Force-Setting/Force-Resetting CX-Programmer can control inputs, independent of inputs from I/O devices. Use this function to force input conditions and output conditions during test runs. Note Before force-setting/force-resetting/releasing or setting/resetting, confirm that the facility will not be affected.
  • Page 90 • To undo the force-set/force-reset, select [Cancel]. • The following areas can be force-set/force-reset: CIO area (I/O area, data link area, CPU bus unit area, special I/O area, and work area), work area (WR), timer completion flag, holding area (HR), counter...
  • Page 91: Changing Timer Settings

    Address Reference Tool The address reference tool displays which instructions are using the address being pointed to with the cursor. It also allows jumping to another instruction with the same address. The address reference tool will display the following items: •...
  • Page 92 5-2 Adjusting/Debugging Online Select [View] - [Windows] - [Address Reference Tool] from the main menu. The address reference tool will be displayed. Input the address to search for. Click [Find]. SYSMAC CP1L Getting Started Guide...
  • Page 93 5-2 Adjusting/Debugging Online A list of used addresses will be displayed. Click an address to display the program being used. Ladder Backtracking This function is used to backtrack the ladder, to determine why a contact does not turn ON, for example.
  • Page 94: Online Editing

    5-2 Adjusting/Debugging Online 5-2-5 Online Editing The CP1L program can be edited online. Caution Before starting online editing, confirm that the extension of cycle time will have no adverse effects. Otherwise, input signals may not be read. Note • Note that if CP1L is running in MONITOR mode, changing the program via editing online may cause the cycle time to become longer and/or failure to read input signals.
  • Page 95: Confirming Cycle Time

    5-2 Adjusting/Debugging Online Select [Program] - [Online Edit] - [Send Changes] from the main menu. The edited rungs will be transferred to CP1L. 5-2-6 Confirming Cycle Time Change CP1L to the MONITOR or RUN operating mode. Click the diagram workspace.
  • Page 96: Appendix

    Appendix This section briefly explains channel and relay numbers, instructions, and the inner workings of CP1L. This section also provides examples of applications utilizing CP1L functions such as pulse functions, communication functions, and special instructions. A-1 Channel/Relay Numbers............96 A-2 Instructions ................. 101 A-2-1 Using Instructions ............
  • Page 97: Channel/Relay Numbers

    *For 14/20-point I/O units: D0 to D9999, D32000 to D32767. Note The work words in CIO Area may be assigned to new functions in future versions of the CPU Units. Be sure to use the work words in W000 to W511CH first.
  • Page 98 Channel data is represented by 4 hexadecimal digits, derived from 16 binary digits, representing the ON/OFF state of the 16 bits. In other words, for each 4 bits, the sum of ON bits are calculated and expressed as a single digit.
  • Page 99: Condition Flags

    Condition Flags Condition flags are used to reflect the processing results during or after the execution of instructions. Whether a flag is used or not will depend on the instruction. These flags are used in ladder programs as contacts. Name...
  • Page 100: Clock Pulses

    1.0s 0.5s 0.5s 1min clock pulse 1min P_1min 1min Note To enter a clock pulse or condition flag into CX-Programmer, first enter a contact, then press the [P] key to select from the drop-down list. SYSMAC CP1L Getting Started Guide...
  • Page 101 Output area 100.00 to 199.15 (100 CHs) With CP1L, the first 1 or 2 channel(s) of the input and output areas, starting at 0CH and 100CH, respectively, are reserved by the CPU unit. As expansion I/O units and expansion units are connected to the CPU unit, input and output areas are assigned 1 channel at a time, in the order of connection.
  • Page 102: Instructions

    A-2 Instructions A-2 Instructions CP1L has a rich instruction set. This section explains how to use the instructions, and gives some basic instructions. A-2-1 Using Instructions With previous PLCs, from C-series to micro PLCs, instruction sets were designed with the primary focus on handing BCD data. However, as data size grow and exchange of data between computers becomes more commonplace, however, support for BIN data has become a necessity for control equipment, as well.
  • Page 103: A-2-2 Basic I/O Processing Instructions

    Instruction Name Instruction Function Contact LOAD Used for contacts connected to the bus bar or to the beginning of a rung block. LOAD NOT LD NOT Used for closed contacts connected to the bus bar or to the beginning of a rung block.
  • Page 104 000004 000001 000005 Note There is no limit on the number of contacts that can be connected by OR/OR NOT instructions. Writing Relay Coils OUT / OUT NOT Instructions OUT instructions turn a relay coil ON when the execution condition is ON. OUT NOT instructions turn a relay coil OFF when the execution condition is ON.
  • Page 105 000102 000000 000001 000102 In the above example, relay coil 000102 is turned ON by the SET condition and OFF by the RSET condition. Note Holding areas and auxiliary areas turned ON by SET instructions will retain the ON status even when power is interrupted or when operation is stopped.
  • Page 106: Inner Workings Of Cp1L

    A-3 Inner Workings of CP1L A-3 Inner Workings of CP1L This section briefly explains the inner structure, functions, and internal operation flow of CP1L CPU units. A-3-1 Inner Structure of CPU Units The inner structure of a CP1L CPU unit is shown below.
  • Page 107 RAM. • By using CX-Programmer, data in the DM area of the I/O memory can also be saved to the built-in flash memory. This saved data can be set as defaults for the DM area, and can be automatically written back into the DM area when the unit is powered ON next.
  • Page 108: A-3-2 Cpu Unit Behavior

    A-3 Inner Workings of CP1L A-3-2 CPU Unit Behavior This section briefly explains operations that take place within a CP1L CPU unit. CPU Unit Operation Flow Program executions (execution of instructions) are first processed, followed by I/O refresh and execution of the peripheral servicing. These processes are repeated in cyclic fashion.
  • Page 109 A-3 Inner Workings of CP1L I/O Refreshing I/O refreshing refers to cyclic data transfers between a preset area of the memory and an external source. It involves the following refreshing processes. Target Unit Type Max. Data Exchange Data Exchange Area CPU unit’s built-in I/O...
  • Page 110 IORF instructions take a relatively long time to execute. The execution time will increase as the number of channels being refreshed increases. Hence, the total cycle time may be extended. It should be noted that the total cycle time may be increased significantly.
  • Page 111 It involves processing of service requests both to and from external devices. In the CP-series, most of the services use the FINS command. Each service is allocated with a fixed amount of time specified by the system, and is executed every cycle. If the services processing completes within the allocated time, no processing is performed during the remaining time.
  • Page 112: Cycle Time

    (from the expansion units to the CPU unit). For details on I/O refresh time, refer to 2-7 Computing the Cycle Time of CP Series CP1L CPU Unit User’s Manual (W462). SYSMAC CP1L Getting Started Guide...
  • Page 113 Use of peripheral USB ports and serial ports "Fixed peripheral servicing time" specified in the PLC settings The cycle time is not affected by the number of tasks in the user program. The cycle time is only affected by cyclic tasks that are READY within the cycle.
  • Page 114 A-3 Inner Workings of CP1L Example Calculation of Cycle Time An example for 4-2-2 Ladder Programs is shown. Process Name Formula Processing Time Overseeing processes 0.4ms Program execution Sequential input instructions LD 0.55µs x 6 instructions OR 0.68µs x 6 instructions AND NOT 0.65µs x 7 instructions...
  • Page 115: Cp1L Programming Examples

    This section provides examples for wiring, DIP switch settings, and programming. For details on wiring and settings, refer to CP Series CP1L CPU Unit User's Manual (W462). For details on CP1L instructions, refer to CP Series CP1H/CP1L CPU Unit Programming Manual (W451). For details on using CX-Programmer, refer to CX-Programmer Operation Manual (W446).
  • Page 116: System Configuration

    (A): To set a minimal value of 2sec, first convert the external analog input value A643 to a BCD value of D0, increment it by 20BCD/2sec, and then store it as (B): TIM will act as a decrementing ON timer with 0.1sec intervals.
  • Page 117 The maximum input voltage is 11VDC. Do not apply voltages any greater. Using the Analog Adjuster on CP1L Settings can be changed by using the analog adjuster on CP1L instead of using an external analog settings input. The analog adjuster can set the auxiliary area (A642CH) to any value in the 0 to 255 range (0 to FF Hex).
  • Page 118: A-4-2 Capturing Short Signals

    100.00 0010 Photoelectric Gate sensor (A): To use the analog adjuster on CP1L for setting the timer in the example application, change auxiliary area A643 in the ladder program to A642. A-4-2 Capturing Short Signals Functions Used Quick-Response Input By setting the built-in input to use quick-response inputs, inputs having a signal width as small as 30 µ...
  • Page 119 Contact 100.00 • Quick-response inputs can read short signals that are shorter than the cycle time. However, as with any other input, the full cycle time will be used for ladder processing. For accelerated processing unaffected by the scan time, use interrupt inputs.
  • Page 120 A-4 CP1L Programming Examples PLC Setup On the PLC Settings dialog box, set the sensor input (0.04) to [Quick]. Open the CX-Programmer main window. Double-click [Settings] in the project tree. The PLC Settings dialog box will be displayed. Click the Built-in Input tab.
  • Page 121 A-4 CP1L Programming Examples On the IN0 drop-down list for Interrupt Input, select [Quick]. While the sensor input contact is 0.04, setup is performed for [IN0] since the interrupt input / quick-response input setting is set to 0. Close the PLC Settings dialog box.
  • Page 122: A-4-3 Using Interrupt Inputs To Accelerate Processes

    Interrupt inputs (direct mode) execute interrupt tasks when the built-in input of a CPU unit switches from OFF to ON, or from ON to OFF. Interrupt tasks 140 to 145 are allocated to the input contacts. The allocation is fixed. Use interrupt inputs to achieve faster processing that is unaffected by the scan time.
  • Page 123 A-4 CP1L Programming Examples System Configuration Wiring Example On CP1L units with 14-point I/O, interrupt inputs can be allocated to contacts 0.04 to 0.07. Input interrupt 0 will be allocated to contact 0.04. The interrupt task executed by input interrupt 0 is task No.140.
  • Page 124 A-4 CP1L Programming Examples Programming Example Ladder Program MSKS (interrupt mask set) instructions will be used to assign the "up" specification to the interrupt input, and to set the interrupt permission for enabling the interrupt inputs. P_On Interrupt input 0...
  • Page 125 A-4 CP1L Programming Examples When interrupt input 0 (contact 0.04) turns ON, the following "interrupt task 140" will be executed once. Assignment of interrupt tasks to interrupt inputs is fixed. Interrupt input 0 will always execute interrupt task 140. 0.00 0.01...
  • Page 126 Creating Interrupt Task Programs Right-click [NewPLC1[CP1L]Offline] in the project tree. Select [Insert Program] from the pop-up menu. [NewProgram2(Unassigned)] will be added to the bottom of the project tree. Right-click [NewProgram2(Unassigned)]. Select [Properties] from the pop-up menu. The Program Properties dialog box will be displayed.
  • Page 127 A-4 CP1L Programming Examples Click the General tab. Select [Interrupt Task 140] from the Task type drop- down list. Close the Program Properties dialog box. Select [Section1] under [NewProgram2(Int 140)]. Input the ladder program for the interrupt. To display the main ladder program, double-click [Section1] under [NewProgram1(00)] in the project tree.
  • Page 128: A-4-4 Using Calendar Timers

    Functions Used Clock CP1L CPU units have a built-in clock. The clock cannot be used if a battery is not installed or the battery voltage is low. Operation Overview In this example, a fountain will be controlled. The fountain is to be activated according to the following schedule: •...
  • Page 129 <DT(343) A354 A351 A351 (A): Turned ON for Monday thru Friday (i.e. when A354 [day] is less than or equal to [Friday]), from 17:30 (when A351 [hh:mm:ss] becomes equal to the value set in D0 [17:30:00]) until 20:30 (when A351 [hh:mm:ss] becomes equal to the value set in D10 [20:30:00]).
  • Page 130 E.g. If 0.00 is ON and the time is 13:00:00, turn 100.00 ON. The hour, minute, and second of the current time in the CPU unit's built-in clock (A351 to A352) and set time (D100 to D102) will be compared.
  • Page 131 A-4 CP1L Programming Examples DM Area Setup The following values are set into the DM area as BCD. Channel Value Content 3000 30min 00sec 0017 17hr 0000 3000 30min 00sec 0020 20hr 0000 0000 00min 00sec 0010 10hr 0000 1500...
  • Page 132 2)Select [Online] - [Transfer to PLC] from the menu. The Transfer to PLC dialog box will be displayed. 3)Select the area and its region for the transfer. Click [Transfer to PLC]. The data will be transferred. SYSMAC CP1L Getting Started Guide...
  • Page 133: A-4-5 Using Rotary Encoders To Measure Positions

    Interrupt tasks can be triggered when the counter value reaches a specific value or value range. Operation Overview A sheet feeder will be regulated to feed constant lengths in a given direction, i.e. for vacuum packing of food products. Motor Speed Motor: Start Contact 0.02...
  • Page 134 Motor run 100.00 Error stop position Motor slow 100.01 100.03 Indicator Inverter, etc. Normal stop position 100.02 Indicator Note Use the external power supply for input devices only. (It cannot be used to power output devices.) SYSMAC CP1L Getting Started Guide...
  • Page 135 Select [Software reset(comparing)] from the Reset drop-down list. Select [Differential phase input] from the Input Setting drop-down list. Close the PLC Settings dialog box. To apply changes made to the PLC settings, turn the PLC power ON. SYSMAC CP1L Getting Started Guide...
  • Page 136 A-4 CP1L Programming Examples Programming Example 1 Use comparison instructions to compare counter values. The program can be created easily by using comparison instructions to compare counter values. Ladder Program Counter values are used to start/slow/stop the motor. 0.02 W0.00...
  • Page 137 >=(325) high-speed counter (A270) is greater than 3550 (0DDE Hex). A270 Error stop position #0DDE When the PV of the high-speed counter matches target value 1 (3000), interrupt task 04 will be executed. P_On Interrupt task Set "motor slow" 100.01...
  • Page 138: A-4-6 Using Servo Drivers For Positioning

    A-4-6 Using Servo Drivers for Positioning Functions Used Pulse Output by Built-in Output Pulse signal outputs from the built-in output of a CPU unit can be used for positioning and speed control of a servo motor driver with up to 2 axes. Operation Overview The following example is for a single-axis handling machine that is used to transfer product.
  • Page 139 (100000) by absolute pulse specification (absolute coordinate system). (3) Positioning of points A and B are repeated. Because absolute pulse specification is used, the positioning SV for (3) will be the same as for (1). SYSMAC CP1L Getting Started Guide...
  • Page 140 100.05 100.02 100.03 *Insert a resistance of 1.6 to 2.2k , so that the current is within the 7 to 15mA range. *For a 20/30/40-point CPU, the origin proximity input (pulse 0) will be 0CH10bit. SYSMAC CP1L Getting Started Guide...
  • Page 141: Plc Setup

    Search Proximity Speed 1000pps Search Compensation Value Search Acceleration Ratio 2000 Search Deceleration Ratio 2000 Positioning Monitor Time Close the PLC Settings dialog box. To apply changes made to the PLC settings, turn the PLC power ON. SYSMAC CP1L Getting Started Guide...
  • Page 142 0.05 @PLS2(887) Positioning PLS2 instruction Pulse output 0 Positioning to point B Absolute pulse specification Position data setup table Initial frequency setting Output flags for origin search and positioning completion. 0.03 0.04 0.05 W0.00 Positioning Positioning Start origin search to point A to point B W0.00...
  • Page 143 Acceleration ratio: 2000 (Hz/4ms) positioning D0001 07D0 Deceleration ratio: 2000 (Hz/4ms) D0002 C350 Target frequency: 50000 (Hz) D0003 0000 D0004 FC18 Pulse output volume: -1000 (Hz) D0005 FFFF Initial D0006 0000 Initial frequency: 0 (Hz) frequency D0007 0000 Point B D0010...
  • Page 144: A-4-7 Using Inverters For Speed Control (1)

    Received responses are automatically stored in the DM fixed allocation words. Note Modbus-RTU easy master execution bits and DM Fixed Allocation words depend on unit type, 14/20-point I/O units or 30/40-point I/O units. For details, refer to CP Series CP1L CPU Unit User's Manual (W462). SYSMAC CP1L Getting Started Guide...
  • Page 145: Operation Overview

    A-4 CP1L Programming Examples Operation Overview A bobbin winder on a spinning machine will be used for in the following example. The rotation speed of the bobbin winder must be made variable as the thread is wound, so that the speed at which the thread is pulled stays constant.
  • Page 146 RS control for RD Enabled SD control for RD Enabled CIMR-V7 Setup Set the DIP switches as follows. • SW2-1: ON (terminating resistance present) Terminating resistance for RS422/ 485 communication Next, set the parameters as follows: Name Value Comments n003...
  • Page 147 A-4 CP1L Programming Examples PLC Setup Configure serial port 1. Open the PLC Settings dialog box. Click the Serial Port 1 tab. Set the following settings. Item Setting Communication Settings Custom Baud 9600bps Format 8, 1, E Mode Serial Gateway Mode...
  • Page 148 #0000 Contact Z D32306 Operation command (0: Stop) Frequency command 00.00Hz MOV(021) #0000 D32307 Start Modbus communication 1 second after executing ladder program. Continue Modbus communication. P_On #0010 A640.00 TIM0 Modbus-RTU easy master function execution bit A640.01 Modbus-RTU easy master function execution normal flag...
  • Page 149 Execution bit A640.01 Execution normal flag A640.02 Execution error flag (A): Turn the A640.00 execution flag ON to send command data D32300 and later. For details, refer to DM Area Setup on the next page. Channel Bits Setting Serial Port 1...
  • Page 150 DM settings from D32300 to D32305 are set before the execution of the ladder program. D32306 and D32307 do not need to be set explicitly. They are modified by MOV instructions, and are used to change, start, and stop frequency commands.
  • Page 151: A-4-8 Using Inverters For Speed Control (2)

    When using serial ports for communication between an inverter and a PLC, substantial knowledge of communication command specifications and communication procedures are generally required in creating the program. In such cases, Smart FB Library can be used to significantly simplify the programming process.
  • Page 152: Function Blocks

    (functions) into a single block. The user can define a function block in advance, and then use it by simply inserting it into a program and setting its I/O. Create and save standard program sections as function blocks. The function blocks can then be placed in a program, and be easily reused by simply setting the I/O parameters.
  • Page 153 In this FB library example, capacity of the user memory may exceed 5K steps. For this reason, since a memory capacity error may occur on a 14/20-point CP1L (with a user memory of 5K steps), use a 30/40-point CP1L (with a user memory of 10K steps) for this example For details on wiring, and on the settings for CP1W-CIF11, CIMR-V7, and CP1L, refer to System Configuration of A-4-7 Using Inverters for Speed Control (1).
  • Page 154 Required for communication with the Specifies start signal, rotation direction, Decelerates an operating axis to a stop. inverter. and frequency in Hz. 1 FB is used for each PLC serial port. " " Status refresh FB will be used for a serial port, even if the serial port has multiple inverters connected.
  • Page 155 Rotation direction Normal (0) MOV(021) W0.01 MOV(021) #157C Contact B D100 Frequency command 55.00Hz(157C Hex) Rotation direction Normal (0) MOV(021) W0.02 MOV(021) #1388 Contact C D100 Frequency command 50.00Hz(1388 Hex) Rotation direction Normal (0) MOV(021) SYSMAC CP1L Getting Started Guide...
  • Page 156 Start W0.01 Contact B W0.02 Contact C W1.01 W0.15 Contact Z Stopped Reset data interface work area between FBs when operation is started. P_First_Cycle Block settings BSET(071) First cycle flag Data to transfer/convert Lower CH No. D9000 D9100 Upper CH No.
  • Page 157 W7.00 #CCCC BUSY UnitSelect Communicating PLC used: select CP1L &1 (INT) (INT) Select serial port PortNo NodeAddr Inverter slave unit communicating or done communicating #00000002 (BOOL) (DWORD) Inverter slave unit used Error Scanlist (DWORD) (WORD) #00000000 ModelTypeM ErrorID Inverter CIMR-V7 INV error code &10...
  • Page 158 The Select CX-Programmer Function Block Library File dialog box will be displayed. Select the [FBL] - [omronlib] - [Inverter] - [INVRT] - [Serial] folder. A list of FB library files for serial communication with inverters will be displayed. SYSMAC CP1L Getting Started Guide...
  • Page 159 A-4 CP1L Programming Examples Select [_INV002_Refresh12.cxf]. Click [Open]. _INV002_Refresh is added under [Function Blocks] in the project tree. Place the cursor at the position where the _INV002_Refresh FB is to be inserted. Select [Insert] - [Function Block Invocation] from the main menu.
  • Page 160 Connect an input contact to the FB. Set the I/O parameters for the FB. 1) Place the cursor next to an FB parameter. Press the [Enter] key. The New Parameter dialog box will be displayed. 2) Input the parameter. Press the [Enter] key.
  • Page 161: A-4-9 Exchanging Data Between Cp1Ls

    A-4-9 Exchanging Data between CP1Ls Functions Used Simple PLC Link By using RS-422A/485 option boards, up to 10CH of data per CPU unit can be shared by as many as 9 CP1L/CP1H/CJ1M units, without the aid of a program. Operation Overview Current temperature information is exchanged by boilers.
  • Page 162 A-4 CP1L Programming Examples DIP Switch Setup for CP1W-CIF11 (RS422/485 Option Board) (Rear panel) CPU unit connector Operation setup DIP switches Setting Master Slave Slave Content No.0 No.1 Presence of terminating Terminating resistance present resistance for PLCs at the ends.
  • Page 163 Close the PLC Settings dialog box. Programming Example Serial PLC links are used for program-free linking of data in the serial PLC link areas. The ladder program transfers the data to be linked to the data link area. Boiler A...
  • Page 164 3100 3110 3120 Use block transfer instruction Use block transfer instruction Use block transfer instruction to transfer 1CH, 2CH to to transfer 1CH, 2CH to to transfer 1CH, 2CH to 3100CH, 3101CH 3110CH, 3111CH 3120CH, 3121CH SYSMAC CP1L Getting Started Guide...
  • Page 165 SYSMAC CP1L Getting Started Guide...
  • Page 166 ......15 help ......50 battery-free operation .
  • Page 167 ....117 relay......96 relay number .

Table of Contents