dl06um1
669 Pages

dl06um1

Course Number: ENGR 480, Fall 2009

College/University: Walla Walla University

Word Count: 128789

Rating:

Document Preview

DL06 User Manual Manual Number: D0-06USER-M Volume 1 of 2 WARNING Thank you for purchasing automation equipment from Automationdirect.com. We want your new automation equipment to operate safely. Anyone who installs or uses this equipment should read this publication (and any other relevant publications) before installing or operating the equipment. To minimize the risk of potential safety problems, you should...

Unformatted Document Excerpt
Coursehero >> Washington >> Walla Walla University >> ENGR 480

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

User DL06 Manual Manual Number: D0-06USER-M Volume 1 of 2 WARNING Thank you for purchasing automation equipment from Automationdirect.com. We want your new automation equipment to operate safely. Anyone who installs or uses this equipment should read this publication (and any other relevant publications) before installing or operating the equipment. To minimize the risk of potential safety problems, you should follow all applicable local and national codes that regulate the installation and operation of your equipment. These codes vary from area to area and usually change with time. It is your responsibility to determine which codes should be followed, and to verify that the equipment, installation, and operation is in compliance with the latest revision of these codes. At a minimum, you should follow all applicable sections of the National Fire Code, National Electrical Code, and the codes of the National Electrical Manufacturer's Association (NEMA). There may be local regulatory or government offices that can also help determine which codes and standards are necessary for safe installation and operation. Equipment damage or serious injury to personnel can result from the failure to follow all applicable codes and standards. We do not guarantee the products described in this publication are suitable for your particular application, nor do we assume any responsibility for your product design, installation, or operation. Our products are not fault-tolerant and are not designed, manufactured or intended for use or resale as online control equipment in hazardous environments requiring fail-safe performance, such as in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines, or weapons systems, in which the failure of the product could lead directly to death, personal injury, or severe physical or environmental damage ("High Risk Activities"). Automationdirect.com specifically disclaims any expressed or implied warranty of fitness for High Risk Activities. For additional warranty and safety information, see the Terms and Conditions section of our catalog. If you have any questions concerning the installation or operation of this equipment, or if you need additional information, please call us at 770-844-4200. This publication is based on information that was available at the time it was printed. At Automationdirect.com we constantly strive to improve our products and services, so we reserve the right to make changes to the products and/or publications at any time without notice and without any obligation. This publication may also discuss features that may not be available in certain revisions of the product. Trademarks This publication may contain references to products produced and/or offered by other companies. The product and company names may be trademarked and are the sole property of their respective owners. Automationdirect.com disclaims any proprietary interest in the marks and names of others. Copyright 2002, Automationdirect.com Incorporated All Rights Reserved No part of this manual shall be copied, reproduced, or transmitted in any way without the prior, written consent of Automationdirect.com Incorporated. Automationdirect.com retains the exclusive rights to all information included in this document. AVERTISSEMENT Nous vous remercions d'avoir achet l'quipement d'automatisation de Automationdirect.comMC. Nous tenons ce que votre nouvel quipement d'automatisation fonctionne en toute scurit. Toute personne qui installe ou utilise cet quipement doit lire la prsente publication (et toutes les autres publications pertinentes) avant de l'installer ou de l'utiliser. Afin de rduire au minimum le risque d'ventuels problmes de scurit, vous devez respecter tous les codes locaux et nationaux applicables rgissant l'installation et le fonctionnement de votre quipement. Ces codes diffrent d'une rgion l'autre et, habituellement, voluent au fil du temps. Il vous incombe de dterminer les codes respecter et de vous assurer que l'quipement, l'installation et le fonctionnement sont conformes aux exigences de la version la plus rcente de ces codes. Vous devez, tout le moins, respecter toutes les sections applicables du Code national de prvention des incendies, du Code national de l'lectricit et des codes de la National Electrical Manufacturer's Association (NEMA). Des organismes de rglementation ou des services gouvernementaux locaux peuvent galement vous aider dterminer les codes ainsi que les normes respecter pour assurer une installation et un fonctionnement srs. L'omission de respecter la totalit des codes et des normes applicables peut entraner des dommages l'quipement ou causer de graves blessures au personnel. Nous ne garantissons pas que les produits dcrits dans cette publication conviennent votre application particulire et nous n'assumons aucune responsabilit l'gard de la conception, de l'installation ou du fonctionnement de votre produit. Nos produits ne sont pas insensibles aux dfaillances et ne sont ni conus ni fabriqus pour l'utilisation ou la revente en tant qu'quipement de commande en ligne dans des environnements dangereux ncessitant une scurit absolue, par exemple, l'exploitation d'installations nuclaires, les systmes de navigation arienne ou de communication, le contrle de la circulation arienne, les quipements de survie ou les systmes d'armes, pour lesquels la dfaillance du produit peut provoquer la mort, des blessures corporelles ou de graves dommages matriels ou environnementaux (activits risque lev). La socit Automationdirect.comMC nie toute garantie expresse ou implicite d'aptitude l'emploi en ce qui a trait aux activits risque lev. Pour des renseignements additionnels touchant la garantie et la scurit, veuillez consulter la section Modalits et conditions de notre documentation. Si vous avez des questions au sujet de l'installation ou du fonctionnement de cet quipement, ou encore si vous avez besoin de renseignements supplmentaires, n'hsitez pas nous tlphoner au 770-844-4200. Cette publication s'appuie sur l'information qui tait disponible au moment de l'impression. la socit Automationdirect.com, nous nous efforons constamment d'amliorer nos produits et services. C'est pourquoi nous nous rservons le droit d'apporter des modifications aux produits ou aux publications en tout temps, sans pravis ni quelque obligation que ce soit. La prsente publication peut aussi porter sur des caractristiques susceptibles de ne pas tre offertes dans certaines versions rvises du produit. Marques de commerce La prsente publication peut contenir des rfrences des produits fabriqus ou offerts par d'autres entreprises. Les dsignations des produits et des entreprises peuvent tre des marques de commerce et appartiennent exclusivement leurs propritaires respectifs. Automationdirect.comMC nie tout intrt dans les autres marques et dsignations. Copyright 2002, Automationdirect.com Incorporated Tous droits rservs Nulle partie de ce manuel ne doit tre copie, reproduite ou transmise de quelque faon que ce soit sans le consentement pralable crit de la socit Automationdirect.com Incorporated. Automationdirect.com conserve les droits exclusifs l'gard de tous les renseignements contenus dans le prsent document. DL06 MICRO PLC USER MANUAL Please include the Manual Number and the Manual Issue, both shown below, when communicating with Technical Support regarding this publication. Manual Number: Issue: Issue Date: D0-06USER-M First Edition, Rev. A 10/02 Publication History Issue First Edition Rev. A Date 7/02 10/02 Description of Changes Original Updated drawing images and made minor corrections. VOLUME ONE: TABLE OF CONTENTS Chapter 1: Getting Started Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2 The Purpose of this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12 Supplemental Manuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12 Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12 Conventions Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-3 Key Topics for Each Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13 DL06 Micro PLC Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14 The DL06 PLC Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14 Programming Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14 DirectSOFT32 Programming for Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14 Handheld Programmer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 I/O Quick Selection Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 Quick Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16 Steps to Designing a Successful System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110 Questions and Answers about DL06 Micro PLCs . . . . . . . . . . . . . . . . . . . . . . . . . .112 Chapter 2: Installation, Wiring, and Specifications . . . . . . . . . . . . . . .21 Safety Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 Plan for Safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 Three Levels of Protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 Orderly System Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23 System Power Disconnect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23 Emergency Stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23 Class I, Division 2 Approval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24 Orientation to DL06 Front Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24 Table of Contents Terminal Block Removal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25 Mounting Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26 Unit Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26 Enclosures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26 Panel Layout & Clearances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27 Using Mounting Rails . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28 Environmental Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29 Agency Approvals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29 Wiring Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210 Fuse Protection for Input Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210 External Power Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .211 Planning the Wiring Routes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .211 Fuse Protection for Input and Output Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . .212 I/O Point Numbering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212 System Wiring Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213 PLC Isolation Boundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213 Connecting Operator Interface Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .214 Connecting Programming Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .214 Sinking / Sourcing Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .215 I/O Common Terminal Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .216 Connecting DC I/O to Solid State Field Devices . . . . . . . . . . . . . . . . . . . . . . . . .217 Solid State Input Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .217 Solid State Output Loads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .217 Relay Output Wiring Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .219 Surge Suppression For Inductive Loads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .220 Prolonging Relay Contact Life . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .221 DC Input Wiring Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222 DC Output Wiring Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223 High-Speed I/O Wiring Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224 Glossary of Specification Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225 Wiring Diagrams and Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .226 D006AA I/O Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .226 D006AR I/O Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228 D006DA I/O Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .230 D006DD1 I/O Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .232 D006DD2 I/O Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .234 D006DR I/O Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236 D006DD1D I/O Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .238 ii DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Table of Contents D006DRD I/O Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .240 Discrete Options Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .242 Chapter 3: High-speed Input and Pulse Output Features . . . . . . . . . .31 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 Built-in Motion Control Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 Availability of HSIO Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 Dedicated High- Speed I/O Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 Wiring Diagrams for Each HSIO Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 Choosing the HSIO Operating Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34 Understanding the Six Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34 Default Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 Configuring the HSIO Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36 Configuring Inputs X0 X3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36 Mode 10: High-Speed Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37 Functional Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37 Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38 Interfacing to Counter Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38 Setup for Mode 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39 Presets and Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39 Absolute and Incremental Presets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .310 Preset Data Starting Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .311 Using Fewer than 24 Presets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .311 Equal Relay Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .312 Calculating Your Preset Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .313 X Input Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .314 Writing Your Control Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .315 Program Example 1: Counter Without Presets . . . . . . . . . . . . . . . . . . . . . . . . . . . .316 Program Example Contd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .317 Program Example 2: Counter With Presets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .318 Program Example 3: Counter With Preload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321 Troubleshooting Guide for Mode 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .323 Symptom: The counter does not count. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .323 Symptom: The counter counts but the presets do not function. . . . . . . . . . . . . . .323 Symptom: The counter counts up but will not reset. . . . . . . . . . . . . . . . . . . . . . . .323 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 iii Table of Contents Mode 20: Up/Down Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .324 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .324 Functional Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .324 Quadrature Encoder Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .325 Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .325 Interfacing to Encoder Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326 Setup for Mode 20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .327 Presets and Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .327 X Input Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .328 Mode 20 Up/Down Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .328 Writing Your Control Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .329 Program Example 1 Quadrature Counting with an Interrupt . . . . . . . . . . . . . . . . .330 Program Example: 2 Up/Down Counting with Standard Inputs . . . . . . . . . . . . . . .332 Program Example: 3 Quadrature Counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334 Troubleshooting Guide for Mode 20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .337 Symptom: The counter does not count. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .337 Symptom: The counter counts in the wrong direction . . . . . . . . . . . . . . . . . . . . .337 Symptom: The counter counts up and down but will not reset. . . . . . . . . . . . . . .337 Mode 30: Pulse Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .338 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .338 Functional Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .339 Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .340 Interfacing to Drive Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .340 Motion Profile Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .341 Physical I/O Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .341 Logical I/O Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .341 Setup for Mode 30 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .342 Profile / Velocity Select Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .343 Profile Parameter Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .343 Automatic Trapezoidal Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .343 Step Trapezoidal Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .344 Choosing the Profile Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .345 Automatic Trapezoidal Profile Defined . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .345 Step Trapezoidal Profiles Defined . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .346 Velocity Control Defined . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .346 Automatic Trapezoidal Profile Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .347 Program Example 1: Automatic Trapezoidal Profile . . . . . . . . . . . . . . . . . . . . . . . .348 iv DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Table of Contents Preload Position Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .349 Program Example 2: Automatic Trapezoidal Profile . . . . . . . . . . . . . . . . . . . . . . . .350 Program Example 3: Home Search Automatic Trapezoidal Profile . . . . . . . . . . . . .353 Step Trapezoidal Profile Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .355 Program Example 4: Step Trapezoidal Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356 Velocity Profile Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .359 Program Example 5: Velocity Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .360 Automatic Trapezoidal Profile Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .362 Troubleshooting Guide for Mode 30 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .362 Symptom: The stepper motor does not rotate. . . . . . . . . . . . . . . . . . . . . . . . . . . .362 Symptom: The motor turns in the wrong direction. . . . . . . . . . . . . . . . . . . . . . . .363 Mode 40: High-Speed Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .364 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .364 Functional Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .364 Setup for Mode 40 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .365 Interrupts and the Ladder Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .365 External Interrupt Timing Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .366 Timed Interrupt Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .366 X Input / Timed INT Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .366 Program Example 1: External Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .367 Program Example 2: Timed Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .368 Mode 50: Pulse Catch Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369 Functional Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369 Pulse Catch Timing Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369 When to use Pulse Catch Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .370 Setup for Mode 50 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .370 X Input Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .371 Program Example 1: Pulse Catch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .372 Mode 60: Discrete Inputs with Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373 Functional Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373 Input Filter Timing Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373 Setup for Mode 60 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .374 X Input Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .374 Program Example: Filtered Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .375 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 v Table of Contents Chapter 4: CPU Specifications and Operation . . . . . . . . . . . . . . . . . . .41 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42 DL06 CPU Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42 CPU Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43 CPU Hardware Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44 Communication Port Pinout Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44 Connecting the Programming Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45 CPU Setup Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45 Status Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46 Mode Switch Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46 Changing Modes in the DL06 PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47 Mode of Operation at Power-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47 Using Battery Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48 Enabling the Battery Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48 Auxiliary Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 Clearing an Existing Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 Initializing System Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 Setting Retentive Memory Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .410 Using a Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .411 CPU Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .412 CPU Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .412 Program Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .413 Run Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .413 Read Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .414 Service Peripherals and Force I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .414 CPU Bus Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .415 Update Clock, Special Relays and Special Registers . . . . . . . . . . . . . . . . . . . . . . . .415 Solve Application Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .416 Solve PID Loop Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .416 Write Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .417 Write Outputs to Specialty I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .417 Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .417 I/O Response Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .417 Is Timing Important for Your Application? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .417 Normal Minimum I/O Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .418 Normal Maximum I/O Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .418 vi DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Table of Contents Improving Response Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .419 CPU Scan Time Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .420 Reading Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .420 Writing Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .420 Service Peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .421 CPU Bus Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .421 Update Clock / Calendar, Special Relays, Special Registers . . . . . . . . . . . . . . . . . . .421 Application Program Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .422 PLC Numbering Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .423 PLC Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .423 VMemory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .424 Binary-Coded Decimal Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .424 Hexadecimal Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .424 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .425 Octal Numbering System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .425 Discrete and Word Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .425 V Memory Locations for Discrete Memory Areas . . . . . . . . . . . . . . . . . . . . . . . . . .425 Input Points (X Data Type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .426 Output Points (Y Data Type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .426 Control Relays (C Data Type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .426 Timers and Timer Status Bits (T Data Type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .426 Timer Current Values (V Data Type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .427 Counters and Counter Status Bits (CT Data type) . . . . . . . . . . . . . . . . . . . . . . . . .427 Counter Current Values (V Data Type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .427 Word Memory (V Data Type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .428 Stages (S Data type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .428 Special Relays (SP Data Type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .428 DL06 System V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .429 System Parameters and Default Data Locations (V Data Type) . . . . . . . . . . . . . . . .429 DL06 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .431 X Input / Y Output Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .432 Stage Control / Status Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .433 Control Relay Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .435 Timer Status Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .437 Counter Status Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .437 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 vii Table of Contents Remote I/O Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .438 Module Placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .442 Slot Numbering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .442 Automatic I/O Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .443 Manual I/O Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .443 Power Budgeting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .444 Power supplied . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .444 Power required by base unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .444 Power required by option cards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .444 Configuring the DL06s Comm Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .446 DL06 Port Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .446 DL06 Port Pinouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .446 Choosing a Network Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .447 RS-232 Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .447 RS-485 Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .447 Connecting to MODBUS and DirectNET Networks . . . . . . . . . . . . . . . . . . . . . . . .448 MODBUS Port Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .448 DirectNET Port Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .449 NonSequence Protocol (ASCII In/Out and PRINT) . . . . . . . . . . . . . . . . . . . . . . .450 MODBUS Port Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .450 Network Slave Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .451 MODBUS Function Codes Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .451 Determining the MODBUS Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .451 If Your Host Software Requires the Data Type and Address . . . . . . . . . . . . . . . . . .452 Example 1: V2100 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .453 Example 2: Y20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .453 Example 3: T10 Current Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .453 Example 4: C54 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .453 If Your MODBUS Host Software Requires an Address ONLY . . . . . . . . . . . . . . . . . .454 Example 1: V2100 584/984 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .455 Example 2: Y20 584/984 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .455 Example 3: T10 Current Value 484 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .455 Example 4: C54 584/984 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .455 Determining the DirectNET Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .455 Network Master Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .456 Step 1: Identify Master Port # and Slave # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .457 viii DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Table of Contents Step 2: Load Number of Bytes to Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .457 Step 3: Specify Master Memory Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .458 Step 4: Specify Slave Memory Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .458 Communications from a Ladder Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .459 Multiple Read and Write Interlocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .459 Network Master Operation (using MRX and MWX Instructions) . . . . . . . . . . . . .460 MODBUS Function Codes Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .460 MODBUS Port Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .461 MODBUS Read from Network(MRX) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .462 MRX Slave Memory Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .463 MRX Master Memory Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .463 MRX Number of Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .463 MRX Exception Response Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .463 MODBUS Write to Network (MWX) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .464 MWX Slave Memory Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .465 MWX Master Memory Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .465 MWX Number of Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .465 MWX Exception Response Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .465 MRX / MWX Example in DirectSOFT32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .466 Multiple Read and Write Interlocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .466 Chapter 5: Standard RLL Instructions . . . . . . . . . . . . . . . . . . . . . . . . .51 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52 Using Boolean Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55 END Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55 Simple Rungs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55 Normally Closed Contact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55 Contacts in Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56 Midline Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56 Parallel Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56 Joining Series Branches in Parallel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57 Joining Parallel Branches in Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57 Combination Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57 Comparative Boolean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57 Boolean Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58 Immediate Boolean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 ix Table of Contents Boolean Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .510 Comparative Boolean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .526 Immediate Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .532 Timer, Counter and Shift Register Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . .539 Using Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .539 Timer Example Using Discrete Status Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .541 Timer Example Using Comparative Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . .541 Accumulating Timer Example using Discrete Status Bits . . . . . . . . . . . . . . . . . . . . .543 Accumulator Timer Example Using Comparative Contacts . . . . . . . . . . . . . . . . . . .543 Using Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .544 Counter Example Using Discrete Status Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .546 Counter Example Using Comparative Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . .546 Stage Counter Example Using Discrete Status Bits . . . . . . . . . . . . . . . . . . . . . . . . .548 Stage Counter Example Using Comparative Contacts . . . . . . . . . . . . . . . . . . . . . .548 Up / Down Counter Example Using Discrete Status Bits . . . . . . . . . . . . . . . . . . . .550 Up / Down Counter Example Using Comparative Contacts . . . . . . . . . . . . . . . . . .550 Accumulator / Stack Load and Output Data Instructions . . . . . . . . . . . . . . . . . . .552 Using the Accumulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .552 Copying Data to the Accumulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .552 Changing the Accumulator Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .553 Using the Accumulator Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .554 Using Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .555 Logical Instructions (Accumulator) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .569 Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .586 Transcendental Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5118 Bit Operation Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5120 Number Conversion Instructions (Accumulator) . . . . . . . . . . . . . . . . . . . . . . . . .5127 Shuffle Digits Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5139 Table Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5141 Copy Data From a Data Label Area to V Memory . . . . . . . . . . . . . . . . . . . . . . . .5143 Clock / Calendar Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5171 CPU Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5173 Program Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5175 MLS/MLR Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5182 x DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Table of Contents Interrupt Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5183 Timed Interrupt Program Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5185 Independent Timed Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5185 Message Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5186 Fault Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5186 Data Label Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5188 Direct Text Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5197 Embedding date and/or time variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5198 Embedding V-memory data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5198 Data Format Suffixes for Embedded V-memory Data . . . . . . . . . . . . . . . . . . . . . .5199 Text Entry from V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5200 MODBUS RTU Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5201 MRX Slave Address Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5202 MRX Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5203 MWX Slave Address Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5205 MWX Master Memory Address Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5205 MWX Number of Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5205 MWX Exception Response Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5205 MWX Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5206 ASCII Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5207 Reading ASCII Input Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5207 Writing ASCII Output Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5207 Managing the ASCII Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5208 AFIND Search Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5214 AFIND Example Combined with AEX Instruction . . . . . . . . . . . . . . . . . . . . . . . . .5215 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 xi GETTING STARTED In This Chapter... CHAPTER 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12 Conventions Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13 DL06 Micro PLC Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14 Programming Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14 I/O Quick Selection Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 Quick Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16 Steps to Designing a Successful System . . . . . . . . . . . . . . . . . . . . .110 Questions and Answers about DL06 Micro PLCs . . . . . . . . . . . . . .112 Chapter 1: Getting Started Introduction The Purpose of this Manual Thank you for purchasing a DL06 Micro PLC. This manual shows you how to install, program, and maintain all PLCs in the DL06 family. It also helps you understand how to interface them to other devices in a control system.This manual contains important information for personnel who will install DL06 PLCs and for the PLC programmer. This user manual will provide the information you need to get and keep your system up and running. Supplemental Manuals The D0OPTIONSM manual contains technical information about the option cards available for the DL06 PLCs. This information includes specifications and wiring diagrams that will be indispensable if you use any of the optional I/O or communications cards. If you have purchased one of our operator interface panels or DirectSOFT programming software, you will want to refer to the manuals that are written for these products. Technical Support We strive to make our manuals the best in the industry. We rely on your feedback to let us know if we are reaching our goal. If you cannot find the solution to your particular application, or, if for any reason you need technical assistance, please call us at: 7708444200. Our technical support group will work with you to answer your questions. They are available Monday through Friday from 9:00 A.M. to 6:00 P.M. Eastern Time. We also encourage you to visit our web site where you can find technical and non-technical information about our products and our company. http://www.automationdirect.com If you have a comment, question or suggestion about any of our products, services, or manuals, please fill out and return the Suggestions card that was included with this manual. 12 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 1: Getting Started Conventions Used When you see the notepad icon in the left-hand margin, the paragraph to its immediate right will be a special note. Notes represent information that may make your work quicker or more efficient. The word NOTE: in boldface will mark the beginning of the text. When you see the exclamation point icon in the left-hand margin, the paragraph to its immediate right will be a warning. This information could prevent injury, loss of property, or even death in extreme cases. Any warning in this manual should be regarded as critical information that should be read in its entirety. The word WARNING in boldface will mark the beginning of the text. Key Topics for Each Chapter The beginning of each chapter will list the key topics that can be found in that chapter. Getting Started CHAPTER 1 In This Chapter... General Information .................................................................1-2 Specifications ...........................................................................1-4 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 13 Chapter 1: Getting Started DL06 Micro PLC Overview The DL06 micro PLC family is a versatile product line that combines powerful features and a very compact footprint. The DL06 PLCs offer expandable I/O, high-speed counter, floating point, PID, etc. There are a number of communication options and an optional LCD display. The DL06 PLC Features The DL06 Micro PLC family includes eight different versions. All have the same appearance and CPU performance. The CPU offers an instruction set very similar to our powerful new DL260 CPU including new easy to use ASCII and MODBUS instructions. All DL06 PLCs have two built-in communications ports that can be used for programming, operator interface, networking, etc. Units with DC inputs have selectable high-speed input features on four input points. Units with DC outputs offer selectable pulse output capability on the first and second output points. Details of these features and more are covered in Chapter 4, CPU Specifications and Operation. There are eight versions of the DL06 PLC. The most common industrial I/O types and power supply voltages are available. Consult the following table to find the model number of the PLC that best fits your application. DL06 Micro PLC Family DL06 Part Number D006AA D006AR D006DA D006DD1 D006DD2 D006DR D006DD1D D006DRD Discrete Input Discrete Output External Power Type Type AC AC DC DC DC DC DC DC AC Relay AC DC Sinking DC Sourcing Relay DC Sinking Relay 95240 VAC 95240 VAC 95240 VAC 95240 VAC 95240 VAC 95240 VAC 1224 VDC 1224 VDC High-Speed Input No No Yes Yes Yes Yes Yes Yes Pulse Output No No No Yes Yes No Yes No Programming Methods Two programming methods are available: RLL (Relay Ladder Logic) and RLLPLUS. RLLPLUS combines the added feature of flow chart programming (Stage) to the standard RLL language. Both the DirectSOFT programming package and the handheld programmer support RLLPLUS as well as standard RLL instructions. DirectSOFT32 Programming for Windows The DL06 Micro PLC can be programmed with DirectSOFT32, V4.0 or later, a Windowsbased software package that supports familiar features such as cut-and-paste between applications, point-and-click editing, viewing and editing multiple application programs at the same time, etc. 14 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 1: Getting Started DirectSOFT32 (part number PC-PGMSW) supports the DirectLOGIC CPU families. You can use the full version of DirectSOFT32 to program the DL05, DL06, DL105, DL205, DL305, and DL405. (Upgrade software may be required for new CPUs when they become available). A separate manual discusses DirectSOFT32 programming software. DirectSOFT32 version 4.0 or later is needed to program the DL06. Handheld Programmer All DL06 Micro PLCs have a built-in programming port for use with the handheld programmer (D2HPP), the same programmer used with the DL05, DL105 and DL205 families. The handheld programmer can be used to create, modify and debug your application program. A separate manual discusses the Handheld Programmer. Only D2HPPs with firmware version 2.2 or later will program the DL06. I/O Quick Selection Guide The eight versions of the DL06 have input/output circuits which can interface to a wide variety of field devices. In several instances a particular input or output circuit can interface to either DC or AC voltages, or both sinking and sourcing circuit arrangements. Check this guide to find the proper DL06 Micro PLC to interface to the field devices in your application. I/O Selection Guide DL06 Part Number D006AA D006AR D006DA D006DD1 D006DD2 D006DR D006DD1D D006DRD INPUTS I/O type/ commons Sink/Source AC / 5 AC / 5 DC / 5 DC / 5 DC / 5 DC / 5 DC / 5 DC / 5 Sink or Source Sink or Source Sink or Source Sink or Source Sink or Source Sink or Source Voltage Ranges 90 120 VAC 90 120 VAC 12 24 VDC 12 24 VDC 12 24 VDC 12 24 VDC 12 24 VDC 12 24 VDC OUTPUTS I/O type/ Sink/Source Voltage/ Current Ratings* commons AC / 4 Relay / 4 AC / 4 DC / 4 DC / 4 Relay / 4 DC / 4 Relay / 4 17 240 VAC, 47 63 Hz 0.5A Sink or Source 6 27VDC, 2A 6 240 VAC, 2A Sink 17 240 VAC, 47 63 Hz 0.5A 6 27 VDC, 0.5A (Y0Y1) 6 27 VDC, 1.0A (Y2Y17) 6 27 VDC, 0.5A (Y0Y1) Source 6 27 VDC, 1.0A (Y2Y17) Sink or Source 6 27VDC, 2A 6 240 VAC, 2A 6 27 VDC, 0.5A (Y0Y1) Sink 6 27 VDC, 1.0A (Y2Y17) Sink or Source 6 27 VDC, 2A 6 240 VAC, 2A * See Chapter 2, Specifications for more information about a particular DL06 version. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 15 Chapter 1: Getting Started Quick Start This example is not intended to tell you everything you need to know about programming and starting-up a complex control system. It is only intended to give you an opportunity to demonstrate to yourself and others the basic steps necessary to power up the PLC and confirm its operation. Please look for warnings and notes throughout this manual for important information you will not want to overlook. Step 1: Unpack the DL06 Equipment Unpack the DL06 and gather the parts necessary to build this demonstration system. The recommended components are: DL06 Micro PLC AC power cord or DC power supply Toggle switches (see Step 2 on next page). Hook-up wire, 16-22 AWG DL06 User Manual (this manual) A small screwdriver, 5/8 flat or #1 Philips type You will need at least one of the following programming options: DirectSOFT32 Programming Software V4.0 or later (PC-PGMSW or PC-PGM-BRICK), DirectSOFT32 Manual (included with the software), and a programming cable (D2-DSCBL connects the DL06 to a personal computer) or D2-HPP Handheld Programmer, firmware version 2.20 or later, (comes with programming cable). Please purchase Handheld Programmer Manual D2-HPP-M separately. 0V LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 G AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 Y 0 1 2 D0-06DR 23 X INPUT: 12 - 24V 3 - 15mA PWR RUN CPU TX1 RX1 TX2 RX2 LOGIC K oyo C0 X0 X1 X2 06 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X10 X12 C3 X15 X17 X20 X22 N.C. TERM PORT1 PORT2 RUN STOP 16 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 1: Getting Started Step 2: Connect Switches to Input Terminals To proceed with this quick-start exercise or to follow other examples in this manual, you will need to connect one or more input switches as shown below. If you have DC inputs on an AC-supply DL06, you can use the auxiliary 24VDC supply on the output terminal block or other external 12-24VDC power supply. Be sure to follow the instructions in the accompanying WARNING on this page. D0-06DA, D0-06DD1, D0-06DD2, D0-06DR, D0-DD1-D, and D0-06DR1-D DC Input X4 C1 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 LOGIC K oyo C0 X0 X1 X2 06 X3 12 - 24 VDC + Toggle Switches UL Listed D0-06AA and D0-06AR AC input only LOGIC K oyo C0 X0 X1 X2 06 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 90 - 120 VAC Toggle Switches UL Listed fuse WARNING: Remove power and unplug the DL06 when wiring the switches. Use only UL-approved switches rated for at least 250VAC, 1A for AC inputs. Firmly mount the switches before using. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 17 Chapter 1: Getting Started Step 3: Connect the Power Wiring Connect the power input wiring for the DL06. Observe all precautions stated earlier in this manual. For more details on wiring, see Chapter 2 on Installation, Wiring, and Specifications. When the wiring is complete, close the connector covers. Do not apply power at this time 12 - 24 VDC + fuse Fuse 110/220 VAC Power Input Fuse 12/24 VDC Power Input G LG Y0 Y2 C1 Y5 Y7 Y1 0V AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 OUTPUT: 17-240V 50 - 60Hz 3 4 5 0.5A 6 7 PWR: 100-240V 10 11 12 13 50-60H 14 15 G LG + - N.C. Y0 Y2 C1 Y5 Y7 Y10 Y1 N.C. C0 Y1 Y3 Y4 Y6 C2 Y11 6 - 27V 1.0A 6 7 10 PWR: 12-24 11 12 13 14 20W 15 16 OUTPUT: Sinking Output Y 0 1 2 Y 0 1 2 3 4 5 X INPUT: 90 - 120V 7 - 15mA X INPUT: 12 - 24V 3 - 15mA Step 4: Connect the Programming Device Most programmers will use DirectSOFT32 programming software, Version 4.0 or later, installed on a personal computer. An alternative, if you need a compact portable programming device, is the Handheld Programmer (firmware version 2.20 or later). Both devices will connect to COM port 1 of the DL06 via the appropriate cable. 0V LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 G AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 6-240V Y 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 INPUT: 12 - 24V X 0 1 2 21 22 D0-06DR 23 3 - 15mA PWR RUN CPU TX1 RX1 TX2 RX2 LOGIC C0 X0 K oyo 06 X3 X2 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 X1 TERM PORT1 PORT2 RUN STOP Use cable part # D2DSCBL (cable comes with HPP) 0V LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 G Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. AC(L) AC(N) 24V C0 OUTPUT: 6-240V Y 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 INPUT: 12 - 24V X 0 1 2 21 22 D0-06DR 23 3 - 15mA PWR RUN CPU TX1 RX1 TX2 RX2 LOGIC C0 X0 K oyo 06 X3 X2 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X10 X12 C3 X15 X17 X20 X22 N.C. X1 TERM PORT1 PORT2 RUN STOP For replacement cable, use part # DV1000CBL Note: The Handheld Programmer cannot create or access LCD, ASCII or MODBUS instructions. 18 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 1: Getting Started Step 5: Switch on the System Power Apply power to the system and ensure the PWR indicator on the DL06 is on. If not, remove power from the system and check all wiring and refer to the troubleshooting section in Chapter 9 for assistance. Step 6: Initialize Scratchpad Memory Its a good precaution to always clear the system memory (scratchpad memory) on a new DL06. There are two ways to clear the system memory: In DirectSOFT32, select the PLC menu, then Setup, then Initialize Scratchpad. For additional information, see the DirectSOFT32 Manual. Initializing Scratchpad will return secondary comm port settings and retentive range settings to default. If you have made any changes to these you will need to note these changes and re-enter them after initializing Scratchpad. For the Handheld Programmer, use the AUX key and execute AUX 54. See the Handheld Programmer Manual for additional information. Step 7: Enter a Ladder Program At this point, DirectSOFT32 programmers need to refer to the Quick Start Tutorial in the DirectSOFT32 Manual. There you will learn how to establish a communications link with the DL06 PLC, change CPU modes to Run or Program, and enter a program. If you are learning how to program with the Handheld Programmer, make sure the CPU is in Program Mode (the RUN LED on the front of the DL06 should be off ). If the RUN LED is on, use the MODE key on the Handheld Programmer to put the PLC in Program Mode, then switch to TERM. Enter the following keystrokes on the Handheld Programmer. Equivalent DirectSOFT32 display X0 Y0 OUT CLR C 2 CLR E 4 Clear the Program AUX ENT ENT CLR NEXT $ STR A 0 ENT END GX OUT A 0 ENT Move to the first address and enter X0 contact Enter output Y0 SHFT E 4 N TMR D 3 ENT Enter the END statement After entering the simple example program put the PLC in Run mode by using the Mode key on the Handheld Programmer. The RUN indicator on the PLC will illuminate indicating the CPU has entered the Run mode. If not, repeat this step, ensuring the program is entered properly or refer to the troubleshooting guide in chapter 9. After the CPU enters the run mode, the output status indicator for Y0 should follow the switch status on input channel X0. When the switch is on, the output will be on. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 19 Chapter 1: Getting Started Steps to Designing a Successful System Step 1: Review the Installation Guidelines Always make safety the first priority in any system design. Chapter 2 provides several guidelines that will help you design a safer, more reliable system. This chapter also includes wiring guidelines for the various versions of the DL06 PLC. Step 2: Understand the PLC Setup Procedures The PLC is the heart of your automation system. Make sure you take time to understand the various features and setup requirements. Step 3: Review the I/O Selection Criteria There are many considerations involved when you select your I/O type and field devices. Take time to understand how the various types of sensors and loads can affect your choice of I/O type. + Input PLC Input Sensing Common Step 4: Choose a System Wiring Strategy It is important to understand the various system design options that are available before wiring field devices and field-side power supplies to the Micro PLC. DL06 PLC +24 VDC + AC Power Loads Power Input 16 Outputs 20 Inputs Commons Commons Step 5: Understand the System Operation Before you begin to enter a program, it is very helpful to understand how the DL06 system processes information. This involves not only program execution steps, but also involves the various modes of operation and memory layout characteristics. Power Up Initialize Hardware 110 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 1: Getting Started Step 6: Review the Programming Concepts The DL06 PLC instruction set provides for three main approaches to solving the application program, depicted in the figure below. RLL diagram-style programming is the best tool for solving boolean logic and general CPU register/accumulator manipulation. It includes dozens of instructions, which will also be needed to augment drums and stages. The Timer/Event Drum Sequencer features up to 16 steps and offers both time and/or event-based step transitions. The DRUM instruction is best for a repetitive process based on a single series of steps. Stage programming (also called RLLPlus) is based on state-transition diagrams. Stages divide the ladder program into sections which correspond to the states in a flow chart you draw for your process. Standard RLL Programming (see Chapter 5) Timer/Event Drum Sequencer (see Chapter 6) Stage Programming (see Chapter 7) PushUP RAISE X0 LDD V1076 CMPD K309482 DOWN LIGHT UP SP62 Y0 OUT LOWER Push DOWN After reviewing the programming concepts above, youll be equipped with a variety of tools to write your application program. Step 7: Choose the Instructions Once you have installed the Micro PLC and understand the main programming concepts, you can begin writing your application program. At that time you will begin to use one of the most powerful instruction sets available in a small PLC. TMR K30 CNT K10 CT3 T1 Step 8: Understand the Maintenance and Troubleshooting Procedures Sometimes equipment failures occur when we least expect it. Switches fail, loads short and need to be replaced, etc. In most cases, the majority of the troubleshooting and maintenance time is spent trying to locate the problem. The DL06 Micro PLC has many built-in features such as error codes that can help you quickly identify problems. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 111 Chapter 1: Getting Started Questions and Answers about DL06 Micro PLCs Q. What is the instruction set like? A. The instruction set is very close to that of our DL260 CPU. The DL06 instructions include the drum sequencing instruction, networking, ASCII, MODBUS, LCD and High-Speed I/O capabilities. High-Speed inputs are available on units with DC inputs only; high-speed outputs are available on units with DC outputs only. Q. Do I have to buy the full DirectSOFT32 programming package to program the DL06? A. No. We offer a version of DirectSOFT32 just for our micro PLC products, PC-PGM-BRICK, and its very affordable. Q. Is the DL06 expandable? A. Yes, the DL06 series function as stand-alone PLCs. However, option card slots allow you to expand the system without changing the footprint. Q. Does the DL06 have motion control capability? A. Yes, the DL06 has limited motion control capabilities. The High-Speed I/O features offer either encoder inputs with high-speed counting and presets with interrupt, or a pulse/direction output for stepper control. Three types of motion profiles are available, which are explained in Chapter 3. Q. Are the ladder programs stored in a removable EEPROM? A. No. The DL06 contains a non-removable FLASH memory for program storage, which may be written and erased thousands of times. You may transfer programs to/from DirectSOFT32 on a PC. Q. Does the DL06 contain fuses for its outputs? A. There are no output circuit fuses. Therefore, we recommend fusing each channel, or fusing each common. See Chapter 2 for I/O wiring guidelines. Q. Is the DL06 Micro PLC U.L. approved? A. The Micro PLC has met the requirements of UL (Underwriters Laboratories, Inc.), and CUL (Canadian Underwriters Laboratories, Inc.). See our website, www.Automationdirect.com, for complete details. Q. Does the DL06 Micro PLC comply with European Union (EU) Directives? A. The Micro PLC has met the requirements of the European Union Directives (CE). See our website, www.Automationdirect.com, for complete details 112 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 1: Getting Started Q. Which devices can I connect to the communication ports of the DL06? A. Port 1: The port is RS-232C, fixed at 9600 baud, odd parity, address 1,and uses the proprietary K-sequence protocol. The DL06 can also connect to MODBUS RTU and DirectNET networks as a slave device through port 1. The port communicates with the following devices: DV-1000 Data Access Unit, EZTouch, EZText, DirectTouch, LookoutDirect, DSData or Optimation Operator interface panels DirectSOFT32 (running on a personal computer) D2-HPP handheld programmer Other devices which communicate via K-sequence, Directnet, MODBUS RTU protocols should work with the DL06 Micro PLC. Contact the vendor for details. A. Port 2: This is a multi-function port. It supports RS-232C, RS422, or RS485, with selective baud rates (300-38,400bps), address and parity. It also supports the proprietary Ksequence protocol as well as DirectNet and MODBUS RTU, ASCII In/Out and nonsequence/print protocols. Q. Can the DL06 accept 5VDC inputs? A. No, 5 volts is lower than the DC input ON threshold. However, many TTL logic circuits can drive the inputs if they are wired as open collector (sinking) inputs. See Chapter 2 for I/O wiring guidelines. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 113 INSTALLATION, WIRING, AND SPECIFICATIONS In This Chapter... CHAPTER 2 Safety Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 Orientation to DL06 Front Panel . . . . . . . . . . . . . . . . . . . . . . . . . . .24 Mounting Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26 Wiring Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210 System Wiring Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213 Glossary of Specification Terms . . . . . . . . . . . . . . . . . . . . . . . . . . .225 Wiring Diagrams and Specifications . . . . . . . . . . . . . . . . . . . . . . . .226 Chapter 2: Installation, Wiring, and Specifications Safety Guidelines NOTE: Products with CE marks perform their required functions safely and adhere to relevant standards as specified by CE directives provided they are used according to their intended purpose and that the instructions in this manual are adhered to. The protection provided by the equipment may be impaired if this equipment is used in a manner not specified in this manual. A listing of our international affiliates is available on our Web site: http://www.automationdirect.com WARNING: Providing a safe operating environment for personnel and equipment is your responsibility and should be your primary goal during system planning and installation. Automation systems can fail and may result in situations that can cause serious injury to personnel or damage to equipment. Do not rely on the automation system alone to provide a safe operating environment. You should use external electro-mechanical devices, such as relays or limit switches, that are independent of the PLC application to provide protection for any part of the system that may cause personal injury or damage. Every automation application is different, so there may be special requirements for your particular application. Make sure you follow all national, state, and local government requirements for the proper installation and use of your equipment. Plan for Safety The best way to provide a safe operating environment is to make personnel and equipment safety part of the planning process. You should examine every aspect of the system to determine which areas are critical to operator or machine safety. If you are not familiar with PLC system installation practices, or your company does not have established installation guidelines, you should obtain additional information from the following sources. NEMA The National Electrical Manufacturers Association, located in Washington, D.C., publishes many different documents that discuss standards for industrial control systems. You can order these publications directly from NEMA. Some of these include: ICS 1, General Standards for Industrial Control and Systems ICS 3, Industrial Systems ICS 6, Enclosures for Industrial Control Systems NEC The National Electrical Code provides regulations concerning the installation and use of various types of electrical equipment. Copies of the NEC Handbook can often be obtained from your local electrical equipment distributor or your local library. Local and State Agencies many local governments and state governments have additional requirements above and beyond those described in the NEC Handbook. Check with your local Electrical Inspector or Fire Marshall office for information. Three Levels of Protection The publications mentioned provide many ideas and requirements for system safety. At a minimum, you should follow these regulations. Also, you should use the following techniques, which provide three levels of system control. Orderly system shutdown sequence in the PLC control program Mechanical disconnect for output module power Emergency stop switch for disconnecting system power 22 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications Orderly System Shutdown The first level of fault detection is ideally the PLC control program, which can identify machine problems. You must shutdown sequences that must be performed. These types of problems are usually things such as jammed parts, etc. that do not pose a risk of personal injury or equipment damage. WARNING: The control program must not be the only form of protection for any problems that may result in a risk of personal injury or equipment damage. Jam Detect Turn off Saw RST RST System Power Disconnect Retract You should also use electro-mechanical devices, such as master control relays and/or limit switches, to prevent accidental equipment startup at an unexpected time. These devices should be installed in such a manner to prevent any machine operations from occurring. For example, if the machine has a jammed part the PLC control program can turn off the saw blade and retract the arbor. However, since the operator must open the guard to remove the part, you should also include a bypass switch that disconnects all system power any time the guard is opened. Emergency Stop The machinery must provide a quick manual method of disconnecting all system power. The disconnect device or switch must be clearly labeled Emergency Stop. Use E-Stop and Master Relay Guard Line Switch Emergency Stop E STOP Power On Guard Link Master Relay To Disconnect PLC Power Master Relay Contacts LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 G 0V Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. AC(L) AC(N) 24V C0 OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 Y 0 1 2 D0-06DR 23 X INPUT: 12 - 24V 3 - 15mA PWR RUN CPU TX1 RX1 TX2 RX2 LOGIC K oyo C0 X0 X1 X2 06 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 TERM PORT1 PORT2 RUN STOP To disconnect PLC output circuit ry Saw Arbor After an Emergency shutdown or any other type of power interruption, there may be requirements that must be met before the PLC control program can be restarted. For example, there may be specific register values that must be established (or maintained from the state prior to the shutdown) before operations can resume. In this case, you may want to use retentive memory locations, or include constants in the control program to ensure a known starting point. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 23 Chapter 2: Installation, Wiring, and Specifications Class 1, Division 2 Approval This equipment is suitable for use in Class 1, Division 2, groups A, B, C and D or nonhazardous locations only. WARNING: Explosion Hazard! Substitution of components may impair suitability for Class 1, Division 2. Do not disconnect equipment unless power has been switched off or area is known to be nonhazardous. Orientation to DL06 Front Panel Most connections, indicators, and labels on the DL06 Micro PLCs are located on its front panel. The communication ports are located on front of the PLC as are the option card slots and the mode selector switch. Please refer to the drawing below. Power Inputs Mounting Tab Discrete Outputs Output Status Indicators Output Circuit Power Input (for DC output versions only) Status Indicators G LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 0V AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 Y 0 1 2 D0-06DR 23 X INPUT: 12 - 24V 3 - 15mA Communication Ports PWR RUN CPU TX1 RX1 TX2 RX2 LOGIC K oyo C0 X0 X1 X2 06 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 TERM PORT1 PORT2 RUN STOP Discrete Inputs Input Status Indicators Option Slots Mode Switch Mounting Tab The output and power connector accepts external power and logic and chassis ground connections on the indicated terminals. The remaining terminals are for connecting commons and output connections Y0 through Y17. The sixteen output terminals are numbered in octal, Y0-Y7 and Y10-Y17. On DC output units, the end terminal on the right accepts power for the output stage. The input side connector provides the location for connecting the inputs X0 and X23 and the associated commons. WARNING: For some applications, field device power may still be present on the terminal block even though the Micro PLC is turned off. To minimize the risk of electrical shock, check all field device power before you expose or remove either connector 24 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications Terminal Block Removal The DL06 terminals are divided into two groups. Each group has its own terminal block. The outputs and power wiring are on one block, and the input wiring is on the other. In some instances, it may be desirable to remove the terminal block for easy wiring. The terminal block is designed for easy removal with just a small screwdriver. The drawing below shows the procedure for removing one of the terminal blocks. 1. Loosen the retention screws on each end of the connector block. G LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 0V AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 Y 0 1 2 D0-06DR 23 X INPUT: 12 - 24V 3 - 15mA PWR RUN CPU TX1 RX1 TX2 RX2 LOGIC K oyo C0 X0 X1 X2 06 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 TERM PORT1 PORT2 RUN STOP 2. From the center of the connector block, pry upward with the screwdriver until the connector is loose. The terminal blocks on DL06 PLCs have regular (m3 size) screw terminals, which will accept either standard blade-type or #1 Philips screwdriver tips. You can insert one 16 AWG wire under a terminal, or two 18 AWG wires (one on each side of the screw). Be careful not to over-tighten; maximum torque is 6 inch/ounces. Spare terminal blocks are available in an accessory kit. Please refer to part number D0-ACC-2. You can find this and other accessories on our web site. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 25 Chapter 2: Installation, Wiring, and Specifications Mounting Guidelines In addition to the panel layout guidelines, other specifications can affect the installation of a PLC system. Always consider the following: Environmental Specifications Power Requirements Agency Approvals Enclosure Selection and Component Dimensions Unit Dimensions The following diagram shows the outside dimensions and mounting hole locations for all versions of the DL06. Make sure you follow the installation guidelines to allow proper spacing from other components. Enclosures Your selection of a proper enclosure is important to ensure safe and proper operation of your DL06 system. Applications of DL06 systems vary and may require additional features. The minimum considerations for enclosures include: Conformance to electrical standards Protection from the elements in an industrial environment Common ground reference Maintenance of specified ambient temperature Access to equipment Security or restricted access Sufficient space for proper installation and maintenance of equipment 26 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications Panel Layout & Clearances There are many things to consider when designing the panel layout. The following items correspond to the diagram shown. Note: there may be additional requirements, depending on your application and use of other components in the cabinet. 1. Mount the PLCs horizontally as shown below to provide proper ventilation. You cannot mount the DL06 units vertically, upside down, or on a flat horizontal surface. If you place more than one unit in a cabinet, there must be a minimum of 7.2 (183mm) between the units. 2. Provide a minimum clearance of 1.5 (39mm) between the unit and all sides of the cabinet. Note, remember to allow for any operator panels or other items mounted in the door. 3. There should also be at least 3 (78mm) of clearance between the unit and any wiring ducts that run parallel to the terminals. Note: There is a minimum clearance requirement of 1.5 (38mm) between the panel door (or any devices mounted in the panel door) and the nearest DL06 component. Ground braid copper lugs Panel Panel or single point ground 1.5" 38mm min Temperature Probe Star Washers Star Washers Power Source 4. The ground terminal on the 1.5" 38mm DL06 base must be connected min to a single point ground. Use copper stranded wire to achieve 1.5" Eart a low impedance. Copper eye lugs Pan h Gr 38mm el G oun min roun d should be crimped and soldered to the ends of d Te rmin al the stranded wire to ensure good surface contact. 5. There must be a single point ground (i.e. copper bus bar) for all devices in the panel requiring an earth ground return. The single point of ground must be connected to the panel ground termination. The panel ground termination must be connected to earth ground. Minimum wire sizes, color coding, and general safety practices should comply with appropriate electrical codes and standards for your area. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 27 Chapter 2: Installation, Wiring, and Specifications 6. A good common ground reference (Earth ground) is essential for proper operation of the DL06. One side of all control and power circuits and the ground lead on flexible shielded cable must be properly connected to Earth ground. There are several methods of providing an adequate common ground reference, including: a) Installing a ground rod as close to the panel as possible. b) Connection to incoming power system ground. 7. Evaluate any installations where the ambient temperature may approach the lower or upper limits of the specifications. If you suspect the ambient temperature will not be within the operating specification for the DL06 system, measures such as installing a cooling/heating source must be taken to get the ambient temperature within the range of specifications. 8. The DL06 systems are designed to be powered by 95-240 VAC or 1224 VDC normally available throughout an industrial environment. Electrical power in some areas where the PLCs are installed is not always stable and storms can cause power surges. Due to this, powerline filters are recommended for protecting the DL06 PLCs from power surges and EMI/RFI noise. The Automation Powerline Filter, for use with 120 VAC and 240 VAC, 15 Amps, is an excellent choice (locate at www.automationdirect.com), however, you can use a filter of your choice. These units install easily between the power source and the PLC. NOTE: If you are using other components in your system, make sure you refer to the appropriate manual to determine how those units can affect mounting dimensions. Using Mounting Rails DL06 Micro PLCs can be secured to a panel by using mounting rails. We recommend rails that conform to DIN EN standard 50 022. They are approximately 35mm high, with a depth of 7mm. If you mount the Micro PLC on a rail, do consider using end brackets on each side of the PLC. The end bracket helps keep the PLC from sliding horizontally along the rail, reducing the possibility of accidentally pulling the wiring loose. On the bottom of the PLC are two small retaining clips. To secure the PLC to a DIN rail, place it onto the rail and gently push up on the clips to lock it onto the rail. To remove the PLC, pull down on the retaining clips, lift up on the PLC slightly, then pull it away from the rail. 28 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications DIN Rail Dimensions 7mm DIN rail slot is designed for 35mm X 7mm rail conforming to DIN EN 50022 35mm Retaining Clip NOTE: Refer to our catalog or web site for a complete listing of DINnector connection systems. Environmental Specifications The following table lists the environmental specifications that generally apply to DL06 Micro PLCs. The ranges that vary for the Handheld Programmer are noted at the bottom of this chart. Certain output circuit types may have derating curves, depending on the ambient temperature and the number of outputs ON. Please refer to the appropriate section in this chapter pertaining to your particular DL06 PLC. Environmental Specifications Specification Storage temperature Ambient operating temperature* Ambient humidity** Vibration resistance Shock resistance Noise immunity Atmosphere Agency approvals Rating 4 F to 158 F (20 C to 70 C) 32 F to 131 F (0 C to 55 C) 5% 95% relative humidity (noncondensing) MIL STD 810C, Method 514.2 MIL STD 810C, Method 516.2 NEMA (ICS3304) No corrosive gases UL, CE (C1D2), FCC class A * Operating temperature for the Handheld Programmer and the DV1000 is 32 to 122 F (0 to 50 C) Storage temperature for the Handheld Programmer and the DV1000 is 4 to 158 F (20 to70 C). **Equipment will operate down to 5% relative humidity. However, static electricity problems occur much more frequently at low humidity levels (below 30%). Make sure you take adequate precautions when you touch the equipment. Consider using ground straps, antistatic floor coverings, etc. if you use the equipment in low-humidity environments. Agency Approvals Some applications require agency approvals for particular components. The DL06 Micro PLC agency approvals are listed below: UL (Underwriters Laboratories, Inc.) CUL (Canadian Underwriters Laboratories, Inc.) CE (European Economic Union) DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 29 Chapter 2: Installation, Wiring, and Specifications Wiring Guidelines Connect the power input wiring for the DL06. Observe all precautions stated earlier in this manual. For more details on wiring, see Chapter 2 on Installation, Wiring, and Specifications. When the wiring is complete, close the connector covers. Do not apply power at this time. 12 - 24 VDC + Fuse Fuse fuse 110/220 VAC Power Input 12/24 VDC Power Input G Y0 Y2 C1 Y5 Y7 LG 0V AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C OUTPUT: 17-240V 50 - 60Hz 3 4 5 0.5A 6 7 PWR: 100-240V 10 11 12 13 50 14 G LG + - N.C. Y0 Y2 C1 Y5 Y7 N.C. C0 Y1 Y3 Y4 Y6 6 - 27V 1.0A 6 7 10 PWR: 12-24 11 12 13 14 OUTPUT: Sinking Output Y 0 1 2 Y 0 1 2 3 4 5 X INPUT: 90 - 120V 7 - 15mA X INPUT: 12 - 24V 3 - 15mA WARNING: Once the power wiring is connected, secure the terminal block cover in the closed position. When the cover is open there is a risk of electrical shock if you accidentally touch the connection terminals or power wiring. Fuse Protection for Input Power There are no internal fuses for the input power circuits, so external circuit protection is needed to ensure the safety of service personnel and the safe operation of the equipment itself. To meet UL/CUL specifications, the input power must be fused. Depending on the type of input power being used, follow these fuse protection recommendations: 208/240 VAC Operation When operating the unit from 208/240 VAC, whether the voltage source is a step-down transformer or from two phases, fuse both the line (L) and neutral (N) leads. The recommended fuse size is 1.0A (fast blow). 110/125 VAC Operation When operating the unit from 110/125 VAC, it is only necessary to fuse the line (L) lead; it is not necessary to fuse the neutral (N) lead. The recommended fuse size is 1.0A (fast blow). 210 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications 12/24 VDC Operation When operating at these lower DC voltages, wire gauge size is just as important as proper fusing techniques. Using large conductors minimizes the voltage drop in the conductor. Each DL06 input power terminal can accommodate one 16 AWG wire or two 18 AWG wires. A DC failure can maintain an arc for much longer time and distance than AC failures. Typically, the main bus is fused at a higher level than the branch device, which in this case is the DL06. The recommended fuse size for the branch circuit to the DL06 is 1.5A (for example, a Littlefuse 312.001 or equivalent). External Power Source The power source must be capable of suppling voltage and current complying with individual Micro PLC specifications, according to the following specifications: Power Source Specifications Item Input Voltage Range Maximum Inrush Current Maximum Power Voltage Withstand (dielectric) Insulation Resistance DL06 VAC Powered Units DL06 VDC Powered Units 110/220 VAC (95240 VAC) 1224 VDC (10.826.4 VDC) 13 A, 1ms (95240 VAC) 10A 15 A, 1ms (240264 VAC) 30 VA 20 W 1 minute @ 1500 VAC between primary, secondary, field ground > 10 M at 500 VDC NOTE: The rating between all internal circuits is BASIC INSULATION ONLY. Planning the Wiring Routes The following guidelines provide general information on how to wire the I/O connections to DL06 Micro PLCs. For specific information on wiring a particular PLC refer to the corresponding specification sheet which appears later in this chapter. 1. Each terminal connection of the DL06 PLC can accept one 16 AWG wire or two 18 AWG size wires. Do not exceed this recommended capacity. NOTE: Recommended wire size for field devices is 16 - 22 AWG solid/stranded. Tighten terminal screws to 7.81 lb-in (0.882 N*m) to 9.03 lb-in (1.02 N*m). 2. Always use a continuous length of wire. Do not splice wires to attain a needed length. 3. Use the shortest possible wire length. 4. Use wire trays for routing where possible. 5. Avoid running wires near high energy wiring. 6. Avoid running input wiring close to output wiring where possible. 7. To minimize voltage drops when wires must run a long distance , consider using multiple wires for the return line. 8. Avoid running DC wiring in close proximity to AC wiring where possible. 9. Avoid creating sharp bends in the wires. 10. Install the recommended powerline filter to reduce power surges and EMI/RFI noise. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 211 Chapter 2: Installation, Wiring, and Specifications Fuse Protection for Input and Output Circuits Input and Output circuits on DL06 Micro PLCs do not have internal fuses. In order to protect your Micro PLC, we suggest you add external fuses to your I/O wiring. A fast-blow fuse, with a lower current rating than the I/O banks common current rating can be wired to each common. Or, a fuse with a rating of slightly less than the maximum current per output point can be added to each output. Refer to the Micro PLC specification sheets further in this chapter to find the maximum current per output point or per output common. Adding the external fuse does not guarantee the prevention of Micro PLC damage, but it will provide added protection. 0V LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 G AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 Y X 0 1 2 D0-06DR 23 INPUT: 12 - 24V 3 - 15mA PWR RUN CPU TX1 RX1 TX2 RX2 LOGIC C0 X0 K oyo 06 X3 X2 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 X1 TERM PORT1 PORT2 RUN STOP I/O Point Numbering All DL06 Micro PLCs have a fixed I/O configuration. It follows the same octal numbering system used on other DirectLogic family PLCs, starting at X0 and Y0. The letter X is always used to indicate inputs and the letter Y is always used for outputs. The I/O numbering always starts at zero and does not include the digits 8 or 9. The addresses are typically assigned in groups of 8 or 16, depending on the number of points in an I/O group. For the DL06 the twenty inputs use reference numbers X0 X23. The sixteen output points use references Y0 Y17. 212 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications System Wiring Strategies The DL06 Micro PLC is very flexible and will work in many different wiring configurations. By studying this section before actual installation, you can probably find the best wiring strategy for your application. This will help to lower system cost, wiring errors, and avoid safety problems. PLC Isolation Boundaries PLC circuitry is divided into three main regions separated by isolation boundaries, shown in the drawing below. Electrical isolation provides safety, so that a fault in one area does not damage another. A powerline filter will provide isolation between the power source and the power supply. A transformer in the power supply provides magnetic isolation between the primary and secondary sides. Opto-couplers provide optical isolation in Input and Output circuits. This isolates logic circuitry from the field side, where factory machinery connects. Note that the discrete inputs are isolated from the discrete outputs, because each is isolated from the logic side. Isolation boundaries protect the operator interface (and the operator) from power input faults or field wiring faults. When wiring a PLC, it is extremely important to avoid making external connections that connect logic side circuits to any other. Power Input 16 Discrete Outputs Output circuit LCD monitor Power Supply Isolation boundary CPU 4 Optional card slots Input circuit 2 comm. ports 20 discrete Inputs To programming device or Operator interface The next figure shows the internal layout of DL06 PLCs, as viewed from the front panel. To Programming Device or Operator Interface DL06 PLC CPU Main Power Supply Input Circuit Power Input 2 Comm. Ports Output Circuit 20 Discrete Inputs Commons 16 Discrete Outputs Commons DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 213 Chapter 2: Installation, Wiring, and Specifications Connecting Operator Interface Devices Operator interfaces require data and power connections. Operator interfaces with a large CRT usually require separate AC power. However, small operator interface devices like the popular DV-1000 Data Access Unit may be powered directly from the DL06 Micro PLC. Connect the DV-1000 to communication port 1 on the DL06 Micro PLC using the cable shown below. A single cable contains transmit/receive data wires and +5V power. DL06 Micro PLC DV-1000 0V G LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 Y X 0 1 2 D0-06DR 23 INPUT: 12 - 24V 3 - 15mA PWR RUN CPU TX1 RX1 TX2 RX2 RJ12 phone style RJ12 phone style LOGIC C0 X0 K oyo 06 X3 X2 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 X1 TERM PORT1 PORT2 RUN STOP Use cable part no. DV1000CBL EZ-Touch and EZ-Text operator interface panels require separate power and communications connections. Connect the DL06 to the proper D-shell connector on the rear of the operator panel using the cable shown below. These panels require 830VDC power. DL06 Micro PLC 15-pin VGA male 15-pin D-shell male LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 0V G Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. AC(L) AC(N) 24V C0 OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 Y X 0 1 2 D0-06DR 23 INPUT: 12 - 24V 3 - 15mA PWR RUN CPU TX1 RX1 TX2 RX2 LOGIC C0 X0 K oyo 06 X3 X2 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 X1 TERM PORT1 PORT2 RUN STOP Use cable part no. EZ-2CBL-1 Connecting Programming Devices DL06 Micro PLCs can be programmed with either a handheld programmer or with DirectSOFT32 on a PC. Connect the DL06 to a PC using the cable shown below. DL06 Micro PLC RJ12 phone style 0V LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 G AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 9-pin D-shell female Y X 0 1 2 D0-06DR 23 INPUT: 12 - 24V 3 - 15mA PWR RUN CPU TX1 RX1 TX2 RX2 LOGIC C0 X0 K oyo 06 X3 X2 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 X1 TERM PORT1 PORT2 RUN STOP Use cable part no. D2DSCBL The D2-HPP Handheld Programmer comes with a communications cable. For a replacement part, use the cable shown below. DL06 Micro PLC RJ12 phone style RJ12 phone style D2HPP 0V LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 G AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 Y X 0 1 2 D0-06DR 23 INPUT: 12 - 24V 3 - 15mA PWR RUN CPU TX1 RX1 TX2 RX2 LOGIC C0 X0 K oyo 06 X3 X2 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 (cable comes with HPP) TERM PORT1 PORT2 RUN STOP X1 For replacement cable, use part no. DV1000CBL 214 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications Sinking / Sourcing Concepts Before going further in our presentation of wiring strategies, we need to introduce the concepts of sinking and sourcing. These terms apply to typical input or output circuits. It is the goal of this section to make these concepts easy to understand. First we give the following short definitions, followed by practical applications. Sinking = Path to supply ground () Sourcing = Path to supply source (+) Notice the reference to (+) and () polarities. Sinking and sourcing terminology applies only to DC input and output circuits. Input and output points that are either sinking or sourcing can conduct current in only one direction. This means it is possible to connect the external supply and field device to the I/O point with current trying to flow in the wrong direction, and the circuit will not operate. However, we can successfully connect the supply and field device every time by understanding sourcing and sinking. For example, the figure to the right depicts a sinking input. To properly connect the external supply, we just have to connect it so the the input provides a path to ground (). So, we start at the PLC input terminal, follow through the input sensing circuit, exit at the common PLC Input terminal, and connect the supply () to the (sinking) common terminal. By adding the switch, between the supply (+) and the input, we have completed + Input the circuit. Current flows in the direction of the Sensing arrow when the switch is closed. Common By applying the circuit principle above to the four possible combinations of input/output sinking/sourcing types, we have the four circuits as shown below. The DC-powered DL06 Micro PLCs have selectable sinking or sourcing inputs and either sinking or sourcing outputs. Any pair of input/output circuits shown below is possible with one of the DL06 models. Sinking Input Input + Common Input Sensing PLC Sinking Output PLC Output Load + Output Switch Common Sourcing Input Common + Input PLC Input Sensing Sourcing Output PLC Common + Output Switch Output Load DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 215 Chapter 2: Installation, Wiring, and Specifications I/O Common Terminal Concepts In order for a PLC I/O circuit to operate, current must enter at one terminal and exit at another. This means at least two terminals are associated with every I/O point. In the figure to the right, the input or output terminal is the main path for the current. One additional terminal must provide the return path to the power supply. Most input or output point groups on PLCs share the return path among two or more I/O points. The figure to the right shows a group (or bank) of 4 input points which share a common return path. In this way, the four inputs require only five terminals instead of eight. Note: In the circuit to the right, the current in the common path is 4 times any channels input current when all inputs are energized. This is especially important in output circuits, where heavier gauge wire is sometimes necessary on commons. Field Device + Return Path Main Path (I/O point) PLC I/O Circuit PLC Input Sensing Input 1 Input 2 Input 3 Input 4 + Common Most DL06 input and output circuits are grouped into banks that share a common return path. The best indication of I/O common grouping is on the wiring label. The I/O common groups are separated by a bold line. A thinner line separates the inputs associated with that common. To the right, notice that X0, X1, X2, and X3 share the common terminal C0, located to the left of X1. The following complete set of labels shows five banks of four inputs and four banks of four outputs. One common is provided for each bank. G LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 0V AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. C0 X0 X1 X2 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 This set of labels is for DC (sinking) output versions such as the D0-06DD1 and D0-06DD1-D. One common is provided for each group of four outputs, and one designated terminal on the output side accepts power for the output stage. G 0V LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 +V C0 X0 X1 X2 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 216 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications Connecting DC I/O to Solid State Field Devices In the previous section on sinking and sourcing concepts, we discussed DC I/O circuits that only allow current to flow one way. This is also true for many of the field devices which have solid-state (transistor) interfaces. In other words, field devices can also be sourcing or sinking. When connecting two devices in a series DC circuit (as is the case when wiring a field device to a PLC DC input or output), one must be wired as sourcing and the other as sinking. Solid State Input Sensors The DL06s DC inputs are flexible in that they detect current flow in either direction, so they can be wired as either sourcing or sinking. In the following circuit, a field device has an opencollector NPN transistor output. It sinks current from the PLC input point, which sources current. The power supply can be the included auxiliary 24 VDC power supply or another supply (+12 VDC or +24VDC), as long as the input specifications are met. Field Device Output (sinking) Supply Ground Input (sourcing) PLC DC Input + Common In the next circuit, a field device has an open-emitter PNP transistor output. It sources current to the PLC input point, which sinks the current back to ground. Since the field device is sourcing current, no additional power supply is required between the device and the PLC DC Input. Field Device => Input (sinking) Output (sourcing) Ground Common PLC DC Input Solid State Output Loads Sometimes an application requires connecting a PLC output point to a solid state input on a device. This type of connection is usually made to carry a low-level signal, not to send DC power to an actuator. The DL06 PLC family offers DC outputs that are sinking only or DC outputs that are sourcing. All sixteen outputs have the same electrical common, even though there are four common terminal screws. In the following circuit, the PLC output point sinks current to the output common when energized. It is connected to a sourcing input of a field device input. PLC DC Output +DC Power Power Output (sinking) Common + 2 .25 > Input (sourcing) Ground Field Device => DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 217 Chapter 2: Installation, Wiring, and Specifications In the next example we connect a PLC DC output point to the sinking input of a field device. This is a bit tricky, because both the PLC output and field device input are sinking type. Since the circuit must have one sourcing and one sinking device, we add sourcing capability to the PLC output by using a pull-up resistor. In the circuit below, we connect Rpull-up from the output to the DC output circuit power input. PLC DC Output +DC pwr Power Field Device Input (sinking) Ground R (sinking) pull-up (sourcing) + Supply Output R input Common NOTE: DO NOT attempt to drive a heavy load (>25 mA) with this pull-up method. NOTE 2: Using the pull-up resistor to implement a sourcing output has the effect of inverting the output point logic. In other words, the field device input is energized when the PLC output is OFF, from a ladder logic point-of-view. Your ladder program must comprehend this and generate an inverted output. Or, you may choose to cancel the effect of the inversion elsewhere, such as in the field device. It is important to choose the correct value of R pull-up. In order to do so, we need to know the nominal input current to the field device (I input) when the input is energized. If this value is not known, it can be calculated as shown (a typical value is 15 mA). Then use I input and the voltage of the external supply to compute R pull-up. Then calculate the power Ppullup (in watts), in order to size R pull-up properly. I input = V input (turnon) R input V supply 0.7 I input R pull-up = R input P pull-up = V supply R pullup 2 218 DL05 Micro PLC User Manual Chapter 2: Installation, Wiring, and Specifications Relay Output Wiring Methods The D006AR and the D006DR models feature relay outputs. Relays are best for the following applications: Loads that require higher currents than the solid-state DL06 outputs can deliver Cost-sensitive applications Some output channels need isolation from other outputs (such as when some loads require AC while others require DC) Some applications in which NOT to use relays: Loads that require currents under 10 mA Loads which must be switched at high speed and duty cycle This section presents various ways to wire relay outputs to the loads. The relay output DL06s have sixteen normally-open SPST relays available. They are organized with four relays per common. The figure below shows the relays and the internal wiring of the PLC. Note that each group is isolated from the other group of outputs. Y0 Common Y1 Y2 Y3 Y4 Common Y5 Y6 Y7 In the circuit below, all loads use the same AC power supply which powers the DL06 PLC. In this example, all commons are connected together. fuse L L L L L L L L L L L L L L L L G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 Y 0 1 2 D0-06AR 23 X INPUT: 90 - 120V 7 - 15mA In the circuit on the following page, loads for Y0 Y3 use the same AC power supply which powers the DL06 PLC. Loads for Y4 Y7 use a separate DC supply. In this example, the commons are separated according to which supply powers the associated load. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 219 Chapter 2: Installation, Wiring, and Specifications +24 VDC fuse L fuse N - + L L L L L L L L G 0V LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 Y 0 1 2 D0-06AR 23 X INPUT: 90 - 120V 7 - 15mA LOGIC K oyo C0 X0 X1 X2 06 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 AC Supply Surge Suppression For Inductive Loads Inductive load devices (devices with a coil) generate transient voltages when de-energized with a relay contact. When a relay contact is closed it bounces, which energizes and de-energizes the coil until the bouncing stops. The transient voltages generated are much larger in amplitude than the supply voltage, especially with a DC supply voltage. When switching a DC-supplied inductive load the full supply voltage is always present when the relay contact opens (or bounces). When switching an AC-supplied inductive load there is one chance in 60 (60 Hz) or 50 (50 Hz) that the relay contact will open (or bounce) when the AC sine wave is zero crossing. If the voltage is not zero when the relay contact opens there is energy stored in the inductor that is released when the voltage to the inductor is suddenly removed. This release of energy is the cause of the transient voltages. When inductive load devices (motors, motor starters, interposing relays, solenoids, valves, etc.) are controlled with relay contacts, it is recommended that a surge suppression device be connected directly across the coil of the field device. If the inductive device has plug-type connectors, the suppression device can be installed on the terminal block of the relay output. Transient Voltage Suppressors (TVS or transorb) provide the best surge and transient suppression of AC and DC powered coils, providing the fastest response with the smallest overshoot. Metal Oxide Varistors (MOV) provide the next best surge and transient suppression of AC and DC powered coils. For example, the waveform in the figure below shows the energy released when opening a contact switching a 24 VDC solenoid. Notice the large voltage spike. +24 VDC +24 VDC 24 VDC Module Relay Contact 324 VDC 220 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications This figure shows the same circuit with a transorb (TVS) across the coil. Notice that the voltage spike is significantly reduced. +24 VDC +24 VDC 42 VDC 24 VDC Module Relay Contact Use the following table to help select a TVS or MOV suppressor for your application based on the inductive load voltage. Surge Suppressors Vendor / Catalog Automationdirect General Instrument Transient Voltage Suppressors, LiteOn Diodes; from DigiKey Catalog; Phone: 1-800-344-4539 Harris Metal Oxide Varistors;| from Newark Catalog: Phone 1-800-463-9275 Type TVS TVS TVS TVS TVS Diode MOV MOV Inductive Load Voltage 110/120 VAC 24 VDC 110/120 VAC 220/240 VDC 12/24 VDC or VAC 12/24 VDC or VAC 110/120 VAC 220/240 VAC Part Number ZL-TD8-120 ZL-TD8-24 P6KE180CAGICTND P6KE350CA P6K30CAGICTND 1N4004CTND V150LA20C V250LA20C Prolonging Relay Contact Life Relay contacts wear according to the amount of relay switching, amount of spark created at the time of open or closure, and presence of airborne contaminants. There are some steps you can take to help prolong the life of relay contacts, such as switching the relay on or off only when it is necessary, and if possible, switching the load on or off at a time when it will draw the least current. Also, take measures to suppress inductive voltage spikes from inductive DC loads such as contactors and solenoids. For inductive loads in DC circuits we recommend using a suppression diode as shown in the following diagram (DO NOT use this circuit with an AC power supply). When the load is energized the diode is reverse-biased (high impedance). When the load is turned off, energy stored in its coil is released in the form of a negative-going voltage spike. At this moment the diode is forward-biased (low impedance) and shunts the energy to ground. This protects the relay contacts from the high voltage arc that would occur just as the contacts are opening. Place the diode as close to the inductive field device as possible. Use a diode with a peak inverse voltage rating (PIV) at least 100 PIV, 3A forward current or larger. Use a fast-recovery type (such as Schottky type). DO NOT use a small-signal diode such as 1N914, 1N941, etc. Be sure the diode is in the circuit correctly before operation. If installed backwards, it shortcircuits the supply when the relay energizes. PLC Relay Output Inductive Field Device Output Input Common + Common DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 221 Chapter 2: Installation, Wiring, and Specifications DC Input Wiring Methods Input DL06 Micro PLCs with DC inputs are particularly flexible because they can be wired as either sinking or sourcing. The dual diodes (shown to the right) allow 10.8 26.4 VDC. The target applications are +12 VDC and +24 VDC. You can actually wire each Common group of inputs associated common group of inputs as DC sinking and the other half as DC sourcing. Inputs grouped by a common must be all sinking or all sourcing. In the first and simplest example below, all commons are connected together and all inputs are sinking. C0 X0 X1 X2 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 PLC DC Input +24 VDC + In the next example, the first eight inputs are sinking, and the last twelve are sourcing. C0 X0 X1 X2 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 +12 VDC +24 VDC + 222 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 + - Chapter 2: Installation, Wiring, and Specifications DC Output Wiring Methods DL06 DC output circuits are high-performance transistor switches with low on-resistance and fast switching times. Please note the following characteristics which are unique to the DC output type: There is only one electrical common for all sixteen outputs. All sixteen outputs belong to one bank. The output switches are current-sinking only or current sourcing only. Refer to the detailed specifications in this manual to determine which type output is present on a particular model. The output circuit inside the PLC requires external power. The supply () must be connected to a common terminal, and the supply (+) connects the the right-most terminal on the upper connector (+V). fuse +24 VDC L L L L L L L L L L L L L L L L + G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 +V In the example below, all sixteen outputs share a common supply. In the next example below, the outputs have split supplies. The first three outputs are using a +12 VDC supply, and the last three are using a +24 VDC supply. However, you can split the outputs among any number of supplies, as long as: all supply voltages are within the specified range all output points are wired as sinking fuse +12 VDC +24 VDC + L L L L L L L L L L L L L L L L + LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 G Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 +V AC(L) AC(N) 24V C0 all source () terminals are connected together OUTPUT: Sinking Output 6 - 27V 1.0A PWR: 100-240V 50-60Hz 40VA DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 223 Chapter 2: Installation, Wiring, and Specifications High-Speed I/O Wiring Methods DL06 versions with DC type input or output points contain a dedicated High-Speed I/O circuit (HSIO). The circuit configuration is programmable, and it processes specific I/O points independently from the CPU scan. Chapter 3 discusses the programming options for HSIO. While the HSIO circuit has six modes, we show wiring diagrams for two of the most popular modes in this chapter. The high-speed input interfaces to points X0 X3. Properly configured, the DL06 can count quadrature pulses at up to 7 kHz from an incremental encoder as shown below. C0 X0 X1 X2 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 Phase A = X0 Phase B = X1 DL06 versions with DC type output points can use the High Speed I/O Pulse Output feature. It can generate high-speed pulses at up to 10 kHz for specialized control such as stepper motor / intelligent drive systems. Output Y0 and Y1 can generate pulse and direction signals, or it can generate CCW and CW pulse signals respectively. See Chapter 3 on highspeed input and pulse output options. Motor Amplifier Power Input Signal Common Pulse Direction OUTPUT: Sinking Output 6 - 27V 1.0A PWR: 100-240V 50-60Hz 40VA +24 VDC G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 +V 224 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 + Chapter 2: Installation, Wiring, and Specifications Glossary of Specification Terms Discrete Input One of twenty input connections to the PLC which converts an electrical signal from a field device to a binary status (off or on), which is read by the internal CPU each PLC scan. Discrete Output One of sixteen output connections from the PLC which converts an internal ladder program result (0 or 1) to turn On or Off an output switching device. This enables the program to turn on and off large field loads. I/O Common A connection in the input or output terminals which is shared by multiple I/O circuits. It usually is in the return path to the power supply of the I/O circuit. Input Voltage Range The operating voltage range of the input circuit. Maximum Voltage Maximum voltage allowed for the input circuit. ON Voltage Level The minimum voltage level at which the input point will turn ON. OFF Voltage Level The maximum voltage level at which the input point will turn OFF Input Impedance Input impedance can be used to calculate input current for a particular operating voltage. Input Current Typical operating current for an active (ON) input. Minimum ON Current The minimum current for the input circuit to operate reliably in the ON state. Maximum OFF Current The maximum current for the input circuit to operate reliably in the OFF state. OFF to ON Response The time the module requires to process an OFF to ON state transition. ON to OFF Response The time the module requires to process an ON to OFF state transition. Status Indicators The LEDs that indicate the ON/OFF status of an input or output point. All LEDs on DL06 Micro PLCs are electrically located on the logic side of the input or output circuit. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 225 Chapter 2: Installation, Wiring, and Specifications Wiring Diagrams and Specifications The remainder of this chapter provides detailed technical information for the DL06 PLCs. A basic wiring diagram, equivalent I/O circuits, and specification tables are laid out for each PLC. D006AA I/O Wiring Diagram The D006AA PLC has twenty AC inputs and sixteen AC outputs. The following diagram shows a typical field wiring example. The AC external power connection uses four terminals as shown. Inputs are organized into five banks of four. Each bank has an isolated common terminal. The wiring example below shows all commons connected together, but separate supplies and common circuits may be used. The equivalent input circuit shows one channel of a typical bank. Outputs are organized into four banks of four triac switches. Each bank has a common terminal. The wiring example below shows all commons connected together, but separate supplies and common circuits may be used. The equivalent output circuit shows one channel of a typical bank. fuse Power Input Wiring AC Supply L L L L L L L L L L L L L L L L Output Point Wiring G LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 0V AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 17-240V 50 - 60Hz 3 4 5 0.5A 6 7 PWR: 100-240V 10 11 12 13 50-60Hz 40VA 14 15 16 17 20 21 22 Y 0 1 2 D0-06AA 23 X INPUT: 90 - 120V 7 - 15mA LOGIC K oyo C0 X0 X1 X2 06 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 AC Supply Input Point Wiring Equivalent Input Circuit +V Optical Isolator Equivalent Output Circuit Internal module circuitry Derating Chart for AC Outputs Points +V OUTPUT L 16 12 8 Input Optical Isolator 0.5 A Y0 - Y7 Y10 - Y17 Common 17-240 VAC COM 4 0 To 0 32 10 50 20 68 30 86 40 104 50 122 50C 122C Ambient Temperature ( C/ F) 226 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications D0-06AA General Specifications External Power Requirements Communication Port 1 9600 baud (Fixed), 8 data bits, 1 stop bit odd parity Communication Port 2 9600 baud (default) 8 data bits, 1 stop bit odd parity Programming cable type Operating Temperature Storage Temperature Relative Humidity Environmental air Vibration Shock Noise Immunity Terminal Type Wire Gauge 100 240 VAC, 40 VA maximum, KSequence (Slave), DirectNET (Slave), MODBUS (Slave) KSequence (Slave),DirectNET (Master/Slave), MODBUS (Master/Slave), Non-sequence / print, ASCII in/out D2DSCBL 32 to 131 F (0 to 55 C) 4 to 158 F (20 to 70 C) 5 to 95% (non-condensing) No corrosive gases permitted MIL STD 810C 514.2 MIL STD 810C 516.2 NEMA ICS3304 Removable One AWG16 or two AWG18, AWG24 minimum AC Input Specifications Input Voltage Range (Min. - Max.) Operating Voltage Range Input Current Max. Input Current Input Impedance ON Current/Voltage OFF Current/Voltage OFF to ON Response ON to OFF Response Status Indicators Commons 80 132 VAC, 47 - 63 Hz 90 120 VAC, 47 - 63 Hz 8 mA @100 VAC at 50 Hz 10 mA @100 VAC at 60 Hz 12 mA @132 VAC at 50 Hz 15 mA @132 VAC at 60 Hz 14K @50 Hz, 12K @60Hz > 6 mA @ 75 VAC < 2 mA @ 20 VAC < 40 mS < 40 mS Logic Side 4 channels / common x 5 banks (isolated) AC Output Specifications Output Voltage Range (Min. - Max.) Operating Voltage On Voltage Drop Max Current Max leakage current Max inrush current Minimum Load OFF to ON Response ON to OFF Response Status Indicators Commons Fuses 15 264 VAC, 47 63 Hz 17 240 VAC, 47 63 Hz 1.5 VAC (>50mA) 4.0 VAC (<50mA) 0.5 A / point, 1.5 A / common <4 mA @ 264 VAC 10 A for 10 mS 10 mA 1 mS 1 mS +1/2 cycle Logic Side 4channels / common x 4 banks (isolated) None (external recommended) DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 227 Chapter 2: Installation, Wiring, and Specifications D006AR I/O Wiring Diagram The D006AR PLC has twenty AC inputs and sixteen relay contact outputs. The following diagram shows a typical field wiring example. The AC external power connection uses four terminals at the left as shown. The twenty AC input channels use terminals on the bottom of the connector. Inputs are organized into five banks of four. Each bank has a common terminal. The wiring example below shows all commons connected together, but separate supplies and common circuits may be used. The equivalent input circuit shows one channel of a typical bank. fuse Power Input Wiring AC or DC Supply L L L L L L L L L L L L L L L L Output Point Wiring G LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 0V AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 Y 0 1 2 D0-06AR 23 X INPUT: 90 - 120V 7 - 15mA LOGIC K oyo C0 X0 X1 X2 06 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 Input Point Wiring AC Supply Equivalent Input Circuit +V Optical Isolator To LED +V 16 12 8 4 Derating Chart for Relay Outputs Points Equivalent Output Circuit Internal module circuitry 2.0A Input Y0 - Y7 Y10 - Y17 L +V Output Common 0 0 32 10 50 20 68 30 86 40 104 50 122 50C 122C Common 627 VDC 6240 VAC Ambient Temperature ( C/ F) To LED 228 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications The sixteen relay output channels use terminals on the right side top connector. Outputs are organized into two banks of three normally-open relay contacts. Each bank has a common terminal. The wiring example on the last page shows all commons connected together, but separate supplies and common circuits may be used. The equivalent output circuit shows one channel of a typical bank. The relay contacts can switch AC or DC voltages. D0-06AR General Specifications 100 240 VAC, 40 VA maximum, External Power Requirements Communication Port 1 9600 baud (Fixed), 8 data KSequence (Slave), DirectNET (Slave), MODBUS (Slave) bits, 1 stop bit, odd parity Communication Port 2 9600 baud (default), 8 data KSequence (Slave), DirectNET (Master/Slave), MODBUS (Master/Slave), Non-sequence / print, ASCII in/out bits, 1 stop bit, odd parity D2DSCBL Programming cable type 32 to 131 F (0 to 55 C) Operating Temperature 4 to 158 F (20 to 70 C) Storage Temperature 5 to 95% (non-condensing) Relative Humidity No corrosive gases permitted Environmental air MIL STD 810C 514.2 Vibration MIL STD 810C 516.2 Shock NEMA ICS3304 Noise Immunity Removable Terminal Type One AWG16 or two AWG18, AWG24 minimum Wire Gauge AC Input Specifications X0-X23 Input Voltage Range (Min. - Max.) Operating Voltage Range Input Current Max. Input Current Input Impedance ON Current/Voltage OFF Current/Voltage OFF to ON Response ON to OFF Response Status Indicators Commons 80 132 VAC, 47 - 63 Hz 90 120 VAC, 47 -63 Hz 8 mA @ 100 VAC at 50 Hz 10 mA @ 100 VAC at 60 Hz 12 mA @ 132 VAC at 50 Hz 15 mA @ 132 VAC at 60 Hz 14K @50 Hz, 12K @60 Hz >6 mA @ 75 VAC <2 mA @ 20 VAC < 40 mS < 40 mS Logic Side 4 channels / common x 5 banks (isolated) Relay Output Specifications Y0-Y17 Output Voltage Range Operating Voltage Range Output Current Max. leakage current Smallest Recommended Load OFF to ON Response ON to OFF Response Status Indicators Commons Fuses (Min. Max.) 5 264 VAC (47 -63 Hz), 5 30 VDC 6 240 VAC (47 -63 Hz), 6 27 VDC 2A / point, 6A / common 0.1 mA @264VAC 5 mA @5 VDC < 15 mS < 10 mS Logic Side 4 channels / common x 4 banks (isolated) None (external recommended) DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 229 Chapter 2: Installation, Wiring, and Specifications D006DA I/O Wiring Diagram The D006DA PLC has twenty DC inputs and sixteen AC outputs. The following diagram shows a typical field wiring example. The AC external power connection uses four terminals as shown. Inputs are organized into five banks of four. Each bank has an isolated common terminal, and may be wired as sinking or sourcing. The wiring example below shows all commons connected together, but separate supplies and common circuits may be used. The equivalent circuit for standard inputs is shown below, and the high-speed input circuit is shown to the left. Outputs are organized into four banks of four triac switches. Each bank has a common terminal. The wiring example below shows all commons connected together, but separate supplies and common circuits may be used. The equivalent output circuit shows one channel of a typical bank. fuse AC Supply L L L L L L L L L L L L L L L L G LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 0V AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 17 - 240V 50-60Hz 3 4 5 6 0.5A 7 PWR: 100-240V 10 11 12 13 50-60Hz 40VA 14 15 16 17 20 21 22 Y 0 1 2 D0-06DA 23 X INPUT: 12 - 24V 3 - 15mA LOGIC K oyo C0 X0 X1 X2 06 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 Points 16 12 8 4 0 0 32 10 50 20 68 30 86 40 104 50 122 50C 122C 0.5 A Y0 - Y7 Y10 - Y17 DC Supply Ambient Temperature ( C/ F) Derating Chart for AC Outputs DA +V +V Optical Isolator +V OUTPUT L + Input Optical Isolator Internal module circuitry +V Optical Isolator Input + To LED Common Common 17-240 VAC COM To LED High Speed Inputs (X0-X3) Standard Inputs (X4-X23) Equivalent Output Circuit 230 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications D0-06DA General Specifications 100 240 VAC, 40 VA maximum, External Power Requirements Communication Port 1 9600 baud (Fixed), 8 data KSequence (Slave), DirectNET (Slave), MODBUS (Slave) bits, 1 stop bit, odd parity Communication Port 2 9600 baud (default), 8 data KSequence (Slave), DirectNET (Master/Slave), MODBUS (Master/Slave), Non-sequence/print, ASCII in/out bits, 1 stop bit, odd parity D2DSCBL Programming cable type 32 to 131 F (0 to 55 C) Operating Temperature 4 to 158 F (20 to 70 C) Storage Temperature 5 to 95% (non-condensing) Relative Humidity No corrosive gases permitted Environmental air MIL STD 810C 514.2 Vibration MIL STD 810C 516.2 Shock NEMA ICS3304 Noise Immunity Removable Terminal Type One AWG16 or two AWG18, AWG24 minimum Wire Gauge DC Input Specifications Parameter Input Voltage Range Operating Voltage Range Maximum Voltage Minimum Pulse Width ON Voltage Level OFF Voltage Level Input Impedance Minimum ON Current Maximum OFF Current OFF to ON Response ON to OFF Response Status Indicators Commons HighSpeed Inputs, X0 X3 Standard DC Inputs X4 X23 10.8 26.4 VDC 10.8 26.4 VDC 12 24 VDC 12 24 VDC 30 VDC (7 kHz maximum frequency) 30 VDC 70 S N/A > 10 VDC > 10 VDC < 2.0 VDC < 2.0 VDC 1.8 k @ 12 24 VDC 2.8 k @ 12 24 VDC >5 mA >4 mA < 0.5 mA <0.5 mA <70 S 2 8 mS, 4 mS typical <70 S 2 8 mS, 4 mS typical Logic side Logic side 4 channels / common x 5 bank (isolated) AC Output Specifications Output Voltage Range (Min. - Max.) Operating Voltage On Voltage Drop Max Current Max leakage current Max inrush current Minimum Load OFF to ON Response ON to OFF Response Status Indicators Commons Fuses 15 264 VAC, 47 63 Hz 17 240 VAC, 47 63 Hz 1.5 VAC @> 50mA, 4 VAC @< 50mA 0.5 A / point, 1.5 A / common < 4 mA @ 264 VAC, 60Hz 10 A for 10 mS 10 mA 1 mS 1 mS +1/2 cycle Logic Side 4 channels / common x 4 banks (isolated) None (external recommended) DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 231 Chapter 2: Installation, Wiring, and Specifications D006DD1 I/O Wiring Diagram The D0-06DD1 PLC has twenty DC inputs and sixteen DC outputs. The following diagram shows a typical field wiring example. The AC external power connection uses four terminals as shown. Inputs are organized into five banks of four. Each bank has an isolated common terminal, and may be wired as either sinking or sourcing inputs. The wiring example below shows all commons connected together, but separate supplies and common circuits may be used. Outputs all share the same common. Note the requirement for external power. fuse +24 VDC L L L L L L L L L L L L L L L L + G LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 0V AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 +V OUTPUT: Sinking Output 6 - 27V 4 5 6 1.0A 7 PWR: 100-240V 10 11 12 13 50-60Hz 40VA 14 15 16 17 20 21 22 Y 0 1 2 3 D0-06DD1 23 X INPUT: 12 - 24V 3 - 15mA LOGIC K oyo C0 X0 X1 X2 06 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 DC Supply +V +V + Internal module circuitry +V + Input Optical Isolator To LED Points 16 24VDC L OUTPUT Optical Isolator 1.0 A 12 8 4 Y0 - Y7 Y10 - Y17 Common + 627 VDC COM To LED 0 0 32 10 50 20 68 30 86 40 104 50 122 50C 122C Ambient Temperature ( C/ F) High Speed Inputs (X0-X3) +V Optical Isolator To LED +V DC Pulse Outputs (Y0-Y1) +V + 24VDC L Internal module circuitry Input + OUTPUT Optical Isolator To LED Common + 627 VDC COM DC Standard Inputs (X4-X23) DC Standard Outputs (Y2-Y17) 232 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications D0-06DD1 General Specifications External Power Requirements Communication Port 1 9600 baud (Fixed), 8 data bits, 1 stop bit, odd parity Communication Port 2 9600 baud (default), 8 data bits, 1 stop bit, odd parity Programming cable type Operating Temperature Storage Temperature Relative Humidity Environmental air Vibration Shock Noise Immunity Terminal Type Wire Gauge Parameter Min. - Max. Voltage Range Operating Voltage Range Peak Voltage Minimum Pulse Width ON Voltage Level OFF Voltage Level Max. Input Current Input Impedance Minimum ON Current Maximum OFF Current OFF to ON Response ON to OFF Response Status Indicators Commons Parameter Min. - Max. Voltage Range Operating Voltage Peak Voltage On Voltage Drop Max Current (resistive) Max leakage current Max inrush current External DC power required OFF to ON Response ON to OFF Response Status Indicators Commons Fuses 100 240 VAC, 40 VA maximum, KSequence (Slave), DirectNET (Slave), MODBUS (Slave) KSequence (Slave), DirectNET (Master/Slave), MODBUS (Master/Slave), Non-sequence / print, ASCII in/out D2DSCBL 32 to 131 F (0 to 55 C) 4 to 158 F (20 to 70 C) 5 to 95% (non-condensing) No corrosive gases permitted MIL STD 810C 514.2 MIL STD 810C 516.2 NEMA ICS3304 Removable One AWG16 or two AWG18, AWG24 minimum DC Input Specifications HighSpeed Inputs, X0 X3 Standard DC Inputs X4 X23 10.8 26.4 VDC 10.8 26.4 VDC 12 24 VDC 12 24 VDC 30 VDC (7 kHz maximum frequency) 30 VDC 100 s N/A > 10.0 VDC > 10.0 VDC < 2.0 VDC < 2.0 VDC 6mA @12VDC, 13mA @24VDC 4mA @12VDC, 8.5mA @24VDC 1.8 k @ 12 24 VDC 2.8 k @ 12 24 VDC >5 mA >4 mA < 0.5 mA <0.5 mA <70 S 2 8 mS, 4 mS typical <70 S 2 8 mS, 4 mS typical Logic side Logic side 4 channels / common x 5 banks isolated DC Output Specifications Pulse Outputs Y0 Y1 5 30 VDC 6 27 VDC < 50 VDC (10 kHz max. frequency) 0.3 VDC @ 1 A 0.5 A / pt., 1A / pt. as standard pt. 15A @ 30 VDC 2 A for 100 mS Standard Outputs Y2 Y17 5 30 VDC 6 27 VDC < 50 VDC 0.3 VDC @ 1 A 1.0 A / point 15A @ 30 VDC 2 A for 100 mS 20 - 28 VDC Max 280mA (Aux. 24VDC 20 - 28 VDC Max 150mA powers V+ terminal (sinking outputs) < 10 s < 10 s < 20 s < 60 s Logic Side Logic Side 4 channels / common x 4 banks non-isolated None (external recommended) DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 233 Chapter 2: Installation, Wiring, and Specifications D006DD2 I/O Wiring Diagram The D006DD2 PLC has twenty DC inputs and sixteen sourcing DC outputs. The following diagram shows a typical field wiring example. The AC external power connection uses four terminals as shown. Inputs are organized into four banks of four. Each bank has an isolated common terminal, and may be wired as either sinking or sourcing inputs. The wiring example below shows all commons connected together, but separate supplies and common circuits may be used. + +24 VDC L L L L L L L L L L L L L L L L G LG 0V Y0 Y2 V1 Y5 Y7 Y10 Y12 V3 Y15 Y17 AC(L) AC(N) 24V V0 Y1 Y3 Y4 Y6 V2 Y11 Y13 Y14 Y16 CO OUTPUT: Sourcing Output 12 - 24V 1.0A 7 PWR: 100-240V 10 11 12 13 50-60Hz 40VA 14 15 16 17 20 21 22 0 1 2 3 4 5 6 fuse Y X INPUT: 12 - 24V 3 - 15mA D0-06DD2 23 LOGIC K oyo C0 X1 X0 X2 06 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 Points 16 12 8 4 0 0 32 10 50 20 68 30 86 40 104 50 122 50C 122C 1.0A Y0 - Y7 Y10 - Y17 Ambient Temperature ( C/ F) DC Supply Derating Chart for DC Outputs +V Internal module circuitry +V + Input Optical Isolator To LED 24VDC + - +V Common Output L Common Optical Isolator To LED High Speed Inputs (X0-X3) +V Optical Isolator To LED +V DC Pulse Outputs (Y0-Y1) + +V 24VDC Output L Input + - Common DC Standard Inputs (X4-X23) DC Standard Outputs (Y2-Y17) 234 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 - All outputs share the same common. Note the requirement for external power. Internal module circuitry To LED Common Optical Isolator Chapter 2: Installation, Wiring, and Specifications D0-06DD2 General Specifications External Power Requirements Communication Port 1 9600 baud (Fixed), 8 data bits, 1 stop bit, odd parity Communication Port 2 9600 baud (default), 8 data bits, 1 stop bit, odd parity Programming cable type Operating Temperature Storage Temperature Relative Humidity Environmental air Vibration Shock Noise Immunity Terminal Type Wire Gauge Parameter Min. - Max. Voltage Range Operating Voltage Range Peak Voltage Minimum Pulse Width ON Voltage Level OFF Voltage Level Max. Input Current Input Impedance Minimum ON Current Maximum OFF Current OFF to ON Response ON to OFF Response Status Indicators Commons Parameter Min. - Max. Voltage Range Operating Voltage Peak Voltage On Voltage Drop Max Current (resistive) Max leakage current Max inrush current External DC power required OFF to ON Response ON to OFF Response Status Indicators Commons Fuses 100 240 VAC, 40 VA maximum, KSequence (Slave), DirectNET (Slave), MODBUS (Slave) KSequence (Slave), DirectNET (Master/Slave), MODBUS (Master/Slave), Non-sequence / print, ASCII in/out D2DSCBL 32 to 131 F (0 to 55 C) 4 to 158 F (20 to 70 C) 5 to 95% (non-condensing) No corrosive gases permitted MIL STD 810C 514.2 MIL STD 810C 516.2 NEMA ICS3304 Removable One AWG16 or two AWG18, AWG24 minimum DC Input Specifications HighSpeed Inputs, X0 X3 Standard DC Inputs X4 X23 10.8 26.4 VDC 10.8 26.4 VDC 12 24 VDC 12 24 VDC 30 VDC (7 kHz maximum frequency) 30 VDC 70 s N/A > 10.0 VDC > 10.0 VDC < 2.0 VDC < 2.0 VDC 6mA @12VDC, 13mA @24VDC 4mA @12VDC, 8.5mA @24VDC 1.8 k @ 12 24 VDC 2.8 k @ 12 24 VDC >5 mA >4 mA < 0.5 mA <0.5 mA <70 S 2 8 mS, 4 mS typical <70 S 2 8 mS, 4 mS typical Logic side Logic side 4 channels/common x 5 banks (isolated) DC Output Specifications Pulse Outputs Y0 Y1 Standard Outputs Y2 Y17 10.8 -26.4 VDC 10.8 -26.4 VDC 12-24 VDC 12-24 VDC < 50 VDC (10 kHz max. frequency) < 50 VDC 0.5VDC @ 1 A 1.2 VDC @ 1 A 0.5 A / pt., 1A / pt. as standard pt. 1.0 A / point 15 A @ 30 VDC 15 A @ 30 VDC 2 A for 100 mS 2 A for 100 mS n/a n/a < 10s < 10 s < 20 s < 0.5 s Logic Side Logic Side 4 channels / common x 4 banks (non-isolated) None (external recommended) DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 235 Chapter 2: Installation, Wiring, and Specifications D006DR I/O Wiring Diagram The D006DR PLCs feature twenty DC inputs and sixteen relay contact outputs. The following diagram shows a typical field wiring example. The AC external power connection uses four terminals as shown. Inputs are organized into five banks of four. Each bank has an isolated common terminal, and may be wired as either sinking or sourcing inputs. The wiring example below shows all commons connected together, but separate supplies and common circuits may be used. The equivalent circuit for standard inputs is shown below, and the high-speed input circuit is shown to the left. Outputs are organized into four banks of four normally-open relay contacts. Each bank has a common terminal. The wiring example below shows all commons connected together, but separate supplies and common circuits may be used. The equivalent output circuit shows one channel of a typical bank. The relay contacts can switch AC or DC voltages. Power Input Wiring fuse AC or DC Supply L L L L L L L L L L L L L L L L Output Point Wiring G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 Y 0 1 2 D0-06DR 23 X INPUT: 12 - 24V 3 - 15mA LOGIC K oyo C0 X1 X0 X2 06 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 Points 16 12 8 4 0 0 32 10 50 20 68 30 86 40 104 50 122 50C 122C 2.0A Y0 - Y7 Y10 - Y17 Ambient Temperature ( C/ F) DC Supply Input Point Wiring Derating Chart for Relay Outputs Equivalent Output Circuit Internal module circuitry +V L Equivalent Circuit, High-speed Inputs (X0-X3) +V Equivalent Circuit, Standard Inputs (X4-X23) +V Optical Isolator To LED +V + Input Optical Isolator To LED + Output Input Common Common Common To LED 627 VDC 6240 VAC 236 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications D0-06DR General Specifications 100 240 VAC, 40 VA maximum, External Power Requirements Communication Port 1 9600 baud (Fixed), 8 data KSequence (Slave), DirectNET (Slave), MODBUS (Slave) bits, 1 stop bit, odd parity Communication Port 2 9600 baud (default), 8 data KSequence (Slave), DirectNET (Master/Slave), MODBUS (Master/Slave), Non-sequence /print, ASCII in/out bits, 1 stop bit,odd parity D2DSCBL Programming cable type 32 to 131 F (0 to 55 C) Operating Temperature 4 to 158 F (20 to 70 C) Storage Temperature 5 to 95% (non-condensing) Relative Humidity No corrosive gases permitted Environmental air MIL STD 810C 514.2 Vibration MIL STD 810C 516.2 Shock NEMA ICS3304 Noise Immunity Removable Terminal Type One AWG16 or two AWG18, AWG24 minimum Wire Gauge DC Input Specifications Parameter Min. - Max. Voltage Range Operating Voltage Range Peak Voltage Minimum Pulse Width ON Voltage Level OFF Voltage Level Input Impedance Max. Input Current Minimum ON Current Maximum OFF Current OFF to ON Response ON to OFF Response Status Indicators Commons HighSpeed Inputs, X0 X3 Standard DC Inputs X4 X23 10.8 26.4 VDC 10.8 26.4 VDC 12 -24 VDC 12 -24 VDC 30 VDC (7 kHz maximum frequency) 30 VDC 70 s N/A > 10 VDC > 10 VDC < 2.0 VDC < 2.0 VDC 1.8 k @ 12 24 VDC 2.8 k @ 12 24 VDC 6mA @12VDC 13mA @24VDC 4mA @12VDC 8.5mA @24VDC >5 mA >4 mA < 0.5 mA <0.5 mA <70 s 2 8 mS, 4 mS typical <70 s 2 8 mS, 4 mS typical Logic side Logic side 4 channels / common x 5 banks (isolated) Relay Output Specifications Output Voltage Range (Min. - Max.) Operating Voltage Output Current Maximum Voltage Max leakage current Smallest Recommended Load OFF to ON Response ON to OFF Response Status Indicators Commons Fuses 5 -264 VAC (47 -63 Hz), 5 - 30 VDC 6 -240 VAC (47 -63 Hz), 6 - 27 VDC 2A / point 6A / common 264 VAC, 30 VDC 0.1 mA @264 VAC 5 mA < 15 mS < 10 mS Logic Side 4 channels / common x 4 banks (isolated) None (external recommended) DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 237 Chapter 2: Installation, Wiring, and Specifications D006DD1D I/O Wiring Diagram These micro PLCs feature twenty DC inputs and sixteen sinking DC outputs. The following diagram shows a typical field wiring example. The DC external power connection uses four terminals at the left as shown. Inputs are organized into five banks of four. Each bank has an isolated common terminal, and may be wired as either sinking or sourcing inputs. The wiring example below shows all commons connected together, but separate supplies and common circuits may be used. All outputs actually share the same common. Note the requirement for external power. 12 - 24 VDC + +24 VDC L L L L L L L L L L L L L L L L + G LG + - Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 N.C. Y0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 +V N.C. C0 6 - 27V 1.0A 6 7 10 PWR: 12-24 11 12 13 14 20W 15 16 17 20 OUTPUT: Sinking Output Y 0 1 2 3 4 5 D0-06DD1-D 21 22 23 X INPUT: 12 - 24V 3 - 15mA LOGIC K oyo C0 X0 X1 X2 06 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 DC Supply +V Internal module circuitry +V +V + 24VDC OUTPUT Optical Isolator + Input Optical Isolator To LED L Common + 627 VDC COM To LED High Speed Inputs (X0-X3) Points DC Pulse Outputs (Y0 - Y1) +V 16 12 8 +V Optical Isolator 1.0 A +V Internal module circuitry Y0 - Y7 Y10 - Y17 + 24VDC L Input + To LED 4 0 OUTPUT Optical Isolator To LED Common 0 32 10 50 20 68 30 86 40 104 50 122 50C 122C + 627 VDC COM Ambient Temperature ( C/ F) Standard Input Circuit (X4-X23) Derating Chart for DC Outputs DC Standard Outputs (Y2 - Y17) 238 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications D0-06DD1-D General Specifications External Power Requirements Communication Port 1: 9600 baud (Fixed), 8 data bits, 1 stop bit, odd parity Communication Port 2: 9600 baud (default), 8 data bits, 1 stop bit,odd parity Programming cable type Operating Temperature Storage Temperature Relative Humidity Environmental air Vibration Shock Noise Immunity Terminal Type Wire Gauge Parameter Min. - Max. Voltage Range Operating Voltage Range Peak Voltage Minimum Pulse Width ON Voltage Level OFF Voltage Level Max. Input Current Input Impedance Minimum ON Current Maximum OFF Current OFF to ON Response ON to OFF Response Status Indicators Commons Parameter Min. - Max. Voltage Range Operating Voltage Peak Voltage On Voltage Drop Max Current (resistive) Max leakage current Max inrush current External DC power required OFF to ON Response ON to OFF Response Status Indicators Commons Fuses 12 24 VDC, 20 W maximum, KSequence (Slave), DirectNET (Slave), MODBUS (Slave) KSequence (Slave), DirectNET (Master/Slave), MODBUS (Master/Slave), Non-sequence/print, ASCII in/out D2DSCBL 32 to 131 F (0 to 55 C) 4 to 158 F (20 to 70 C) 5 to 95% (non-condensing) No corrosive gases permitted MIL STD 810C 514.2 MIL STD 810C 516.2 NEMA ICS3304 Removable One AWG16 or two AWG18, AWG24 minimum DC Input Specifications HighSpeed Inputs, X0 X3 Standard DC Inputs X4 X23 10.8 26.4 VDC 10.8 26.4 VDC 12 24 VDC 12 24 VDC 30 VDC (7 kHz maximum frequency) 30 VDC 70 s N/A >10.0 VDC > 10.0 VDC < 2.0 VDC < 2.0 VDC 6mA @12VDC, 13mA @24VDC 4mA @12VDC, 8.5mA @24VDC 1.8 k @ 12 24 VDC 2.8 k @ 12 24 VDC >5 mA >4 mA < 0.5 mA <0.5 mA <70 S 2 8 mS, 4 mS typical <70 S 2 8 mS, 4 mS typical Logic side Logic side 4 channels / common x 5 banks (isolated) DC Output Specifications Pulse Outputs, Y0 Y1 Standard Outputs, Y2 Y17 5 30 VDC 5 30 VDC 6 27 VDC 6 27 VDC < 50 VDC (10 kHz max. frequency) < 50 VDC 0.3 VDC @ 1 A 0.3 VDC @ 1 A 0.5 A / pt., 1A / pt. as standard pt. 1.0 A / point 15 A @ 30 VDC 15 A @ 30 VDC 2 A for 100 mS 2 A for 100 mS 20 - 28 VDC Max 150mA 20 - 28 VDC Max 150mA < 10 s < 10 s < 20 s < 60 s Logic Side Logic Side 4 channels / common x 4 banks (non-isolated) None (external recommended) DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 239 Chapter 2: Installation, Wiring, and Specifications D006DRD I/O Wiring Diagram The D006DRD PLC has twenty DC inputs and sixteen relay contact outputs. The following diagram shows a typical field wiring example. The DC external power connection uses three terminals as shown. 12 - 24 VDC + AC or DC Supply L L L L L L L L L L L L L L L L G LG + OUTPUT: 6-240V - N.C. Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 N.C. C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. 2.0A, 6 - 27V 6 7 10 11 12 2.0A 13 PWR: 12-24 14 15 16 20W 17 20 50 - 60Hz 3 4 5 Y 0 1 2 D0-06DR-D 21 22 23 X INPUT: 12 - 24V 3 - 15mA Points 16 12 8 4 0 0 32 10 50 20 68 30 86 40 104 50 122 50C 122C 2.0A Y0 - Y7 Y10 - Y17 LOGIC K oyo C0 X0 X1 X2 06 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 Ambient Temperature ( C/ F) Derating Chart for Relay Outputs DC Supply Inputs are organized into five banks of four. Each bank has an isolated common terminal, and may be wired as either sinking or sourcing inputs. The wiring example above shows all commons connected together, but separate supplies and common circuits may be used. Outputs are organized into four banks of four normally-open relay contacts. Each bank has a common terminal. The wiring example above shows all commons connected together, but separate supplies and common circuits may be used. The equivalent output circuit shows one channel of a typical bank. The relay contacts can switch AC or DC voltages. +V +V Optical Isolator To LED +V Internal module circuitry L + Input Optical Isolator To LED Input + +V Output Common Common Common 627 VDC 6240 VAC To LED High-speed Input Circuit (X0-X3) Standard Input Circuit (X4-X23) Standard Output Circuit 240 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications D0-06DR-D General Specifications External Power Requirements Communication Port 1 9600 baud (Fixed), 8 data bits, 1 stop bit, odd parity Communication Port 2 9600 baud (default), 8 data bits, 1 stop bit, odd parity Programming cable type Operating Temperature Storage Temperature Relative Humidity Environmental air Vibration Shock Noise Immunity Terminal Type Wire Gauge 12 24 VDC, 20 W maximum, KSequence (Slave), DirectNET (Slave), MODBUS (Slave) KSequence (Slave), DirectNET (Master/Slave), MODBUS (Master/Slave),Non-sequence/print, ASCII in/out D2DSCBL 32 to 131 F (0 to 55 C) 4 to 158 F (20 to 70 C) 5 to 95% (non-condensing) No corrosive gases permitted MIL STD 810C 514.2 MIL STD 810C 516.2 NEMA ICS3304 Removable One AWG16 or two AWG18, AWG24 minimum DC Input Specifications Parameter Min. - Max. Voltage Range Operating Voltage Range Peak Voltage Minimum Pulse Width ON Voltage Level OFF Voltage Level Input Impedance Max. Input Current Minimum ON Current Maximum OFF Current OFF to ON Response ON to OFF Response Status Indicators Commons HighSpeed Inputs, X0 X3 Standard DC Inputs X4 X23 10.8 26.4 VDC 10.8 26.4 VDC 12 -24 VDC 12 -24 VDC 30 VDC (7 kHz maximum frequency) 30 VDC 70 s N/A > 10 VDC > 10 VDC < 2.0 VDC < 2.0 VDC 1.8 k @ 12 24 VDC 2.8 k @ 12 24 VDC 6mA @12VDC 13mA @24VDC 4mA @12VDC 8.5mA @24VDC >5 mA >4 mA < 0.5 mA <0.5 mA <70 s 2 8 mS, 4 mS typical < 70 s 2 8 mS, 4 mS typical Logic side Logic side 4 channels / common x 5 banks (isolated) Relay Output Specifications Output Voltage Range (Min. - Max.) Operating Voltage Output Current Maximum Voltage Max leakage current Smallest Recommended Load OFF to ON Response ON to OFF Response Status Indicators Commons Fuses 5 -264 VAC (47 -63 Hz), 5 - 30 VDC 6 -240 VAC (47 -63 Hz), 6 - 27 VDC 2A / point 6A / common 264 VAC, 30 VDC 0.1 mA @264 VAC 5 mA < 15 mS < 10 mS Logic Side 3 channels / common x 2 banks None (external recommended) DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 241 Chapter 2: Installation, Wiring, and Specifications D0-10ND3 10-point DC input module D0-10ND3 Specifications Number of Inputs Input Voltage Range Operating Voltage Range Peak Voltage Input Current Maximum Input Current Input Impedance On Voltage Level Off Voltage Level Minimum ON Current Minimum OFF Current Off to On Response On to Off Response Status Indicators Commons Fuse Base Power Required 10 (sink/source) 10.8-26.4VDC 12-24VDC 30.0VDC Typical:4.0mA @ 12VDC 8.5mA @ 24VDC 11mA @ 26.4VDC 2.8Kq @ 12-24VDC > 10.0 VDC < 2.0 VDC 3.5mA 0.5mA 2-8ms, Typ. 4ms 2-8ms, Typ. 4ms Module activity: one green LED 2 non-isolated No fuse Typical. 35mA (all pts. ON) Note: The DL06 must have firmware version V4.10 (or later) for this module to function properly. Equivalent input circuit Derating chart 242 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications D0-16ND316-point DC input module D0-16ND3 Specifications Number of Inputs Input Voltage Range Operating Voltage Range Peak Voltage Input Current Maximum Input Current Input Impedance On Voltage Level Off Voltage Level Minimum ON Current Minimum OFF Current Off to on Response On to off Response Status Indicators Commons Fuse 16 (sink/source) 20-28VDC 24VDC 30.0VDC Typical: 4.0mA @ 24VDC 6mA @ 28VDC 4.7K @ 24VDC > 19.0 VDC < 7.0 VDC 3.5mA 1.5mA 2-8ms, Typ. 4ms 2-8ms, Typ. 4ms Module activity: one green LED 4 non-isolated No fuse Wiring for ZL-CM056 Equivalent input circuit External DC power required 20-28VDC max. ON) 200 mA (all pts. Base Power Required (5V) Typical. 35mA (all pts. ON) Note: The DL06 must have firmware version V4.10 (or later) for this module to function properly. Derating chart Use ZipLink ZL-CBL056 cable and ZL-CM056 connector module or build your own cables using 24-pin Molex Micro Fit 3.0 receptacle, part number 43025, or compatible. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 243 Chapter 2: Installation, Wiring, and Specifications D0-10TD1 10-point DC output module D0-10TD1 Specifications Number of Outputs Operating Voltage Range Output Voltage Range Peak Voltage Maximum Output Current Minimum Output Current ON Voltage Drop Maximum Leakage Current Maximum Inrush Current OFF to ON Response ON to OFF Response Status Indicators Commons Fuse Base Power Required (5V) 10 (sinking) 6-27VDC 5-30VDC 50.0VDC 0.3A/point 1.5A/common 0.5mA 0.5.VDC @0.3A 15A @ 30.0VDC 1A for 10ms <10s <60s Module activity: one green LED 2 non-isolated (5 points/common) No fuse Max. 150mA (All pts. on) Note: The DL06 must have firmware version V4.10 (or later) for this module to function properly. Equivalent output circuit Derating chart Use ZipLink ZL-CBL056 cable and ZL-CM056 connector module or build your own cables using 24-pin Molex Micro Fit 3.0 receptacle, part number 43025, or compatible. 244 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications D0-16TD1 16-point DC output module Equivalent input circuit D0-16TD1 Specifications Number of Outputs Operating Voltage Range Output Voltage Range Peak Voltage Maximum Output Current Minimum Output Current ON Voltage Drop Maximum Leakage Current Maximum Inrush Current OFF to ON Response ON to OFF Response 16 (sinking) 6-27VDC 5-30VDC 50.0VDC 0.1A/point 0.8A/common 0.5mA 0.5.VDC @0.1A 15A @ 30.0VDC 1A for 10ms <0.5 ms Derating chart <0.5 ms Module activity: Status Indicators one green LED 2 isolated Commons (8 points/common) No fuse Fuse max External DC power required 20-28 VDCpts. ON) 70 mA (all Base Power Required (5V) Max. 200mA (All pts. ON) Note: The DL06 must have firmware version V4.10 (or later) for this module to function properly. Wiring for ZL-CM056 Use ZipLink ZL-CBL056 cable and ZL-CM056 connector module or build your own cables using 24-pin Molex Micro Fit 3.0 receptacle, part number 43025, or compatible. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 245 Chapter 2: Installation, Wiring, and Specifications D0-10TD2 10-point DC output module D0-10TD2 Output Specifications Number of Outputs Operating Voltage Range Output Voltage Range Peak Voltage Maximum Output Current Minimum Output Current ON Voltage Drop Maximum Leakage Current Maximum Inrush Current OFF to ON Response ON to OFF Response Status Indicators Commons Fuse Base Power Required (5V) 10 (sourcing) 12-24VDC 10.8-26.4VDC 50.0VDC 0.3A/point 1.5A/common 0.5mA 1.0.VDC @0.3A 1.5A @ 30.0VDC 1A for 10ms <10s <60s Module activity: one green LED 2 non-isolated (5 points/common) No fuse Max. 150mA (All pts. On) Note: The DL06 must have firmware version V4.10 (or later) for this module to function properly. Derating chart Equivalent output circuit 246 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications D0-16TD2 16-point DC output module D0-16TD2 Specifications Number of Outputs Operating Voltage Range Output Voltage Range Peak Voltage Maximum Output Current Minimum Output Current ON Voltage Drop Maximum Leakage Current Maximum Inrush Current OFF to ON Response ON to OFF Response Status Indicators Commons Fuse Base Power Required (5V) 16 (sourcing) 12-24VDC 10.8-26.4VDC 50.0VDC 0.1A/point 0.8A/common 0.5mA 1.0.VDC @ 0.1A 1.5A @ 26.4VDC 1A for 10ms <0.5 ms <0.5 ms Module activity: one green LED 2 non-isolated (8 points/common) No fuse Max. 200mA (All pts. ON) Wiring for ZL-CM056 Equivalent output circuit Note: The DL06 must have firmware version V4.10 (or later) for this module to function properly. Derating chart Use ZipLink ZL-CBL056 cable and ZL-CM056 connector module or build your own cables using 24-pin Molex Micro Fit 3.0 receptacle, part number 43025, or compatible. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 247 Chapter 2: Installation, Wiring, and Specifications D0-07CDR 4-point DC input and 4-point relay output module Input Specifications Inputs per module Operating voltage range Input voltage range Peak voltage Maximum input current Input current Input impedance ON voltage level OFF voltage level Minimum ON current Maximum OFF current ON to OFF response OFF to ON response Commons 4 (sink/source) 12-24 VDC 10.8-26.4 VDC 30.0 VDC 11 mA @ 26.4 VDC Typical: 4mA @ 12VDC 8.5 mA @ 24VDC 2.8K @ 12-24VDC Output Specifications Outputs per module Operating voltage range Output type Peak voltage Maximum current (resistive) Minimum load current Maximum leakage current ON voltage drop Maximum inrush current ON to OFF response OFF to ON response Status indicators Commons Fuse Base power required (5V) 3 6-27 VDC/6-240 VAC Relay, form A, SPST 30.0 VDC/264 VAC 1 A/point, 4 A/common 5mA @ 5VDC 0.1 mA @ 264 VAC N/A Output: 3A for 10 ms Common: 10A for 10 ms < 10 ms < 15 ms Module acitivity: one green LED 1 (3 points/common) N/A Max. 200 mA (all points ON) >10.0 VDC < 2.0 VDC 3.5 mA 0.5 mA 2-8 ms, typical 4 ms 2-8 ms, typical 4 ms 1 (4 points/common) Note: The DL06 must have firmware version V4.10 (or later) for this module to function properly. Equivalent input circuit Equivalent output circuit Derating chart for DC inputs Derating chart for relay outputs 248 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications D0-08TR 8-point Relay output module D0-08TR Specifications Outputs per module Operating voltage range Output type Peak voltage Maximum current (resistive) Minimum load current Maximum leakage current ON voltage drop Maximum inrush current ON to OFF response OFF to ON response Status indicators Commons Fuse Base power required (5V) 8 6-27 VDC/6-240 VAC Relay, form A, SPST 30.0 VDC/264 VAC 1 A/point, 4 A/common 0.5mA 0.1 mA @ 264 VAC N/A Output: 3A for 10 ms Common: 10A for 10 ms < 10 ms < 15 ms Module acitivity: one green LED 2 isolated. (4 points/common) N/A Max. 280 mA (all points ON) Note: The DL06 must have firmware version V4.10 (or later) for this module to function properly. Equivalent output circuit Derating chart DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 249 Chapter 2: Installation, Wiring, and Specifications D0-08CDD1 4-point DC input and 4-point relay output module Input Specifications Inputs per module Operating voltage range Input voltage range Peak voltage Maximum input current Input current Input impedance ON voltage level OFF voltage level Minimum ON current Maximum OFF current ON to OFF response OFF to ON response Commons 4 (sink/source) 10.8-26.4 VDC 12-24 VDC 30.0 VDC 11 mA @ 26.4 VDC Typical: 4mA @ 12 VDC 8.5 mA @ 24 VDC 2.8K @ 12-24 VDC Output Specifications Outputs per module Operating voltage range Output voltage range Peak voltage Maximum output current Minimum outpu current Maximum leakage current ON voltage drop Maximum inrush current ON to OFF response OFF to ON response Status indicators Commons Fuse Base power required (5V) External DC power required (24V) 4 (sinking) 6-27 VDC 5-30 VDC 50.0 VDC/ 0.3 A/point, 1.2 A/common 0.5 mA 1.5 A @ 30.0 VDC 0.5 VDC @ 0.3A 1A for 10 ms >10.0 VDC < 2.0 VDC 3.5 mA 0.5 mA 2-8 ms, typical 4 ms 2-8 ms, typical 4 ms 2 non-isolated (4points/common) <60 ms <10 ms Module acitivity: one green LED 2 non-isolated (4 points/common) N/A Max. 200 mA (all points ON) 20 - 28 VDC, maximum 80 mA (all pts. ON) Note: The DL06 must have firmware version V4.10 (or later) for this module to function properly. Equivalent output circuit Equivalent input circuit Input Derating Chart Output Derating chart 250 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 2: Installation, Wiring, and Specifications I/O Addressing Module I/O Points and Addressing Each option module has a set number of I/O points. This holds true for both the discrete modules and the analog modules. The following chart shows the number of I/O points per module when used in the DL06. DC Input Modules D0-10ND3 D0-16ND 10 Input 16 Input I/O Points Slot 1 I/O Address X100 - X107 and X110 - X111 X100 - X107 and X110 - X117 DC Output Modules D0-10TD1 D0-16TD1 D0-10TD2 D0-16TD2 10 Output 16 Output 10 Output 16 Output I/O Points Slot 1 I/O Address Y100 - Y107 and Y110 - Y111 Y100 - Y107 and Y110 - Y117 Y100 - Y107 and Y110 - Y111 Y100 - Y107 and Y110 - Y117 Relay Output Modules D0-08TR 8 Output I/O Points I/O Points 4 Input, 3 Output 4 Input, 4 Output Slot 1 I/O Address Y100 - X107 Combination Modules D0-07CDR D0-08CDD1 Slot 1 I/O Address X100 - X103 and Y100 - Y102 X100 - X103 and Y100 - Y103 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 251 HIGH-SPEED INPUT AND PULSE OUTPUT FEATURES In This Chapter CHAPTER 3 2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 Choosing the HSIO Operating Mode . . . . . . . . . . . . . . . . . . . . . . . .34 Mode 10: High-Speed Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . .37 Mode 20: Up/Down Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . .324 Mode 30: Pulse Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .338 Mode 40: High-Speed Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . .364 Mode 50: Pulse Catch Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369 Mode 60: Discrete Inputs with Filter . . . . . . . . . . . . . . . . . . . . . . .373 Chapter 3: High-speed Input and Pulse Output Features Introduction Built-in Motion Control Solution Many machine control applications require various types of simple high-speed monitoring and control. These applications usually involve some type of motion control, or high-speed interrupts for time-critical events. The DL06 Micro PLC solves this traditionally expensive problem with built-in CPU enhancements. Lets take a closer look at the available high-speed I/O features. The available high-speed input features are: High Speed Counter (7 kHz max.) with up to 24 counter presets and built-in interrupt subroutine, counts up only, with reset Quadrature encoder inputs to measure counts and clockwise or counter clockwise direction (7 kHz max.), counts up or down, with reset High-speed interrupt inputs for immediate response to critical or time-sensitive tasks Pulse catch feature to monitor one input point, having a pulse width as small as 100s (0.1ms) Programmable discrete filtering (both on and off delay up to 99ms) to ensure input signal integrity (this is the default mode for inputs X0X3) The available pulse output features are: Single-axis programmable pulse output (10 kHz max.) with three profile types, including trapezoidal moves, registration, and velocity control Availability of HSIO Features IMPORTANT: Please note the following restrictions on availability of features: High-speed input options are available only on DL06s with DC inputs. Pulse output options are available only on DL06s with DC outputs. Only one HSIO feature may be in use at one time. You cannot use a highspeed input feature and the pulse output at the same time. Specifications DL06 Part Number D006AA D006AR D006DA D006DD1 D006DD2 D006DR D006DD1D D006DRD Discrete Input Type Discrete Output Type AC AC DC DC DC DC DC DC AC Relay AC DC DC Relay DC Relay High-Speed Input No No Yes Yes Yes Yes Yes Yes Pulse Output No No No Yes Yes No Yes No 32 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Dedicated High- Speed I/O Circuit The internal CPUs main task is to execute the ladder program and read/write all I/O points during each scan. In order to service high-speed I/O events, the DL06 includes a special circuit which is dedicated to a portion of the I/O points. Refer to the DL06 block diagram in the figure below. 16 Discrete Outputs DL06 PLC Output Circuit Y0, Y1 Y2 - Y17 High-Speed I/O Circuit X0 - X3 Input Circuit CPU X4 - X23 20 Discrete Inputs The high-speed I/O circuit (HSIO) is dedicated to the first four inputs (X0 X3) and the first two outputs (Y0 Y1). We might think of this as a CPU helper. In the default operation (called Mode 60) the HSIO circuit just passes through the I/O signals to or from the CPU, so that all twenty inputs behave equally and all sixteen outputs behave equally. When the CPU is configured in any other HSIO Mode, the HSIO circuit imposes a specialized function on the portion of inputs and outputs shown. The HSIO circuit operates independently of the CPU program scan. This provides accurate measurement and capturing of high-speed I/O activity while the CPU is busy with ladder program execution. Wiring Diagrams for Each HSIO Mode After choosing the appropriate HSIO mode for your application, youll need to refer to the section in this chapter for that specific mode. Each section includes wiring diagrams to help you connect the High-Speed I/O points correctly to field devices. An example of the quadrature counter mode diagram is shown below. C0 X0 X1 X2 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 TERM PORT1 PORT2 RUN STOP Counter Input Wiring Signal + Signal Common 12-24 VDC Supply DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 33 Chapter 3: High-speed Input and Pulse Output Features Choosing the HSIO Operating Mode Understanding the Six Modes The High-Speed I/O circuit operates in one of 6 basic modes as listed in the table below. The number in the left column is the mode number (later, well use these numbers to configure the PLC). Choose one of the following modes according to the primary function you want from the dedicated High-Speed I/O circuit. You can simply use all twenty inputs and sixteen outputs as regular I/O points with Mode 60. High Speed I/O Basic Modes Mode 10 High-Speed Counter Mode Features Two 7 kHz counters with 24 presets and reset input, counts up only, cause interrupt on preset 7 kHz up/down counter with 24 presets and reset, causes interrupt on preset Channel A / Channel B 7 kHz quadrature input, counts up and down 20 Up/Down Counter 30 40 50 60 Pulse Output High-Speed Interrupt Pulse Catch Filtered Input Stepper control pulse and direction signals, programmable motion profile (10kHz max.) Generates an interrupt based on input transition or time Captures narrow pulses on a selected input Rejects narrow pulses on selected inputs In choosing one of the six high-speed I/O modes, the I/O points listed in the table below operate only as the function listed. If an input point is not specifically used to support a particular mode, it usually operates as a filtered input by default. Similarly, output points operate normally unless Pulse Output mode is selected. 34 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Physical I/O Point Usage Mode DC Input Points X0 X1 Counter #2, Interrupt, Pulse Input or Filtered Input DC Output Points X3 Reset #2, Interrupt, Pulse Input or Filtered Input X2 Reset #1, Interrupt, Pulse Input or Filtered Input Y0 Y1 10 High-Speed Counter Counter #1 Regular Output Regular Output 20 Up/Down counter (Standard counting) Up Counting Up/Down counter (Quadrature counting) Pulse Output Down Counting Reset, Pulse Input or Phase A Input Phase B Input Filtered Input Pulse Input or Pulse Input or Filtered Input Filtered Input Interrupt, Pulse Input or Filtered Input Pulse Input, Interrupt or Filtered Input Filtered Input Pulse Input or Filtered Input Interrupt, Pulse Input or Filtered Input Pulse Input, Interrupt or Filtered Input Filtered Input Pulse Input or Filtered Input Regular Output Regular Output 30 40 50 60 Pulse Input or Filtered Input Interrupt, Pulse Input or Filtered Input Pulse Input, Interrupt or Filtered Input Filtered Input Pulse or CW Pulse Direction or CCW Pulse High-Speed Interrupt Interrupt Regular Output Regular Output Pulse Catch Filtered Input Pulse Input Filtered Input Regular Output Regular Output Regular Output Regular Output Default Mode Mode 60 (Filtered Inputs) is the default mode. The DL06 is initialized to this mode at the factory, and any time you initialize the scratchpad memory. In the default condition, X0X3 are filtered inputs (10 mS delay) and Y0Y1 are standard outputs. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 35 Chapter 3: High-speed Input and Pulse Output Features Configuring the HSIO Mode If you have chosen a mode suited to the high-speed I/O needs of your application, were ready to proceed to configure the PLC to operate accordingly. In the block diagram below, notice the V-memory detail in the expanded CPU block. V-memory location V7633 determines the functional mode of the high-speed I/O circuit. This is the most important V-memory configuration value for HSIO functions! Output Circuit Y0 - Y1 Y2 - Y17 DL06 PLC High-Speed I/O Circuit X0 - X3 I/O Data Mode Select CPU V-Memory V7633 xxxx X4 - X23 Input Circuit The contents of V7633 is a 16-bit word, to be entered in binarycoded decimal. The figure below defines what each 4-bit BCD digit of the word represents. Memory Location V7633 Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 1 5 0 1 0 0 0 0 0 Miscellaneous Setup (BCD) 00 = Not Used (default) 10 = Battery Enabled 20 = Power-up in RUN 30 = Battery Enabled and Power-up in RUN HSIO Mode Setup (BCD) 00 = Not Used 10 = High-Speed Counter 20 = Up/Down Counter 30 = Pulse Output 40 = High-Speed Interrupts 50 = Pulse Catch 60 = Filtered Inputs (default) Bits 0 7 define the mode number 00, 10.. 60 previously referenced in this chapter. The example data 2050 shown selects Mode 50 Pulse Catch (BCD = 50). Configuring Inputs X0 X3 In addition to configuring V7633 for the HSIO mode, youll need to program the next four locations in certain modes according to the desired function of input points X0 X3. Other memory locations may require configuring, depending on the HSIO mode (see the corresponding section for particular HSIO modes). V-Memory Mode X0 X1 X2 X3 V7633 V7634 V7635 V7636 V7637 xxxx xxxx xxxx xxxx xxxx 36 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Mode 10: High-Speed Counter Purpose The HSIO circuit contains two high-speed counters. A single pulse train from an external source (X0) clocks the counter on each signal leading edge. The counter counts only upwards, from 0 to 99999999. The counter compares the current count with up to 24 preset values, which you define. The purpose of the presets is to quickly cause an action upon arrival at specific counts, making it ideal for such applications as cut-to-length. It uses counter registers CT174 to CT177 in the CPU. Functional Block Diagram Refer to the block diagram below. When the lower byte of HSIO Mode register V7633 contains a BCD 10, the high-speed up counter in the HSIO circuit is enabled. X0 and X1 automatically become the clock inputs for the high-speed counters, incrementing them upon each off-to-on transition. The external reset input on X2 and X3 are the default configuration for Mode 10. DL06 PLC Y0 - Y1 Output Circuit Y2 - Y17 HSIO Counter 1 CLK Reset X0 X2 I/O data Filter Mode Select CPU V-memory V7633 X4 - X23 Counter 2 CLK Reset X1 X3 0010 Input Circuit Instead of using X2 and X3 as dedicated reset inputs, you can configure X2 and X3 as normal filtered inputs. In this way, the counter reset must be generated in ladder logic. DL06 PLC Y0 - Y1 Output Circuit Y2 - Y17 HSIO Counter 1 CLK Reset X0 I/O data Filter Mode Select CPU V-memory V7633 X4 - X23 Counter 2 CLK Reset X1 0010 X2 - X3 Input Circuit DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 37 Chapter 3: High-speed Input and Pulse Output Features Wiring Diagram A general wiring diagram for counters/encoders to the DL06 in HSIO Mode 10 is shown below. Many types of pulse-generating devices may be used, such as proximity switches, single-channel encoders, magnetic or optical sensors, etc. Devices with sinking outputs (NPN open collector) are probably the best choice for interfacing. If the counter sources to the inputs, it must output 12 to 24 VDC. Note that devices with 5V sourcing outputs will not work with DL06 inputs. C0 X0 X1 X2 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 TERM PORT1 PORT2 RUN STOP Counter Input Wiring Signal + Signal Common 12-24 VDC Supply Interfacing to Counter Inputs The DL06s DC inputs are flexible in that they detect current flow in either direction, so they can be wired to a counter with either sourcing or sinking outputs. In the following circuit, a counter has open-collector NPN transistor outputs. It sinks current from the PLC input point, which sources current. The power supply can be the FA24PS or another supply (+12VDC or +24VDC), as long as the input specifications are met. Counter Output Output (sinking) 12-24 VDC Supply Ground Input (sourcing) X0 - X3 Input + Common In the circuit diagram below, an encoder has open-emitter PNP transistor outputs. It sources current to the PLC input point, which sinks the current back to ground. Since the encoder sources current, no additional power supply is required. However, note that the encoder output must be 12 to 24 volts (5V encoder outputs will not work). Counter Output +12 to 24 VDC X0 - X3 Input Input Output (sourcing) : Ground (sinking) Common 38 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Setup for Mode 10 V7633 is the HSIO Mode Select register. Refer to the diagram below. Use BCD 10 in the lower byte of V7633 to select the High-Speed Counter Mode. Memory Location V7633 Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 For the function of bits 8 - 15, refer to page 3-6. HSIO Mode Setup (BCD) 10 = High-Speed Counter Choose the most convenient method of programming V7633 from the following: Include load and out instructions in your ladder program DirectSOFT32s memory editor or Data View Use the Handheld Programmer D2HPP We recommend using the first method above so that the HSIO setup becomes an integral part of your application program. An example program later in this section shows how to do this. Presets and Special Relays Presets are used to cause a particular action to occur when the count reaches the preset value. Refer to the figure below. Each counter features 24 presets, which you can program. Presets are double word numbers so they occupy two V-memory registers. The user selects the preset values, and the counter continuously compares the current count with the preset. When the two are equal, a special relay contact is energized and program execution jumps to the interrupt routine. We recommend using the special relay(s) in the interrupt service routine to cause any immediate action you desire. After the interrupt service routine is complete, the CPU returns to the ladder program, resuming program execution from the point of interruption. The compare function is ready for the next preset event. X0, up counter clock X2, external reset X1, up counter clock Counter 1 Reset 1 Counter 2 Reset 2 Current Value Current Value CPU Scan Does Count 1 = Preset? = Input Update Ladder Program Execution = Current Instruction Output Update INT HSIO Interrupt Routine Program SPxxx IRT X3, external reset Counter 2: Preset Data 1500 V3710 0000 2500 V3712 0000 2000 V3632 0000 Counter 1: Preset Data V3630 0000 V3634 0000 1000 2500 2000 V3632 0000 V3636 0000 2500 3175 V3634 0000 V3636 V3706 V3706 0000 0921 High 0921 Word High Word Does Count 2 = Preset? 3175 0000 Low 0000 Word Low Word DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 39 Chapter 3: High-speed Input and Pulse Output Features Absolute and Incremental Presets Two preset modes are available, absolute and incremental. Presets are entered into a contiguous block of V-memory registers. In the absolute mode, each preset is treated as the total count. In the incremental mode, the presets are cumulative. Incremental presets represent the number of counts between events. Absolute Presets (default) Incremental Presets Event C Preset = 150 Event C Preset = 150 (A + B + C) Event B Preset = 100 Event B Preset = 100 (A + B) Event A Preset = 50 100 200 300 Event A Preset = 50 100 200 300 = trigger point In the example above, presets are established at 50, 100, and 150. The difference between absolute and incremental modes is shown. Absolute presets trigger events at the preset values, 50, 100, and 150. Incremental presets trigger events at the cumulative totals: 50, 150, and 300. 310 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Preset Data Starting Location V7630 is the pointer to the V-memory location which contains the beginning of the Preset Data Tables. The default starting location for the Preset Data Tables is V3630 (default after initializing scratchpad). However, you may change this by programming a different value in V7630. Use the LDA and OUT instructions as shown: LDA O2000 OUT V7630 Load the octal address, convert to hex, leave result in accumulator. Output this address to V7630, the location of the pointer to the Preset data. Preset Table Pointer V7630 V2001 V2003 V2005 V2007 V2000 V2002 V2004 V2006 2000 Preset Table 0000 0000 0000 0000 1000 2000 2500 3175 Using Fewer than 24 Presets When all 24 available presets are used, the CPU knows automatically when it reaches the end of the preset table. When using fewer than 24 presets, however, it is necessary to signal the CPU that it has reached the last preset. The way to signal the end of the block of presets is to insert one of the following table-end codes into the next available register pair: Table-end Code Applicable Mode 0000 FFFF 0000 00FF 0000 FF00 Absolute and Incremental Incremental Incremental V2077 V2076 0000 0000 Meaning Signals end of presets Signals end of presets and restarts presets. Does not reset accumulated pulse counts of CT174 or CT176. Signals end of presets, restarts presets and resets accumulated pulse counts of CT174 or CT176. As shown in the table above, each of the table-end signals has a different meaning. Use the LDD Kffff instruction to insert the table-end code into the next register pair beyond the preset table. In the example, four presets are used. The 0000 FFFF in V3641-V3640 indicates the previous preset was the last preset. Default Preset Table Example V3630 V3632 V3634 V3636 V3640 0000 0000 0000 0000 0000 LDD Kffff OUT V3640 Load 0000 FFFF into accumulator. Output this value to V3640, the register beyond the Preset Table. V3631 V3633 V3635 V3637 V3641 1000 2000 2500 3175 FFFF In absolute mode, the counter and the cumulative total are reset each time a preset is reached. In incremental mode, you can choose not to reset the counter or the cumulative total, or you can choose to reset only the counter, or you can choose to reset the counter and the cumulative total when the table-end code is read. In the example, FFFF has been placed in V3640 since the last preset was in V3636, and we are using fewer than 24 presets. NOTE: In incremental mode each successive preset must be greater than the previous preset value. If a preset value is less than a lower-numbered preset value, the CPU cannot compare to that value, since the counter can only count upwards. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 311 Chapter 3: High-speed Input and Pulse Output Features Equal Relay Numbers The following table lists all 24 preset register default locations for each high-speed counter. Each occupies two 16-bit V-memory registers. The corresponding special relay contact number is in the next column. We might also call these equal relay contacts, because they are true (closed) when the present high-speed counter value is equal to the preset value. Each contact remains closed until the counter value equals the next preset value. Preset Register Table Counter 1 Preset 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Preset V-memory Register V3631 / V3630 V3633 / V3632 V3635 / V3634 V3637 / V3636 V3641 / V3640 V3643 / V3642 V3645 / V3644 V3647 / V3646 V3651 / V3650 V3653 / V3652 V3655 / V3654 V3657 / V3656 V3661 / V3660 V3663 / V3662 V3665 / V3664 V3667 / V3666 V3671 / V3670 V3673 / V3672 V3675 / V3674 V3677 / V3676 V3701 / V3700 V3703 / V3702 V3705 / V3704 V3707 / V3706 Special Relay Number SP540 SP541 SP542 SP543 SP544 SP545 SP546 SP547 SP550 SP551 SP552 SP553 SP554 SP555 SP556 SP557 SP560 SP561 SP562 SP563 SP564 SP565 SP566 SP567 Counter 2 Preset 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Preset V-memory Register V3711/V3710 V3713/V3712 V3715/V3714 V3717/V3716 V3721/V3720 V3723/V3722 V3725/V3724 V3727/V3726 V3731/V3730 V3733/V3732 V3735/V3734 V3737/V3736 V3741/V3740 V3743/V3742 V3745/V3744 V3747/V3746 V3751/V3750 V3753/V3752 V3755/V3754 V3757/V3756 V3761/V3760 V3763/V3762 V3765/V3764 V3767/V3766 Special Relay Number SP570 SP571 SP572 SP573 SP574 SP575 SP576 SP577 SP600 SP601 SP602 SP603 SP604 SP605 SP606 SP607 SP610 SP611 SP612 SP613 SP614 SP615 SP616 SP617 The consecutive addresses shown above for each relay are those assigned by the CPU as default addresses. The Pointer for the start of these addresses is stored by the CPU at V7630. If you have a conflict of addresses because of pre-existing code written to these addresses, you can change the default block of addresses merely by having your ladder logic place a different pointer value in V7630. To change the table location. use the LDA and OUT instructions as shown on the previous page. 312 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Calculating Your Preset Values The preset values occupy two data words each. They can range in value from -8388608 to 8388607, just like the high-speed counter value. All 24 values are absolute values, meaning that each one is an offset from the counter zero value. The preset values must be individually derived for each application. In the industrial lathe diagram below, the PLC monitors the position of the lead screw by counting pulses. At points A, B, and C along the linear travel, the cutter head pushes into the work material and cuts a groove. PLC 0V G LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 6-240V Y 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 INPUT: 12 - 24V X 0 1 2 21 22 D0-06DR 23 3 - 15mA PWR RUN CPU TX1 RX1 TX2 RX2 LOGIC C0 X0 K oyo 06 X3 X2 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X10 X12 C3 X15 X17 X20 X22 N.C. Industrial Lathe TERM PORT1 PORT2 RUN STOP X1 A B C to X0 and X1 quadrature pulses Encoder Motor lead screw cutter head Start The timing diagram below shows the duration of each equal relay contact closure. Each contact remains on until the next one closes. All go off when the counter resets. Equal Relays SP540 SP541 SP542 A B C NOTE: Each successive preset must be two numbers greater than the previous preset value. In the industrial lathe example, B>A+2 and C>B+2. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 313 Chapter 3: High-speed Input and Pulse Output Features X Input Configuration The configurable discrete input options for High-Speed Counter Mode are listed in the table below. Input X0 is dedicated for the first counter clock input. Input X1 can be the clock for the second counter or a filtered input. The section on Mode 60 operation at the end of this chapter describes programming the filter time constants. Inputs X2 and X3 can be configured as the counter resets, with or without the interrupt option. The interrupt option allows the reset input (X2 and X3) to cause an interrupt like presets do, but there is no SP relay contact closure (instead, X2 and X3 will be on during the interrupt routine, for 1 scan). Or finally, X2 and X3 may be left simply as a filtered input. Input Options Input X0 Configuration Register V7634 Function Counter #1 Clock Counter #2 Clock Hex Code Required 0001 (absolute) (default) 0101 (incremental) 0001 (absolute) (default) 0101 (incremental) 0004 0005 xx06, xx = filter time 0 - 99 ms (BCD) 0007* (default) 0207* 0107* 0307* 0004 0005 xx06, xx= filter time 0 - 99 ms (BCD) 0007* (default) 0207* 0107* 0307* 0004 0005 xx06, xx= filter time 0 - 99 ms (BCD) X1 V7635 Interrupt Pulse Input Filtered Input Counter #1 Reset (no interrupt) Counter #1 Reset (with interrupt) X2 V7636 Interrupt Pulse Input Filtered Input Counter #2 Reset (no interrupt) Counter #2 Reset (with interrupt) X3 V7637 Interrupt Pulse Input Filtered Input *With the counter reset, you have the option of a normal reset or a faster reset. However, the fast reset does not recognize changed preset values during program execution. When 0007 or 0107 are set in V7636 or V7637 and preset values are changed during program execution, the DL06 recognizes the changed preset values at the time of the reset. When 0207 or 0307 are set in V7636 or V7637 the CPU does not check for changed preset values, so the DL06 has a faster reset time. 314 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Writing Your Control Program The mnemonic for the counter instruction is UDC (up-down counter).The DL06 can have up to 128 counters, labeled CT0 through CT177. The high speed counter in the HSIO circuit is accessed in ladder logic by using UDC CT174 and CT176. It uses counter registers CT174 through CT177 exclusively when the HSIO mode 10 is active (otherwise, CT174 through CT177 are available for standard counter use). The HSIO counter needs two registers because it is a double-word counter. It has three inputs as shown. The first input (Enable) allows counting when active. The middle input is used to preload the counter value. The bottom signal is the reset. The Preload Input must be off while the counter is counting. The next figure shows how the HSIO counter will appear in a ladder program. Note that the Enable Interrupt (ENI) command must execute before the counter value reaches the first preset value. We do this at powerup by using the first scan relay. When using the counter but not the presets and interrupt, we can omit the ENI. Standard Counter Function UP Count DOWN Count Reset Input Kxxxxxxxx UDC CTxx HSIO Counter Function Enable Input Preload Input Reset Input UDC CT174 (or CT176) Kxxxxxxxx Counts UP and DOWN Preload counter by write to value Reset input is internal only Counts UP only Can use Preload Input to change count Reset may be internal or external Direct SOFT32 SP1 ENI XX Enable Input XX XX Preload Input Reset Input UDC CT174 (or CT176) Kxxxxxxxx Preset Range: 1-99999999 Required When the enable input is energized, the up/down counter CT174 will respond to pulses on X0 and increment. The updown counter CT176 will respond to pulses on X1 and increment. The reset input contact behaves in a logical OR fashion with the physical reset input. X2 (when selected) resets counter 1. X3 (when selected) resets counter 2. So,the high speed counter can receive a reset form either the contact(s) on the reset rung in the ladder, OR the external reset X2 or X3, if you have configured X2 or X3 as an external reset. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 315 Chapter 3: High-speed Input and Pulse Output Features Program Example 1: Counter Without Presets The following example is the simplest way to use the high-speed counters, which does not use the presets and special relays in the interrupt routine. The program configures the HSIO circuit for Mode 10 operation, so X0 is automatically the counter clock input for the first counter, and X1 is the counter clock input for the second counter. It uses the Comparedouble (CMPD) instruction to cause action at certain count values. Note that this allows you to have more than 24 presets.Then it configures X2 and X3 to be the external reset of the counter. Direct SOFT32 First Scan Only SP0 LD K10 OUT V7633 LD K1 OUT V7634 Load constant K10 into the accumulator . This selects Mode 10 as the HSIO mode. Output the constant K10 to V7633, the location of HSIO Mode select register . Load the constant required to configure X0 as the counter 1 clock. Output the constant K1 to V7634, the location of the setup parameter for X0. Load the constant required to configure X1 as the counter 2 clock. Output the constant K1 to V7635, the location of setup parameter for X1. Load the constant required to configure X2 as an external reset without interrupt. Output the constant K7 to V7636, the location of the setup parameter for X2. Load the constant required to configure X3 as an external reset without interrupt. Output the constant K7 to V7637, the location of the setup parameter for X3. Mode 10 Configure Inputs LD K1 OUT V7635 LD K7 OUT V7636 LD K7 OUT V7637 SP1 UDC SP1 K99999999 SP1 CT174 CT174 is the HSIO counter. The first rungs SP1 always enables the counter. The Preload Input in the middle is always of f. The third rungs Reset input is always off, because we will use the external reset. continued on next page 316 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Program Example Contd The compare double instructions below use the current count of the HSIO counter to turn on Y0 and Y1. This technique can make more than 24 comparisons, but it is scan-time dependent. However, use the 24 built-in presets with the interrupt routine if your application needs a very fast response time, as shown in the next example. continued from previous page SP1 UDC SP1 K99999999 SP1 CT176 CT176 always enables the counter. The Preload Input in the middle is always of f. The third rungs Reset input is always off, because we will use the external reset. SP1 LDD V1174 CMPD K123456 Load the current count of the HSIO counter in V1174 and V1175 into the accumulator Use the Compare-double instruction to compare the double word in the accumulator to the constant K123456. SP62 Y0 OUT The execution of the above CMPD instruction turns on special relay contact SP62 if the current count is greater than the comparison number (K123456). Load the current count of the HSIO counter in V1176 and V1177 into the accumulator Use the Compare-double instruction to compare the double word in the accumulator to the constant K345678 SP1 LDD V1176 CMPD K345678 SP62 Y1 OUT The execution of the above CMPD instruction turns on special relay contact SP62 if the current count is greater than the comparison number (K345678). END coil marks the end of the main program. END DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 317 Chapter 3: High-speed Input and Pulse Output Features Program Example 2: Counter With Presets The following example shows how to program the HSIO circuit to trigger on three preset values. You may recall the industrial lathe example from the beginning of this chapter. This example program shows how to control the lathe cutter head to make three grooves in the work-piece at precise positions. When the lead screw turns, the counter device generates pulses which the DL06 can count. The three preset variables A, B, and C represent the positions (number of pulses) corresponding to each of the three grooves. In this example, only one high-speed counter is used. The second counter could be used in the same manner. Preset Data A V3630 0000 B V3632 0000 C V3634 0000 V3636 0000 1500 3780 4850 FFFF Industrial Lathe A B C I/O Assignments X3 - Cutter head extended X4 - Cutter head retracted Y0 - Lead screw motor Y1 - Cutter head solenoid Counter Device Start Cutter head Lead screw Direct SOFT32 SP0 ENI SP0 LD K10 OUT V7633 LD K1 OUT V7634 Enable Interrupts before reaching a preset generates an interrupt. Special Relay SP0 is on during the first CPU scan. Load constant K10 into the accumulator . This selects Mode 10 as the HSIO mode. Output the constant to V7633, the location of HSIO Mode select register. Load the constant required to configure X0 as the counter clock. Output the constant K1 to V7634, the location of the setup parameter for X0. Load the constant required to configure X1 as a filtered input. Output the constant to V7635, the location of the setup parameter for X1. Load the constant required to configure X2 as an external reset with interrupt. Output the constant to V7636, the location of the setup parameter for X2. Load the constant required to configure X3 as a filtered input. Output the constant to V7637, the location of the setup parameter for X3. Load the octal address O3630 into the accumulator. This instruction automatically converts the address into hex. Output this address to V7630, the location of the pointer to the Preset Table. Select Mode 10 LD K1006 OUT V7635 LD K107 OUT V7636 LD K1006 OUT V7637 LDA O3630 OUT V7630 continued on next page 318 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features continued from previous page SP0 LDD K1500 OUTD V3630 LDD K3780 OUTD V3632 LDD K4850 OUTD V3634 LDD Kffff OUTD V3636 Load the preset A value into the accumulator . Load Presets Output the accumulator contents to the memory location for preset 1. Load the preset B value into the accumulator . Output the accumulator contents to the memory location for preset 2. Load the preset C value into the accumulator . Output the accumulator contents to the memory location for preset 3. Load the constant Kffff into the accumulator. This value represents the end of the preset list. Output the accumulator contents to the memory location for preset 4 (end of preset marker). SP1 UDC SP1 K99999999 SP1 SP0 The third rungs Reset input is normally of f, because we will use the external reset. You can optionally reset the counter value on each powerup using the SP0 contact. CT174 CT174 is the HSIO counter. The first rung s SP1 always enables the counter. The preload input in the middle is off (unused in this example). X3 Y1 RST Y0 SET END Input X3 energizes when the groove has finished cutting. So, we retract the cutter head. Turn lead screw on again, after cutter head has retracted. END coil marks the end of the main program. The INT label marks the beginning of the interrupt service routine program. X4 INT O0 SP540 Preset 1 Y0 RSTI Inside the interrupt service routine, we turn OFF the lead screw motor immediately . These special equal relays turn on individually as the corresponding preset is reached. In this application, each results in the cutting of a groove (Y1), so they are logically ORed together . SP541 Preset 2 SP542 Y1 SETI Preset 3 X2 C10 SETI IRT Input X2 will be energized inside the interrupt routine if X2 external interrupt was the source. Return from the interrupt service routine. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 319 Chapter 3: High-speed Input and Pulse Output Features Some applications will require a different type of action at each preset. It is possible for the interrupt routine to distinguish one preset event from another, by turning on a unique output for each equal relay contact SPxxx. We can determine the source of the interrupt by examining the equal relay contacts individually, as well as X2. The X2 contact will be on (inside the interrupt routine only) if the interrupt was caused by the external reset, X2 input. 320 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Program Example 3: Counter With Preload The following example shows how you can preload the current count with another value. When the preload command input (X4 in this example) is energized, we disable the counter from counting with C0. Then we write the value K3000 to the count register (V1076V1077). We preload the current count of the counter with K3000. When the preload command (X4) is turned off, the counter resumes counting any pulses, but now starting from K3000. In this example, only one high-speed counter is used. The second counter could be used in the same manner. DirectSOFT32 SP0 LD K10 OUT V7633 LD K1 OUT V7634 LD K1006 OUT V7635 LD K1006 OUT V7636 LD K1006 OUT V7637 C0 SET C0 UDC C1 K99999999 C2 SP0 The third rungs Reset input is normally off, because we will use the external reset. You can optionally reset the counter value on each powerup using the SP0 contact. Load constant K10 into the accumulator . This selects Mode 10 as the HSIO mode. Output this address to V7633, the location of HSIO Mode select register . Load the constant required to configure X0 as the counter clock. Output the constant K1 to V7634, the location of the setup parameter for X0. Load the constant required to configure X1 as a filtered input. Output the constant to V7635, the location of the setup parameter for X1. Load the constant required to configure X2 as a filtered input. Output the constant to V7636, the location of the setup parameter for X2. Load the constant required to configure X3 as a filtered input. Output the constant to V7637, the location of the setup parameter for X3. Select Mode 10 Set C0 on at powerup to enable counting. CT174 CT174 is the HSIO counter. The first rungs C0 contact enables the counter . The dummy input is in the middle. continued on next page DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 321 Chapter 3: High-speed Input and Pulse Output Features continued from last page X4 C0 RST LDD K3000 OUTD V1174 C1 PD When the preload request is made, the user turns on X4. First we disable counting by resetting C0, the counter s enable input. Load the BCD value K3000 into the accumulator. Output the constant to V1174/V1175, the location of the accumulated count for CT76. Generate a preload counter input pulse, which causes the counter to preload from V1174-V1175. Enable the counter by setting C0, when the preolad pulse on C1 has occurred (C1 is off). END coil marks the end of the main program. C0 C1 C0 SET END 322 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Troubleshooting Guide for Mode 10 If youre having trouble with Mode 10 operation, please study the following symptoms and possible causes. The most common problems are listed below. Symptom: The counter does not count. Possible causes: 1. Field sensor and wiring Verify that the encoder, proximity switch,or counter actually turns on and illuminates the status LED for X0 (counter 1) and X1 (counter 2). The problem could be due to sinking-sourcing wiring problem, etc. Remember to check the signal ground connection. Also verify that the pulse on-time is long enough for the PLC to recognize it. 2. Configuration use the Data View window to check the configuration parameters. V7633 must be set to 10, and V7634 must be set to 1 or 101 to enable the first high-speed counter. V7635 must be set to 1 or 101 to enable the second high-speed counter. 3. Stuck in reset check the input status of the reset input, X2 and X3. If X2 is on, the counter will not count because it is being held in reset. 4. Ladder program make sure you are using counter CT174 and CT176 in your program. The top input is the enable signal for the counter. It must be on before the counter will count. The middle input is the dummy input. The bottom input is the counter reset, and must be off during counting. Symptom: The counter counts but the presets do not function. Possible causes: 1. Configuration Ensure the preset values are correct. The presets are 32-bit BCD values having a range of 0 to 99999999. Make sure you write all 32 bits to the reserved locations by using the LDD and OUTD instructions. Use only evennumbered addresses, from V3630 to V3767. If using less than 24 presets, be sure to place 0000FFFF, 0000FF00, or 000000FF in the location after the last preset used. 2. Interrupt routine Only use Interrupt #0. Make sure the interrupt has been enabled by executing an ENI instruction prior to needing the interrupt. The interrupt routine must be placed after the main program, using the INT label and ending with an interrupt return IRT. 3. Special relays Check the special relay numbers in your program. Use SP540 for Preset 1, SP541 for Preset 2, etc. Remember that only one special equal relay contact is on at a time. When the counter value reaches the next preset, the SP contact which is on now goes off and the next one turns on. Symptom: The counter counts up but will not reset. Possible causes: 1. Check the LED status indicator for X2 (counter 1) and X3 (counter 2) to make sure it is active when you want a reset. Or, if you are using an internal reset, use the status mode of DirectSOFT32 to monitor the reset input to the counter. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 323 Chapter 3: High-speed Input and Pulse Output Features Mode 20: Up/Down Counter Purpose The counter in the HSIO circuit can count up/down signals from two separate sources (i.e. two single channel encoders) or two quadrature signal pulses. Quadrature signals are commonly generated from incremental encoders, which may be rotary or linear. The up/down counter has a range from -8388608 to 8388607. Using CT174 and CT175, the quadrature counter can count at up to a 7 kHz rate. Functional Block Diagram The diagram below shows HSIO functionality in Mode 20. When the lower byte of HSIO Mode register V7633 contains a BCD 20, the up/down counter in the HSIO circuit is enabled. For quadrature counting, input X0 is dedicated to the Phase A quadrature signal, and input X1 receives Phase B signal. X2 is dedicated to reset the counter to zero value when energized. DL06 PLC Y0 - Y1 Output Circuit Y2 - Y17 HSIO Counter Phase A X0 I/O data Reset X2 CPU V-memory V7633 X4 - X23 Phase B X1 Filter X3 Mode Select 0020 Input Circuit For standard up/down counting, input X0 is dedicated to the up counting signal, and input X1 is dedicated to the down counting signal. The X2 input resets the counter to zero when energized. DL06 PLC Y0 - Y1 Output Circuit Y2 - Y17 HSIO Counter Up X0 I/O data Reset X2 CPU V-memory V7633 X4 - X23 Down X1 Filter X3 Mode Select 0020 Input Circuit 324 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Quadrature Encoder Signals Quadrature encoder signals contain position and direction information, while their frequency represents speed of motion. Phase A and B signals shown below are phase-shifted 90 degrees, thus the quadrature name. When the rising edge of Phase A precedes Phase Bs leading edge (indicates clockwise motion by convention), the HSIO counter counts UP. If Phase Bs rising edge precedes Phase As rising edge (indicates counter-clockwise motion), the counter counts DOWN. Wiring Diagram A general wiring diagram for encoders to the DL06 in HSIO Mode 20 is shown below. Encoders with sinking outputs (NPN open collector) are probably the best choice for interfacing. If the encoder sources to the inputs, it must output 12 to 24 VDC. Note that encoders with 5V sourcing outputs will not work with DL06 inputs. Leading Edge Signal 90 phase shift Clockwise sequence Phase A Phase B Counterclockwise sequence Phase A Phase B Leading Edge Signal K oyo C0 X0 X1 X2 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 one cycle A B Quadrature Encoder Input LOGIC K oyo C0 X0 X1 X2 06 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 Reset Prox Sensor Input Up Down DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 325 Chapter 3: High-speed Input and Pulse Output Features Interfacing to Encoder Outputs The DL06s DC inputs are flexible in that they detect current flow in either direction, so they can be wired to an encoder with either sourcing or sinking outputs. In the following circuit, an encoder has open-collector NPN transistor outputs. It sinks current from the PLC input point, which sources current. The power supply can be the +24VDC auxiliary supply or another supply (+12VDC or +24VDC), as long as the input specifications are met. Encoder Output, (one phase) Output (sinking) 12-24 VDC Supply Ground Input (sourcing) Phase A or B Input + Common In the next circuit, an encoder has open-emitter PNP transistor outputs. It sources current to the PLC input point, which sinks the current back to ground. Since the encoder sources current, no additional power supply is required. However, note that the encoder output must be 12 to 24 volts (5V encoder outputs will not work). Encoder Output, (one phase) +12 to 24VDC Input Output (sourcing) Ground (sinking) Common Phase A or B Input 326 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Setup for Mode 20 Recall that V7633 is the HSIO Mode Select register. Refer to the diagram below. Use BCD 20 in the lower byte of V7633 to select the High-Speed Counter Mode. Memory Location V7633 Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 0 0 0 0 0 0 Miscellaneous Setup (BCD) 00 = Not Used (default) 10 = Battery Enabled 20 = Power-up in RUN 30 = Battery Enabled and Power-up in RUN HSIO Mode Setup (BCD) 20 = Up/Down Counter Choose the most convenient method of programming V7633 from the following: Include load and out instructions in your ladder program DirectSOFTs memory editor Use the Handheld Programmer D2HPP We recommend using the first method above so that the HSIO setup becomes an integral part of your application program. An example program later in this section shows how to do this. Presets and Special Relays The goal of counting is to cause a particular action to occur when the count reaches a preset value. Refer to the figure below. Each counter features 24 presets, which you can program. A preset is a number you select and store so that the counter will continuously compare the current count with the preset. When the two are equal, a special relay contact is energized and program execution jumps to the interrupt routine. We recommend using the special relay(s) in the interrupt service routine to cause any immediate action you desire. After the interrupt service routine is complete, the CPU returns to the ladder program, resuming program execution from the point of interruption. The compare function is ready for the next preset event. X0, up counter clock X2, external reset X1, up counter clock Counter 1 Reset 1 Counter 2 Reset 2 Current Value Current Value CPU Scan Does Count 1 = Preset? = Input Update Ladder Program Execution = Current Instruction Output Update INT HSIO Interrupt Routine Program SPxxx IRT X3, external reset Counter 2: Preset Data V3710 0000 1500 V3712 0000 2500 V3632 0000 2000 Counter 1: Preset Data V3630 0000 V3634 0000 1000 2500 2000 V3632 0000 V3636 0000 2500 3175 V3634 0000 V3636 V3706 V3706 0000 0921 High 0921 Word High Word Does Count 2 = Preset? 3175 0000 Low 0000 Word Low Word DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 327 Chapter 3: High-speed Input and Pulse Output Features X Input Configuration The configurable discrete input options for High-Speed Counter Mode are listed in the table below. The section on Mode 60 operation at the end of this chapter describes programming the filter time constants. Mode 20 Up/Down Counter Input Configuration Register Function Up counting Hex Code Required 0202 (standard, absolute) 0302 (standard, incremental) 0002 (quadrature, absolute) (default) 0102 (quadrature, incremental) 1002 (quadrature, absolute) 4x counting* 1102 (quadrature, incremental) 4x counting* 0000 0007** (default) 0207** 0107** 0307** 0005 xx06 (xx = filter time, 0 - 99ms (BCD) 0005 xx06 (xx = filter time, 0 - 99ms (BCD) (default) X0 V7634 Phase A X1 V7635 Down counting or Phase B Counter Reset (no interrupt) X2 V7636 Counter Reset (with interrupt) Pulse input Filtered input Pulse input Filtered input X3 V7637 * With this feature, you can count 4 times more with the same encoder. 4x counting Normal counting 1 1 2 3 4 5 2 6 7 8 9 10 11 12 13 14 15 16 3 4 Phase A Phase B ** With the counter reset you have the option of a normal reset or a faster reset. However, the fast reset does not recognize changed preset values during program execution. When 0007 or 0107 are set in V7636 and preset values are changed during program execution, the DL06 recognizes the changed preset values at the time of the reset. When 0207 or 0307 are set in V7636 the CPU does not check for changed preset values, so the DL06 has a faster reset time. 328 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Writing Your Control Program The mnemonic for the counter is UDC (up-down counter).The DL06 can have up to 128 counters, labeled CT0 through CT177. The quadrature counter in the HSIO circuit is accessed in ladder logic by using UDC CT174. It uses counter registers CT174 and CT175 exclusively when the HSIO mode 20 is active (otherwise, CT174 and CT175 are available for standard counter use). The HSIO counter needs two registers because it is a double-word counter. It has three inputs as shown. The first input is the enable signal, the middle is a preload (write), and the bottom is the reset. The enable input must be on before the counter will count. The enable input must be off during a preload. Standard Counter Function UP Count DOWN Count Reset Input Kxxxxxxxx UDC CTxx HSIO Counter Function Enable Input Preload Input Reset Input Kxxxxxxxx UDC CT174 Counts UP and DOWN Preload counter by write to value Reset input is internal only Counts UP and DOWN (from X0, X1) Can use Preload Input to change count Reset may be internal or external The next figure shows the how the HSIO quadrature counter will appear in a ladder program. Enable Input Preload Input Reset Input UDC CT174 Kxxxxxxxx Preset Range: 1-99999999 -8388608 to 8388607 When the enable input is energized, the counter will respond to quadrature pulses on X0 and X1, incrementing or decrementing the counter at CT174 CT175. The reset input contact behaves in a logical OR fashion with the physical reset input X2. This means the quadrature counter can receive a reset from either the contact(s) on the reset rung in the ladder, OR the external reset X2. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 329 Chapter 3: High-speed Input and Pulse Output Features Program Example 1: Quadrature Counting with an Interrupt Below is a simple example of how quadrature counting with an interrupt can be programmed. DirectSOFT32 ENI SP0 Load constant K20 into the accumulator . This selects Mode 20 as the HSIO mode. Output this address to V7633, the location of the HSIO Mode select register . Load the constant required to configure X0 as a quadrature absolute input. Output the constant to V7634, the location of the setup register for X0. Load the constant required to configure X2 as an external reset with interrupt. Output the constant to V7636, the location of the setup register for X2. Load the constant required to configure X3 as a filtered input. Output the constant to V7637, the location of the setup register for X3. Load the preset 1 value into the accumulator. LD K20 OUT V7633 LD K2 OUT V7634 LD K107 OUT V7636 LD K2006 OUT V7637 LDD K5000 OUTD V3630 LDD K10000 OUTD V3632 LDD K15000 OUTD V3634 LDD KFFFF OUTD V3636 SP1 UDC SP1 K18724 SP1 CT174 Output the accumulator contents to the memory location for preset 1. Load the constant required to configure X0 as Phase A input. Output the constant to V7634, the location of the setup register for X0. Load the constant required to configure X1 as Phase B input. Output the constant to V7635, the location of the setup register for X1. Load the constant required to configure X2 as an external reset. Output the constant to V7636, the location of the setup register for X2. CT174 is the HSIO quadrature counter. The first rung s SP1 always enables the counter . The dummy input is used by the built-in compiler . END END coil marks the end of the main program.. continued on next page 330 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features continued from last page INT O0 SP540 Y10 OUT Y11 OUT IRT Set Y0 to ON when the counter reaches or exceeds our comparison value while COUNTING UP. SP541 Set Y1 to ON when the counter reaches or goes below our comparison value while COUNTING DOWN. The Load Accumulator instructions have set up the V-memory as required, i.e. 20 in V7633 for the mode and 0202 in V7634 to designate the standard up/down with the absolute preset mode. By placing 0107 in V7636, an external reset for counter CT174 is selected and it will execute interrupt 0 on the rising edge of the reset. Presets for up/down counting have been stored in memory locations V3630 through V3635. The next even numbered location following this has FFFF to indicate we have no more presets. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 331 Chapter 3: High-speed Input and Pulse Output Features Program Example 2: Up/Down Counting with Standard Inputs In this example, there is a conveyor belt A that transports bottles to be inspected. During the course of the process, one sensor is keeping track of the bottles that are going onto belt A for inspection, and another sensor is keeping track of how many bottles are being removed to the finished product line. When we have reached 500 bottles in the process, an over 500 light turns on and a rerouting gate is activated to channel the incoming bottles to conveyor belt B. The rerouting gate will stay activated for 30 seconds after the conveyor belt A contains less than 500 bottles. The program below shows how ladder logic might be written to handle the job. Note the use of V1174. This memory location stores the current count for CT174 which is used with the DL06. DirectSOFT32 SP0 LD K20 Mode 20 Up/Down counter OUT V7633 LD K202 OUT V7634 LD K0 Must be zero with mode 20 Standard counting Absolute preset mode at X0 and X1 OUT V7635 LD K7 External reset without interrupt (X2) OUT V7636 LD K1006 Discrete filtered input at (X3) 10 ms. OUT V7637 SP1 UDC SP1 K500 SP1 CT174 Up/Down counter Only one counter is used with mode 20. The actual count (32-bit) is stored in V1175/V1174. When pulses are received at point 00, the value in V1175/V1174 will decrement. Actual counts V1174 K450 Y20 OUT When the pulse count reaches and exceeds 450, the "over 450" light (Y20) will turn on. Continued on next page. 332 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features continued from previous page Counter output Over 500 light CT174 Y21 OUT Over 500 latch When the pulse count reaches or exceeds the preset value of 500, the output of the counter (CT174) goes high and turns on the "over 500" light (Y21) and latches C5. C5 SET Over 500 latch C5 Y22 OUT Counter output When the count is 500 or greater, the rerouting gate (Y22) turns on and will stay on for 30 seconds after the count falls below 500. CT174 TMR TIMER 0 OUTPUT TO K300 Over 500 latch T0 C5 RST END END coil marks the end of the main program. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 333 Chapter 3: High-speed Input and Pulse Output Features Program Example 3: Quadrature Counting In this example, a wooden workpiece is being drilled with 3 holes and then the holes are injected with glue for dowels to be inserted at another workstation. A quadrature encoder is connected to a positioning table which is moving a drill press horizontally over the workpiece. The positioning table will stop and the drill press will lower to drill a hole in an exact location. After the three holes are drilled in the workpiece, the positioning table reverses direction and injects glue into the same holes. DirectSOFT32 ENI SP0 LD K20 Mode 20 Enable interrupts OUT V7633 LD K2 OUT V7634 LD K0 Must be zero Quadrature counting absolute mode at X0 and X1 OUT V7635 LD K107 OUT V7636 LD K1006 OUT V7637 SP0 LDD K5000 OUTD V3630 LDD K6000 OUTD V3632 LDD K7500 OUTD V3634 LDD K8000 OUTD V3636 LDD KFFFF OUTD V3640 External reset w/interrupt (X2) Discrete filtered input at (X3) 10 ms. Presets for up counting. This rung loads the counter's presets. In this case, the absolute preset mode has been selected. Tell CPU that there are no more presets. Continued on next page. 334 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Continued from previous page. Manual start of drilling process momentary PB. Forwarding positioning table. X20 Y30 SET C1 Drilling sequence completed (one hole only). 1st preset actual counts. C1 RST Drilling sequence completed (one hole only). Reversing Position Table. Glue injection. V1174 V3630 V1174 K5100 Y31 Y32 OUT 2nd preset actual counts. V1174 V3632 V1174 K6100 3rd preset actual counts. V1174 V3634 V1174 K7600 SP1 UDC SP1 K8388607 SP1 CT174 Drilling sequence initiation. One-shot bit. C5 C6 PD One-shot bit. Drill press down. C6 Y20 SET Drill turning. Y21 SET Drill fully extended. Limit switch 1. X10 Drill press down. Y20 RST Drill press up. Y22 Drill fully retracted. (home position) Limit switch 1. X3 SET One-shot bit. C7 PD Continued on next page. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 335 Chapter 3: High-speed Input and Pulse Output Features Continued from previous page. One-shot bit. First scan bit. Drill press down. C7 SP1 Y22 RST Drill turning. Y21 RST Drilling sequence completed (one hole only). C1 SET Drilling sequence initiation. C5 RST END INT O0 Forwarding Positioning Table. SP540 Y30 OUT Drilling sequence initiation. C5 SET SP541 Forwarding Positioning Table. Y30 OUT Drilling sequence initiation. C5 SET SP542 Forwarding Positioning Table. Y30 OUT Drilling sequence initiation. C5 SET SP543 Forwarding Positioning Table. Y30 OUT Reversing Positioning Table. Y31 SET Drilling sequence initiation. C5 Position Table home limit switch (resets counter to zero). SET Reversing Positioning Table. X2 Y31 RSTI IRT 336 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Troubleshooting Guide for Mode 20 If youre having trouble with Mode 20 operation, please study the following symptoms and possible causes. The most common problems are listed below. Symptom: The counter does not count. Possible causes: 1. Field sensor and wiring Verify that the encoder or other field device inputs actually turn on and illuminates the status LEDs for X0 and X1. A standard incremental encoder will visibly, alternately turn on the LEDs for X0 and X1 when rotating slowly (1 RPM). Or, the problem could be due to a sinking-sourcing wiring problem, etc. Remember to check the signal ground connection. Also verify that the pulse on-time, duty cycle, voltage level, and frequency are within the input specifications. 2. Configuration make sure all of the configuration parameters are correct. V7633 must be set to 20, and V7634 must be set to 0002 to enable the Phase A input, and V7635 must be set to 0000 to enable the Phase B input. 3. Stuck in reset check the input status of the reset input, X2. If X2 is on, the counter will not count because it is being held in reset. 4. Ladder program make sure you are using counter CT174 in your program. The top input is the enable signal for the counter. It must be on before the counter will count. The middle input is the dummy input and must be off for the counter to count. The bottom input is the counter reset, and must be off during counting. Symptom: The counter counts in the wrong direction (up instead of down, and visa-versa). Possible causes: 1. Channel A and B assignment Its possible that Channel A and B assignments of the encoder wires is backwards from the desired rotation/counting orientation. Just swap the X0 and X1 inputs, and the counting direction will be reversed. Symptom: The counter counts up and down but will not reset. Possible causes: 1. Check the LED status indicator for X2 to make sure it is active when you want a reset. Also verify the configuration register V7636 for X2 is set to 7. Or, if you are using an internal reset, use the status mode of DirectSOFT32 to monitor the reset input to the counter. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 337 Chapter 3: High-speed Input and Pulse Output Features Mode 30: Pulse Output Purpose The HSIO circuit in Mode 30 generates output pulse trains suitable for open-loop control of a single-axis motion positioning system. It generates pulse (stepper increment) and direction signals which you can connect to motor drive systems and perform various types of motion control. Using Mode 30 Pulse Output, you can select from three profile types detailed later in this chapter: Trapezoidal Profile Velocity Accel Decel Time Automatic Trapezoidal Accel Slope to Target Velocity to Decel Slope Step Trapezoidal User defined step acceleration/deceleration and target velocity Velocity Control Speed and Direction only The HSIO circuit becomes a high-speed pulse generator (up to 10 kHz) in Mode 30. By programming acceleration and deceleration values, position and velocity target values, the HSIO function automatically calculates the entire motion profile. The figure below shows the DL06 generating pulse and direction signals to the drive amplifier of a stepper positioning system. The pulses accomplish the profile independently and without interruption to ladder program execution in the CPU. Pulse DL06 Micro PLC Direction Stepper Motor LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 0V G AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 6-240V Y 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 INPUT: 12 - 24V X 0 1 2 21 22 D0-06DR 23 3 - 15mA PWR RUN CPU TX1 RX1 TX2 RX2 Drive Amplifier LOGIC C0 X0 K oyo 06 X3 X2 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X10 X12 C3 X15 X17 X20 X22 N.C. X1 TERM PORT1 PORT2 RUN STOP In the figure above, the DL06 generates pulse and direction signals. Each pulse represents the smallest increment of motion to the positioning system (such as one step or micro-step to a stepper system). Alternatively, the HSIO Pulse Output Mode may be configured to deliver counter clock-wise (CCW) and clock-wise (CW) pulse signals as shown to the right. CCW Pulse CW Pulse Drive Amplifier NOTE: The pulse output is designed for open loop stepper motor systems. This, plus its minimum velocity of 40 pps make it unsuitable for servo motor control. 338 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Functional Block Diagram The diagram below shows HSIO functionality in Mode 30. When the lower byte of HSIO Mode register V7633 contains a BCD 30, the pulse output capability in the HSIO circuit is enabled. The pulse outputs use Y0 and Y1 terminals on the output connector. Remember that the outputs can only be DC type to operate. DL06 PLC Output Circuit Y0 (Pulse / CW) Y1 (Direction / CCW) Y2 - Y17 HSIO SP 104 Profile Complete PULSE GEN Y0 Start Profile Y1 Preload Position Value Interrupt X1 during Automatic/Step Trapezoidal Profile CPU FILTER X1 Filtered Input Mode select V-memory V7633 xx30 X0, X1, X2, X3 X4 - X23 Input Circuit IMPORTANT NOTE: In Pulse Output Mode, Y0 and Y1 references are redefined or are used differently in two ways. Physical references refer to terminal screws, while logical references refer to I/O references in the ladder program. Please read the items below to understand this very crucial point. Notice the I/O point assignment and usage in the above diagram: X0, X1, X2 and X3 can be filtered inputs or pulse inputs in Pulse Output Mode, and they are available as input contacts to the ladder program. X1 behaves as an external interrupt to the pulse generator for automatic/step trapezoidal profiles. In other profile modes, it can be used as a filtered input or pulse input just like X0 (registration mode configuration shown above). References Y0 and Y1 are used in two different ways. At the discrete output connector, Y0 and Y1 terminals deliver the pulses to the motion system. The ladder program uses logical references Y0 and Y1 to initiate Start Profile and Load Position Value HSIO functions in Mode 30. Hopefully, the above discussion will explain why some I/O reference names have dual meanings in Pulse Output Mode. Please read the remainder of this section with care, to avoid confusion about which actual I/O function is being discussed. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 339 Chapter 3: High-speed Input and Pulse Output Features Wiring Diagram The generalized wiring diagram below shows pulse outputs Y0 and Y1 connected to the drive amplifier inputs of a motion control system. Motor Amplifier Power Input Signal Common Pulse Direction OUTPUT: Sinking Output 6 - 27V 1.0A PWR: 100-240V 50-60Hz 40VA +24 VDC G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 +V Interfacing to Drive Inputs The pulse signals from Y0 and Y1 outputs will typically go to drive input circuits as shown above. It will be helpful to locate equivalent circuit schematics of the drive amplifier. The following diagram shows how to interface to a sourcing drive input circuit. Y0, Y1 Pulse Output Power +DC Power Output (sinking) Common + Input (sourcing) Ground Drive Input The following circuit shows how to interface to a sinking drive input using a pullup resistor. Please refer to Chapter 2 to learn how to calculate and install R pullup. Y0, Y1 Pulse Output +DC power Power R pullup (sinking) (sourcing) Output + Supply Common 340 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 + Drive Input Input (sinking) Ground R Input Chapter 3: High-speed Input and Pulse Output Features Motion Profile Specifications The motion control profiles generated in Pulse Output Mode have the following specifications: Motion Control Profile Specifications Parameter Profiles Position Range Positioning Velocity Range V-memory registers Current Position Specification Automatic Trapezoidal Accel Slope / Target Velocity / Decel Slope Step Trapezoidal - Step Acceleration / Deceleration Velocity Control Speed and Direction only 8388608 to 8388607 Absolute / relative command 40 Hz to 10 kHz V3630 to V3652 (Profile Parameter Table) CT174 and CT175 (V1174 and V1175) Physical I/O Configuration The configurable discrete I/O options for Pulse Output Mode are listed in the table below. The CPU uses SP 104 contact to sense profile complete. V7632 is used to select pulse/direction or CW/CCW modes for the pulse outputs. Input X1 is dedicated as the external interrupt for use in registration mode. Physical I/O Configuration Input X0 X1 X2 X3 Configuration Register V7632 V7634 V7635 V7636 V7637 Function Y0 = Pulse Y1 = Direction Y0 = CW Pulse Y1 = CCW Pulse pulse input filtered input pulse input filtered input pulse input filtered input pulse input filtered input Hex Code Required 0103 0003 (default) 0005 xx06, xx = filter time, 0-9 (BCD) (default) 0005 xx06, xx = filter time, 0-99 (BCD) (default) 0005 xx06, xx = filter time, 0-99 (BCD) (default) 0005 xx06, xx = filter time, 0-99 (BCD) (default) Logical I/O Functions The following logical I/O references define functions that allow the HSIO to communicate with the ladder program. Logical I/O/ Functions Logical I/O SP104 X1 Y0 Y1 Function Profile Complete the HSIO turns on SP104 to the CPU when the profile completes. Goes back off when Start Profile (Y0) turns on. External Interrupt - If the interrupt feature is selected for the Automatic Trapezoidal profile or the Step Trapezoidal Profile, the DL06 keeps outputting pulses until X1 turns on. After it is on the unit outputs the pulses that are defined as the Target Start Profile the ladder program turns on Y0 to start motion. If turned off before the move completes, motion stops. Turning it on again will start another profile, unless the current position equals the target position. Preload Position Value if motion is stopped and Start Profile is off, you can load a new value in CT174/CT175, and turn on Y1. At that transition, the value in CT174/CT175 becomes the current position. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 341 Chapter 3: High-speed Input and Pulse Output Features Setup for Mode 30 Recall that V7633 is the HSIO Mode Select register. Refer to the diagram below. Use BCD 30 in the lower byte of V7633 to select the High-Speed Counter Mode. Memory Location V7633 Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 3 1 1 0 0 0 0 0 Miscellaneous Setup (BCD) 00 = Not Used (default) 10 = Battery Enabled 20 = Power-up in RUN 30 = Battery Enabled and Power-up in RUN HSIO Mode Setup (BCD) 30 = Pulse Output Choose the most convenient method of programming V7633 from the following: Include load and out instructions in your ladder program DirectSOFT32s memory editor Use the Handheld Programmer D2HPP We recommend using the first method above so that the HSIO setup becomes an integral part of your application program. An example program later in this section shows how to do this. Memory Location V3630 (default) Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 1 7 1 1 0 0 0 0 0 0 0 0 0 0 Profile Select (BCD) 4 to 7, C to F = Automatic Trapezoidal Profile 0, 1, 8, 9 = Step Trapezoidal Profile 2 = Velocity Profile Target Velocity Value Range = 0, 4 to 999, representing 40 Hz to 10 kHz pulse rate 342 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Profile / Velocity Select Register The first location in the Profile Parameter Table stores two key pieces of information. The upper four bits (1215) select the type of profile required. The lower 12 bits (0-11) select the Target Velocity. The ladder program must program this location before initiating any of the three profiles. The LD and OUT instruction will write all 16 bits, so be sure to fully specify the full fourdigit BCD value for the Profile / Velocity Select Register each time. The absolute and relative selection determines how the HSIO circuit will interpret your specified target position. Absolute position targets are referenced to zero. Relative position targets are referenced to the current position (previous target position). You may choose whichever reference method is most convenient for your application. Profile Parameter Table V7630 is a pointer location which points to the beginning of the Profile Parameter Table. The default starting location for the profile parameter table is V3630. However, you may change this by programming a different value in V7630. Remember to use the LDA (load address) instruction, converting octal into hex. The HSIO uses the next V-memory register past the bottom of the profile parameter table to indicate profile errors. See the error table at the end of this section for error code definitions. Profile Table Pointer V7630 3630 V3630 V3631 V3633 V3634 V3635 Profile Parameter Table xxxx xxxx xxxx xxxx xxxx xxxx Pulse Output Error Code V3636 00xx Automatic Trapezoidal Profile V-Memory Function Automatic Trapezoidal Profile without Ending Velocity (Ending Velocity is fixed to 0.) V3630, bits 1215 Automatic Trapezoidal Profile with Ending Velocity (Use V3637 to set up Ending Velocity.) Target Velocity Target Position** Starting Velocity Acceleration Time Deceleration Time Error Code Ending Velocity Range 4=absolute w/o interrupt 5=absolute with interrupt* C=relative w/o interrupt D=relative with interrupt* 6=absolute w/o interrupt 7=absolue with interrupt* E=relative w/o interrupt F=relative with interrupt* 4 to 999 or 0 to 1000 8388608 to 8388607 4 to 100 1 to 100 1 to 100 (see end of section) 4 to 100 Units x 10 pps Pulses x 10 pps x 100 mS x 100 mS x 10 pps V3630, bits 011 V3631 / V3632 V3633 V3634 V3635 V3636 V3637 * If you select to use interrupt, the DL06 will not start looking for your target count until the interrupt X1 is on. **To set a negative number, put 8 in the most significant digit. For example: -8388608 is 88388608 in V3631 and V3632. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 343 Chapter 3: High-speed Input and Pulse Output Features Step Trapezoidal Profile V-Memory V3630, bits 1215 Function Step Trapezoidal Profile Range 0=absolute w/o interrupt 7=absolue with interrupt* 8=relative w/o interrupt 9=relative with interrupt* 4 to 999 or 0 for 1000 8388608 to 8388607 4 to 1000 1 to 9999 4 to 1000 1 to 9999 4 to 1000 1 to 9999 4 to 1000 1 to 9999 4 to 1000 1 to 9999 4 to 1000 1 to 9999 4 to 1000 1 to 9999 4 to 1000 1 to 9999 Units V3630, bits 011 V3631 / V3632 V3633 V3634 V3635 V3636 V3637 V3640 V3641 V3642 V3643 V3644 V3645 V3646 V3647 V3650 V3651 V3652 Target Velocity Target Position** Step 1 Acceleration Step 1 Distance Step 2 Acceleration Step 2 Distance Step 3 Acceleration Step 3 Distance Step 4 Acceleration Step 4 Distance Step 5 Deceleration Step 5 Distance Step 6 Deceleration Step 6 Distance Step 7 Deceleration Step 7 Distance Step 8 Deceleration Step 8 Distance x 10 pps Pulses x 10 pps Pulses x 10 pps Pulses x 10 pps Pulses x 10 pps Pulses x 10 pps Pulses x 10 pps Pulses x 10 pps Pulses x 10 pps Pulses * If you select to use interrupt, the DL06 will not start looking for your target count until the interrupt X1 is on. **To set a negative number, put 8 in the most significant digit. For example: -8388608 is 88388608 in V3631 and V3632. Velocity Control V-Memory V3630 V3631 / 3632 V3633 V3636 Function Velocity Profile Direction Select Velocity Error Code Range 2000 only 0=CW, 80000000=CCW, 4 to 1000 (see end of section) Units Pulses x 10 pps 344 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Choosing the Profile Type Pulse Output Mode generates three types of motion profiles. Most applications use one type for most moves. However, each move can be different if required. Automatic Trapezoidal Accel Slope to Target Velocity to Decel Slope Step Trapezoidal Velocity to Position Control on Interrupt Velocity Control Speed and Direction only Automatic Trapezoidal Profile Defined The automatic trapezoidal profile is the most common positioning profile. It moves the load to a pre-defined target position by creating a move profile. The acceleration slope is applied at the starting position. The deceleration slope is applied backwards from the target position. The remainder of the move in the middle is spent traveling at a defined velocity. Registration profiles solve a class of motion control problems. In some applications, product material in work moves past a work tool such as a drill station. Shown to the right, registration marks on the scrap area of the work-piece allow a machine tool to register its position relative to the rectangle, to drill properly. Home search moves allow open-loop motion systems to re-calibrate (preload) the current position value at powerup. Velocity (Hz) 800 600 400 200 Automatic Trapezoidal Profile Target = 7000 pulses positioning velocity = 800 Hz Starting velocity = 40 to 1000 Hz Ending velocity = 0 Hz or 40 to 1000 Hz 100 ms to 10 secs 100 ms to 10 secs Time 0 pulses Acceleration Deceleration 7000 pulses The user determines the starting velocity, the acceleration/deceleration times, and the total number of pulses. The CPU computes the profile from these inputs. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 345 Chapter 3: High-speed Input and Pulse Output Features Step Trapezoidal Profiles Defined Registration profiles are a combination of velocity and position control modes. The move begins by accelerating to a programmed velocity. The velocity is sustained and the move is of indefinite duration. When an external interrupt signal occurs (due to registration sensing), the profile switches from velocity to position control. The move ends by continuing motion a pre-defined distance past the interrupt point (such as a drill hole location). The deceleration ramp is applied in advance of the target position. Velocity (Hz) 1000 800 600 400 200 1 100 200 300 400 5000 400 300 200 Step Trapezoidal Profile 4 3 2 5 6 7 8 100 Target = 7000 pulses positioning velocity = 1000 Hz Time Acceleration 0 pulses 1000 pulses Deceleration 6000 pulses 7000 pulses Define steps 1 through 4 for gradual acceleration to the target velocity and define steps 5 through 8 for gradual deceleration from the target velocity. This type of profile is appropriate for applications involving large stepper motors and/or large inertia loads. It can, however, be used to provide gradual ramping in applications involving smaller motors and loads. Velocity Control Defined The Velocity Control defines only the direction and speed of motion. There is no target position specified, so the move can be of indefinite length. Only the first velocity value needs to be defined. The remaining velocity values can be created while motion is in progress. Arrows in the profile shown indicate velocity changes. Velocity Control Profile Velocity (Hz) 800 600 400 200 Time 346 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Automatic Trapezoidal Profile Operation Starting velocities must be within the range of 40 pps to 1k pps. The remainder of the profile parameters are in the profile parameter table. Automatic Trapezoidal Profile Velocity Target Velocity Accel Starting Velocity Decel Ending velocity (optional) Time Start position Start External Interrupt (Optional) Profile Complete Y0 X1 SP104 Target position The time line of signal traces below the profile indicates the order of events. The HSIO uses logical output Y0 as the Start input to the HSIO, which starts the profile. Immediately the HSIO turns off the Profile Complete signal (SP104), so the ladder program can monitor the progress of the move. Typically a ladder program will monitor this bit so it knows when to initiate the next profile move. You can also use the external interrupt (X1). Once the external interrupt feature is selected for the profile, the DL06 keeps outputting the pulses until X1 turns on. Then, the DL06 outputs the pulses defined as the target position. If you are familiar with motion control, youll notice that we do not have to specify the direction of the move. The HSIO function examines the target position relative to the current position, and automatically outputs the correct direction information to the motor drive. Notice that the motion accelerates immediately to the starting velocity. This segment is useful in stepper systems so we can jump past low speed areas when low-torque problems or a resonant point in the motor might cause a stall. (When a stepper motor stalls, we have lost the position of the load in open-loop positioning systems). However, it is preferable not to make the starting velocity too large, because the stepper motor will also slip some pulses due to the inertia of the system. You can also set up the ending velocity for the same reason. When you need to change the current position value, use logical Y1 output coil to load a new value into the HSIO counter. If the ladder program loads a new value in CT174/CT175 (V1174/V1175), then energizing Y1 will copy that value into the HSIO circuit counter. This must occur before the profile begins, because the HSIO ignores Y1 during motion. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 347 Chapter 3: High-speed Input and Pulse Output Features Program Example 1: Automatic Trapezoidal Profile without External Interrupt The Automatic Trapezoidal Profile we want to perform is drawn and labeled in the following figure. It consists of a non-zero starting velocity, and moderate target velocity. Trapezoidal Profile Velocity Target V elocity = 1 kHz Accel = 2 sec Starting Velocity = 40Hz Decel = 4 sec In this example the ending velocity is not selected. Time Start position Target position = 5000 The following program will realize the profile drawn above, when executed. The beginning of the program contains all the necessary setup parameters for Pulse Output Mode 30. We only have to do this once in the program, so we use first-scan contact SP0 to trigger the setup. DirectSOFT32 SP0 LD K30 OUT V7633 LDA O3630 OUT V7630 Load constant K30 into the accumulator. This selects Mode 30 as the HSIO mode. Output the constant to V7633, the location of the HSIO Mode select register. Load the octal address of the beginning of the Profile Parameter Table. The LDA instruction converts this to a hex number in the accumulator. Output this address to V7630, the location of the pointer to the Profile Parameter Table. Load the constant K103 which is required to select pulse and direction for physical Y0 and Y1 functions, respectively (use K3 if your application needs CW and CCW). Output this constant to V7632, configuring the pulse output type. Load the constant K1006 which is required to select filtered inputs with a 10 mS filter time constant. Output this constant to V7634, configuring X0. Mode 30 Locate Parameter Table (optional) Select Pulse / Direction LD K103 OUT V7632 Filtered Inputs LD K1006 OUT V7634 OUT V7635 OUT V7636 OUT V7637 Output this constant to V7635, configuring X1. Output this constant to V7636, configuring X2. Output this constant to V7637, configuring X3. Continued on next page. 348 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Continued from previous page. SP0 LD K4100 OUT V3630 LDD K5000 OUTD V3631 Load the constant K4100 which is required to select Automatic Trapzoidal Profile, absolute positioning, without interrupt and a target velocity of 1 kHz. Output this constant to V3630, the location of the Profile Select / Starting Velocity setup register . Load the constant K5000 which selects a target position of 5000 pulses. Dont forget to use double word size (8-digit BCD position value). Output this constant to V3631 and V3632, the location of the Target Position double-word register . Load the constant K4 which is required to select a starting velocity of 40 Hz (4 x 10 pps). Output this constant to V3633, the location of the starting velocity parameter register . Load the constant K20 which is required to select an acceleration time of 2 seconds (20 x 100 mS). Output this constant to V3634, the location of the acceleration parameter register . Load the constant K40 which is required to select a deceleration time of 4 seconds (40 x 100 mS). Output this constant to V3635, the location of the deceleration parameter register . We use a spare filtered input to allow the operator to start the profile. When the operator turns X3 ON, then OFF , logical output Y0 starts the profile. SP104 is the logical output of the HSIO to indicate the move is complete. W e use Y2 to energize an annunciator that the profile has finished. Profile / Target Velocity Target Position Starting Velocity LD K4 OUT V3633 Acceleration LD K20 OUT V3634 Deceleration LD K40 OUT V3635 Y0 OUT Y2 OUT Start Profile X3 Profile Complete SP 104 Preload Position Value At any time you can write (preload) a new position into the current position value. This is often done after a home search (see the registration example programs). C0 Load the constant K1000 as the new current position value. Output this constant to V1174/V1175 (CTA174/CTA175). the location of the current position value. LDD K1000 OUTD V1174 Y1 PD Profile / Target Velocity Turn on Y1 for 1 scan. The off-to-on transition causes the HSIO to preload the current position with the value in V1174/V1175. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 349 Chapter 3: High-speed Input and Pulse Output Features Program Example 2: Automatic Trapezoidal Profile with External Interrupt Registration Applications: 1. In a typical application shown to the right, product material in work moves past a work tool such as a drill. Registration marks on the scrap Finished part area Scrap Area area of the work-piece allow a machine tool to register its position relative to the rectangle, to drill properly. direction of motion Registration marks 2. In other examples of registration, the work piece is stationary and the tool moves. A drill bit may approach the surface of a part in work, preparing to drill a hole of precise depth. However, the drill bit length gradually decreases Detect contact due to tool wear. A method to overcome this is to detect the moment of contact with the part surface on each drill, moving the bit into the part a constant distance after contact. Detect contact Finished part area Scrap Area Registration marks direction of motion. 3. The home search move allows a motion system to calibrate its position on startup. In this case, the positioning system makes an indefinite move and waits for the load to pass by a home limit switch. This creates an interrupt at the moment when the load is in a known position. We then stop motion and preload the position value with a number which equates to the physical home position. When an interrupt pulse occurs on physical input X1, the starting position is declared to be the present count (current load position). The velocity control switches to position control, moving the load to the target position. Note that the minimum starting velocity is 40 pps. This instantaneous velocity accommodates stepper motors that can stall at low speeds. Velocity Registration Profile Target Velocity Accel Decel Starting Velocity Start position Start Y0 Target position Time External Interrupt X1 Profile Complete SP104 The time line of signal traces below the profile indicates the order of events. The CPU uses logical output Y0 to start the profile. Immediately the HSIO turns off the Profile Complete signal (SP104), so the ladder program can monitor the moves completion by sensing the signals on state. 350 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features The Automatic Trapezoidal profile we want to perform is drawn and labeled in the following figure. It consists of a non-zero starting velocity, and moderate target velocity. Automatic Trapezoidal Profile Velocity Target V elocity = 1 kHz Accel = 2 sec Starting Velocity = 40 Hz Decel = 4 sec Ending Velocity = 80 Hz Time Start position Target position = 5000 The following program will realize the profile drawn above, when executed. The first program rung contains all the necessary setup parameters. We only have to do this once in the program, so we use first-scan contact SP0 to trigger the setup. DirectSOFT32 SP0 LD K30 OUT V7633 LDA O3630 OUT V7630 Load constant K30 into the accumulator. This selects Mode 30 as the HSIO mode. Output this constant to V7633, the location of the HSIO Mode select register. Load the octal address of the beginning of the Profile Parameter Table. The LDA instruction converts this to a hex number in the accumulator. Output this address to V7630, the location of the pointer to the Profile Parameter Table. Load the constant K103 which is required to select pulse and direction for physical Y0 and Y1 functions, respectively (Use K3 if your application requires CCW and CW). Output this constant to V7637, configuring the pulse output type. Load the constant K2006 which is required to select X0 and X1 as a filtered input with a 20 mS filter time constant. Output this constant to V7634, configuring X0. Mode 30 Locate Parameter Table (optional) Select Pulse / Direction LD K103 OUT V7632 Filtered Inputs LD K2006 OUT V7634 OUT V7635 LD K1006 OUT V7636 OUT V7637 Output this constant to V7635, configuring X1. Load the constant K1006 which is required to select X2 and X3 as a filtered input with a 10 ms filter time constant. Output this constant to V7636, configuring X2. Output this constant to V7637, configuring X3. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 351 Chapter 3: High-speed Input and Pulse Output Features Continued from previous page SP0 LD KF100 OUT V3630 LDD K5000 OUTD V3631 Load the constant KF100 which is required to select Automatic Trapezoidal Profile, relative positioning, with interrupt a velocity of 1 kHz (Fxxx times 10 pps). Output this constant to V3630, the location of the Profile Select / Starting Velocity setup register. Load the constant K5000 which selects a target position of 5000 pulses. Dont forget to use double word size (8-digit BCD position value). Output this constant to V3631 and V3632, the location of the Target Position double-word register. Load the constant K4 which is required to select a starting velocity of 40 Hz (4 x 10 pps). Output this constant to V3633, the location of the starting velocity parameter register. Load the constant K20 which is required to select an acceleration time of 2 seconds (20 x 100 mS). Output this constant to V3634, the location of the acceleration parameter register. Load the constant K40 which is required to select a deceleration time of 4 seconds (40 x 100 mS). Output this constant to V3635, the location of the deceleration parameter register. Load the constant K8 which is required to select an ending velocity of 80Hz (8 x 10 pps). Output this constant to V3637, the location of the deceleration parameter register. Profile / Target Velocity Target Position Starting Velocity LD K4 OUT V3633 Acceleration LD K20 OUT V3634 Deceleration LD K40 OUT V3635 Ending Velocity LD K8 OUT V3637 Y0 SET Start Profile X3 Profile Complete SP104 Y2 OUT C0 PD C0 Y0 RST We use an input to allow the operator to start the profile. X3 is a momentary Start switch. When the operator turns X3 ON, logical output Y0 starts the profile. SP104 is the logical output of the HSIO to indicate the move is complete. W e use Y2 to energize an annunciator that the profile has finished. This wont occur until after the interrupt from X1 has occurred and the profile is complete. The profile will begin when the start input (X3) is given. Then the motion begins an indefinite move, which lasts until an external interrupt on X1 occurs. Then the motion continues on for 5000 more pulses before stopping. 352 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Program Example 3: Automatic Trapezoidal Profile with Home Search One of the more challenging aspects of motion control is the establishment of actual position at powerup. This is especially true for open-loop systems which do not have a position feedback device. However, a simple limit switch located at an exact location on the positioning mechanism can provide position feedback at one point. For most stepper control systems, this method is a good and economical solution. Load Positioning System Motor Limit Switches Motion Numbering System CCW limit (X0) Home limit (X1) CW limit (X2) -3000 -2000 -1000 0 1000 2000 3000 In the drawing above, the load moves left or right depending on the CW/CCW direction of motor rotation. The PLC ladder program senses the CW and CCW limit switches to stop the motor, before the load moves out-of-bounds and damages the machine. The home limit switch is used at powerup to establish the actual position. The numbering system is arbitrary, depending on a machines engineering units. At powerup, we do not know whether the load is located to the left or to the right of the home limit switch. Therefore, we will initiate a home search profile, using the registration mode. The home limit switch is wired to X1, causing the interrupt. We choose an arbitrary initial search direction, moving in the CW (left-to-right) direction. If the home limit switch closes first, then we stop and initialize the position (this value is typically 0, but it may be different if preferred). However, if the CW limit switch closes first, we must reverse the motor and move until the home limit switch closes, stopping just past it. In the latter case, we repeat the first move, because we always need to make the final approach to the home limit switch from the same direction, so that the final physical position is the same in either case! Direct SOFT32 SP0 LD K30 OUT V7633 LDA O3630 OUT V7630 Configure the address of the parameter table. Selects Mode 30 as the HSIO mode. Filtered Inputs LD K2006 OUT V7634 OUT V7635 LD K1006 Configure the Y0 and Y1 pulse outputs for pulse and direction, respectively. The constant K2006 selects a 20 mS filter time constant. Output this constant to V7634, configuring X0. Output this constant to V7635, configuring X1. The constant K1006 selects a 10 mS filter time constant. Output this constant to V7630, configuring X2. Output this constant to V7637, configuring X3. Mode 30 Locate Parameter Table (optional) Select Pulse / Direction LD K103 OUT V7632 OUT V7636 OUT V7637 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 353 Chapter 3: High-speed Input and Pulse Output Features Profile / Target Velocity SP0 LD KD100 OUT V3630 Select Automatic Trapezoidal Profile, relative positioning, and a target velocity of 1000 pps (Dxxx times 10 pps). C1 TMR T0 K5 C2 SET Y0 SET C3 SET LDD K50 OUTD V3631 Add a timer to create a slight delay before reversing motor. T0 CCW delay done. Starting Velocity LD K4 OUT V3633 The constant K4 selects a starting velocity of 40 Hz (4 x 10 pps). Start profile again. CCW past home C2 The constant K20 selects an acceleration time of 2 seconds (20 x 100 mS). C3 X1 CCW past home Load a small positive position count (go CW). Acceleration LD K20 OUT V3634 Deceleration OUT V3635 X7 C10 SET Well choose the same for the deceleration value. Home Limit found, CW search direction C3 X1 Y0 RST C4 SET Turn off Start Profile. Go CW back to home. Add a timer to create a slight delay before reversing motor. Start the home search when X7 turns on. Search in CW direction C10 C0 LDD K50 OUTD V3631 Y0 SET C0 SET Turn on Start Profile, searching for either the home limit or the CW limit (depends on our starting position). Set C0 to indicate the CW home search has begun. The constant K50 selects a target position of 50 pulses (CW direction). C4 TMR T1 K5 C5 SET Y0 SET Target Position T1 CW delay done. Start profile again. Home Limit found, CW search direction C0 C1 C3 X1 Y0 RST LDD K0 OUTD V1174 Turn off Start Profile. Load the constant K0 for our initialized position. Output this constant to V1174/V1175. CW Limit found C0 C1 X2 Y0 RST LDD K80000200 OUTD V3631 C1 SET Turn off Start Profile. The constant K200 selects a target position of 200 pulses, which is in the CCW direction. C5 The CW limit has been reached. The home search profile will execute specific parts of the program, based on the order of detection of the limit switches. Ladder logic sets C0 to initiate a home search in the CW direction. If the CW limit is encountered, the program searches for home in the CCW direction, passes it slightly, and does the final CW search for home. After reaching home, the last ladder rung preloads the current position to 0. 354 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Step Trapezoidal Profile Operation With this step trapezoidal profile, you can control the acceleration and deceleration slopes as you want. Velocity (Hz) 1000 800 600 400 200 Step 1 Step 4 Step 3 Step Trapezoidal Profile Step 5 Accel Step 2 Decel Step 6 Step 7 Target Step 8 position Time Start External Interrupt (Optional) Profile Complete Start position Y0 X1 SP104 The time line of signal traces below the profile indicates the order of events. The HSIO uses logical output Y0 as the start input to the HSIO, which starts the profile. Immediately, the HSIO turns off the Profile Complete signal (SP104), so the ladder program can monitor the progress of the move. Typically, a ladder program will monitor this bit so it knows when to initiate the next profile move. You can also use the external interrupt (X1). Once the external interrupt feature selected for the profile, the DL06 keeps outputting the pulses until X1 turns on. Then the DL06 outputs the pulses defined as the target position. Each acceleration and deceleration slope consists of 4 steps. You can set up the velocity and the distance (number of pulses) of each step. You dont need to use all 4 steps of each slope. For instance, if you want to use only 2 steps, just set zero to the velocity and the distance of the 3rd and 4th step. If the acceleration slope and the deceleration slope are identical, you can just put zero into all the velocity and the distance parameters for the deceleration slope. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 355 Chapter 3: High-speed Input and Pulse Output Features Program Example 4: Step Trapezoidal Profile Program Example SP0 LD K30 OUT V7633 LDA O3630 OUT V7630 Load the constant K30 which is required to select Mode 30 as the HSIO mode. Output this constant to V7633, the location of the . HSIO mode selection register. Load the octal address O3630 of the beginning of the Profile Parameter Table. Output this constant to V7630, the location of the pointer to the Profile Parameter Table. Load the constant K3 which is required to select CW and CCW for physical Y0 and Y1 functions. Output this constant to V7632, configuring pulse output type. Load the constant K1006 which is required to select X0 as a filtered input with a 20ms filter time constant. Output this constant to V3634, configuring X0. Mode 30 Locate Parameter Table Select CW/CCW LD K3 OUT V7632 Filtered Inputs LD K1006 OUT V3634 LD K1006 OUT V7635 LD K1006 OUT V7636 LD K1006 OUT V7637 Load the constant K1006 which is required to select X1 as a filtered input with a 20ms filter time constant. Output this constant to V7635, configuring X1. Load the constant K1006 which is required to select X2 as a filtered input with a 20ms filter time constant. Output this constant to V7636, configuring X2. Load the constant K1006 which is required to select X3 as a filtered input with a 20ms filter time constant. Output this constant to V7637, configuring X3. Load the constant K8100 which is required to select trapezoidal profile, relative positioning, without interrupt and a target velocity of 1kHz. Output this constant to V3630, the location of the profile select/starting velocity setup register. Load the constant K30000 which selects a target position of 30000 pulses. Don't forget to use double word size (8-digit BCD position value). Output this constant to V3631 and V3632, the location of the target position double-word register. Profile/Target Velocity LD K8100 OUT V3630 Target Position LDD K30000 OUTD V3631 Continued on next page 356 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Continued from previous page Program Example SP0 LD K20 OUT V3633 LD K100 OUT V3634 Load the constant K20 which is required to select the step 1 acceleration velocity of 200 Hz. Output this constant to V3633, the location of the step 1 acceleration velocity setup register. Load the constant K100 which selects the step 1 distance of 100 pulses. Output this constant to V3634, the location of the step 1 distance. Load the constant K40 which is required to select the step 2 acceleration velocity of 400 Hz. Output this constant to V3635, the location of the step 2 acceleration velocity setup register. Load the constant K200 which selects the step 2 distance of 200 pulses. Output this constant to V3636, the location of the step 2 distance. Load the constant K60 which is required to select the step 3 acceleration velocity of 600 Hz. Output this constant to V3637, the location of the step 3 acceleration velocity setup register. Load the constant K300 which selects the step 3 distance of 300 pulses. Output this constant to V3640, the location of the step 3 distance. Load the constant K80 which is required to select the step 4 acceleration velocity of 800 Hz. Output this constant to V3641, the location of the step 4 acceleration velocity setup register. Load the constant K400 which selects the step 4 distance of 100 pulses. Output this constant to V3642, the location of the step 4 distance. Load the constant K80 which is required to select the step 5 deceleration velocity of 800 Hz. Output this constant to V3643 which is required to select the step 5 deceleration velocity of 800 Hz. Step 1 Acceleration Step 1 Distance Step 2 Acceleration LD K40 OUT V3635 Step 2 Distance LD K200 OUT V3636 Step 3 Acceleration LD K60 OUT V3637 Step 3 Distance LD K300 OUT V3640 Step 4 Acceleration LD K80 OUT V3641 Step 4 Distance LD K400 OUT V3642 Step 5 Deceleration LD K80 OUT V3643 Continued on next page DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 357 Chapter 3: High-speed Input and Pulse Output Features Continued from previous page Program Example SP0 LD K400 OUT V3644 LD K60 OUT V3645 Load the constant K400 which selects the step 5 distance of 400 pulses. Output this constant to V3644, the location of the step 5 distance. Load the constant K60 which is required to select the step 6 deceleration velocity of 600 Hz. Output this constant to V3645, which is required to select the step 6 deceleration velocity of 600 Hz. Load the constant K200 which selects the step 6 distance of 300 pulses. Output this constant to V3646, the location of the step 6 distance. Load the constant K40 which is required to select the step 6 deceleration velocity of 400 Hz. Output this constant to V3647, which is required to select the step 6 deceleration velocity of 400 Hz. Load the constant K200 which selects the step 7 distance of 200 pulses. Output this constant to V3650, the location of the step 7 distance. Load the constant K20 which is required to select the step 8 deceleration velocity of 200 Hz. Output this constant to V3651, which is required to select the step 8 deceleration velocity of 200 Hz. Load the constant K10 which selects the step 8 distance of 100 pulses. Output this constant to V3652, the location of the step 8 distance. Step 5 Distance Step 6 Deceleration Step 6 Distance LD K300 OUT V3646 Step 7 Deceleration LD K40 OUT V3647 Step 7 Distance LD K200 OUT V3650 Step 8 Deceleration LD K20 OUT V3651 Step 8 Distance LD K100 OUT V3652 Y0 OUT Start Profile X3 We use a spare filtered input to allow the operator to start the profile. When the operator turns X3 ON, then OFF, logical output Y0 starts the profile. Load value. Output this constant to V1174/V1175 (CT174/CT175), the location of the current position value. X0 LDD K0 OUTD V1174 Y1 PD END Profile / Target Velocity Turn on Y1 for 1 scan. The off-to-on transition causes the HSIO to preload the current position with the value in V1174/V1175. 358 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Velocity Profile Operation The velocity profile is best suited for applications which involve motion but do not require moves to specific points. Conveyor speed control is a typical example. Velocity Time Start Profile Complete Y0 SP104 The time line of signal traces below the profile indicates the order of events. Assuming the velocity is set greater than zero, motion begins when the Start input (Y0) energizes. Since there is no end position target, the profile is considered in progress as long as the Start input remains active. The profile complete logical input to ladder logic (X0) correlates directly to the Start input status when velocity profiles are in use. While the Start input is active, the ladder program can command a velocity change by writing a new value to the velocity register (V3633 by default). The full speed range of 40 Hz to 10 kHz is available. Notice from the drawing that there are no acceleration or deceleration ramps between velocity updates. This is how velocity profiling works with the HSIO. However, the ladder program can command more gradual velocity changes by incrementing or decrementing the velocity value more slowly. A counter or timer can be useful in creating your own acceleration/deceleration ramps. Unless the load must do a very complex move, it is easier to let the HSIO function generate the accel/decel ramps by selecting the trapezoidal or registration profiles instead. Unlike the trapezoidal and registration profiles, you must specify the desired direction of travel with velocity profiles. Load the direction select register (V3631/V3632 by default) with 8000 0000 hex for CCW direction, or 0 for CW direction. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 359 Chapter 3: High-speed Input and Pulse Output Features Program Example 5: Velocity Profile The velocity profile we want to perform is drawn and labeled in the following figure. Each velocity segment is of indefinite length. The velocity only changes when ladder logic (or other device writing to V-memory) updates the velocity parameter. Velocity Profile Velocity Time The following program uses dedicated discrete inputs to load in new velocity values. This program is fun to try, because you can create an infinite variety of profiles with just two or three input switches. The intent is to turn on only one of X2, X3, or X4 at a time. The beginning of the program contains all the necessary setup parameters for Pulse Output Mode 30. We only have to do this once in the program, so we use first-scan contact SP0 to trigger the setup. DirectSOFT32 SP0 LD K30 OUT V7633 LDA O3630 OUT V7630 Load constant K30 into the accumulator. This selects Mode 30 as the HSIO mode. Output this constant to V7633, the location of the HSIO Mode select register. Load the octal address of the beginning of the Profile Parameter Table. The LDA instruction converts this to hex number in the accumulator. Output this address to V7630, the location of the pointer to the Profile Parameter Table. Load the constant K103 which is required to select pulse and direction for physical Y0 and Y1 functions, respectively (Use K3 if your application needs CW and CCW). Output this constant to V7632, configuring the pulse output type. Load the constant K1006 which is required to select filtered inputs with a 10 mS filter time constant. Output this constant to V7634, configuring X0. Mode 30 Locate Parameter Table (optional) Select Pulse / Direction LD K103 OUT V7632 Filtered Inputs LD K1006 OUT V7634 OUT V7635 OUT V7636 OUT V7637 Output this constant to V7635, configuring X1. Output this constant to V7636, configuring X2. Output this constant to V7637, configuring X3. 360 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Program Example Contd SP0 LD K2000 OUT V3630 LDD K80000000 OUTD V3631 Load the constant K2000 which is required to select Velocity Profile. This data word contains no velocity information in the case of velocity mode. Output this constant to V3630, the location of the Profile Select setup register . Load the constant K80000000 which selects CCW direction for Velocity Profiles. Dont forget to use double word size (8-digit BCD position value). Output this constant to V3631 and V3632, the location of the Target Position double-word register . Load the constant K10 which is required to select an initial velocity of 100 pps (uses x10 multiplier). Output this constant to V3633, the location of the velocity parameter register . After the program is running, we can write here again, using discrete input switches. Profile / Target Velocity Select Direction Set Velocity LD K10 OUT V3633 Start Profile X1 Y0 OUT We use a spare filtered input to allow the operator to start the profile. When the operator turns X1 ON and leaves it on, logical output Y0 starts the profile. Load the constant K50 which is required to select a velocity of 500 pps when the operator closes X2. Output this constant to V3633, the location of the velocity parameter register . The speed will change immediately . Go Slow X2 LD K50 OUT V3633 Go Moderately X3 LD K200 OUT V3633 LD K600 OUT V3633 Load the constant K200 which is required to select a velocity of 2000 pps when the operator closes X3. Output this constant to V3633, the location of the velocity parameter register . The speed will change immediately . Load the constant K600 which is required to select a velocity of 6000 pps when the operator closes X4. Output this constant to V3633, the location of the velocity parameter register . The speed will change immediately . Go Fast X4 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 361 Chapter 3: High-speed Input and Pulse Output Features Automatic Trapezoidal Profile Error Codes The Profile Parameter Table starting at V3630 (default location) defines the profile. Certain numbers will result in an error when the HSIO attempts to use the parameters to execute a move profile. When an error occurs, the HSIO writes an error code in V3636. Most errors can be corrected by rechecking the Profile Parameter Table values. The error is automatically cleared at powerup and at Program-to-Run Mode transitions. Error Code 0000 0010 0020 0021 0022 0030 0032 0040 0041 0042 0050 0051 0052 0060 0061 0062 Error Description No error Requested profile type code is invalid (must use 4 to 6 or C to F) Target Velocity is not in BCD Target Velocity is specified to be less than 40 pps Target Velocity is specified to be greater than 10,000 pps Target Position value is not in BCD Direction Select is not 0 or 80000000. Starting Velocity is not in BCD Starting Velocity is specified to be less than 40 pps Starting Velocity is specified to be greater than 1,000 pps Acceleration Time is not in BCD Acceleration Time is zero Acceleration Time is greater than 10 seconds Deceleration Time is not in BCD Deceleration Time is zero Deceleration Time is greater than 10 seconds Troubleshooting Guide for Mode 30 If youre having trouble with Mode 30 operation, please study the following symptoms and possible causes. The most common problems are listed below: Symptom: The stepper motor does not rotate. Possible causes: 1. Configuration Verify that the HSIO actually generates pulses on outputs Y0 and Y1. Watch the status LEDs for Y0 and Y1 when you start a motion profile. If the LEDs flicker on and off or are steadily on, the configuration is probably correct. 2. Programming error If there are no pulses on Y0 or Y1 you may have a programming error. Check the contents of V3636 for an error code that may be generated when the PLC attempts to do the move profile. Error code descriptions are given above. 3. Check target value The profile will not pulse if the count value is equal to the target value (ex. count =0, target=0) 362 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features 4. Wiring Verify the wiring to the stepper motor is correct. Remember the signal ground connection from the PLC to the motion system is required. 5. Motion system Verify that the drive is powered and enabled. To verify the motion system is working, you can use Mode 60 operation (normal PLC inputs/outputs) as shown in the test program below. With it, you can manually control Y0 and Y1 with X0 and X1, respectively. Using an input simulator is ideal for this type of manual debugging. With the switches you can singlestep the motor in either direction. If the motor will not move with this simple control, Mode 30 operation will not be possible until the problem with the motor drive system or wiring is corrected. DirectSOFT32 SP0 LD K60 OUT V7633 LD K1006 OUT V7634 OUT V7635 OUT V7636 OUT V7637 X0 Y0 OUT Y1 OUT END Load constant K60 into the accumulator. This selects Mode 60 as the HSIO mode. Output the constant to V7633, the location of the HSIO Mode select register. Load the constant K1006 which is required to configure filtered inputs with a time constant of 10 mS. Output this constant to V7634, configuring X0. Mode 60 Filtered Inputs Output this constant to V7635, configuring X1. Output this constant to V7636, configuring X2. Output this constant to V7637, configuring X3. Use a switch on X0 input to manually control output Y0. X1 Use a switch on X1 input to manually control output Y1. END coil marks the end of the main program.. 6. Memory Error HSIO configuration parameters are stored in the CPU system memory. Corrupted data in this memory area can sometimes interfere with proper HSIO operation. If all other corrective actions fail, initializing the scratchpad memory may solve the problem. With DirectSOFT32, select the PLC menu, then Setup, then Initialize Scratchpad. Symptom: The motor turns in the wrong direction. Possible causes: 1. Wiring If you have selected CW and CCW type operation, just swap the wires on Y0 and Y1 outputs. 2. Direction control If you have selected Pulse and Direction type operation, just change the direction bit to the opposite state. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 363 Chapter 3: High-speed Input and Pulse Output Features Mode 40: High-Speed Interrupts Purpose The HSIO Mode 40 provides a high-speed interrupt to the ladder program. This capability is provided for your choice of the following application scenarios: External events need to trigger an interrupt subroutine in the CPU. Using immediate I/O instructions in the subroutine is typical. An interrupt routine needs to occur on a timed basis which is different from the CPU scan time (either faster or slower). The timed interrupt is programmable, from 5 to 999 mS. Functional Block Diagram The HSIO circuit creates the high-speed interrupt to the CPU. The following diagram shows the external interrupt option, which uses X0. In this configuration X1, X2 and X3 are external interrupts or normal filtered inputs. DL06 PLC HSIO Interrupt Interrupt or Filter Output Circuit Y0, Y1 Y2 -Y17 I/O data Interrupt Mode select CPU V-memory V7633 0040 X0 X1, X2, X3 X4 - X23 Input Circuit Alternately, you may configure the HSIO circuit to generate interrupts based on a timer, as shown below. In this configuration, inputs X0 is a filtered input. DL06 PLC HSIO Interrupt Timer Filter X0 Output Circuit Y0, Y1 Y2 - Y17 I/O data Interrupt or Filter X1, X2, X3 CPU V-memory V7633 0040 Interrupt Mode select X4 - X23 Input Circuit 364 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Setup for Mode 40 Recall that V7633 is the HSIO Mode Select register. Refer to the diagram below. Use BCD 40 in the lower byte of V7633 to select the High-Speed Counter Mode. Memory Location V7633 Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 1 4 0 0 0 0 0 0 0 Miscellaneous Setup (BCD) 00 = Not Used (default) 10 = Battery Enabled 20 = Power-up in RUN 30 = Battery Enabled and Power-up in RUN HSIO Mode Setup (BCD) 40 = High-Speed Interrupts Choose the most convenient method of programming V7633 from the following: Include load and out instructions in your ladder program DirectSOFT32s memory editor Use the Handheld Programmer D2HPP We recommend using the first method above so that the HSIO setup becomes an integral part of your application program. An example program later in this section shows how to do this. Interrupts and the Ladder Program Refer to the drawing below. The source of the interrupt may be external (X0 - X3). An internal timer can be used instead of X0 as the interrupt source. The setup parameter in V7634 serves a dual purpose: It selects between the two interrupt sources (external or internal timer). The timed interrupt can only be used with X0. In the case of the timer interrupt, it programs the interrupt timebase between 5 and 999 mS. The resulting interrupt uses label INT 0, 1, 2 or 3 in the ladder program. Be sure to include the Enable Interrupt (ENI) instruction at the beginning of your program. Otherwise, the interrupt routine will not be executed. CPU Scan Input Update Ladder Program Execution Current Instruction Input Update INT X0, External Interrupt TIMER Interrupt source / Time select V7634 xxx4 Interrupt Routine Program IRT X1-X3, External Interrupts DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 365 Chapter 3: High-speed Input and Pulse Output Features External Interrupt Timing Parameters External interrupt signals must meet certain timing criteria to guarantee an interrupt will result. Refer to the timing diagram below. The minimum pulse width is 0.1 mS. There must be some delay before the next interrupt pulse arrives, such that the interrupt period cannot be smaller than 0.5 mS. 0.5 mS minimum 0.1 mS minimum External Interrupt X0 Time Timed Interrupt Parameters When the timed interrupt is selected, the HSIO generates the interrupt to ladder logic. There is no interrupt pulse width in this case, but the interrupt period can be adjusted from 5 to 999 mS. 5 mS to 999 mS Timed Interrupt Time X Input / Timed INT Configuration The configurable discrete input options for High-Speed Interrupt Mode are listed in the table below. Input X0 is the external interrupt when 0004 is in V7634. If you need a timed interrupt instead, then V7634 contains the interrupt time period, and input X0 becomes a filtered input (uses X1s filter time constant by default). Inputs X0, X1, X2, and X3, can be filtered inputs, having individual configuration registers and filter time constants, interrupt inputs or counter inputs. Input X0 X1 X2 X3 Configuration Register V7634 V7635 Function External Interrupt Timed Interrupt Interrupt Pulse Input Filtered Input Interrupt Pulse Input Filtered Input Interrupt Pulse Input Filtered Input Hex Code Required 0004 (default) xxx4, xxx = INT timebase 5 - 999 ms (BCD) 0004 (default) 0005 xx06 (xx = filter time) 0 - 99 ms (BCD) 0004 (default) 0005 xx06 (xx = filter time) 0 - 99 ms (BCD) 0004 (default) 0005 xx06 (xx = filter time) 0 - 99 ms (BCD) V7636 V7637 If you are only using one of the points for an interrupt, you may want to select a different main mode (i.e. 10, 20, 30, 50, or 60); and then, just configure one of the terminals not taken as an interrupt. For example, you might want to configure your CPU for the UP counter mode (Mode 10) and use point 03 for a high speed interrupt. You should read the individual sections for any alternate mode you might choose. There you will find instructions on how to select a high speed interrupt as a secondary feature. 366 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Program Example 1: External Interrupt The following program selects Mode 40, then selects the external interrupt option for inputs X0 and X1. Inputs X2 and X3 are configured as filtered inputs with a 10 mS time constant. The program is otherwise generic, and may be adapted to your application. Direct SOFT32 SP0 LD K40 OUT V7633 LD K4 OUT V7634 OUT V7635 Load constant K40 into the accumulator . This selects Mode 40 as the HSIO mode. Output this constant to V7633, the location of the HSIO Mode select register . Load the constant K4 which is required to select the external interrupt option. X0 is the interrupt input. Output this constant to V7634, configuring the external interrupt option for X0. Output this constant to V7635, configuring the external interrupt option for X1. Load the constant K1006 which is required to select filtered inputs with a 10 mS filter time constant. Output this constant to V7636, configuring X2. Mode 40 External Interrupt Filtered Inputs LD K1006 OUT V7636 OUT V7637 Y5 RST Y6 RST Output this constant to V7637, configuring X3. Reset output Y5. Reset output Y6. Enable Interrupts at the beginning of the program. Insert Main Program rungs here for your application. INT Enable ENI Main Program INT O0 END END coil marks the end of the main program.. The INT label marks the beginning of the interrupt service routine program. Insert interrupt service routine rungs here for your application. Interrupt Routine SP1 Y5 SETI IRT INT O1 Set output Y5 Return to the main ladder program. Interrupt Routine SP1 Y6 SETI IRT Insert interrupt service routine rungs here for your application. Set output Y6. Return to the main ladder program. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 367 Chapter 3: High-speed Input and Pulse Output Features Program Example 2: Timed Interrupt The following program selects Mode 40, then selects the timed interrupt option, with an interrupt period of 100 mS. 100 mS Timed Interrupt Time Inputs X0, X1, X2, and X3, are configured as filtered inputs with a 10 mS time constant. Note that X0 uses the time constant from X1. The program is otherwise generic, and may be adapted to your application. Direct SOFT32 SP0 LD K40 OUT V7633 LD K1004 OUT V7634 Load constant K40 into the accumulator . This selects Mode 40 as the HSIO mode. Output this constant to V7633, the location of the HSIO Mode select register . Load the constant K1004 which is required to select the timed interrrupt option, with a period of 100 mS. Output this constant to V7634, configuring the timed interrupt for 100 mS period. Load the constant K1006 which is required to select filtered inputs with a 10 mS filter time constant. Output this constant to V7635, configuring X1 and X0. Mode 40 Timed Interrupt Filtered Inputs LD K1006 OUT V7635 OUT V7636 OUT V7637 Output this constant to V7636, configuring X2. Output this constant to V7637, configuring X3. INT Enable ENI Enable Interrupts at the beginning of the program. Insert Main Program rungs here for your application. Main Program END INT O0 END coil marks the end of the main program.. The INT label marks the beginning of the interrupt service routine program. Insert interrupt service routine rungs here for your application. Interrupt Routine SP1 LD K1 ADD V2000 OUT V2000 IRT Load constant K1 into the accumulator . Add the value in the accumulator with the value in memory location V2000. Output the result into memory location V2000. Return to the main ladder program. 368 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Mode 50: Pulse Catch Input Purpose The HSIO circuit has a pulse-catch mode of operation. It monitors the signal on inputs X0 X3, preserving the occurrence of a narrow pulse. The purpose of the pulse catch mode is to enable the ladder program to see an input pulse which is shorter in duration than the current scan time. The HSIO circuit latches the input event on input X0 - X3 for one scan. This contact automatically goes off after one scan. Functional Block Diagram Refer to the block diagram below. When the lower byte of HSIO Mode register V7633 contains a BCD 50, the pulse catch mode in the HSIO circuit is enabled. X0 - X3 automatically become the pulse catch inputs, which set the latch on each rising edge. The HSIO resets the latch at the end of the next CPU scan. Inputs X1 X2, and X3 can be filtered discrete inputs, also. DL06 PLC HSIO Latch Set X0 Output Circuit Y0, Y1 Y2 -Y17 I/O data Latch or Filter CPU V-memory Reset scan Mode select V7633 0050 X1, X2, X3 X4 - X23 Input Circuit Pulse Catch Timing Parameters Signal pulses at X0 - X3 must meet certain timing criteria to guarantee a pulse capture will result. Refer to the timing diagram below. The input characteristics of X0 are fixed (it is not a programmable filtered input). The minimum pulse width is 0.1 mS. There must be some delay before the next pulse arrives, such that the pulse period cannot be smaller than 0.5 mS. If the pulse period is smaller than 0.5 mS, the next pulse will be considered part of the current pulse. 0.5 mS minimum 0.1 mS minimum Pulse Input X0 Time Note: that the pulse catch and filtered input functions are opposite in nature. The pulse catch feature seeks to capture narrow pulses, while the filter input feature seeks to reject narrow pulses. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 369 Chapter 3: High-speed Input and Pulse Output Features When to use Pulse Catch Mode Use the pulse catch mode for applications where the input (e.g. X0) can not be used in the user program because the pulse width is very narrow. Use SP100 instead of X0. The SP100 contact stays on through the next scan, as shown above. PLC Scan X Input Update X0 SP100 Solve User Logic Output Update Input Update PLC Scan X + 1 Solve User Logic Output Update Input Update PLC Scan X + 2 Solve User Logic Output Update The status relay for X0 is SP100. The other status relays are shown in the table below. Input X0 X1 X2 X3 Status Relay SP100 SP101 SP102 SP103 Setup for Mode 50 Recall that V7633 is the HSIO Mode Select register. Refer to the diagram below. Use BCD 50 in the lower byte of V7633 to select the High-Speed Counter Mode. Memory Location V7633 Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 1 5 0 1 0 0 0 0 0 Miscellaneous Setup (BCD) 00 = Not Used (default) 10 = Battery Enabled 20 = Power-up in RUN 30 = Battery Enabled and Power-up in RUN HSIO Mode Setup (BCD) 50 = Pulse Catch Choose the most convenient method of programming V7633 from the following: Include load and out instructions in your ladder program DirectSOFT32s memory editor Use the Handheld Programmer D2HPP We recommend using the first method above so that the HSIO setup becomes an integral part of your application program. An example program later in this section shows how to do this. 370 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features X Input Configuration The configurable discrete input options for Pulse Catch Mode are listed in the table below. Each input has its own configuration register and filter time constant. Input X0 X1 Configuration Register V7634 V7635 Function Pulse Catch Input Interrupt Pulse Catch Input Filtered Input Interrupt Pulse Catch Input Filtered Input Interrupt Pulse Catch Input Filtered Input Hex Code Required 0005 (default) 0004 0005 (default) xx06 (xx = filter time) 0 - 99 ms (BCD) 0004 0005 (default) xx06 (xx = filter time) 0 - 99 ms (BCD) 0004 0005 (default) xx06 (xx = filter time) 0 - 99 ms (BCD) X2 V7636 X3 V7637 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 371 Chapter 3: High-speed Input and Pulse Output Features Program Example 1: Pulse Catch The following program selects Mode 50, then programs the pulse catch code for X0 and X1. Inputs X2, and X3 are configured as filtered inputs with 10 and 30 mS time constants respectively. The program is otherwise generic, and may be adapted to your application. Direct SOFT32 SP0 LD K50 OUT V7633 LD K5 OUT V7634 OUT V7635 LD K1006 OUT V7636 LD K3006 OUT V7637 Load constant K50 into the accumulator . This selects Mode 50 as the HSIO mode. Output this constant to V7633, the location of the HSIO Mode select register. Load the constant K5 which is required to configure X0 as the pulse catch input. Output this constant to V7634, configuring the pulse catch option for X0. Output this constant to V3635, configuring the pulse catch option for X1. Load the constant K1006 which is required to select filtered inputs with a 10 mS filter time constant. Output this constant to V7636, configuring X2. Mode 50 Pulse Catch Filtered Inputs Load the constant K3006 which is required to select filtered inputs with a 30 mS filter time constant. Output this constant to V7637, configuring X3. Main Program SP100 Y0 SET Y1 SET END Use the pulse catch input to set output Y0 on. This will work even for a very short pulse on X0. SP101 Use the pulse catch input to set output Y1 on. This will work even for a very short pulse on X1. END coil marks the end of the main program. 372 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Mode 60: Discrete Inputs with Filter Purpose The last mode we will discuss for the HSIO circuit is Mode 60, Discrete Inputs with Filter. The purpose of this mode is to allow the input circuit to reject narrow pulses and accept wide ones, as viewed from the ladder program. This is useful in especially noisy environments or other applications where pulse width is important. In all other modes in this chapter, X0 to X3 usually support the mode functions as special inputs. Only spare inputs operate as filtered inputs by default. Now in Mode 60, all four inputs X0 through X3 function only as discrete filtered inputs. Functional Block Diagram Refer to the block diagram below. When the lower byte of HSIO Mode register V7633 contains a BCD 60, the input filter in the HSIO circuit is enabled. Each input X0 through X3 has its own filter time constant. The filter circuit assigns the outputs of the filters as logical references X0 through X3. DL06 PLC HSIO FILTERS Output Circuit Y0, Y1 Y2-Y17 I/O data X0-X3 Mode select CPU V-memory V7633 X4-X23 0060 X0 X1 X2 X3 Input Circuit Input Filter Timing Parameters Signal pulses at inputs X0 X3 are filtered by using a delay time. In the figure below, the input pulse on the top line is longer than the filter time. The resultant logical input to ladder is phase-shifted (delayed) by the filter time on both rising and falling edges. In the bottom waveforms, the physical input pulse width is smaller than the filter time. In this case, the logical input to the ladder program remains in the OFF state (input pulse was filtered out). Filter Time Physical Input Logical Input X0 X0 Time Physical Input Logical Input X0 X0 Filter Time DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 373 Chapter 3: High-speed Input and Pulse Output Features Setup for Mode 60 Recall that V7633 is the HSIO Mode Select register. Refer to the diagram below. Use BCD 60 in the lower byte of V7633 to select the High-Speed Counter Mode. Memory Location V7633 Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 1 6 1 0 0 0 0 0 0 Miscellaneous Setup (BCD) 00 = Not Used (default) 10 = Battery Enabled 20 = Power-up in RUN 30 = Battery Enabled and Power-up in RUN HSIO Mode Setup (BCD) 60 = Filtered Inputs Choose the most convenient method of programming V7633 from the following: Include load and out instructions in your ladder program DirectSOFT32s memory editor Use the Handheld Programmer D2HPP We recommend using the first method above so that the HSIO setup becomes an integral part of your application program. An example program later in this section shows how to to this. X Input Configuration The configurable discrete input options for Discrete Filtered Inputs Mode are listed in the table below. The filter time constant (delay) is programmable from 0 to 99 mS (the input acts as a normal discrete input when the time constant is set to 0). The code for this selection occupies the upper byte of the configuration register in BCD. We combine this number with the required 06 in the lower byte to get xx06, where xx = 0 to 99. Input X0, X1, X2, and X3 can only be filtered inputs. Each input has its own configuration register and filter time constant. Input X0 X1 X2 X3 Configuration Register V7634 V7635 V7636 V7637 Function Filtered Input Filtered Input Filtered Input Filtered Input Hex Code Required xx06 (xx = filter delay time) 0 - 99 ms (BCD) (default) xx06 (xx = filter delay time) 0 - 99 ms (BCD) (default) xx06 (xx = filter delay time) 0 - 99 ms (BCD) (default) xx06 (xx = filter delay time) 0 - 99 ms (BCD) (default) 374 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 3: High-speed Input and Pulse Output Features Program Example: Filtered Inputs The following program selects Mode 60, then programs the filter delay time constants for inputs X0, X1, X2, and X3. Each filter time constant is different, for illustration purposes. The program is otherwise generic, and may be adapted to your application. Direct SOFT32 SP0 LD K60 OUT V7633 LD K1006 OUT V7634 LD K2006 OUT V7635 LD K5006 OUT V7636 LD K7006 OUT V7637 Load constant K60 into the accumulator . This selects Mode 60 as the HSIO mode. Output the constant to V7633, the location of the HSIO Mode select register . Load the constant K1006 which is required to configure filtered inputs with a 10 mS filter time constant. Output this constant to V7634, configuring X0. Mode 60 Filtered Inputs Load the constant K2006 which is required to select filtered inputs with a 20 mS filter time constant. Output this constant to V7635, configuring X1. Load the constant K5006 which is required to select filtered inputs with a 50 mS filter time constant. Output this constant to V7636, configuring X2. Load the constant K5006 which is required to select filtered inputs with a 70 mS filter time constant. Output this constant to V7637, configuring X3. Main Program END Insert Main Program rungs here for your application. END coil marks the end of the main program.. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 375 CPU SPECIFICATIONS AND OPERATION In This Chapter CHAPTER 4 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42 CPU Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43 CPU Hardware Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44 Using Battery Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48 CPU Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .412 I/O Response Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .417 CPU Scan Time Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . .420 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .425 DL06 System V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .429 Control Relay Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .435 Timer Status Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .437 Counter Status Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .437 Remote I/O Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .438 Module Placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .442 Power Budgeting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .444 Configuring the DL06s Comm Ports . . . . . . . . . . . . . . . . . . . . . . .446 Connecting to MODBUS and DirectNET Networks . . . . . . . . . . . .448 MODBUS Port Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . .448 NonSequence Protocol (ASCII In/Out and PRINT) . . . . . . . . . . . .450 Network Slave Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .451 Network Master Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .456 Network Master Operation (using MRX and MWX Instructions) . .460 Chapter 4: CPU Specifications and Operation Introduction The Central Processing Unit (CPU) is the heart of the Micro PLC. Almost all PLC operations are controlled by the CPU, so it is important that it is set up correctly. This chapter provides the information needed to understand: Steps required to set up the CPU Operation of ladder programs Organization of Variable Memory Power Input 16 Discrete Outputs Output circuit LCD monitor Power Supply Isolation boundary CPU 4 Optional card slots Input circuit 2 comm. ports 20 discrete Inputs To programming device or Operator interface Note: The High-Speed I/O function (HSIO) consists of dedicated but configurable hardware in the DL06. It is not considered part of the CPU, because it does not execute the ladder program. For more on HSIO operation, see Chapter 3. DL06 CPU Features The DL06 Micro PLC has 14.8K words of memory comprised of 7.6K of ladder memory and 7.6K words of V-memory (data registers). Program storage is in the FLASH memory which is a part of the CPU board in the PLC. In addition, there is RAM with the CPU which will store system parameters, V-memory, and other data which is not in the application program. The RAM is backed up by a super-capacitor, storing the data for several hours in the event of a power outage. The capacitor automatically charges during powered operation of the PLC. The DL06 supports fixed I/O which includes twenty discrete input points and sixteen output points. Over 220 different instructions are available for program development as well as extensive internal diagnostics that can be monitored from the application program or from an operator interface. Chapters 5, 6, and 7 provide detailed descriptions of the instructions. The DL06 provides two built-in communication ports, so you can easily connect a handheld programmer, operator interface, or a personal computer without needing any additional hardware. 42 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation CPU Specifications Specifications Feature Total Program memory (words) Ladder memory (words) Total V-memory (words) User V-memory (words) Non-volatile V Memory (words) Contact execution (boolean) Typical scan (1k boolean) RLL Ladder style Programming RLL and RLLPLUS Programming Run Time Edits Scan Handheld programmer DirectSOFT32 programming for Windows. Built-in communication ports (RS232C) FLASH Memory Local Discrete I/O points available Local Analog input / output channels maximum High-Speed I/O (quad., pulse out, interrupt, pulse catch, etc.) I/O Point Density Number of instructions available (see Chapter 5 for details) Control relays Special relays (system defined) Stages in RLLPLUS Timers Counters Immediate I/O Interrupt input (external / timed) Subroutines For/Next Loops Math (Integer and floating point) Drum Sequencer Instruction Time of Day Clock/Calendar Internal diagnostics Password security System error log User error log Battery backup DL06 14.8K 7680 7616 7488 128 2.0uS 3 - 4mS Yes Yes Yes Variable / fixed Yes Yes Yes Standard on CPU 36 None Yes, 2 20 inputs, 16 outputs 229 1024 512 1024 256 128 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Optional D2-BAT-1 available (not included with unit) DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 43 Chapter 4: CPU Specifications and Operation CPU Hardware Setup Communication Port Pinout Diagrams Cables are available that allow you to quickly and easily connect a Handheld Programmer or a personal computer to the DL06 PLCs. However, if you need to build your own cables, use the pinout diagrams shown. The DL06 PLCs require an RJ-12 phone plug for port 1 and a 15-pin svga dsub for port 2. The DL06 PLC has two built-in serial communication ports. Port 1 (RS232C only) is generally used for connecting to a D2-HPP, DirectSOFT32, operator interface, MODBUS slave only, or a DirectNET slave only. The baud rate is fixed at 9600 baud for port 1. Port 2 (RS232C/RS422/RS485) can be used to connect to a D2-HPP, DirectSOFT32, operator interface, MODBUS master/slave, DirectNET master/slave or ASCII in/out. Port 2 has a range of speeds from 300 baud to 38.4K baud. Port 1 Pin Descriptions 1 2 3 4 5 6 0V 5V RXD TXD 5V 0V PORT1 Port 2 Pin Descriptions 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5V TXD RXD RTS CTS RXD0V 0V TXD+ TXDRTS+ RTSRXD+ CTS+ CTSPower (+) connection Transmit data (RS-232C) Receive data (RS-232C) Ready to send Clear to send Receive data (-) (RS-422/485) Power (-) connection (GND) Power (-) connection (GND) Transmit data (+) (RS-422/485) Transmit data (-) (RS-422/485) Ready to send (+) (RS-422/485) Ready to send (-) (RS-422/485) Receive data (+) (RS-422/485) Clear to send (+) (RS-422/485) Clear to send (-) (RS-422/485) Power (-) connection (GND) Power (+) connection Receive data (RS-232C) Transmit data (RS-232C) Power (+) connection Power (-) connection (GND) TERM PORT2 RU RUN STOP 5 4 3 2 6 1 5 10 15 1 6 11 PORT1 PORT2 Communications Port 1 Com 1 Connects to HPP, DirectSOFT32, operator interfaces, etc. 6-pin, RS232C Communication speed (baud): 9600 (fixed) Parity: odd (default) Station Address: 1 (fixed) 8 data bits 1 start, 1 stop bit Asynchronous, half-duplex, DTE Protocol: (auto-select) K-sequence (slave only), DirectNET (slave only), MODBUS (slave only) Communications Port 2 Com 2 Connects to HPP, DirectSOFT32, operator interfaces, etc. 15-pin, multifunction port, RS232C, RS422, RS485 Communication speed (baud): 300, 600, 1200, 2400, 4800, 9600, 19200, 38400 Parity: odd (default), even, none Station Address: 1 (default) 8 data bits 1 start, 1 stop bit Asynchronous, half-duplex, DTE Protocol: (auto-select) K-sequence (slave only), DirectNET (master/slave), MODBUS (master/slave), non-sequence/print/ASCII in/out 44 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation Connecting the Programming Devices If youre using a Personal Computer with the DirectSOFT32 programming package, you can connect the computer to either of the DL06s serial ports. For an engineering office environment (typical during program development), this is the preferred method of programming. 0V LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 G Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. AC(L) AC(N) 24V C0 OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 Y X 0 1 2 D0-06DR 23 INPUT: 12 - 24V 3 - 15mA PWR RUN CPU TX1 RX1 TX2 RX2 LOGIC C0 X0 K oyo 06 X3 X2 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X10 X12 C3 X15 X17 X20 X22 N.C. X1 TERM PORT1 PORT2 RUN STOP Use cable part no. D2DSCBL The Handheld programmer D2-HPP is connected to the CPU with a handheld programmer cable. This device is ideal for maintaining existing installations or making small program changes. The handheld programmer is shipped with a cable, which is approximately 6.5 feet (200 cm) long. 0V G LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 Y X 0 1 2 D0-06DR 23 INPUT: 12 - 24V 3 - 15mA PWR RUN CPU TX1 RX1 TX2 RX2 LOGIC C0 X0 K oyo 06 X3 X2 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 X1 TERM PORT1 PORT2 RUN STOP For replacement cable, use part no. DV1000CBL CPU Setup Information Even if you have years of experience using PLCs, there are a few things you need to do before you can start entering programs. This section includes some basic things, such as changing the CPU mode, but it also includes some things that you may never have to use. Heres a brief list of the items that are discussed: Using Auxiliary Functions Clearing the program (and other memory areas) How to initialize system memory Setting retentive memory ranges The following paragraphs provide the setup information necessary to get the CPU ready for programming. They include setup instructions for either type of programming device you are using. The D2HPP Handheld Programmer Manual provides the Handheld keystrokes required to perform all of these operations. The DirectSOFT32 Manual provides a description of the menus and keystrokes required to perform the setup procedures via DirectSOFT32. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 45 Chapter 4: CPU Specifications and Operation status indicators G LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 0V AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 Y 0 1 2 D0-06DR 23 X INPUT: 12 - 24V 3 - 15mA PWR RUN CPU TX1 RX1 TX2 RX2 LOGIC K oyo C0 X0 X1 X2 06 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 TERM PORT1 PORT2 RUN STOP mode switch Status Indicators The status indicator LEDs on the CPU front panels have specific functions which can help in programming and troubleshooting. Mode Switch Functions The mode switch on the DL06 PLC provides positions for enabling and disabling program changes in the CPU. Unless the mode switch is in the TERM position, RUN and STOP mode changes will not be allowed by any interface device, (handheld programmer, DirectSOFT32 programming package or operator interface). Programs may be viewed or monitored but no changes may be made. If the switch is in the TERM position and no program password is in effect, all operating modes as well as program access will be allowed through the connected programming or monitoring device. Indicator PWR RUN Status ON OFF ON OFF Blinking ON OFF Blinking ON OFF ON OFF ON OFF ON OFF Meaning Power good Power failure CPU is in Run Mode CPU is in Stop or program Mode CPU is in firmware update mode CPU self diagnostics error CPU self diagnostics good Low battery Data is being transmitted by the CPU - Port 1 No data is being transmitted by the CPU - Port 1 Data is being received by the CPU - Port 1 No data is being received by the CPU - Port 1 Data is being transmitted by the CPU - Port 2 No data is being transmitted by the CPU - Port 2 Data is being received by the CPU - Port 2 No data is being received by the CPU - Port 2 CPU TX1 RX1 TX2 RX2 46 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation Changing Modes in the DL06 PLC Mode Switch Position RUN (Run Program) TERM (Terminal) RUN STOP CPU Action CPU is forced into the RUN mode if no errors are encountered. No changes are allowed by the attached programming/monitoring device. PROGRAM and the TEST modes are available. Mode and program changes are allowed by the programming/monitoring device. CPU is forced into the STOP mode. No changes are allowed by the programming/monitoring device. There are two ways to change the CPU mode. You can use the CPU mode switch to select the operating mode, or you can place the mode switch in the TERM position and use a programming device to change operating modes. With the switch in this position, the CPU can be changed between Run and Program modes. You can use either DirectSOFT32 or the Handheld Programmer to change the CPU mode of operation. With DirectSOFT32 you use a menu option in the PLC menu. With the Handheld Programmer, you use the MODE key. Menu Options MODE Key Mode of Operation at Power-up The DL06 CPU will normally power-up in the mode that it was in just prior to the power interruption. For example, if the CPU was in Program Mode when the power was disconnected, the CPU will power-up in Program Mode (see warning note below). WARNING: Once the super capacitor has discharged, the system memory may not retain the previous mode of operation. When this occurs, the PLC can power-up in either Run or Program Mode if the mode switch is in the term position. There is no way to determine which mode will be entered as the startup mode. Failure to adhere to this warning greatly increases the risk of unexpected equipment startup. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 47 Chapter 4: CPU Specifications and Operation Using Battery Backup An optional lithium battery is available to maintain the system RAM retentive memory when the DL06 system is without external power. Typical CPU battery life is five years, which includes PLC runtime and normal shutdown periods. However, consider installing a fresh battery if your battery has not been changed recently and the system will be shut down for a period of more than ten days. NOTE: Before installing or replacing your CPU battery, back-up your V-memory and system parameters. You can do this by using DirectSOFT32 to save the program, V-memory, and system parameters to hard/floppy disk on a personal computer. To install the D2BAT1 CPU battery in the DL06 CPU: 1. Press the retaining clip on the battery door down and swing the battery door open. 2. Place the battery into the cointype slot. 3. Close the battery door making sure that it locks securely in place. 4. Make a note of the date the battery was installed Battery door WARNING: Do not attempt to recharge the battery or dispose of an old battery by fire. The battery may explode or release hazardous materials. Enabling the Battery Backup Setting bit 12 in V7633 ON enables the battery circuit (SET B7633.12). In this mode the CPU will maintain the data in C, S, T, CT, and V memory when power is removed from the CPU, provided the battery is good. The use of a battery can also determine which operating mode is entered when the system power is connected. Whenever you have installed a battery, the battery always backs up the memory. However, the low battery indication can be disabled by turning off bit 12 in V7633. 48 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation Auxiliary Functions Many CPU setup tasks involve the use of Auxiliary (AUX) Functions. The AUX Functions perform many different operations, ranging from clearing ladder memory, displaying the scan time, copying programs to EEPROM in the handheld programmer, etc. They are divided into categories that affect different system parameters. Appendix A provides a description of the AUX functions. You can access the AUX Functions from DirectSOFT32 or from the D2HPP Handheld Programmer. The manuals for those products provide step-by-step procedures for accessing the AUX Functions. Some of these AUX Functions are designed specifically for the Handheld Programmer setup, so they will not be needed (or available) with the DirectSOFT32 package. The following table shows a list of the Auxiliary functions for the Handheld Programmer. AUX 2* RLL Operations 21 22 23 24 31 41 42 44 45 46 51 52 53 54 55 56 57 Check Program Change Reference Clear Ladder Range Clear All Ladders Clear V Memory 58 59 5B 5C 5D 61 62 65 71 72 73 74 75 76 81 82 83 Test Operations Override Setup HSIO Configuration Display Error History Scan Control Setup Show Revision Numbers Beeper On / Off Run Self Diagnostics Copy CPU memory to HPP EEPROM Write HPP EEPROM to CPU Compare CPU to HPP EEPROM Blank Check (HPP EEPROM) Erase HPP EEPROM Show EEPROM Type (CPU and HPP) Modify Password Unlock CPU Lock CPU AUX 3* V-Memory Operations AUX 4* I/O Configuration Show I/O Configuration I/O Diagnostics Power Up I/O Configuration check Select Configuration Configure I/O AUX 6* Handheld Programmer Configuration AUX 7* EEPROM Operations AUX 5* CPU Configuration Modify Program Name Display/Change Calendar Display Scan Time Initialize Scratchpad Set Watchdog Timer Set Communication Port 2 Set Retentive Ranges AUX 8* Password Operations Clearing an Existing Program Before you enter a new program, be sure to always clear ladder memory. You can use AUX Function 24 to clear the complete program.You can also use other AUX functions to clear other memory areas. AUX 23 Clear Ladder Range AUX 24 Clear all Ladders AUX 31 Clear V Memory Initializing System Memory The DL06 Micro PLC maintains system parameters in a memory area often referred to as the scratchpad. In some cases, you may make changes to the system setup that will be stored in system memory. For example, if you specify a range of Control Relays (CRs) as retentive, these changes are stored in system memory. AUX 54 resets the system memory to the default values. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 49 Chapter 4: CPU Specifications and Operation WARNING: You may never have to use this feature unless you want to clear any setup information that is stored in system memory. Usually, youll only need to initialize the system memory if you are changing programs and the old program required a special system setup. You can usually load in new programs without ever initializing system memory. Remember, this AUX function will reset all system memory. If you have set special parameters such as retentive ranges, etc. they will be erased when AUX 54 is used. Make sure that you have considered all ramifications of this operation before you select it. Setting Retentive Memory Ranges The DL06 PLCs provide certain ranges of retentive memory by default. The default ranges are suitable for many applications, but you can change them if your application requires additional retentive ranges or no retentive ranges at all. The default settings are: Memory Area Control Relays V Memory Timers Counters Stages DL06 Default Range C1000 C1777 V400 V37777 None by default CT0 CT177 None by default Available Range C0 C1777 V0 V37777 T0 T377 CT0 CT177 S0 S1777 You can use AUX 57 to set the retentive ranges. You can also use DirectSOFT32. menus to select the retentive ranges. Appendix A contains detailed information about auxiliary functions. WARNING: The DL06 CPUs do not come with a battery. The super capacitor will retain the values in the event of a power loss, but only for a short period of time, depending on conditions. If the retentive ranges are important for your application, make sure you obtain the optional battery. 410 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation Using a Password The DL06 PLCs allow you to use a password to help minimize the risk of unauthorized program and/or data changes. Once you enter a password you can lock the PLC against access. Once the CPU is locked you must enter the password before you can use a programming device to change any system parameters. You can select an 8-digit numeric password. The Micro PLCs are shipped from the factory with a password of 00000000. All zeros removes the password protection. If a password has been entered into the CPU you cannot just enter all zeros to remove it. Once you enter the correct password, you can change the password to all zeros to remove the password protection. WARNING: Make sure you remember your password. If you forget your password you will not be able to access the CPU. The Micro PLC must be returned to the factory to have the password (along with the ladder project) removed. You can use the D2HPP Handheld Programmer or DirectSOFT32. to enter a password. The following diagram shows how you can enter a password with the Handheld Programmer. DirectSOFT32 DirectSOFT Select AUX 81 CLR CLR I 8 B 1 AUX ENT D2HPP D2HPP PASSWORD 00000000 PASSWORD XXXXXXXX Enter the new 8-digit password X X X ENT There are three ways to lock the CPU once the password has been entered. 1. If the CPU power is disconnected, the CPU will be automatically locked against access. 2. If you enter the password with DirectSOFT32, the CPU will be automatically locked against access when you exit DirectSOFT32. 3. Use AUX 83 to lock the CPU. When you use DirectSOFT32, you will be prompted for a password if the CPU has been locked. If you use the Handheld Programmer, you have to use AUX 82 to unlock the CPU. Once you enter AUX 82, you will be prompted to enter the password. Note: The DL06 CPUs support multi-level password protection of the ladder program. This allows password protection while not locking the communication port to an operator interface. The multilevel password can be invoked by creating a password with an upper case A followed by seven numeric characters (e.g. A1234567). DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 411 Chapter 4: CPU Specifications and Operation CPU Operation Achieving the proper control for your equipment or process requires a good understanding of how DL06 CPUs control all aspects of system operation. There are four main areas to understand before you create your application program: CPU Operating System the CPU manages all aspects of system control. A quick overview of all the steps is provided in the next section. CPU Operating Modes The two primary modes of operation are Program Mode and Run Mode. CPU Timing The two important areas we discuss are the I/O response time and the CPU scan time. CPU Memory Map DL06 CPUs offer a wide variety of resources, such as timers, counters, inputs, etc. The memory map section shows the organization and availability of these data types. CPU Operating System At powerup, the CPU initializes the internal electronic hardware. Memory initialization starts with examining the retentive memory settings. In general, the contents of retentive memory is preserved, and non-retentive memory is initialized to zero (unless otherwise specified). After the one-time powerup tasks, the CPU begins the cyclical scan activity. The flowchart to the right shows how the tasks differ, based on the CPU mode and the existence of any errors. The scan time is defined as the average time around the task loop. Note that the CPU is always reading the inputs, even during program mode. This allows programming tools to monitor input status at any time. The outputs are only updated in Run mode. In program mode, they are in the off state. Error detection has two levels. Non-fatal errors are reported, but the CPU remains in its current mode. If a fatal error occurs, the CPU is forced into program mode and the outputs go off. Power up Initialize hardware Initialize various memory based on retentive configuration Update input Service peripheral Update Special Relays PGM Mode? RUN Execute program Update output Do diagnostics YES OK? NO Report error , set flag register , turn on LED Fatal error YES Force CPU into PGM mode NO 412 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation Program Mode In Program Mode, the CPU does not execute the application program or update the output points. The primary use for Program Mode is to enter or change an application program. You also use program mode to set up the CPU parameters, such as HSIO features, retentive memory areas, etc. You can use a programming device, such as DirectSOFT32 or the D2HPP Handheld Programmer to place the CPU in Program Mode. Run Mode In Run Mode, the CPU executes the application program and updates the I/O system. You can perform many operations during Run Mode. Some of these include: G LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 0V AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. Monitor and change I/O point status Update timer/counter preset values Update Variable memory locations OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 Y 0 1 2 D0-06DR 23 X INPUT: 12 - 24V 3 - 15mA PWR RUN CPU TX1 RX1 TX2 RX2 Download Program LOGIC K oyo C0 X0 X1 X2 06 X3 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 TERM PORT1 PORT2 RUN STOP Run Mode operation can be divided into several key areas. For the vast majority of applications, some of these execution segments are more important than others. For example, you need to understand how the CPU updates the I/O points, handles forcing operations, and solves the application program. The remaining segments are not that important for most applications. You can use DirectSOFT32 or the D2HPP Handheld Programmer to place the CPU in Run Mode. You can also edit the program during Run Mode. The Run Mode Edits are not bumpless to the outputs. Instead, the CPU maintains the outputs in their last state while it accepts the new program information. If an error is found in the new program, then the CPU will turn all the outputs off and enter the Program Mode. This feature is discussed in more detail in Chapter 9. Normal Run mode scan Read Inputs Read Inputs from Specialty I/O Service Peripherals Update Clock, Special Relays Solve the Application Program Write Outputs Write Outputs Write Outputs to Specialty I/O Diagnostics WARNING: Only authorized personnel fully familiar with all aspects of the application should make changes to the program. Changes during Run Mode become effective immediately. Make sure you thoroughly consider the impact of any changes to minimize the risk of personal injury or damage to equipment. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 413 Chapter 4: CPU Specifications and Operation Read Inputs The CPU reads the status of all inputs, then stores it in the image register. Input image register locations are designated with an X followed by a memory location. Image register data is used by the CPU when it solves the application program. Of course, an input may change after the CPU has just read the inputs. Generally, the CPU scan time is measured in milliseconds. If you have an application that cannot wait until the next I/O update, you can use Immediate Instructions. These do not use the status of the input image register to solve the application program. The Immediate instructions immediately read the input status directly from the I/O modules. However, this lengthens the program scan since the CPU has to read the I/O point status again. A complete list of the Immediate instructions is included in Chapter 5. Service Peripherals and Force I/O After the CPU reads the inputs from the input modules, it reads any attached peripheral devices. This is primarily a communications service for any attached devices. For example, it would read a programming device to see if any input, output, or other memory type status needs to be modified. There are two basic types of forcing available with the DL06 CPUs: Forcing from a peripheral not a permanent force, good only for one scan Bit Override holds the I/O point (or other bit) in the current state. Valid bits are X, Y, C, T, CT, and S. (These memory types are discussed in more detail later in this chapter). Regular Forcing This type of forcing can temporarily change the status of a discrete bit. For example, you may want to force an input on, even though it is really off. This allows you to change the point status that was stored in the image register. This value will be valid until the image register location is written to during the next scan. This is primarily useful during testing situations when you need to force a bit on to trigger another event. Bit Override Bit override can be enabled on a point-by-point basis by using AUX 59 from the Handheld Programmer or, by a menu option from within DirectSOFT32. Bit override basically disables any changes to the discrete point by the CPU. For example, if you enable bit override for X1, and X1 is off at the time, then the CPU will not change the state of X1. This means that even if X1 comes on, the CPU will not acknowledge the change. So, if you used X1 in the program, it would always be evaluated as off in this case. Of course, if X1 was on when the bit override was enabled, then X1 would always be evaluated as on. There is an advantage available when you use the bit override feature. The regular forcing is not disabled because the bit override is enabled. For example, if you enabled the Bit Override for Y0 and it was off at the time, then the CPU would not change the state of Y0. However, you can still use a programming device to change the status. Now, if you use the programming device to force Y0 on, it will remain on and the CPU will not change the state of Y0. If you then force Y0 off, the CPU will maintain Y0 as off. The CPU will never update the point with the results from the application program or from the I/O update until the bit override is removed. The following diagram shows a brief overview of the bit override feature. Notice the CPU does not update the Image Register when bit override is enabled. 414 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation Input Update Input Update X128 OFF Y128 OFF C377 OFF ... ... ... ... ... ... X2 ON Y2 ON C2 ON X1 ON Y1 ON C1 OFF X0 OFF Y0 OFF C0 OFF Bit Override OFF Force from Programmer Result of Program Solution Force from Programmer Result of Program Solution Bit Override ON Image Register (example) WARNING: Only authorized personnel fully familiar with all aspects of the application should make changes to the program. Make sure you thoroughly consider the impact of any changes to minimize the risk of personal injury or damage to equipment. CPU Bus Communication It is possible to transfer data to and from the CPU over the CPU bus on the backplane. This data is more than standard I/O point status. This type of communications can only occur on the CPU (local) base. There is a portion of the execution cycle used to communicate with these modules. The CPU performs both read and write requests during this segment. Update Clock, Special Relays and Special Registers The DL06 CPUs have an internal real-time clock and calendar timer which is accessible to the application program. Special V-memory locations hold this information. This portion of the execution cycle makes sure these locations get updated on every scan. Also, there are several different Special Relays, such as diagnostic relays, etc., that are also updated during this segment. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 415 Chapter 4: CPU Specifications and Operation Solve Application Program The CPU evaluates each instruction in the application program during this segment of the scan cycle. The instructions define the relationship between the input conditions and the desired output response. The CPU uses the output image register area to store the status of the desired action for the outputs. Output image register locations are designated with a Y followed by a memory location. The actual outputs are updated during the write outputs segment of the scan cycle. There are immediate output instructions available that will update the output points immediately instead of waiting until the write output segment. A complete list of the Immediate instructions is provided in Chapter 5. The internal control relays (C), the stages (S), and the variable memory (V) are also updated in this segment. You may recall that you can force various types of points in the system. (This was discussed earlier in this chapter.) If any I/O points or memory data have been forced, the output image register also contains this information. LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 G 0V AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 Y X 0 1 2 D0-06DR 23 INPUT: 12 - 24V 3 - 15mA PWR RUN CPU TX1 RX1 TX2 RX2 LOGIC C0 X0 K oyo 06 X3 X2 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 X1 TERM PORT1 PORT2 RUN STOP Normal Run mode scan Read Inputs from Specialty I/O Service Peripherals Update Special Relays Solve the Application Program Write Outputs from Specialty I/O Diagnostics Solve PID Loop Equations The DL06 CPU can process up to 8 PID loops. The loop calculations are run as a separate task from the ladder program execution, immediately following it. Only loops which have been configured are calculated, and then only according to a built-in loop scheduler. The sample time (calculation interval) of each loop is programmable. Please refer to Chapter 8, PID Loop Operation, for more on the effects of PID loop calculation on the overall CPU scan time. 416 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation Write Outputs Once the application program has solved the instruction logic and constructed the output image register, the CPU writes the contents of the output image register to the corresponding output points. Remember, the CPU also made sure that any forcing operation changes were stored in the output image register, so the forced points get updated with the status specified earlier. Write Outputs to Specialty I/O After the CPU updates the outputs in the local and expansion bases, it sends the output point information that is required by any Specialty modules which are installed. Diagnostics During this part of the scan, the CPU performs all system diagnostics and other tasks such as calculating the scan time and resetting the watchdog timer. There are many different error conditions that are automatically detected and reported by the DL06 PLCs. Appendix B contains a listing of the various error codes. Probably one of the more important things that occurs during this segment is the scan time calculation and watchdog timer control. The DL06 CPU has a watchdog timer that stores the maximum time allowed for the CPU to complete the solve application segment of the scan cycle. If this time is exceeded the CPU will enter the Program Mode and turn off all outputs. The default value set from the factory is 200 ms. An error is automatically reported. For example, the Handheld Programmer would display the following message E003 S/W TIMEOUT when the scan overrun occurs. You can use AUX 53 to view the minimum, maximum, and current scan time. Use AUX 55 to increase or decrease the watchdog timer value. I/O Response Time Is Timing Important for Your Application? I/O response time is the amount of time required for the control system to sense a change in an input point and update a corresponding output point. In the majority of applications, the CPU performs this task in such a short period of time that you may never have to concern yourself with the aspects of system timing. However, some applications do require extremely fast update times. In these cases, you may need to know how to to determine the amount of time spent during the various segments of operation. There are four things that can affect the I/O response time. The point in the scan cycle when the field input changes states Input Off to On delay time CPU scan time Output Off to On delay time The next paragraphs show how these items interact to affect the response time. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 417 Chapter 4: CPU Specifications and Operation Normal Minimum I/O Response The I/O response time is shortest when the input changes just before the Read Inputs portion of the execution cycle. In this case the input status is read, the application program is solved, and the output point gets updated. The following diagram shows an example of the timing for this situation. Scan Solve Program Read Inputs Scan Solve Program Write Outputs Solve Program Solve Program Field Input CPU Reads Inputs CPU Writes Outputs Input Off/On Delay Output Off/On Delay I/O Response T ime In this case, you can calculate the response time by simply adding the following items: Input Delay + Scan Time + Output Delay = Response Time Normal Maximum I/O Response The I/O response time is longest when the input changes just after the Read Inputs portion of the execution cycle. In this case the new input status is not read until the following scan. The following diagram shows an example of the timing for this situation. Scan Solve Program Read Inputs Scan Solve Program Write Outputs Solve Program Solve Program Field Input CPU Reads Inputs CPU Writes Outputs Input Off/On Delay Output Off/On Delay I/O Response T ime In this case, you can calculate the response time by simply adding the following items: Input Delay +(2 x Scan Time) + Output Delay = Response Time 418 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation Improving Response Time There are a few things you can do to help improve throughput. You can choose instructions with faster execution times You can use immediate I/O instructions (which update the I/O points during the program execution) You can use the HSIO Mode 50 Pulse Catch features designed to operate in high-speed environments. See Chapter 3 for details on using this feature. Of these three things the Immediate I/O instructions are probably the most important and most useful. The following example shows how an immediate input instruction and immediate output instruction would affect the response time. Scan Solve Program Normal Read Input Read Input Immediate Scan Solve Program Write Output Immediate Solve Program Normal Write Outputs Solve Program Field Input Input Off/On Delay Output Off/On Delay I/O Response Time In this case, you can calculate the response time by simply adding the following items. Input Delay + Instruction Execution Time + Output Delay = Response Time The instruction execution time would be calculated by adding the time for the immediate input instruction, the immediate output instruction, and any other instructions in between the two. NOTE: Even though the immediate instruction reads the most current status from I/O, it only uses the results to solve that one instruction. It does not use the new status to update the image register. Therefore, any regular instructions that follow will still use the image register values. Any immediate instructions that follow will access the I/O again to update the status. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 419 Chapter 4: CPU Specifications and Operation CPU Scan Time Considerations The scan time covers all the cyclical tasks that are performed by the operating system. You can use DirectSOFT32. or the Handheld Programmer to display the minimum, maximum, and current scan times that have occurred since the previous Program Mode to Run Mode transition. This information can be very important when evaluating the performance of a system. As weve shown previously there are several segments that make up the scan cycle. Each of these segments requires a certain amount of time to complete. Of all the segments, the following are the most important: Input Update Peripheral Service Program Execution Output Update Timed Interrupt Execution CPU Bus Communication Power up Initialize hardware Check I/O module config. and verify Initialize various memory based on retentive configuration Update input Read input data from Specialty and Remote I/O Service peripheral The one you have the most control over is the amount of time it takes to execute the application program. This is because different instructions take different amounts of time to execute. So, if you think you need a faster scan, then you can try to choose faster instructions. Your choice of I/O type and peripheral devices can also affect the scan time. However, these things are usually dictated by the application. The following paragraphs provide some general information on how much time some of the segments can require. Update Clock / Calendar PGM Mode? RUN Execute ladder program PID Equations (DL250) Update output Write output data to Specialty and Remote I/O Reading Inputs The time required during each scan to read the input status of built-in inputs is 52.6 s. Dont confuse this with the I/O response time that was discussed earlier. Do diagnostics Writing Outputs The time required to write the output status of built-in outputs is 41.1 S. Dont confuse this with the I/O response time that was discussed earlier. OK OK? NO Report the error, set flag, register, turn on LED YES NO Fatal error YES Force CPU into PGM mode 420 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation Service Peripherals Communication requests can occur at any time during the scan, but the CPU only logs the requests for service until the Service Peripherals portion of the scan. The CPU does not spend any time on this if there are no peripherals connected. To Log Request (anytime) Nothing Connected Port 1 Port 2 LCD Min. & Max Send Min. / Max. Rec. Min. / Max. Send Min. / Max. Rec. Min. / Max. Min. / Max. DL06 0s 5.8/11.8 s 12.5/25.2 s 6.2/14.3 s 14.2/31.9 s 4.8/49.2 s During the Service Peripherals portion of the scan, the CPU analyzes the communications request and responds as appropriate. The amount of time required to service the peripherals depends on the content of the request. To Service Request DL06 Minimum Run Mode Max. Program Mode Max. DL06 9 s 412 s 2.5 second CPU Bus Communication Some specialty modules can also communicate directly with the CPU via the CPU bus. During this portion of the cycle the CPU completes any CPU bus communications. The actual time required depends on the type of modules installed and the type of request being processed. Update Clock / Calendar, Special Relays, Special Registers The clock, calendar, and special relays are updated and loaded into special V-memory locations during this time. This update is performed during both Run and Program Modes. Modes Program Mode Run Mode Minimum Maximum Minimum Maximum DL06 12.0s 12.0s 20.0s 27.0s DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 421 Chapter 4: CPU Specifications and Operation Application Program Execution The CPU processes the program from address 0 to the END instruction. The CPU executes the program left to right and top to bottom. As each rung is evaluated the appropriate image register or memory location is updated. The time required to solve the application program depends on the type and number of instructions used, and the amount of execution overhead. Just add the execution times for all the instructions in your program to determine to total execution time. Appendix C provides a complete list of the instruction execution times for the DL06 Micro PLC. For example, the execution time for running the program shown below is calculated as follows: Instruction STR X0 OR C0 ANDN X1 OUT Y0 STRN C100 LD K10 STRN C101 OUT V2002 STRN C102 LD K50 STRN C103 OUT V2006 STR X5 ANDN X10 OUT Y3 END SUBT OTAL Overhead Minimum Maximum DL06 746.2 s 4352.4 s Time .67 .51 .51 1.82 .67 9.00 .67 9.3 .67 9.00 .67 1.82 .67 .51 1.82 12.80 s s s s s s s s s s s s s s s s X0 X1 Y0 OUT C0 C100 LD K10 C101 OUT V2002 C102 LD K50 C103 OUT V2006 X5 X10 51.11 s Y3 OUT END TOTAL TIME = (Program execution time + Overhead) x 1.18 The program above takes only 51.11 s to execute during each scan. The DL06 spends 0.18 ms, on internal timed interrupt management, for every 1ms of instruction time. The total scan time is calculated by adding the program execution time to the overhead (shown above)and multiplying the result (ms) by 1.18. Overhead includes all other housekeeping and diagnostic tasks. The scan time will vary slightly from one scan to the next, because of fluctuation in overhead tasks. Program Control Instructions the DL06 CPUs offer additional instructions that can change the way the program executes. These instructions include FOR/NEXT loops, Subroutines, and Interrupt Routines. These instructions can interrupt the normal program flow and affect the program execution time. Chapter 5 provides detailed information on how these different types of instructions operate. 422 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation PLC Numbering Systems If you are a new PLC user or are using ? 0402 ? ? 3 AutomationDirect PLCs for the first time, please take 3A9 7 961428 ASCII a moment to study how our PLCs use numbers. hexadecimal 1001011011 Youll find that each PLC manufacturer has their own 177 1011 ? conventions on the use of numbers in their PLCs. decimal A 72B We want to take just a moment to familiarize you ? 300124 with how numbers are used in AutomationDirect PLCs. The information you learn here applies to all of our PLCs! As any good computer does, PLCs store and manipulate numbers in binary form: just ones and zeros. So why do we have to deal with numbers in so many different forms? Numbers have meaning, and some representations are more convenient than others for particular purposes. Sometimes we use numbers to represent a size or amount of something. Other numbers refer to locations or addresses, or to time. In science we attach engineering units to numbers to give a particular meaning. octal 1482 BCD ? binary PLC Resources PLCs offer a fixed amount of resources, depending on the model and configuration. We use the word resources to include variable memory (V-memory), I/O points, timers, counters, etc. Most modular PLCs allow you to add I/O points in groups of eight. In fact, all the resources of our PLCs are counted in octal. Its easier for computers to count in groups of eight than ten, because eight is an even power of 2. Octal means simply counting in groups of eight things Decimal 1 2 3 4 5 6 7 8 at a time. In the figure to the right, there are eight circles. The quantity in decimal is 8, but in octal it is 10 (8 and 9 are not valid in octal). In octal, 10 Octal 1 2 3 4 5 6 7 10 means 1 group of 8 plus 0 (no individuals). In the figure below, we have two groups of eight circles. Counting in octal we have 20 items, meaning 2 groups of eight, plus 0 individuals Dont say twenty, say twozero octal. This makes a clear distinction between number systems. Decimal 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Octal 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 After counting PLC resources, its time to access PLC resources (theres a difference). The CPU instruction set accesses resources of the PLC using octal addresses. Octal addresses are the same as octal quantities, except they start counting at zero. The number zero is significant to a computer, so we dont skip it. X= 0 1 2 3 4 5 6 7 Our circles are in an array of square containers to the right. To access a resource, our PLC instruction X will address its location using the octal references shown. If these were counters, CT14 would 1X access the black circle location. 2X DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 423 Chapter 4: CPU Specifications and Operation VMemory V-memory address (octal) Variable memory (called VV2017 0 1 0 0 1 1 1 0 0 0 1 0 1 0 0 1 memory) stores data for the ladder program and for configuration settings. V-memory locations and V-memory addresses are the same thing, and are numbered in octal. For example, V2073 is a valid location, while V1983 is not valid (9 and 8 are not valid octal digits). Each V-memory location is one data word wide, meaning 16 bits. For configuration registers, our manuals will show each bit of a V-memory word. The least significant bit (LSB) will be on the right, and the most significant bit (MSB) on the left. We use the word significant, referring to the relative binary weighting of the bits. V-memory data is 16-bit binary, but we rarely program the data registers one bit at a time. We use instructions or viewing tools that let us work with decimal, octal, and hexadecimal numbers. All these are converted and stored as binary for us. A frequently-asked question is How do I tell if a number is octal, BCD, or hex? The answer is that we usually cannot tell just by looking at the data... but it does not really matter. What matters is: the source or mechanism which writes data into a V-memory location and the thing which later reads it must both use the same data type (i.e., octal, hex, binary, or whatever). The V-memory location is just a storage box... thats all. It does not convert or move the data on its own. MSB V-memory data (binary) LSB Binary-Coded Decimal Numbers BCD number 4 9 3 6 0 1 0 0 1 0 0 1 0 0 1 1 0 1 1 0 V-memory storage Since humans naturally count in decimal (10 fingers, 10 toes), we prefer to enter and view PLC data in decimal as well. However, computers are more efficient in using pure binary numbers. A compromise solution between the two is Binary-Coded Decimal (BCD) representation. A BCD digit ranges from 0 to 9, and is stored as four binary bits (a nibble). This permits each V-memory location to store four BCD digits, with a range of decimal numbers from 0000 to 9999. In a pure binary sense, a 16-bit word can represent numbers from 0 to 65535. In storing BCD numbers, the range is reduced to only 0 to 9999. Many math instructions use BinaryCoded Decimal (BCD) data, and DirectSOFT32 and the handheld programmer allow us to enter and view data in BCD. Hexadecimal Numbers Hexadecimal numbers are similar to BCD numbers, except they utilize all possible binary values in each 4-bit digit. They are base-16 numbers so we need 16 different digits. To extend our decimal digits 0 through 9, we use A through F as shown. Decimal Hexadecimal 0 1 2 3 0 1 2 3 4 5 4 5 6 6 7 7 8 9 10 11 12 13 14 15 8 9 A B C D E F A 4-digit hexadecimal number can represent all 65536 values in a V-memory word. The range is from 0000 to FFFF (hex). PLCs often need this full range for sensor data, etc. Hexadecimal is just a convenient way for humans to view full binary data. Hexadecimal number V-memory storage A 1 0 1 0 7 0 1 1 1 F 1 1 1 1 4 0 1 0 0 424 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation Memory Map With any PLC system, you generally have many different types of information to process. This includes input device status, output device status, various timing elements, parts counts, etc. It is important to understand how the system represents and stores the various types of data. For example, you need to know how the system identifies input points, output points, data words, etc. The following paragraphs discuss the various memory types used in DL06 Micro PLCs. A memory map overview for the CPU follows the memory descriptions. G LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 0V AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. Octal Numbering System All memory locations and resources are numbered in Octal (base 8). For example, the diagram shows how the octal numbering system works for the discrete input points. Notice the octal system does not contain any numbers with the digits 8 or 9. OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 Y X 0 1 2 D0-06DR 23 INPUT: 12 - 24V 3 - 15mA PWR RUN CPU TX1 RX1 TX2 RX2 LOGIC C0 X0 K oyo 06 X3 X2 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X10 X12 C3 X15 X17 X20 X22 N.C. X1 TERM PORT1 PORT2 RUN STOP X0 X1 X2 X3 X4 X5 X6 X7 Discrete and Word Locations As you examine the different memory types, youll notice two types of memory in the DL06, X10 X11 discrete and word memory. Discrete memory is Discrete On or Off, 1 bit one bit that can be either a 1 or a 0. Word X0 memory is referred to as V memory (variable) and is a 16-bit location normally used to manipulate data/numbers, store Word Locations 16 bits data/numbers, etc. Some information is automatically stored 0 1 0 1 0 0 0 0 0 0 1 0 0 1 0 1 in V memory. For example, the timer current values are stored in V memory. V Memory Locations for Discrete Memory Areas The discrete memory area is for inputs, outputs, control relays, special relays, stages, timer status bits and counter status bits. However, you can also access the bit data types as a Vmemory word. Each V-memory location contains 16 consecutive discrete locations. For example, the following diagram shows how the X input points are mapped into V-memory locations. 8 Discrete (X) Input Points X7 X6 X5 X4 X3 X2 X1 X0 Bit # 15 V40400 These discrete memory areas and their corresponding V memory ranges are listed in the memory area table for DL06 Micro PLCs on the following pages. 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 425 Chapter 4: CPU Specifications and Operation Input Points (X Data Type) The discrete input points are noted by an X data type. There are 8 discrete input points and 256 discrete input addresses available with DL06 CPUs. In this example, the output point Y0 will be turned on when input X0 energizes. X0 Y0 OUT Output Points (Y Data Type) The discrete output points are noted by a Y data type. There are 6 discrete outputs and 256 discrete output addresses available with DL06 CPUs. In this example, output point Y1 will be turned on when input X1 energizes. X1 Y1 OUT Control Relays (C Data Type) Control relays are discrete bits normally used to control the user program. The control relays do not represent a real world device, that is, they cannot be physically tied to switches, output coils, etc. They are internal to the CPU. Because of this, control relays can be programmed as discrete inputs or discrete outputs. These locations are used in programming the discrete memory locations (C) or the corresponding word location which contains 16 consecutive discrete locations. In this example, memory location C5 will energize when input X6 turns on. The second rung shows a simple example of how to use a control relay as an input. X6 C5 OUT C5 Y10 OUT Y20 OUT Timers and Timer Status Bits (T Data Type) Timer status bits reflect the relationship between the current value and the preset value of a specified timer. The timer status bit will be on when the current value is equal or greater than the preset value of a corresponding timer. When input X0 turns on, timer T1 will start. When the timer reaches the preset of 3 seconds (K of 30) timer status contact T1 turns on. When T1 turns on, output Y12 turns on. Turning off X0 resets the timer. X0 TMR K30 T1 T1 Y12 OUT 426 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation Timer Current Values (V Data Type) As mentioned earlier, some information is automatically stored in V memory. This is true for the current values associated with timers. For example, V0 holds the current value for Timer 0, V1 holds the current value for Timer 1, etc. These can also be designated as TA0 (Timer Accumulated) for Timer 0, and TA1 for Timer 1. The primary reason for this is programming flexibility. The example shows how you can use relational contacts to monitor several time intervals from a single timer. X0 TMR T1 K1000 K30 Y2 OUT Y3 OUT V1 K100 V1 V1 K50 Counters and Counter Status Bits (CT Data type) Counter status bits that reflect the relationship between the current value and the preset value of a specified counter. The counter status bit will be on when the current value is equal to or greater than the preset value of a corresponding counter. Each time contact X0 transitions from off to on, the counter increments by one. (If X1 comes on, the counter is reset to zero.) When the counter reaches the preset of 10 counts (K of 10) counter status contact CT3 turns on. When CT3 turns on, output Y2 turns on. V1 K75 Y4 OUT X0 X1 CNT K10 CT3 CT3 Y2 OUT Counter Current Values (V Data Type) Just like the timers, the counter current values are also automatically stored in V memory. For example, V1000 holds the current value for Counter CT0, V1001 holds the current value for Counter CT1, etc. These can also be designated as CTA0 (Counter Accumulated) for Counter 0 and CTA01 for Timer 1. The primary reason for this is programming flexibility. The example shows how you can use relational contacts to monitor the counter values. X0 X1 CNT K10 CT3 V1003 K1 Y2 OUT Y3 OUT V1003 K8 V1003 K3 V1003 K5 Y4 OUT DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 427 Chapter 4: CPU Specifications and Operation Word Memory (V Data Type) Word memory is referred to as V memory (variable) and is a 16-bit location normally used to manipulate data/numbers, store data/numbers, etc. Some information is automatically stored in V memory. For example, the timer current values are stored in V memory. The example shows how a four-digit BCD constant is loaded into the accumulator and then stored in a V-memory location. X0 LD K1345 OUT V2000 Stages (S Data type) Stages are used in RLLPLUS programs to create a structured program, similar to a flowchart. Each program Stage denotes a program segment. When the program segment, or Stage, is active, the logic within that segment is executed. If the Stage is off, or inactive, the logic is not executed and the CPU skips to the next active Stage. (See Chapter 7 for a more detailed description of RLLPLUS programming.) Each Stage also has a discrete status bit that can be used as an input to indicate whether the Stage is active or inactive. If the Stage is active, then the status bit is on. If the Stage is inactive, then the status bit is off. This status bit can also be turned on or off by other instructions, such as the SET or RESET instructions. This allows you to easily control stages throughout the program. Word Locations 16 bits 0 0 0 1 00 1 1 0 1 0 0 0 1 0 1 1 3 4 5 Ladder Representation ISG S0000 Start X0 S500 JMP SG S0001 Wait for Start S1 JMP Check for a Part Part Present X1 Part Present X1 S6 JMP S2 JMP SG S0002 Clamp the part Clamp SET S400 S3 JMP Special Relays (SP Data Type) Special relays are discrete memory locations with pre-defined functionality. There are many different types of special relays. For example, some aid in program development, others provide system operating status information, etc. Appendix D provides a complete listing of the special relays. In this example, control relay C10 will energize for 50 ms and de-energize for 50 ms because SP5 is a predefined relay that will be on for 50 ms and off for 50 ms. Part Locked X2 SP5 C10 OUT SP4: 1 second clock SP5: 100 ms clock SP6: 50 ms clock 428 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation DL06 System V-memory System Parameters and Default Data Locations (V Data Type) The DL06 PLCs reserve several V-memory locations for storing system parameters or certain types of system data. These memory locations store things like the error codes, High-Speed I/O data, and other types of system setup information. System V-memory V700-V707 V710-V717 V720-V727 V730-V737 V3630V3707 V3710-V3767 V7620V7627 V7620 V7621 V7622 V7623 V7624 V7625 V7626 V7627 Description of Contents Sets the V-memory location for option card in slot 1 Sets the V-memory location for option card in slot 2 Sets the V-memory location for option card in slot 3 Sets the V-memory location for option card in slot 4 The default location for multiple preset values for UP/DWN and UP Counter 1 or pulse catch function The default location for multiple preset values for UP/DWN and UP Counter 2 "Locations for DV1000 operator interface parameters.Sets the V-memory location that contains the value.Sets the V-memory location that contains the message.Sets the total number (1 32) of V-memory locations to be displayed.Sets the V-memory location that contains the numbers to be displayed.Sets the V-memory location that contains the character code to be displayed.Contains the function number that can be assigned to each key.Powerup operational mode.Change preset value." Default Values / Ranges N/A N/A N/A N/A N/A N/A V0 V3760 V0 V37601 - 32 V0 V3760 V0 V3760 V-memory for X, Y, or C0, 1, 2, 3, 12Default = 0000 V7630 Starting location for the multistep presets for channel 1. The default value is 3630, which indicates the first value should be obtained from V3630. Since there Default: V3630 are 24 presets available, the default range is V3630 V3707. You can change the Range: V0- V3710 starting point if necessary. Starting location for the multistep presets for channel 2. The default value is 3710, which indicates the first value should be obtained from V3710. Since there Default: V3710 are 24 presets available, the default range is V3710 V3767. You can change the Range: V0- V3710 starting point if necessary. Setup Register for Pulse Output N/A Default: 0060 Lower Byte Range:Range: 10 Counter 20 Quadrature 30 Pulse Out Pulse Sets the desired function code for the high speed counter, interrupt, pulse catch, 40 Interrupt 50 discrete pulse train, and input filter. Location can also be used to set the power-up in Run Catch 60 Filtered In. Upper Byte Range:Bits Mode option. 811, 14, 15: Unused, Bit 13: Powerup in RUN,only if Mode Switch is inTERM position. Bit 12 is used to enable the battery. X0 Setup Register for High-Speed I/O functions Default: 1006 X1 Setup Register for High-Speed I/O functions Default: 1006 X2 Setup Register for High-Speed I/O functions Default: 1006 X3 Setup Register for High-Speed I/O functions Default: 1006 "V1200 V7377 PID Loop table beginning address V10000 - V17777" V7631 V7632 V7633 V7634 V7635 V7636 V7637 V7640 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 429 Chapter 4: CPU Specifications and Operation System V-memory V7641 V7642 V7643-V7647 V7650 V7653 V7655 V7656 V7657 V7660 V7661 V7662V7717 V7720V7722 V7720 V7721 V7722 V7723V7737 V7740 V7741V7746 V7747 V7750 V7751 V7752 V7753 V7754 V7755 V7756 V7757 V7760V7762 V7763 V7764 V7765 V7766 V7767 V7770 V7771 V7772 V7773 V7774 V7775 V7776 V7777 V37700-V37737 Description of Contents Number of Loops Error Code - V-memory Error location for Loop Table Reserved Port 2: Setup for V-memory address for Non-procedure protocol Port 2: Setup for terminate code for Non-procedure protocol Port 2: Setup for the protocol, time-out, and the response delay time. Port 2: Setup for the station number, baud rate, STOP bit, and parity. Port 2: Setup completion code used to notify the completion of the parameter setup Scan control setup: Keeps the scan control mode. Setup timer over counter: Counts the times the actual scan time exceeds the user setup time. Reserved Locations for DV1000 operator interface parameters. Titled Timer preset value pointer Title Counter preset value pointer HiByte-Titled Timer preset block size, LoByte-Titled Counter preset block size Reserved Port 1 and Port 2: Communication Auto Reset Timer Setup Reserved Location contains a 10mS counter (0-99). This location increments once every 10 mS Reserved Fault Message Error Code stores the 4-digit code used with the FAULT instruction when the instruction is executed. I/O Configuration Error: Current ID code of error slot I/O Configuration Error: Old ID code of error slot I/O Configuration Error: error slot number Error code stores the fatal error code. Error code stores the major error code. Error code stores the minor error code. Reserved Program address where syntax error exists Syntax error code Scan counter stores the total number of scan cycles that have occurred since the last Program Mode to Run Mode transition. Contains the number of seconds on the clock (00-59) Contains the number of minutes on the clock (00-59) Contains the number of hours on the clock (00-23) Contains the day of the week (Mon., Tues., Wed., etc.) Contains the day of the month (01, 02, etc.) Contains the month (01 to 12) Contains the year (00 to 99) Scan stores the current scan time (milliseconds). Scan stores the minimum scan time that has occurred since the last Program Mode to Run Mode transition (milliseconds). For remote I/O Default Values / Ranges 1-8 V1200 V7377 V10000 - V17777 Default: 3030 430 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation DL06 Memory Map Memory Type Input Points Output Points Control Relays Special Relays Timers Discrete Memory Reference (octal) X0 X777 Y0 Y777 C0 C1777 SP0 SP777 T0 T377 Word Memory Reference (octal) V40400 - V40437 V40500 V40537 V40600 - V40677 V41200 V41237 V41100 V41117 V0 V377 V41100 V41117 Decimal 512 512 1024 512 256 256 256 Symbol X0 Y0 C0 SP0 TMR K100 V0 K100 T0 CNT CT0 K10 V1000 K100 CT0 T0 C0 Timer Current Values None Timer Status Bits T0 T377 Counters Counter Current Values Counter Status Bits CT0 CT177 V41140 V41147 128 None CT0 CT177 V1000 V1177 V41140 V41147 V400-V677 V1200 V7377 V10000 - V17777 V7400 V7577 V41000 V41017 V40000-V40177 V40200-V40377 V700-V777 V7600 V7777 V36000-V37777 128 128 192 3200 4096 128 1024 2048 2048 64 128 1024 Data Words Data Words Non-volatile Stages Remote I/O None None specific, used with many instructions None specific, used with many instructions None S0 S1777 GX0-GX3777 GY0-GY3777 None SG S001 GX0 GY0 S0 System parameters None specific, used for various purposes 1-The DL06 systems are limited to 20 discrete inputs and 16 discrete outputs with the present available hardware, but 512 point addresses exist. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 431 Chapter 4: CPU Specifications and Operation X Input / Y Output Bit Map This table provides a listing of individual input and output points associated with each Vmemory address bit for the DL06s twenty integrated physical inputs and 16 integrated physical outputs in addition to up to 64 inputs and 64 outputs for option cards. Actual available references are X0 to X777 (V40400 V40437) and Y0 to Y777 (V40500 V40537). MSB 17 017 037 057 077 117 137 157 177 217 237 257 277 317 337 357 377 417 437 457 477 517 537 557 577 617 637 657 677 717 737 757 777 16 016 036 056 076 116 136 156 176 216 236 256 276 316 336 356 376 416 436 456 476 516 536 556 576 616 636 656 676 716 736 756 776 15 015 035 055 075 115 135 155 175 215 235 255 275 315 335 355 375 415 435 455 475 515 535 555 575 615 635 655 675 715 735 755 775 DL06 Input (X) and Output (Y) Points 14 014 034 054 074 114 134 154 174 214 234 254 274 314 334 354 374 414 434 454 474 514 534 554 574 614 634 654 674 714 734 754 774 13 013 033 053 073 113 133 153 173 213 233 253 273 313 333 353 373 413 433 453 473 513 533 553 573 613 633 653 673 713 733 753 773 12 012 032 052 072 112 132 152 172 212 232 252 272 312 332 352 372 412 432 452 472 512 532 552 572 612 632 652 672 712 732 752 772 11 011 031 051 071 111 131 151 171 211 231 251 271 311 331 351 371 411 431 451 471 511 531 551 571 611 631 651 671 711 731 751 771 10 010 030 050 070 110 130 150 170 210 230 250 270 310 330 350 370 410 430 450 470 510 530 550 570 610 630 650 670 710 730 750 770 7 007 027 047 067 107 127 147 167 207 227 247 267 307 327 347 367 407 427 447 467 507 527 547 567 607 627 647 667 707 727 747 767 6 006 026 046 066 106 126 146 166 206 226 246 266 306 326 346 366 406 426 446 466 506 526 546 566 606 626 646 666 706 726 746 766 5 005 025 045 065 105 125 145 165 205 225 245 265 305 325 345 365 405 425 445 465 505 525 545 565 605 625 645 665 705 725 745 765 4 004 024 044 064 104 124 144 164 204 224 244 264 304 324 344 364 404 424 444 464 504 524 544 564 604 624 644 664 704 724 744 764 3 003 023 043 063 103 123 143 163 203 223 243 263 303 323 343 363 403 423 443 463 503 523 543 563 603 623 643 663 703 723 743 763 2 002 022 042 062 102 122 142 162 202 222 242 262 302 322 342 362 402 422 442 462 502 522 542 562 602 622 642 662 702 722 742 762 1 001 021 041 061 101 121 141 161 LSB 0 000 020 040 060 100 120 140 160 200 220 240 260 300 320 340 360 400 420 440 460 500 520 540 560 600 620 640 660 700 720 740 760 X Input Y Output Address Address V40400 V40401 V40402 V40403 V40404 V40405 V40406 V40407 V40410 V40411 V40412 V40413 V40414 V40415 V40416 V40417 V40420 V40421 V40422 V40423 V40424 V40425 V40426 V40427 V40430 V40431 V40432 V40433 V40434 V40435 V40436 V40437 V40500 V40501 V40502 V40503 V40504 V40505 V40506 V40507 V40510 V40511 V40512 V40513 V40514 V40515 V40516 V40517 V40520 V40521 V40522 V40523 V40524 V40525 V40526 V40527 V40530 V40531 V40532 V40533 V40534 V40535 V40536 V40537 201 221 241 261 301 321 341 361 401 421 441 461 501 521 541 561 601 621 641 661 701 721 741 761 432 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation Stage Control / Status Bit Map This table provides a listing of individual Stage control bits associated with each V-memory address bit. MSB 17 017 037 057 077 117 137 157 177 217 237 257 277 317 337 357 377 417 437 457 477 DL06 Stage (S) Control Bits 16 016 036 056 076 116 136 156 176 216 236 256 276 316 336 356 376 416 436 456 476 LSB 4 004 024 044 064 104 124 144 164 204 224 244 264 304 324 344 364 404 424 444 464 15 015 035 055 075 115 135 155 175 215 235 255 275 315 335 355 375 415 435 455 475 14 014 034 054 074 114 134 154 174 214 234 254 274 314 334 354 374 414 434 454 474 13 013 033 053 073 113 133 153 173 213 233 253 273 313 333 353 373 413 433 453 473 12 012 032 052 072 112 132 152 172 212 232 252 272 312 332 352 372 412 432 452 472 11 011 031 051 071 111 131 151 171 211 231 251 271 311 331 351 371 411 431 451 471 10 010 030 050 070 110 130 150 170 210 230 250 270 310 330 350 370 410 430 450 470 7 007 027 047 067 107 127 147 167 207 227 247 267 307 327 347 367 407 427 447 467 6 006 026 046 066 106 126 146 166 206 226 246 266 306 326 346 366 406 426 446 466 5 005 025 045 065 105 125 145 165 205 225 245 265 305 325 345 365 405 425 445 465 3 003 023 043 063 103 123 143 163 203 223 243 263 303 323 343 363 403 423 443 463 2 002 022 042 062 102 122 142 162 202 222 242 262 302 322 342 362 402 422 442 462 1 001 021 041 061 101 121 141 161 201 221 241 261 301 321 341 361 401 421 441 461 0 000 020 040 060 100 120 140 160 200 220 240 260 300 320 340 360 400 420 440 460 Address V41000 V41001 V41002 V41003 V41004 V41005 V41006 V41007 V41010 V41011 V41012 V41013 V41014 V41015 V41016 V41017 V41020 V41021 V41022 V41023 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 433 Chapter 4: CPU Specifications and Operation MSB 17 517 537 557 577 617 637 657 677 717 737 757 777 1017 1037 1057 1077 1117 1137 1157 1177 1217 1237 1257 1277 1317 1337 1357 1377 1417 1437 1457 1477 1517 1537 1557 1577 1617 1637 1657 1677 1717 1737 1757 1777 DL06 Stage (S) Control Bits 16 516 536 556 576 616 636 656 676 716 736 756 776 1016 1036 1056 1076 1116 1136 1156 1176 1216 1236 1256 1276 1316 1336 1356 1376 1416 1436 1456 1476 1516 1536 1556 1576 1616 1636 1656 1676 1716 1736 1756 1776 LSB 4 504 524 544 564 604 624 644 664 704 724 744 764 1004 1024 1044 1064 1104 1124 1144 1164 1204 1224 1244 1264 1304 1324 1344 1364 1404 1424 1444 1464 1504 1524 1544 1564 1604 1624 1644 1664 1704 1724 1744 1764 15 515 535 555 575 615 635 655 675 715 735 755 775 1015 1035 1055 1075 1115 1135 1155 1175 1215 1235 1255 1275 1315 1335 1355 1375 1415 1435 1455 1475 1515 1535 1555 1575 1615 1635 1655 1675 1715 1735 1755 1775 14 514 534 554 574 614 634 654 674 714 734 754 774 1014 1034 1054 1074 1114 1134 1154 1174 1214 1234 1254 1274 1314 1334 1354 1374 1414 1434 1454 1474 1514 1534 1554 1574 1614 1634 1654 1674 1714 1734 1754 1774 13 513 533 553 573 613 633 653 673 713 733 753 773 1013 1033 1053 1073 1113 1133 1153 1173 1213 1233 1253 1273 1313 1333 1353 1373 1413 1433 1453 1473 1513 1533 1553 1573 1613 1633 1653 1673 1713 1733 1753 1773 12 512 532 552 572 612 632 652 672 712 732 752 772 1012 1032 1052 1072 1112 1132 1152 1172 1212 1232 1252 1272 1312 1332 1352 1372 1412 1432 1452 1472 1512 1532 1552 1572 1612 1632 1652 1672 1712 1732 1752 1772 11 511 531 551 571 611 631 651 671 711 731 751 771 1011 1031 1051 1071 1111 1131 1151 1171 1211 1231 1251 1271 1311 1331 1351 1371 1411 1431 1451 1471 1511 1531 1551 1571 1611 1631 1651 1671 1711 1731 1751 1771 10 510 530 550 570 610 630 650 670 710 730 750 770 1010 1030 1050 1070 1110 1130 1150 1170 1210 1230 1250 1270 1310 1330 1350 1370 1410 1430 1450 1470 1510 1530 1550 1570 1610 1630 1650 1670 1710 1730 1750 1770 7 507 527 547 567 607 627 647 667 707 727 747 767 1007 1027 1047 1067 1107 1127 1147 1167 1207 1227 1247 1267 1307 1327 1347 1367 1407 1427 1447 1467 1507 1527 1547 1567 1607 1627 1647 1667 1707 1727 1747 1767 6 506 526 546 566 606 626 646 666 706 726 746 766 1006 1026 1046 1066 1106 1126 1146 1166 1206 1226 1246 1266 1306 1326 1346 1366 1406 1426 1446 1466 1506 1526 1546 1566 1606 1626 1646 1666 1706 1726 1746 1766 5 505 525 545 565 605 625 645 665 705 725 745 765 1005 1025 1045 1065 1105 1125 1145 1165 1205 1225 1245 1265 1305 1325 1345 1365 1405 1425 1445 1465 1505 1525 1545 1565 1605 1625 1645 1665 1705 1725 1745 1765 3 503 523 543 563 603 623 643 663 703 723 743 763 1003 1023 1043 1063 1103 1123 1143 1163 1203 1223 1243 1263 1303 1323 1343 1363 1403 1423 1443 1463 1503 1523 1543 1563 1603 1623 1643 1663 1703 1723 1743 1763 2 502 522 542 562 602 622 642 662 702 722 742 762 1002 1022 1042 1062 1102 1122 1142 1162 1202 1222 1242 1262 1302 1322 1342 1362 1402 1422 1442 1462 1502 1522 1542 1562 1602 1622 1642 1662 1702 1722 1742 1762 1 501 521 541 561 601 621 641 661 701 721 741 761 1001 1021 1041 1061 1101 1121 1141 1161 1201 1221 1241 1261 1301 1321 1341 1361 1401 1421 1441 1461 1501 1521 1541 1561 1601 1621 1641 1661 1701 1721 1741 1761 0 500 520 540 560 600 620 640 660 700 720 740 760 1000 1020 1040 1060 1100 1120 1140 1160 1200 1220 1240 1260 1300 1320 1340 1360 1400 1420 1440 1460 1500 1520 1540 1560 1600 1620 1640 1660 1700 1720 1740 1760 Address V41024 V41025 V41026 V41027 V41030 V41031 V41032 V41033 V41034 V41035 V41036 V41037 V41040 V41041 V41042 V41043 V41044 V41045 V41046 V41047 V41050 V41051 V41052 V41053 V41054 V41055 V41056 V41057 V41060 V41061 V41062 V41063 V41064 V41065 V41066 V41067 V41070 V41071 V41072 V41073 V41074 V41075 V41076 V41077 434 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation Control Relay Bit Map This table provides a listing of the individual control relays associated with each V-memory address bit MSB 17 017 037 057 077 117 137 157 177 217 237 257 277 317 337 357 377 417 437 457 477 517 537 557 577 617 637 657 677 717 737 757 777 16 016 036 056 076 116 136 156 176 216 236 256 276 316 336 356 376 416 436 456 476 516 536 556 576 616 636 656 676 716 736 756 776 15 015 035 055 075 115 135 155 175 215 235 255 275 315 335 355 375 415 435 455 475 515 535 555 575 615 635 655 675 715 735 755 775 14 014 034 054 074 114 134 154 174 214 234 254 274 314 334 354 374 414 434 454 474 514 534 554 574 614 634 654 674 714 734 754 774 13 013 033 053 073 113 133 153 173 213 233 253 273 313 333 353 373 413 433 453 473 513 533 553 573 613 633 653 673 713 733 753 773 12 012 032 052 072 112 132 152 172 212 232 252 272 312 332 352 372 412 432 452 472 512 532 552 572 612 632 652 672 712 732 752 772 DL06 Control Relays (C) 11 011 031 051 071 111 131 151 171 211 231 251 271 311 331 351 371 411 431 451 471 511 531 551 571 611 631 651 671 711 731 751 771 10 010 030 050 070 110 130 150 170 210 230 250 270 310 330 350 370 410 430 450 470 510 530 550 570 610 630 650 670 710 730 750 770 7 007 027 047 067 107 127 147 167 207 227 247 267 307 327 347 367 407 427 447 467 507 527 547 567 607 627 647 667 707 727 747 767 6 006 026 046 066 106 126 146 166 206 226 246 266 306 326 346 366 406 426 446 466 506 526 546 566 606 626 646 666 706 726 746 766 5 005 025 045 065 105 125 145 165 205 225 245 265 305 325 345 365 405 425 445 465 505 525 545 565 605 625 645 665 705 725 745 765 4 004 024 044 064 104 124 144 164 204 224 244 264 304 324 344 364 404 424 444 464 504 524 544 564 604 624 644 664 704 724 744 764 3 003 023 043 063 103 123 143 163 203 223 243 263 303 323 343 363 403 423 443 463 503 523 543 563 603 623 643 663 703 723 743 763 2 002 022 042 062 102 122 142 162 202 222 242 262 302 322 342 362 402 422 442 462 502 522 542 562 602 622 642 662 702 722 742 762 1 001 021 041 061 101 121 141 161 201 221 241 261 301 321 341 361 401 421 441 461 501 521 541 561 601 621 641 661 701 721 741 761 LSB 0 000 020 040 060 100 120 140 160 200 220 240 260 300 320 340 360 400 420 440 460 500 520 540 560 600 620 640 660 700 720 740 760 Address V40600 V40601 V40602 V40603 V40604 V40605 V40606 V40607 V40610 V40611 V40612 V40613 V40614 V40615 V40616 V40617 V40620 V40621 V40622 V40623 V40624 V40625 V40626 V40627 V40630 V40631 V40632 V40633 V40634 V40635 V40636 V40637 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 435 Chapter 4: CPU Specifications and Operation MSB 17 1017 1037 1057 1077 1117 1137 1157 1177 1217 1237 1257 1277 1317 1337 1357 1377 1417 1437 1457 1477 1517 1537 1557 1577 1617 1637 1657 1677 1717 1737 1757 1777 16 1016 1036 1056 1076 1116 1136 1156 1176 1216 1236 1256 1276 1316 1336 1356 1376 1416 1436 1456 1476 1516 1536 1556 1576 1616 1636 1656 1676 1716 1736 1756 1776 15 1015 1035 1055 1075 1115 1135 1155 1175 1215 1235 1255 1275 1315 1335 1355 1375 1415 1435 1455 1475 1515 1535 1555 1575 1615 1635 1655 1675 1715 1735 1755 1775 14 1014 1034 1054 1074 1114 1134 1154 1174 1214 1234 1254 1274 1314 1334 1354 1374 1414 1434 1454 1474 1514 1534 1554 1574 1614 1634 1654 1674 1714 1734 1754 1774 13 1013 1033 1053 1073 1113 1133 1153 1173 1213 1233 1253 1273 1313 1333 1353 1373 1413 1433 1453 1473 1513 1533 1553 1573 1613 1633 1653 1673 1713 1733 1753 1773 12 1012 1032 1052 1072 1112 1132 1152 1172 1212 1232 1252 1272 1312 1332 1352 1372 1412 1432 1452 1472 1512 1532 1552 1572 1612 1632 1652 1672 1712 1732 1752 1772 DL06 Control Relays (C) 11 1011 1031 1051 1071 1111 1131 1151 1171 1211 1231 1251 1271 1311 1331 1351 1371 1411 1431 1451 1471 1511 1531 1551 1571 1611 1631 1651 1671 1711 1731 1751 1771 10 1010 1030 1050 1070 1110 1130 1150 1170 1210 1230 1250 1270 1310 1330 1350 1370 1410 1430 1450 1470 1510 1530 1550 1570 1610 1630 1650 1670 1710 1730 1750 1770 7 1007 1027 1047 1067 1107 1127 1147 1167 1207 1227 1247 1267 1307 1327 1347 1367 1407 1427 1447 1467 1507 1527 1547 1567 1607 1627 1647 1667 1707 1727 1747 1767 6 1006 1026 1046 1066 1106 1126 1146 1166 1206 1226 1246 1266 1306 1326 1346 1366 1406 1426 1446 1466 1506 1526 1546 1566 1606 1626 1646 1666 1706 1726 1746 1766 5 1005 1025 1045 1065 1105 1125 1145 1165 1205 1225 1245 1265 1305 1325 1345 1365 1405 1425 1445 1465 1505 1525 1545 1565 1605 1625 1645 1665 1705 1725 1745 1765 4 1004 1024 1044 1064 1104 1124 1144 1164 1204 1224 1244 1264 1304 1324 1344 1364 1404 1424 1444 1464 1504 1524 1544 1564 1604 1624 1644 1664 1704 1724 1744 1764 3 1003 1023 1043 1063 1103 1123 1143 1163 1203 1223 1243 1263 1303 1323 1343 1363 1403 1423 1443 1463 1503 1523 1543 1563 1603 1623 1643 1663 1703 1723 1743 1763 2 1002 1022 1042 1062 1102 1122 1142 1162 1202 1222 1242 1262 1302 1322 1342 1362 1402 1422 1442 1462 1502 1522 1542 1562 1602 1622 1642 1662 1702 1722 1742 1762 1 1001 1021 1041 1061 1101 1121 1141 1161 1201 1221 1241 1261 1301 1321 1341 1361 1401 1421 1441 1461 1501 1521 1541 1561 1601 1621 1641 1661 1701 1721 1741 1761 LSB 0 1000 1020 1040 1060 1100 1120 1140 1160 1200 1220 1240 1260 1300 1320 1340 1360 1400 1420 1440 1460 1500 1520 1540 1560 1600 1620 1640 1660 1700 1720 1740 1760 Address V40640 V40641 V40642 V40643 V40644 V40645 V40646 V40647 V40650 V40651 V40652 V40653 V40654 V40655 V40656 V40657 V40660 V40661 V40662 V40663 V40664 V40665 V40666 V40667 V40670 V40671 V40672 V40673 V40674 V40675 V40676 V40677 436 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation Timer Status Bit Map This table provides a listing of individual timer contacts associated with each V-memory address bit. MSB 17 017 037 057 077 117 137 157 177 217 237 257 277 317 337 357 377 DL06 Timer (T) Contacts 16 016 036 056 076 116 136 156 176 216 236 256 276 316 336 356 376 LSB 5 005 025 045 065 105 125 145 165 205 225 245 265 305 325 345 365 15 015 035 055 075 115 135 155 175 215 235 255 275 315 335 355 375 14 014 034 054 074 114 134 154 174 214 234 254 274 314 334 354 374 13 013 033 053 073 113 133 153 173 213 233 253 273 313 333 353 373 12 012 032 052 072 112 132 152 172 212 232 252 272 312 332 352 372 11 011 031 051 071 111 131 151 171 211 231 251 271 311 331 351 371 10 010 030 050 070 110 130 150 170 210 230 250 270 310 330 350 370 7 007 027 047 067 107 127 147 167 207 227 247 267 307 327 347 367 6 006 026 046 066 106 126 146 166 206 226 246 266 306 326 346 366 4 004 024 044 064 104 124 144 164 204 224 244 264 304 324 344 364 3 003 023 043 063 103 123 143 163 203 223 243 263 303 323 343 363 2 002 022 042 062 102 122 142 162 202 222 242 262 302 322 342 362 1 001 021 041 061 101 121 141 161 201 221 241 261 301 321 341 361 0 000 020 040 060 100 120 140 160 200 220 240 260 300 320 340 360 Address V41100 V41101 V41102 V41103 V41104 V41105 V41106 V41107 V41110 V41111 V41112 V41113 V41114 V41115 V41116 V41117 Counter Status Bit Map This table provides a listing of individual counter contacts associated with each V-memory address bit. MSB 17 017 037 057 077 117 137 157 177 DL06 Counter (CT) Contacts 16 016 036 056 076 116 136 156 176 LSB 5 4 004 024 044 064 104 124 144 164 15 015 035 055 075 115 135 155 175 14 014 034 054 074 114 134 154 174 13 013 033 053 073 113 133 153 173 12 012 032 052 072 112 132 152 172 11 011 031 051 071 111 131 151 171 10 010 030 050 070 110 130 150 170 7 007 027 047 067 107 127 147 167 6 006 026 046 066 106 126 146 166 3 003 023 043 063 103 123 143 163 2 002 022 042 062 102 122 142 162 1 001 021 041 061 101 121 141 161 0 000 020 040 060 100 120 140 160 Address V41140 V41141 V41142 V41143 V41144 V41145 V41146 V41147 005 025 045 065 105 125 145 165 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 437 Chapter 4: CPU Specifications and Operation Remote I/O Bit Map This table provides a listing of the individual remote I/O points associated with each V-memory address bit. MSB 17 017 037 057 077 117 137 157 177 217 237 257 277 317 337 357 377 417 437 457 477 517 537 557 577 617 637 657 677 717 737 757 777 16 016 036 056 076 116 136 156 176 216 236 256 276 316 336 356 376 416 436 456 476 516 536 556 576 616 636 656 676 716 736 756 776 15 015 035 055 075 115 135 155 175 215 235 255 275 315 335 355 375 415 435 455 475 515 535 555 575 615 635 655 675 715 735 755 775 14 014 034 054 074 114 134 154 174 214 234 254 274 314 334 354 374 414 434 454 474 514 534 554 574 614 634 654 674 714 734 754 774 Remote I/O (GX) and (GY) Points 13 013 033 053 073 113 133 153 173 213 233 253 273 313 333 353 373 413 433 453 473 513 533 553 573 613 633 653 673 713 733 753 773 12 012 032 052 072 112 132 152 172 212 232 252 272 312 332 352 372 412 432 452 472 512 532 552 572 612 632 652 672 712 732 752 772 11 011 031 051 071 111 131 151 171 211 231 251 271 311 331 351 371 411 431 451 471 511 531 551 571 611 631 651 671 711 731 751 771 10 010 030 050 070 110 130 150 170 210 230 250 270 310 330 350 370 410 430 450 470 510 530 550 570 610 630 650 670 710 730 750 770 7 007 027 047 067 107 127 147 167 207 227 247 267 307 327 347 367 407 427 447 467 507 527 547 567 607 627 647 667 707 727 747 767 6 006 026 046 066 106 126 146 166 206 226 246 266 306 326 346 366 406 426 446 466 506 526 546 566 606 626 646 666 706 726 746 766 5 005 025 045 065 105 125 145 165 205 225 245 265 305 325 345 365 405 425 445 465 505 525 545 565 605 625 645 665 705 725 745 765 4 004 024 044 064 104 124 144 164 204 224 244 264 304 324 344 364 404 424 444 464 504 524 544 564 604 624 644 664 704 724 744 764 3 003 023 043 063 103 123 143 163 203 223 243 263 303 323 343 363 403 423 443 463 503 523 543 563 603 623 643 663 703 723 743 763 2 002 022 042 062 102 122 142 162 202 222 242 262 302 322 342 362 402 422 442 462 502 522 542 562 602 622 642 662 702 722 742 762 1 001 021 041 061 101 121 141 161 201 221 241 261 301 321 341 361 401 421 441 461 501 521 541 561 601 621 641 661 701 721 741 761 LSB 0 000 020 040 060 100 120 140 160 200 220 240 260 300 320 340 360 400 420 440 460 500 520 540 560 600 620 640 660 700 720 740 760 GX Address V40000 V40001 V40002 V40003 V40004 V40005 V40006 V40007 V40010 V40011 V40012 V40013 V40004 V40015 V40016 V40007 V40020 V40021 V40022 V40023 V40024 V40025 V40026 V40027 V40030 V40031 V40032 V40033 V40034 V40035 V40036 V40037 GY Address V40200 V40201 V40202 V40203 V40204 V40205 V40206 V40207 V40210 V40211 V40212 V40213 V40214 V40215 V40216 V40217 V40220 V40221 V40222 V40223 V40224 V40225 V40226 V40227 V40230 V40231 V40232 V40233 V40234 V40235 V40236 V40237 438 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation MSB 17 1017 1037 1057 1077 1117 1137 1157 1177 1217 1237 1257 1277 1317 1337 1357 1377 1417 1437 1457 1477 1517 1537 1557 1577 1617 1637 1657 1677 1717 1737 1757 1777 16 1016 1036 1056 1076 1116 1136 1156 1176 1216 1236 1256 1276 1316 1336 1356 1376 1416 1436 1456 1476 1516 1536 1556 1576 1616 1636 1656 1676 1716 1736 1756 1776 15 1015 1035 1055 1075 1115 1135 1155 1175 1215 1235 1255 1275 1315 1335 1355 1375 1415 1435 1455 1475 1515 1535 1555 1575 1615 1635 1655 1675 1715 1735 1755 1775 14 1014 1034 1054 1074 1114 1134 1154 1174 1214 1234 1254 1274 1314 1334 1354 1374 1414 1434 1454 1474 1514 1534 1554 1574 1614 1634 1654 1674 1714 1734 1754 1774 DL06 Remote I/O (GX) and (GY) Points 13 1013 1033 1053 1073 1113 1133 1153 1173 1213 1233 1253 1273 1313 1333 1353 1373 1413 1433 1453 1473 1513 1533 1553 1573 1613 1633 1653 1673 1713 1733 1753 1773 12 1012 1032 1052 1072 1112 1132 1152 1172 1212 1232 1252 1272 1312 1332 1352 1372 1412 1432 1452 1472 1512 1532 1552 1572 1612 1632 1652 1672 1712 1732 1752 1772 11 1011 1031 1051 1071 1111 1131 1151 1171 1211 1231 1251 1271 1311 1331 1351 1371 1411 1431 1451 1471 1511 1531 1551 1571 1611 1631 1651 1671 1711 1731 1751 1771 10 1010 1030 1050 1070 1110 1130 1150 1170 1210 1230 1250 1270 1310 1330 1350 1370 1410 1430 1450 1470 1510 1530 1550 1570 1610 1630 1650 1670 1710 1730 1750 1770 7 1007 1027 1047 1067 1107 1127 1147 1167 1207 1227 1247 1267 1307 1327 1347 1367 1407 1427 1447 1467 1507 1527 1547 1567 1607 1627 1647 1667 1707 1727 1747 1767 6 1006 1026 1046 1066 1106 1126 1146 1166 1206 1226 1246 1266 1306 1326 1346 1366 1406 1426 1446 1466 1506 1526 1546 1566 1606 1626 1646 1666 1706 1726 1746 1766 5 1005 1025 1045 1065 1105 1125 1145 1165 1205 1225 1245 1265 1305 1325 1345 1365 1405 1425 1445 1465 1505 1525 1545 1565 1605 1625 1645 1665 1705 1725 1745 1765 4 1004 1024 1044 1064 1104 1124 1144 1164 1204 1224 1244 1264 1304 1324 1344 1364 1404 1424 1444 1464 1504 1524 1544 1564 1604 1624 1644 1664 1704 1724 1744 1764 3 1003 1023 1043 1063 1103 1123 1143 1163 1203 1223 1243 1263 1303 1323 1343 1363 1403 1423 1443 1463 1503 1523 1543 1563 1603 1623 1643 1663 1703 1723 1743 1763 2 1002 1022 1042 1062 1102 1122 1142 1162 1202 1222 1242 1262 1302 1322 1342 1362 1402 1422 1442 1462 1502 1522 1542 1562 1602 1622 1642 1662 1702 1722 1742 1762 1 1001 1021 1041 1061 1101 1121 1141 1161 1201 1221 1241 1261 1301 1321 1341 1361 1401 1421 1441 1461 1501 1521 1541 1561 1601 1621 1641 1661 1701 1721 1741 1761 LSB 0 1000 1020 1040 1060 1100 1120 1140 1160 1200 1220 1240 1260 1300 1320 1340 1360 1400 1420 1440 1460 1500 1520 1540 1560 1600 1620 1640 1660 1700 1720 1740 1760 GX GY Address Address V40040 V40041 V40042 V40043 V40044 V40045 V40046 V40047 V40050 V40051 V40052 V40053 V40054 V40055 V40056 V40057 V40060 V40061 V40062 V40063 V40064 V40065 V40066 V40067 V40070 V40071 V40072 V40073 V40074 V40075 V40076 V40077 V40240 V40241 V40242 V40243 V40244 V40245 V40246 V40247 V40250 V40251 V40252 V40253 V40254 V40255 V40256 V40257 V40260 V40261 V40262 V40263 V40264 V40265 V40266 V40267 V40270 V40271 V40272 V40273 V40274 V40275 V40276 V40277 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 439 Chapter 4: CPU Specifications and Operation MSB 17 2017 2037 2057 2077 2117 2137 2157 2177 2217 2237 2257 2277 2317 2337 2357 2377 2417 2437 2457 2477 2517 2537 2557 2577 2617 2637 2657 2677 2717 2737 2757 2777 16 2016 2036 2056 2076 2116 2136 2156 2176 2216 2236 2256 2276 2316 2336 2356 2376 2416 2436 2456 2476 2516 2536 2556 2576 2616 2636 2656 2676 2716 2736 2756 2776 15 2015 2035 2055 2075 2115 2135 2155 2175 2215 2235 2255 2275 2315 2335 2355 2375 2415 2435 2455 2475 2515 2535 2555 2575 2615 2635 2655 2675 2715 2735 2755 2775 14 2014 2034 2054 2074 2114 2134 2154 2174 2214 2234 2254 2274 2314 2334 2354 2374 2414 2434 2454 2474 2514 2534 2554 2574 2614 2634 2654 2674 2714 2734 2754 2774 DL06 Remote I/O (GX) and (GY) Points 13 2013 2033 2053 2073 2113 2133 2153 2173 2213 2233 2253 2273 2313 2333 2353 2373 2413 2433 2453 2473 2513 2533 2553 2573 2613 2633 2653 2673 2713 2733 2753 2773 12 2012 2032 2052 2072 2112 2132 2152 2172 2212 2232 2252 2272 2312 2332 2352 2372 2412 2432 2452 2472 2512 2532 2552 2572 2612 2632 2652 2672 2712 2732 2752 2772 11 2011 2031 2051 2071 2111 2131 2151 2171 2211 2231 2251 2271 2311 2331 2351 2371 2411 2431 2451 2471 2511 2531 2551 2571 2611 2631 2651 2671 2711 2731 2751 2771 10 2010 2030 2050 2070 2110 2130 2150 2170 2210 2230 2250 2270 2310 2330 2350 2370 2410 2430 2450 2470 2510 2530 2550 2570 2610 2630 2650 2670 2710 2730 2750 2770 7 2007 2027 2047 2067 2107 2127 2147 2167 2207 2227 2247 2267 2307 2327 2347 2367 2407 2427 2447 2467 2507 2527 2547 2567 2607 2627 2647 2667 2707 2727 2747 2767 6 2006 2026 2046 2066 2106 2126 2146 2166 2206 2226 2246 2266 2306 2326 2346 2366 2406 2426 2446 2466 2506 2526 2546 2566 2606 2626 2646 2666 2706 2726 2736 2766 5 2005 2025 2045 2065 2105 2125 2145 2165 2205 2225 2245 2265 2305 2325 2345 2365 2405 2425 2445 2465 2505 2525 2545 2565 2605 2625 2645 2665 2705 2725 2735 2765 4 2004 2024 2044 2064 2104 2124 2144 2164 2204 2224 2244 2264 2304 2324 2344 2364 2404 2424 2444 2464 2504 2524 2544 2564 2604 2624 2644 2664 2704 2724 2734 2764 3 2003 2023 2043 2063 2103 2123 2143 2163 2203 2223 2243 2263 2303 2323 2343 2363 2403 2423 2443 2463 2503 2523 2543 2563 2603 2623 2643 2663 2703 2723 2733 2763 2 2002 2022 2042 2062 2102 2122 2142 2162 2202 2222 2242 2262 2302 2322 2342 2362 2402 2422 2442 2462 2502 2522 2542 2562 2602 2622 2642 2662 2702 2722 2732 2762 1 2001 2021 2041 2061 2101 2121 2141 2161 2201 2221 2241 2261 2301 2321 2341 2361 2401 2421 2441 2461 2501 2521 2541 2561 2601 2621 2641 2661 2701 2721 2731 2761 LSB 0 2000 2020 2040 2060 2100 2120 2140 2160 2200 2220 2240 2260 2300 2320 2340 2360 2400 2420 2440 2460 2500 2520 2540 2560 2600 2620 2640 2660 2700 2720 2730 2760 GX GY Address Address V40100 V40101 V40102 V40103 V40104 V40105 V40106 V40107 V40110 V40111 V40112 V40113 V40114 V40115 V40116 V40117 V40120 V40121 V40122 V40123 V40124 V40125 V40126 V40127 V40130 V40131 V40132 V40133 V40134 V40135 V40136 V40137 V40300 V40301 V40302 V40303 V40304 V40305 V40306 V40307 V40310 V40311 V40312 V40313 V40314 V40315 V40316 V40317 V40320 V40321 V40322 V40323 V40324 V40325 V40326 V40327 V40330 V40331 V40332 V40333 V40334 V40335 V40336 V40337 440 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation MSB 17 3017 3037 3057 3077 3117 3137 3157 3177 3217 3237 3257 3277 3317 3337 3357 3377 3417 3437 3457 3477 3517 3537 3557 3577 3617 3637 3657 3677 3717 3737 3757 3777 16 3016 3036 3056 3076 3116 3136 3156 3176 3216 3236 3256 3276 3316 3336 3356 3376 3416 3436 3456 3476 3516 3536 3556 3576 3616 3636 3656 3676 3716 3736 3756 3776 15 3015 3035 3055 3075 3115 3135 3155 3175 3215 3235 3255 3275 3315 3335 3355 3375 3415 3435 3455 3475 3515 3535 3555 3575 3615 3635 3655 3675 3715 3735 3755 3775 14 3014 3034 3054 3074 3114 3134 3154 3174 3214 3234 3254 3274 3314 3334 3354 3374 3414 3434 3454 3474 3514 3534 3554 3574 3614 3634 3654 3674 3714 3734 3754 3774 DL06 Remote I/O (GX) and (GY) Points 13 3013 3033 3053 3073 3113 3133 3153 3173 3213 3233 3253 3273 3313 3333 3353 3373 3413 3433 3453 3473 3513 3533 3553 3573 3613 3633 3653 3673 3713 3733 3753 3773 12 3012 3032 3052 3072 3112 3132 3152 3172 3212 3232 3252 3272 3312 3332 3352 3372 3412 3432 3452 3472 3512 3532 3552 3572 3612 3632 3652 3672 3712 3732 3752 3772 11 3011 3031 3051 3071 3111 3131 3151 3171 3211 3231 3251 3271 3311 3331 3351 3371 3411 3431 3451 3471 3511 3531 3551 3571 3611 3631 3651 3671 3711 3731 3751 3771 10 3010 3030 3050 3070 3110 3130 3150 3170 3210 3230 3250 3270 3310 3330 3350 3370 3410 3430 3450 3470 3510 3530 3550 3570 3610 3630 3650 3670 3710 3730 3750 3770 7 3007 3027 3047 3067 3107 3127 3147 3167 3207 3227 3247 3267 3307 3327 3347 3367 3407 3427 3447 3467 3507 3527 3547 3567 3607 3627 3647 3667 3707 3727 3747 3767 6 3006 3026 3046 3066 3106 3126 3146 3166 3206 3226 3246 3266 3306 3326 3346 3366 3406 3426 3446 3466 3506 3526 3546 3566 3606 3626 3646 3666 3706 3726 3746 3766 5 3005 3025 3045 3065 3105 3125 3145 3165 3205 3225 3245 3265 3305 3325 3345 3365 3405 3425 3445 3465 3505 3525 3545 3565 3605 3625 3645 3665 3705 3725 3745 3765 4 3004 3024 3044 3064 3104 3124 3144 3164 3204 3224 3244 3264 3304 3324 3344 3364 3404 3424 3444 3464 3504 3524 3544 3564 3604 3624 3644 3664 3704 3724 3744 3764 3 3003 3023 3043 3063 3103 3123 3143 3163 3203 3223 3243 3263 3303 3323 3343 3363 3403 3423 3443 3463 3503 3523 3543 3563 3603 3623 3643 3663 3703 3723 3743 3763 2 3002 3022 3042 3062 3102 3122 3142 3162 3202 3222 3242 3262 3302 3322 3342 3362 3402 3422 3442 3462 3502 3522 3542 3562 3602 3622 3642 3662 3702 3722 3742 3762 1 3001 3021 3041 3061 3101 3121 3141 3161 3201 3221 3241 3261 3301 3321 3341 3361 3401 3421 3441 3461 3501 3521 3541 3561 3601 3621 3641 3661 3701 3721 3741 3761 LSB 0 3000 3020 3040 3060 3100 3120 3140 3160 3200 3220 3240 3260 3300 3320 3340 3360 3400 3420 3440 3460 3500 3520 3540 3560 3600 3620 3640 3660 3700 3720 3740 3760 GX GY Address Address V40140 V40141 V40142 V40143 V40144 V40145 V40146 V40147 V40150 V40151 V40152 V40153 V40154 V40155 V40156 V40157 V40160 V40161 V40162 V40163 V40164 V40165 V40166 V40167 V40170 V40171 V40172 V40173 V40174 V40175 V40176 V40177 V40340 V40341 V40342 V40343 V40344 V40345 V40346 V40347 V40350 V40351 V40352 V40353 V40354 V40355 V40356 V40357 V40360 V40361 V40362 V40363 V40364 V40365 V40366 V40367 V40370 V40371 V40372 V40373 V40374 V40375 V40376 V40377 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 441 Chapter 4: CPU Specifications and Operation Module Placement Slot Numbering The DL06 has four slots, which are numbered as follows: Slot 1 Slot 2 Slot 3 Slot 4 442 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation Automatic I/O Configuration The DL06 CPUs automatically detect any installed I/O modules (including specialty modules)at powerup, and establish the correct I/O configuration and addresses. This applies to modules located in local and expansion I/O bases. For most applications, you will never have to change the configuration. I/O addresses use octal numbering, starting at X100 and Y100 in the slot next to the CPU. The addresses are assigned in groups of 8, or 16 depending on the number of points for the I/O module. The discrete input and output modules can be mixed in any order, but there may be restrictions placed on some specialty modules. The following diagram shows the I/O numbering convention for an example system. Both the Handheld Programmer and DirectSOFT32 provide AUX functions that allow you to automatically configure the I/O. For example, with the Handheld Programmer AUX 46 executes an automatic configuration, which allows the CPU to examine the installed modules and determine the I/O configuration and addressing.With DirectSOFT32, the PLC Configure I/O menu option would be used. Automatic Manual Slot 1 Slot 2 Slot 3 8pt. Input 16pt. Output 16pt. Input X100X107 Y100Y117 X110X127 Slot 1 Slot 2 Slot 3 8pt. Input 16pt. Output 16pt. Input X100X107 Y100Y117 X200X217 Slot 4 8pt. Input X130X137 Slot 4 8pt. Input X110X117 Manual I/O Configuration It may never become necessary, but DL06 CPUs allow manual I/O address assignments for any I/O slot(s) . You can manually modify an auto configuration to match arbitrary I/O numbering. For example, two adjacent input modules can have starting addresses at X100 and X200.Use DirectSOFT32 PLC Configure I/O menu option to assign manual I/O address. In automatic configuration, the addresses are assigned on 8-point boundaries. Manual configuration, however, assumes that all modules are at least 16 points, so you can only assign addresses that are a multiple of 20 (octal). For example, X130 and Y150 are not valid addresses. You can still use 8 point modules, but 16 addresses will be assigned and the upper eight addresses will be unused. WARNING: If you manually configure an I/O slot, the I/O addressing for the other modules may change. This is because the DL06 CPUs do not allow you to assign duplicate I/O addresses. You must always correct any I/O configuration errors before you place the CPU in RUN mode. Uncorrected errors can cause unpredictable machine operation that can result in a risk of personal injury or damage to equipment. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 443 Chapter 4: CPU Specifications and Operation Power Budgeting The DL06 has four option card slots. To determine whether the combination of cards you select will have sufficient power, you will need to perform a power budget calculation. Power supplied Power is supplied from two sources, the internal base unit power supply and, if required, an external supply (customer furnished). The D0-06xx (AC powered) PLCs supply a limited amount of 24VDC power. The 24VDC output can be used to power external devices. For power budgeting, start by considering the power supplied by the base unit. All DL06 PLCs supply the same amount of 5VDC power. Only the AC units offer 24VDC auxiliary power. Be aware of the trade-off between 5VDC power and 24VDC power. The amount of 5VDC power available depends on the amount of 24VDC power being used, and the amount of 24VDC power available depends on the amount of 5VDC power consumed. Determine the amount of internally supplied power from the table on the following page. Power required by base unit Because of the different I/O configurations available in the DL06 family, the power consumed by the base unit itself varies from model to model. Subtract the amount of power required by the base unit from the amount of power supplied by the base unit. Be sure to subtract 5VDC and 24VDC amounts. Power required by option cards Next, subtract the amount of power required by the option cards you are planning to use. Again, remember to subtract both 5VDC and 24VDC. If your power budget analysis shows surplus power available, you should have a workable configuration. 444 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation DL06 Power Supplied by Base Units Part Number D0-06xx D0-06xx-D 5 VDC (mA) <1500mA <2000mA 1500mA DLO6 Power Consumed by Option Cards Part number D0-07CDR D0-08CDD1 D0-08TR D0-10ND3 D0-10TD1 D0-10TD2 D0-16ND3 D0-16TD1 D0-16TD2 F0-04AD-1 F0-2AD2DA-2 F0-4AD2DA-1 F0-4AD2DA-2 D0-DEVNETS 5 VDC 130mA 100mA 280mA 35mA 150mA 150mA 35mA 200mA 200mA 50mA 50mA 100mA 100mA 45mA 24 VDC (mA) 300mA 200mA none 24 VDC none none none none none none none none none none 30mA 40mA none none If the 5VDC loading is less than 2000mA but more than 1500mA, than available 24VDC supply current is 200mA. If the 5VDC loading is less than 1500mA, then the available 24VDC current is 300mA. DL06 Base Unit Power Required Part Number D0-06AA D0-06AR D0-06DA D0-06DD1 D0-06DD2 D0-06DR D0-06DD1-D D0-06DR-D 5 VDC (mA) 800mA 900mA 800mA 600mA 600mA 950mA 600mA 950mA 24 VDC (mA) none none none 280mA* none none none none Power Budgeting Example Power Source D0-06DD1 (select row A or row B) A B 5VDC 24VDC power (mA) power (mA) 1500mA 2000mA 300mA 200mA Current Required D0-06DD1 D0-16ND3 D0-10TD1 D0-08TR F0-4AD2DA-2 D0-06LCD Total Used Remaining A B 5VDC 24VDC power (mA) power (mA) 600mA 35mA 150mA 280mA 100mA 50mA 1215mA 285mA 785mA 280mA* 0 0 0 0 0 280mA 20mA note 1 DL06 Power Consumed by Other Devices Part Number D0-06LCD D2-HPP DV1000 5 VDC (mA) 50mA 200mA 150mA 24 VDC (mA) none none none * Auxiliary 24VDC used to power V+ terminal of D0-06DD1 sinking outputs. Note 1: If the PLCs auxiliary 24VDC power source is used to power the sinking outputs, use power choice A, above. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 445 Chapter 4: CPU Specifications and Operation Configuring the DL06s Comm Ports This section describes how to configure the CPUs built-in networking ports. for either MODBUS or DirectNET. This will allow you to connect the DL06 PLC system directly to MODBUS networks using the RTU protocol, or to other devices on a DirectNET network. MODBUS hosts system on the network must be capable of issuing the MODBUS commands to read or write the appropriate data. For details on the MODBUS protocol, please refer to the Gould MODBUS Protocol reference Guide (P1MBUS300 Rev. B). In the event a more recent version is available, check with your MODBUS supplier before ordering the documentation. For more details on DirectNET, order our DirectNET manual, part number DADNETM. Note: For information about the MODBUS protocol see the Group Schneider Web site at: www.schneiderautomation.com. At the main menu, select Support/Services, Modbus, Modbus Technical Manuals, PI-MBUS-300 Modbus Protocol Reference Guide or search for PIMBUS300.For more information about the DirectNET protocol, order our DirectNET user manual, part number DADNETM, or download it free from our Web site: www.automationdirect.com. Select Documentation/Misc./DA-DNET-M. DL06 Port Specifications Communications Port 1 Port 1 Connects to HPP, DirectSOFT32, operator interfaces, etc. 6-pin, RS232C Communication speed (baud): 9600 (fixed) Parity: odd (fixed) Station Address: 1 (fixed) 8 data bits 1 start, 1 stop bit Asynchronous, half-duplex, DTE Protocol (auto-select): K-sequence (slave only), DirectNET (slave only), MODBUS (slave only) Communications Port 2 Port 2 Connects to HPP, DirectSOFT32, operator interfaces, etc. 15-pin, multifunction port, RS232C, RS422, RS485 Communication speed (baud): 300, 600, 1200, 2400, 4800, 9600, 19200, 38400 Parity: odd (default), even, none Station Address: 1 (default) 8 data bits 1 start, 1 stop bit Asynchronous, half-duplex, DTE Protocol (auto-select): K-sequence (slave only), DirectNET (master/slave), MODBUS (master/slave), non-sequence/print/ASCII in/out Port 2 Pin Descriptions 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5V TXD RXD RTS CTS RXD0V 0V TXD+ TXDRTS+ RTSRXD+ CTS+ CTSPower (+) connection Transmit data (RS-232C) Receive data (RS-232C) Ready to send Clear to send Receive data (-) (RS-422/485) Power (-) connection (GND) Power (-) connection (GND) Transmit data (+) (RS-422/485) Transmit data (-) (RS-422/485) Ready to send (+) (RS-422/485) Ready to send (-) (RS-422/485) Receive data (+) (RS-422/485) Clear to send (+) (RS-422/485) Clear to send (-) (RS-422/485) DL06 Port Pinouts Port 1 Pin Descriptions TERM PORT1 PORT2 RU RUN STOP 5 4 3 2 1 2 3 4 5 6 0V 5V RXD TXD 5V 0V Power (-) connection (GND) Power (+) connection Receive data (RS-232C) Transmit data (RS-232C) Power (+) connection Power (-) connection (GND) 6 1 5 10 15 1 6 11 PORT1 PORT2 446 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation Choosing a Network Specification The DL06 PLCs multi-function port gives you the option of using RS-232C, RS-422, or RS-485 specifications. First, determine whether the network will be a 2-wire RS232C type, a 4-wire RS422 type, or a 2-wire/4-wire RS-485 type. The RS232C specification is simple to implement for networks of shorter distances (15 meters max) and where communication is only required between two devices. The RS422 and RS-485 signals are for networks that cover longer distances (1000 meters max.) and for multi-drop networks (from 2 to 247 devices). Note: Termination resistors are required at both ends of RS422 and RS-485 networks. It is necessary to select resistors that match the impedance rating of the cable (between 100 and 500 ohms). RS-232 Network Normally, the RS-232 signals are used for shorter distances (15 meters maximum), for communications between two devices. Point-to-point DTE Device 1 3 4 0V RXD TXD Signal GND RXD TXD GND RXD TXD CTS Signal GND TXD RXD RTS CTS OR Loop Back RTS CTS PORT1 6P6C Phone Jack RTS Connections on Port 1 Connections on Port 2 RS-422 Network RS-422 signals are for long distaces ( 1000 meters maximum). Use terminator resistors at both ends of RS-422 network wiring, matching the impedence rating of the cable (between 100 and 500 ohms). ASCII Slave Device RXD+ RXD TXD+ TXD Signal GND 9 TXD+ 10 TXD 13 RXD+ 6 RXD 11 RTS+ 12 RTS 14 CTS+ 15 CTS 7 0V Termination Resistor at both ends of network PORT 2 Master The recommended cable for RS422 is Belden 9729 or equivalent. RS-485 Network RS-485 signals are for longer distances (1000 meters max) and for multi-drop networks. Use termination resistors at both ends of RS-485 network wiring, matching the impedance rating of the cable (between 100 and 500 ohms). TXD+ / RXD+ Termination Resistor TXD+ / RXD+ TXD / RXD TXD / RXD Signal GND Connect shield to signal ground RXD TXD+ / RXD+ TXD / RXD Signal GND Signal GND RXD 0V TXD+ RTS+ RXD+ RTS CTS+ CTS 0V TXD+ Cable: Use Belden 9841 or equivalent RXD+ RTS+ RTS CTS+ CTS TXD TXD DL06 CPU Port 2 DL06 CPU Port 2 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 447 Chapter 4: CPU Specifications and Operation Connecting to MODBUS and DirectNET Networks MODBUS Port Configuration In DirectSOFT32, choose the PLC menu, then Setup, then Secondary Comm Port. Port: From the port number list box at the top, choose Port 2. Protocol: Click the check box to the left of MODBUS (use AUX 56 on the HPP, and select MBUS), and then youll see the dialog box below. Timeout: amount of time the port will wait after it sends a message to get a response before logging an error. RTS ON / OFF Delay Time: The RTS ON Delay Time specifies the time the DL06 waits to send the data after it has raised the RTS signal line. The RTS OFF Delay Time specifies the time the DL06 waits to release the RTS signal line after the data has been sent. When using the DL06 on a multi-drop network, the RTS ON Delay time must be set to at least 5ms and the RTS OFF Delay time must be set to at least 2ms. If you encounter problems, the time can be increased. Station Number: For making the CPU port a MODBUS master, choose 1. The possible range for MODBUS slave numbers is from 1 to 247, but the DL06 network instructions used in Master mode will access only slaves 1 to 99. Each slave must have a unique number. At powerup, the port is automatically a slave, unless and until the DL06 executes ladder logic network instructions which use the port as a master. Thereafter, the port reverts back to slave mode until ladder logic uses the port again. Baud Rate: The available baud rates include 300, 600, 1200, 2400, 4800, 9600, 19200, and 38400 baud. Choose a higher baud rate initially, reverting to lower baud rates if you experience data errors or noise problems on the network. Important: You must configure the baud rates of all devices on the network to the same value. Refer to the appropriate product manual for details. Stop Bits: Choose 1 or 2 stop bits for use in the protocol. Parity: Choose none, even, or odd parity for error checking. Echo Suppression: Select the appropriate radio button based on the wiring configuration used on port 2. Then click the button indicated to send the Port configuration to the CPU, and click Close. 448 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation DirectNET Port Configuration In DirectSOFT32, choose the PLC menu, then Setup, then Secondary Comm Port. Port: From the port number list box, choose Port 2 . Protocol: Click the check box to the left of DirectNET (use AUX 56 on the HPP, then select DNET), and then youll see the dialog box below. Timeout: Amount of time the port will wait after it sends a message to get a response before logging an error. RTS ON / OFF Delay Time: The RTS ON Delay Time specifies the time the DL06 waits to send the data after it has raised the RTS signal line. The RTS OFF Delay Time specifies the time the DL06 waits to release the RTS signal line after the data has been sent. When using the DL06 on a multi-drop network, the RTS ON Delay time must be set to at least 5ms and the RTS OFF Delay time must be set to at least 2ms. If you encounter problems, the time can be increased. Station Number: For making the CPU port a DirectNET master, choose 1. The allowable range for DirectNET slaves is from 1 to 90 (each slave must have a unique number). At powerup, the port is automatically a slave, unless and until the DL06 executes ladder logic instructions which attempt to use the port as a master. Thereafter, the port reverts back to slave mode until ladder logic uses the port again. Baud Rate: The available baud rates include 300, 600, 1200, 2400, 4800, 9600, 19200, and 38400 baud. Choose a higher baud rate initially, reverting to lower baud rates if you experience data errors or noise problems on the network. Important: You must configure the baud rates of all devices on the network to the same value. Stop Bits: Choose 1 or 2 stop bits for use in the protocol. Parity: Choose none, even, or odd parity for error checking. Format: Choose between hex or ASCII formats. Then click the button indicated to send the Port configuration to the CPU, and click Close. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 449 Chapter 4: CPU Specifications and Operation NonSequence Protocol (ASCII In/Out and PRINT) MODBUS Port Configuration Configuring port 2 on the DL06 for NonSequence allows the CPU to use port 2 to either read or write raw ASCII strings using the ASCII instructions. See the ASCII In/Out instructions and the PRINT instruction in chapter 5. In DirectSOFT32, choose the PLC menu, then Setup, then Secondary Comm Port. Port: From the port number list box at the top, choose Port 2. Protocol: Click the check box to the left of NonSequence. Timeout: Amount of time the port will wait after it sends a message to get a response before logging an error. RTS On Delay Time: The amount of time between raising the RTS line and sending the data. RTS Off Delay Time: The amount of time between resetting the RTS line after sending the data. Data Bits: Select either 7bits or 8bits to match the number of data bits specified for the connected devices. Baud Rate: The available baud rates include 300, 600, 900, 2400, 4800, 9600, 19200, and 38400 baud. Choose a higher baud rate initially, reverting to lower baud rates if you experience data errors or noise problems on the network. Important: You must configure the baud rates of all devices on the network to the same value. Refer to the appropriate product manual for details. Stop Bits: Choose 1 or 2 stop bits to match the number of stop bits specified for the connected devices. Parity: Choose none, even, or odd parity for error checking. Be sure to match the parity specified for the connected devices. Echo Suppression: Select the appropriate radio button based on the wiring configuration used on port 2. Xon/Xoff Flow Control: Choose this selection if you have port 2 wired for Hardware Flow Control (Xon/Xoff ) with RTS and CTS signal connected between all devices. RTS Flow Control: Choose this selection if you have Port 2 RTS signal wired between all devices. Then click the button indicated to send the Port configuration to the CPU, and click Close. 450 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation Network Slave Operation This section describes how other devices on a network can communicate with a CPU port that you have configured as a DirectNETslave or MODBUS slave (DL06). A MODBUS host must use the MODBUS RTU protocol to communicate with the DL06 as a slave. The host software must send a MODBUS function code and MODBUS address to specify a PLC memory location the DL06 comprehends. The DirectNET host uses normal I/O addresses to access applicable DL06 CPU and system. No CPU ladder logic is required to support either MODBUS slave or DirectNET slave operation. MODBUS Function Codes Supported The MODBUS function code determines whether the access is a read or a write, and whether to access a single data point or a group of them. The DL06 supports the MODBUS function codes described below. MODBUS Function Code 01 02 05 15 03, 04 06 16 Function Read a group of coils Read a group of inputs Set / Reset a single coil Set / Reset a group of coils Y, Read a value from one or more registers Write a value into a single register Write a value into a group of registers DL06 Data Types Available Y, CR, T, CT X, SP Y, CR, T, CT CR, T, CT V V V Determining the MODBUS Address There are typically two ways that most host software conventions allow you to specify a PLC memory location. These are: By specifying the MODBUS data type and address By specifying a MODBUS address only DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 451 Chapter 4: CPU Specifications and Operation If Your Host Software Requires the Data Type and Address... Many host software packages allow you to specify the MODBUS data type and the MODBUS address that corresponds to the PLC memory location. This is the easiest method, but not all packages allow you to do it this way. The actual equation used to calculate the address depends on the type of PLC data you are using. The PLC memory types are split into two categories for this purpose. Discrete X, SP, Y, CR, S, T, C (contacts) Word V, Timer current value, Counter current value In either case, you basically convert the PLC octal address to decimal and add the appropriate MODBUS address (if required). The table below shows the exact equation used for each group of data. DL06 Memory Type QTY (Dec.) PLC Range(Octal) MODBUS Address MODBUS Data Type Range (Decimal) Input Input Coil Coil Coil Coil Coil Input Register Input Register Holding Register Holding Register Holding Register For Discrete Data Types .... Convert PLC Addr. to Dec. + Start of Range + Data Type 512 X0 X777 2048 2559 Inputs (X) 512 SP0 SP777 3072 3583 Special Relays(SP) 512 Y0 Y777 2048 2559 Outputs (Y) 1024 C0 C1777 3072 4095 Control Relays (CR) 256 T0 T377 6144 6399 Timer Contacts (T) 128 CT0 CT177 6400 6527 Counter Contacts (CT) 1024 S0 S1777 5120 6143 Stage Status Bits(S) For Word Data Types .... Convert PLC Addr. to Dec. + Data Type 256 V0 V377 0 255 Timer Current Values (V) 128 V1000 V1177 512 639 Counter Current Values (V) V Memory, user data (V) V Memory, non-volatile (V) 3200 4096 128 V1200 V7377 V10000 - V17777 V7400 V7577 640 3839 4096 - 8191 3840 3967 452 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation The following examples show how to generate the MODBUS address and data type for hosts which require this format. Example 1: V2100 Find the MODBUS address for User V location V2100. 1. Find V memory in the table. 2. Convert V2100 into decimal (1088). 3. Use the MODBUS data type from the table. V Memory, user data (V) 3200 V1200 V7377 640 3839 Holding Register Holding Reg 1088 Example 2: Y20 Find the MODBUS address for output Y20. 1. Find Y outputs in the table. 2. Convert Y20 into decimal (16). 3. Add the starting address for the range (2048). 4. Use the MODBUS data type from the table. Outputs (V) 256 Y0 Y377 2048 - 2303 Coil Coil 2064 Example 3: T10 Current Value Find the MODBUS address to obtain the current value from Timer T10. 1. Find Timer Current Values in the table. 2. Convert T10 into decimal (8). 3. Use the MODBUS data type from the table. Timer Current Values (V) 128 V0 V177 0 - 127 Input Register Input Reg. 8 Example 4: C54 Find the MODBUS address for Control Relay C54. 1. Find Control Relays in the table. 2. Convert C54 into decimal (44). 3. Add the starting address for the range (3072). 4. Use the MODBUS data type from the table. Control Relays (CR) 512 C0 C77 3072 3583 Coil Coil 3116 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 453 Chapter 4: CPU Specifications and Operation If Your MODBUS Host Software Requires an Address ONLY Some host software does not allow you to specify the MODBUS data type and address. Instead, you specify an address only. This method requires another step to determine the address, but its still fairly simple. Basically, MODBUS also separates the data types by address ranges as well. So this means an address alone can actually describe the type of data and location. This is often referred to as adding the offset. One important thing to remember here is that two different addressing modes may be available in your host software package. These are: 484 Mode 584/984 Mode We recommend that you use the 584/984 addressing mode if your host software allows you to choose. This is because the 584/984 mode allows access to a higher number of memory locations within each data type. If your software only supports 484 mode, then there may be some PLC memory locations that will be unavailable. The actual equation used to calculate the address depends on the type of PLC data you are using. The PLC memory types are split into two categories for this purpose. Discrete X, SP, Y, CR, S, T, C (contacts) Word V, Timer current value, Counter current value In either case, you basically convert the PLC octal address to decimal and add the appropriate MODBUS addresses (as required). The table below shows the exact equation used for each group of data. DL06 Memory Type MODBUS PLC Range Address 484 Mode QTY (Dec.) (Octal) Range Address (Decimal) 584/984 MODBUS Mode Data Address Type Input Input Coil Coil Coil Coil Coil Input Register Input Register Holding Register Holding Register Holding Register For Discrete Data Types ....Convert Addr. to Dec. + Start of Range + Data Type 512 X0 X777 2048 2559 1001 100001 Inputs (X) 512 SP0 SP777 3072 3583 1001 100001 Special Relays (SP) 512 Y0 Y777 2048 2559 1 1 Outputs (Y) 1024 C0 C1777 3072 4095 1 1 Control Relays (CR) 256 T0 T377 6144 6399 1 1 Timer Contacts (T) 128 CT0 CT177 6400 6527 1 1 Counter Contacts (CT) 1024 S0 S1777 5120 6143 1 1 Stage Status Bits (S) For Word Data Types .... Convert Addr. to Dec. + Data Type Timer Current Values (V) Counter Current Values (V) V Memory, user data (V) 4096 256 128 3200 V0 V377 V1000 V1177 V1200 V7377 V10000 V17777 V7400 V7577 0 255 512 639 640 3839 4001 4096 - 8191 3840 3967 4001 40001 40001 3001 3001 30001 30001 V-Memory, non-volatile (V) 128 454 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation The following examples show how to generate the MODBUS addresses for hosts which require this format. Example 1: V2100 584/984 Mode Find the MODBUS address for User V location V2100. 1. Find V memory in the table. 2. Convert V2100 into decimal (1088). 3. Add the MODBUS starting address for the mode (40001). V Memory, system (V) 128 V1200 V7377 3480 3735 4001 40001 Holding Register 41089 Example 2: Y20 584/984 Mode Find the MODBUS address for output Y20. 1. Find Y outputs in the table. 2. Convert Y20 into decimal (16). 3. Add the starting address for the range (2048). 4. Add the MODBUS address for the mode (1). Outputs (V) 256 Y0 Y377 2048 2303 1 1 Coil 2065 Example 3: T10 Current Value 484 Mode Find the MODBUS address to obtain the current value from Timer T10. 1. Find Timer Current Values in the table. 2. Convert T10 into decimal (8). 3. Add the MODBUS starting address for the mode (3001). Timer Current Values (V) 128 V0 V177 0 127 3001 3001 Input Register 3009 Example 4: C54 584/984 Mode Find the MODBUS address for Control Relay C54. 1. Find Control Relays in the table. 2. Convert C54 into decimal (44). 3. Add the starting address for the range (3072). 4. Add the MODBUS address for the mode (1). Control Relays(V) 512 C0 C777 3072 3583 1 1 Coil 3117 Determining the DirectNET Address Addressing the memory types for DirectNET slaves is very easy. Use the ordinary native address of the slave device itself. To access a slave PLCs memory address V2000 via DirectNET, for example, the network master will request V2000 from the slave. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 455 Chapter 4: CPU Specifications and Operation Network Master Operation This section describes how the DL06 can communicate on a MODBUS or DirectNET network as a master. For MODBUS networks, it uses the MODBUS RTU protocol, which must be interpreted by all the slaves on the network. Both MODBUS and DirectNet are single master/multiple slave networks. The master is the only member of the network that can initiate requests on the network. This section teaches you how to design the required ladder logic for network master operation. 0V G LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 PWR RUN CPU TX1 RX1 TX2 RX2 Y X 0 1 2 D0-06DR 23 INPUT: 12 - 24V 3 - 15mA LOGIC C0 X0 K oyo 06 X3 X2 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 X1 TERM PORT1 PORT2 RUN STOP Master MODBUS RTU Protocol, or DirectNET , Slave #1 Slave #2 Slave #3 When using the DL06 PLC as the master station, simple RLL instructions are used to initiate the requests. The WX instruction initiates network write operations, and the RX instruction initiates network read operations. Before executing either the WX or RX commands, we will need to load data related to the read or write operation onto the CPUs accumulator stack. When the WX or RX instruction executes, it uses the information on the stack combined with data in the instruction box to completely define the task, which goes to the port. 0V LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 G AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 PWR RUN CPU TX1 RX1 TX2 RX2 Y X 0 1 2 D0-06DR 23 INPUT: 12 - 24V 3 - 15mA LOGIC C0 X0 K oyo 06 X3 X2 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X10 X12 C3 X15 X17 X20 X22 N.C. X1 TERM PORT1 PORT2 RUN STOP Master WX (write) RX (read) Network Slave The following step-by-step procedure will provide you the information necessary to set up your ladder program to receive data from a network slave. 456 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation Step 1: Identify Master Port # and Slave # The first Load (LD) instruction identifies the communications port number on the network master (DL06) and the address of the slave station. This instruction can address up to 99 MODBUS slaves, or 90 DirectNET slaves. The format of the word is shown to the right. The F2 in the upper byte indicates the use of the right port of the DL06 PLC, port number 2. The lower byte contains the slave address number in BCD (01 to 99). F 2 0 1 Slave address (BCD) Port number (BCD) Internal port (hex) LD KF201 Step 2: Load Number of Bytes to Transfer 6 4 (BCD) The second Load (LD) instruction determines the number of bytes which will be transferred # of bytes to transfer between the master and slave in the subsequent WX or RX instruction. The value to be loaded LD is in BCD format (decimal), from 1 to 128 K64 bytes. The number of bytes specified also depends on the type of data you want to obtain. For example, the DL06 Input points can be accessed by V-memory locations or as X input locations. However, if you only want X0 X27, youll have to use the X input data type because the V-memory locations can only be accessed in 2-byte increments. The following table shows the byte ranges for the various types of DirectLOGIC. products. DL 05 / 06 / 205 / 350 / 405 Memory V memory T / C current value Inputs (X, SP) Outputs (Y, C, Stage, T/C bits) Scratch Pad Memory Diagnostic Status Bits per unit 16 16 8 8 8 8 Bytes 2 2 1 1 1 1 DL330 / 340 Memory Data registers T / C accumulator I/O, internal relays, shift register bits, T/C bits, stage bits Scratch Pad Memory Diagnostic Status(5 word R/W) Bits per unit 8 16 1 8 16 Bytes 1 2 1 1 10 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 457 Chapter 4: CPU Specifications and Operation Step 3: Specify Master Memory Area The third instruction in the RX or WX sequence is a Load Address (LDA) instruction. Its purpose is to load the starting address of the memory area to be transferred. Entered as an octal number, the LDA instruction converts it to hex and places the result in the accumulator. For a WX instruction, the DL06 CPU sends the number of bytes previously specified from its memory area beginning at the LDA address specified. For an RX instruction, the DL06 CPU reads the number of bytes previously specified from the slave, placing the received data into its memory area beginning at the LDA address specified. 4 0 6 0 0 (octal) Starting address of master transfer area LDA O40600 MSB 15 MSB 15 V40600 LSB 0 V40601 LSB 0 NOTE: Since V memory words are always 16 bits, you may not always use the whole word. For example, if you only specify 3 bytes and you are reading Y outputs from the slave, you will only get 24 bits of data. In this case, only the 8 least significant bits of the last word location will be modified. The remaining 8 bits are not affected. Step 4: Specify Slave Memory Area The last instruction in our sequence is the WX or RX instruction itself. Use WX to write to the slave, and RX to read from the slave. All four of our instructions are shown to the right. In the last instruction, you must specify the starting address and a valid data type for the slave. DirectNET slaves specify the same address in the WX and RX instruction as the slaves native I/O address MODBUS DL405, DL205, or DL06 slaves specify the same address in the WX and RX instruction as the slaves native I/O address MODBUS 305 slaves use the following table to convert DL305 addresses to MODBUS addresses SP116 LD KF201 LD K64 LDA O40600 RX Y0 DL305 Series CPU Memory TypetoMODBUS Cross Reference (excluding 350 CPU) PLC Memory Type PLC Base Address TMR/CNT Current Values I/O Points Data Registers Stage Status Bits (D3-330P only) R600 IO 000 R401,R400 S0 MODBUS Base Address V0 GY0 V100 GY200 PLC Memory Type PLC Base Address TMR/CNT Status Bits Control Relays Shift Registers CT600 CR160 SR400 MODBUS Base Address GY600 GY160 GY400 458 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation Communications from a Ladder Program Typically network communications will last longer than 1 scan. The program must wait for the communications to finish before starting the next transaction. Port 2, which can be a master, has two Special Relay contacts associated with it (see Appendix D for comm port Port Communication Error special relays).One indicates Port busy(SP116), and the other indicates Port Communication Error(SP117). The example above shows the use of these contacts for a network master that only reads a device (RX). The Port Busy bit is on while the PLC communicates with the slave. When the bit is off the program can initiate the next network request. The Port Communication Error bit turns on SP116 when the PLC has detected an error. Use of this bit is optional. When used, it should be ahead of any network instruction boxes since the error bit is reset when an RX or WX instruction is executed. SP117 Y1 SET LD KF201 LD K0003 LDA O40600 RX Y0 SP116 Port Busy Interlocking Relay C100 LD KF201 LD K0003 LDA O40600 RX VY0 C100 SET LD KF201 LD K0003 LDA O40400 WX VY0 C100 RST Multiple Read and Write Interlocks If you are using multiple reads and writes in the RLL program, you have to interlock the routines to make sure all the routines are executed. If you dont use the interlocks, then the CPU will only execute the first routine. This is because each port can only handle one transaction at a time. In the example to the right, after the RX instruction is executed, C0 is set. When the port has finished the communication task, the second routine is executed and C0 is reset. If youre using RLLPLUS Stage Programming, you can put each routine in a separate program stage to ensure proper execution and switch from stage to stage allowing only one of them to be active at a time. Interlocking Relay SP116 C100 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 459 Chapter 4: CPU Specifications and Operation Network Master Operation (using MRX and MWX Instructions) This section describes how the DL06 can communicate on a MODBUS RTU network as a master using the MRX and MWX read/write instructions. These instructions allow you to enter native MODBUS addressing in your ladder logic program with no need to perform octal to decimal conversions. MODBUS is a single master/multiple slave network. The master is the only member of the network that can initiate requests on the network. This section teaches you how to design the required ladder logic for network master operation. G LG Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 0V Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C. AC(L) AC(N) 24V C0 OUTPUT: 6-240V 50 - 60Hz 3 4 5 2.0A, 6 - 27V 6 7 10 11 2.0A 12 PWR: 100-240V 13 14 15 16 50-60Hz 40VA 17 20 21 22 Y X 0 1 2 D0-06DR 23 INPUT: 12 - 24V 3 - 15mA PWR RUN CPU TX1 RX1 TX2 RX2 LOGIC C0 X0 K oyo 06 X3 X2 C1 X4 X5 X6 X7 C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3 X1 TERM PORT1 PORT2 RUN STOP Master MODBUS RTU Protocol, or DirectNET , Slave #1 Slave #2 Slave #3 MODBUS Function Codes Supported The MODBUS function code determines whether the access is a read or a write, and whether to access a single data point or a group of them. The DL06 supports the MODBUS function codes described below. MODBUS Function Code 01 02 05 15 03, 04 06 07 08 16 Read a group of coils Read a group of inputs Set / Reset a single coil (slave only) Set / Reset a group of coils Read a value from one or more registers Write a value into a single register (slave only) Read Exception Status Diagnostics Write a value into a group of registers Function DL06 Data Types Available Y, CR, T, CT X, SP Y, CR, T, CT Y, CR, T, CT V V V V V 460 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation MODBUS Port Configuration In DirectSOFT32, choose the PLC menu, then Setup, then Secondary Comm Port. Port: From the port number list box at the top, choose Port 2. Protocol: Click the check box to the left of MODBUS (use AUX 56 on the HPP, and select MBUS), and then youll see the dialog box below. Timeout: Amount of time the port will wait after it sends a message to get a response before logging an error. RTS On Delay Time: The amount of time between raising the RTS line and sending the data. RTS Off Delay Time: The amount of time between resetting the RTS line after sending the data. Station Number: For making the CPU port a MODBUS master, choose 1. The possible range for MODBUS slave numbers is from 1 to 247. Each slave must have a unique number. At powerup, the port is automatically a slave, unless and until the DL06 executes ladder logic MWX/MRX network instructions which use the port as a master. Thereafter, the port reverts back to slave mode until ladder logic uses the port again. Baud Rate: The available baud rates include 300, 600, 900, 2400, 4800, 9600, 19200, and 38400 baud. Choose a higher baud rate initially, reverting to lower baud rates if you experience data errors or noise problems on the network. Important: You must configure the baud rates of all devices on the network to the same value. Refer to the appropriate product manual for details. Stop Bits: Choose 1 or 2 stop bits for use in the protocol. Parity: Choose none, even, or odd parity for error checking. Echo Suppression: Select the appropriate radio button based on the wiring configuration used on port 2. Then click the button indicated to send the Port configuration to the CPU, and click Close. DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 461 Chapter 4: CPU Specifications and Operation MODBUS Read from Network(MRX) The MODBUS Read from Network (MRX) instruction is used by the DL06 network master to read a block of data from a connected slave device and to write the data into Vmemory addresses within the master. The instruction allows the user the to specify the MODBUS Function Code, slave station address, starting master and slave memory addresses, number of elements to transfer, MODBUS data format and the Exception Response Buffer. Port Number: must be DL06 Port 2 (K2) Slave Address: specify a slave station address (0247) Function Code: The following MODBUS function codes are supported by the MRX instruction: 01 Read a group of coils 02 Read a group of inputs 03 Read holding registers 04 Read input registers 07 Read Exception status 08 Diagnostics Start Slave Memory Address: specifies the starting slave memory address of the data to be read. See the table on the following page. Start Master Memory Address: specifies the starting memory address in the master where the data will be placed. See the table on the following page. Number of Elements: specifies how many coils, input, holding registers or input register will be read. See the table on the following page. MODBUS Data Format: specifies MODBUS 584/984 or 484 data format to be used Exception Response Buffer: specifies the master memory address where the Exception Response will be placed. See the table on the following page. 462 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation MRX Slave Memory Address MRX Slave Address Ranges Function Code 01 Read Coil 01 Read Coil 02 Read Input Status 02 Read Input Status 03 Read Holding Register 03 Read Holding Register 04 Read Input Register 04 Read Input Register 07 Read Exception Status 08 Diagnostics MODBUS Data Format 484 Mode 584/984 Mode 484 Mode 584/984 Mode 484 Mode 584/984 484 Mode 584/984 Mode 484 and 584/984 Mode 484 and 584/984 Mode Slave Address Range(s) 1999 165535 10011999 1000119999 (5 digit) or 100001165535 (6 digit) 40014999 4000149999 (5 digit) or 4000001465535 (6 digit) 30013999 3000139999 (5 digit) or 3000001365535 (6 digit) n/a 065535 MRX Master Memory Addresses MRX Master Memory Address Ranges Operand Data Type Inputs X Outputs Y Control Relays C Stage Bits S Timer Bits T Counter Bits CT Special Relays SP Vmemory V Global Inputs GX Global Outputs GY DL06 Range 01777 01777 03777 01777 0377 0377 0777 All 03777 03777 MRX Number of Elements Number of Elements Operand Data Type Vmemory . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K DL06 Range All 12000 MRX Exception Response Buffer Exception Response Buffer Operand Data Type Vmemory . . . . . . . . . . . . . . . . . . . . . . . . . . . . V DL06 Range All DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 463 Chapter CPU 4: Specifications and Operation MODBUS Write to Network (MWX) The MODBUS Write to Network (MWX) instruction is used to write a block of data from the network masterss (DL06) memory to MODBUS memory addresses within a slave device on the network. The instruction allows the user to specify the MODBUS Function Code, slave station address, starting master and slave memory addresses, number of elements to transfer, MODBUS data format and the Exception Response Buffer. Port Number: must be DL06 Port 2 (K2) Slave Address: specify a slave station address (0247) Function Code: The following MODBUS function codes are supported by the MWX instruction: 05 Force Single coil 06 Preset Single Register 08 Diagnostics 15 Force Multiple Coils 16 Preset Multiple Registers Start Slave Memory Address: specifies the starting slave memory address where the data will be written. Start Master Memory Address: specifies the starting address of the data in the master that is to written to the slave. Number of Elements: specifies how many consecutive coils or registers will be written to. This field is only active when either function code 15 or 16 is selected. MODBUS Data Format: specifies MODBUS 584/984 or 484 data format to be used. Exception Response Buffer: specifies the master memory address where the Exception Response will be placed. 464 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation MWX Slave Memory Address MWX Slave Address Ranges Function Code 05 Force Single Coil 05 Force Single Coil 06 Preset Single Register 06 Preset Single Register 08 Diagnostics 15 Force Multiple Coils 15 Force Multiple Coils 16 Preset Multiple Registers 16 Preset Multiple Registers MODBUS Data Format 484 Mode 584/984 Mode 484 Mode 84/984 Mode 484 and 584/984 Mode 484 585/984 Mode 484 Mode 584/984 Mode Slave Address Range(s) 1999 165535 40014999 4000149999 (5 digit) or 400001465535 (6 digit) 065535 1999 165535 40014999 4000149999 (5 digit) or 4000001465535 (6 digit) MWX Master Memory Addresses MRX Master Memory Address Ranges Operand Data Type Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . Stage Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Timer Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Counter Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Special Relays. . . . . . . . . . . . . . . . . . . . . . . . . . . . Vmemory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Global Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . Global Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . X Y C S T CT SP V GX GY DL06 Range 0777 0777 01777 01777 0377 0177 0777 All 03777 03777 MWX Number of Elements Number of Elements Operand Data Type Vmemory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V K DL06 Range All 12000 MWX Exception Response Buffer Exception Response Buffer Operand Data Type Vmemory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V DL06 Range All DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 465 Chapter 4: CPU Specifications and Operation MRX / MWX Example in DirectSOFT32 DL06 port 2 has two Special Relay contacts associated with it (see Appendix D for comm port special relays). One indicates Port busy(SP116), and the other indicates Port Communication Error(SP117). The Port Busy bit is on while the PLC communicates with the slave. When the bit is off the program can initiate the next network request. The Port Communication Error bit turns on when the PLC has detected an error and use of this bit is optional. When used, it should be ahead of any network instruction boxes since the error bit is reset when an MRX or MWX instruction is executed. Typically network communications will last longer than 1 CPU scan. The program must wait for the communications to finish before starting the next transaction. The Port Communication Error bit turns on when the PLC has detected an error. Use of this bit is optional. When used, it should be ahead of any network instruction boxes since the error bit is reset when an RX or WX instruction is executed. Multiple Read and Write Interlocks If you are using multiple reads and writes in the RLL program, you have to interlock the routines to make sure all the routines are executed. If you dont use the interlocks, then the CPU will only execute the first routine. This is because each port can only handle one transaction at a time.In the example below, after the RX instruction is executed, C100 is set. When the port has finished the communication task, the second routine is executed and C100 is reset. If youre using RLLPLUS Stage Programming, you can put each routine in a separate program stage to ensure proper execution and switch from stage to stage allowing only one of them to be active at a time. SP116 will execute every time it attempts to poll the network. You should see this counting up as you enable the MWX and MRX instructions. Some things that would prevent this: 1) Com Port RTS and CTS not jumpered. 2) Port not set up for MODBUS RTU. 3) Problem in logic that is not allowing the MWX or MRX to enable. CNT Port 2 busy bit 1 SP116 _FirstScan Number of times that the PLC has tried to poll network SP0 CTO K9999 SP117 will come on when: 1) The slave device sends an "Exception Response." If this occurs, look at the V-memory location associated with that instruction and consult the MODICON MODBUS manual for details. 2) Cabling problem. Consult wiring diagram in user manual and verify. 3) Setting for communications are not matching. For example: Baud rates, parities, stop bits all must match. 4) Polling a slave address number that doesn't exist. Under good conditions, SP116 will be counting up and SP117 will not. You will get an occasional error in many field environments that introduce electrical/RF noise into the application. Each application will dictate what allowable "percentage" of error is acceptable. Anything below 10% typically does not affect the throughput very much. Port 2 error bit CNT Number of times that the PLC has errored 2 SP117 _FirstScan SP0 CT1 K9999 466 DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 Chapter 4: CPU Specifications and Operation This rung does a MODBUS write to the first holding register 40001 of slave address number one. It writes the values over that reside in V2000. This particular function code only writes to one register. Use function code 16 to write to multiple registers. Only one Network Instruction (WX, RX, MWX, MRX) can be enabled in one scan. That is the reason for the interlock bits. For using many network instructions on the same port, use the Shift Register instruction. SP116 3 C100 MWX Port Number: K2 Slave Address: K1 Function Code: 06 - Preset Single Register Start Slave Memory Address: 40001 Number of Elements: n/a Modbus Data Type: 584/984 Mode Exception Response Buffer: V400 Instruction interlock bit C100 ( SET ) This rung does a MODBUS read from the first 32 coils of slave address number one. It will place the values into 32 bits of the master starting at C0. 4 SP116 C100 MRX Port Number: K2 Slave Address: K1 Function Code: 01 - Read Coil Status Start Slave Memory Address: 1 Start Master Memory Address: C0 Number of Elements: 32 Modbus Data Type: 584/984 Mode Exception Response Buffer: V400 Instruction interlock bit C100 ( RST ) DL06 Micro PLC User Manual; 1st Ed., Rev. A, 10/02 467 STANDARD RLL INSTRUCTIONS In This Chapter CHAPTER 5 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52 Using Boolean Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55 Boolean Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .510 Comparative Boolean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .526 Immediate Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .532 Timer, Counter and Shift Register Instructions . . . . . . . . . . . . . . . .539 Accumulator / Stack Load and Output Data Instructions . . . . . . . .552 Logical Instructions (Accumulator) . . . . . . . . . . . . . . . . . . . . . . . . .569 Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .586 Transcendental Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5118 Bit Operation Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5120 Number Conversion Instructions (Accumulator) . . . . . . . . . . . . . .5127 Table Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5141 Clock / Calendar Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . .5171 CPU Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5173 Program Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . .5175 Interrupt Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5183 Message Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5186 MODBUS RTU Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5201 ASCII Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5207 Chapter 5: Standard RLL Instructions Introduction DL06 Micro PLCs offer a wide variety of instructions to perform many different types of operations. This chapter shows you how to use each standard Relay Ladder Logic (RLL) instruction. In addition to these instructions, you may also need to refer to the Drum instruction in Chapter 6, or the Stage programming instructions in Chapter 7. There are two ways to quickly find the instruction you need. If you know the instruction category (Boolean, Comparative Boolean, etc.) just use the title at the top of the page to find the pages that discuss the instructions in that category. If you know the individual instruction name, use the following table to find the page(s) that discusses the instruction. Instruction Accumulating Fast Timer (TMRAF) Accumulating Timer (TMRA) Add (ADD) Add Binary (ADDB) Add Binary Double (ADDBD) Add Binary Top of Stack (ADDBS) Add Double (ADDD) Add Formatted (ADDF) Add Real (ADDR) Add to Top (ATT) Add Top of Stack (ADDS) And (AND) And (AND) And (AND) AND Bit-of-Word (ANDB) And Double (ANDD) And Formatted (ANDF) And If Equal (ANDE) And If Not Equal (ANDNE) And Immediate (ANDI) AND Move (ANDMOV) And Negative Differential (ANDND) And Not (ANDN) And Not (ANDN) And Not Bit-of-Word (ANDNB) And Not Immediate (ANDNI) And Positive Differential (ANDPD) Page 542 542 586 599 5100 5114 587 5106 588 5162 5110 569 531 514 515 570 571 528 528 533 5167 522 531 514 515 533 522 Instruction And Store (AND STR) And with Stack (ANDS) Arc Cosine Real (ACOSR) Arc Sine Real (ASINR) Arc Tangent Real (ATANR) ASCII Clear Buffer (ACRB) ASCII Compare (CMPV) ASCII Constant (ACON) ASCII Extract (AEX) ASCII Find (AFIND) ASCII Input (AIN) ASCII Print from Vmemory (PRINTV) ASCII Print to Vmemory (VPRINT) ASCII Swap Bytes (SWAPB) ASCII to HEX (ATH) Binary (BIN) Binary Coded Decimal (BCD) Binary to Real Conversion (BTOR) Compare (CMP) Compare Double (CMPD) Compare Formatted (CMPF) Compare Real Number (CMPR) Compare with Stack (CMPS) Cosine Real (COSR) Counter (CNT) Data Label (DLBL) Date (DATE) Page 516 572 5119 5118 5119 5225 5217 5187 5216 5213 5209 5223 5218 5224 5134 5127 5128 5131 581 582 583 585 584 5118 545 5187 5171 52 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions Instruction Decode (DECO) Decrement (DEC) Decrement Binary (DECB) Degree Real Conversion (DEGR) Disable Interrupts (DISI) Divide (DIV) Divide Binary (DIVB) Divide Binary by Top OF Stack (DIVBS) Divide by Top of Stack (DIVS) Divide Double (DIVD) Divide Formatted (DIVF) Divide Real (DIVR) Enable Interrupts (ENI) Encode (ENCO) End (END) Exclusive Or (XOR) Exclusive Or Double (XORD) Exclusive Or Formatted (XORF) Exclusive OR Move (XORMOV) Exclusive Or with Stack (XORS) External Interrupt Program Example Fault (FAULT) Fill (FILL) Find (FIND) Find Block (FINDB) Find Greater Than (FDGT) For / Next (FOR) (NEXT) Goto Label (GOTO) (LBL) Goto Subroutine (GTS) (SBR) Gray Code (GRAY) HEX to ASCII (HTA) Increment (INC) Increment Binary (INCB) Interrupt (INT) Interrupt Return (IRT) Interrupt Return Conditional (IRTC) Invert (INV) LCD Load (LD) Page 5126 598 5105 5133 5184 595 5104 5117 5113 596 5109 597 5183 5125 5173 577 578 579 5167 580 5184 5186 5146 5147 5169 5148 5176 5175 5178 5138 5135 598 5105 5183 5183 5183 5129 5197 557 Instruction Load Accumulator Indexed (LDX) Load Address (LDA) Load Double (LDD) Load Formatted (LDF) Load Immediate (LDI) Load Immediate Formatted (LDIF) Load Label (LDLBL) Load Real Number (LDR) Master Line Reset (MLR) Master Line Set (MLS) MODBUS Read from Network (MRX) MODBUS Write to Network (MWX) Move (MOV) Move Memory Cartridge (MOVMC) Multiply (MUL) Multiply Binary (MULB) Multiply Binary Top of Stack (MULBS) Multiply Double (MULD) Multiply Formatted (MULF) Multiply Real (MULR) Multiply Top of Stack (MULS) No Operation (NOP) Not (NOT) Numerical Constant (NCON) Or (OR) Or (OR) Or (OR) Or Bit-of-Word (ORB) Or Double (ORD) Or Formatted (ORF) Or If Equal (ORE) Or Immediate (ORI) OR Move (ORMOV) Or Negative Differential (ORND) Or Not (ORN) Or Not (ORN) Or Not Bit-of-Word (ORNB) Or Not Immediate (ORNI) Page 561 560 558 559 537 538 5142 563 5181 5181 5201 5204 5141 5142 592 5103 5116 593 5108 594 5112 5173 519 5187 573 530 512 513 574 575 527 532 5167 521 530 512 513 532 Load Accumulator Indexed from Data Constants (LDSX) 562 DL06 Micro PLC User Manual, 1st Ed., Rev. A 53 Chapter 5: Standard RLL Instructions Instruction OR Not Immediate Instructions Contd Or Out (OR OUT) Or Out Immediate (OROUTI) Or Positive Differential (ORPD) Or Store (OR STR) Or with Stack (ORS) Out (OUT) Out (OUT) Out Bit-of-Word (OUTB) Out Double (OUTD) Out Formatted (OUTF) Out Immediate (OUTI) Out Immediate Formatted (OUTIF) Out Indexed (OUTX) Out Least (OUTL) Out Most (OUTM) Pause (PAUSE) Pop (POP) Positive Differential (PD) Print Message (PRINT) Radian Real Conversion (RADR) Read from Network (RX) Real to Binary Conversion (RTOB) Remove from Bottom (RFB) Remove from Table (RFT) Reset (RST) Reset Bit-of-Word (RSTB) Reset Immediate (RSTI) Reset Watch Dog Timer (RSTWT) Rotate Left (ROTL) Rotate Right (ROTR) RSTBIT Segment (SEG) Set (SET) Set Bit-of-Word (SETB) Set Immediate (SETI) SETBIT Shift Left (SHFL) Shift Register (SR) Shift Right (SHFR) Page 533 517 534 521 516 576 564 517 518 564 565 534 535 567 568 568 525 565 519 5189 5133 5193 5132 5153 5159 523 524 536 5174 5123 5124 5144 5137 523 524 536 5144 5121 551 5122 Instruction Shuffle Digits (SFLDGT) Sine Real (SINR) Source to Table (STT) Square Root Real (SQRTR) Stage Counter (SGCNT) Stop (STOP) Store (STR) Store (STR) Store Bit-of-Word (STRB) Store If Equal (STRE) Store If Not Equal (STRNE) Store Immediate (STRI) Store Negative Differential (STRND) Store Not (STRN) Store Not (STRN) Store Not Bit-of-Word (STRNB) Store Not Immediate (STRNI) Store Positive Differential (STRPD) Subroutine Return (RT) Subroutine Return Conditional (RTC) Subtract (SUB) Subtract Binary (SUBB) Subtract Binary Double (SUBBD) Subtract Binary Top of Stack (SUBBS) Subtract Double (SUBD) Subtract Formatted (SUBF) Subtract Real (SUBR) Subtract Top of Stack (SUBS) Sum (SUM) Swap (SWAP) Table Shift Left (TSHFL) Table Shift Right (TSHFR) Table to Destination (TTD) Tangent Real (TANR) Tens Complement (BCDCPL) Time (TIME) Timer (TMR) and Timer Fast (TMRF) Understanding Master Control Relays Up Down Counter (UDC) Write to Network (WX) Page 5139 5118 5156 5119 547 5173 529 510 511 526 526 532 520 529 510 511 532 520 5178 5178 589 5101 5102 5115 590 5107 591 5111 5120 5170 5165 5165 5150 5118 5130 5172 540 5181 549 5195 54 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Boolean Instructions Using Boolean Instructions Do you ever wonder why so many PLC manufacturers always quote the scan time for a 1K boolean program? Simple. Most all programs utilize many boolean instructions. These are typically very simple instructions designed to join input and output contacts in various series and parallel combinations. Since the DirectSOFT32 package allows you to use graphic symbols to build the program, you dont absolutely have to know the mnemonics of the instructions. However, it may helpful at some point, especially if you ever have to troubleshoot the program with a Handheld Programmer.The following paragraphs show how these instructions are used to build simple ladder programs. END Statement All DL06 programs require an END statement as the last instruction. This tells the CPU that this is the end of the program. Normally, any instructions placed after the END statement will not be executed. There are exceptions to this such as interrupt routines, etc. Chapter 5 discusses the instruction set in detail. X0 Y0 All programs must have an END statement OUT END Simple Rungs You use a contact to start rungs that contain both contacts and coils. The boolean instruction that does this is called a Store or, STR instruction. The output point is represented by the Output or, OUT instruction. The following example shows how to enter a single contact and a single output coil. Direct SOFT32 Example X0 Y0 OUT Handheld Mnemonics STR X0 OUT Y0 END END Normally Closed Contact Normally closed contacts are also very common. This is accomplished with the Store Not, or STRN instruction. The following example shows a simple rung with a normally closed contact. Direct SOFT32 Example X0 Y0 OUT Handheld Mnemonics STRN X0 OUT Y0 END END DL06 Micro PLC User Manual, 1st Ed., Rev. A 55 Chapter 5: Standard RLL Instructions - Boolean Instructions Contacts in Series Use the AND instruction to join two or more contacts in series. The following example shows two contacts in series and a single output coil. The instructions used would be STR X0, AND X1, followed by OUT Y0. Direct SOFT32 Example X0 X1 Y0 OUT Handheld Mnemonics STR X0 AND X1 OUT Y0 END END Midline Outputs Sometimes it is necessary to use midline outputs to get additional outputs that are conditional on other contacts. The following example shows how you can use the AND instruction to continue a rung with more conditional outputs. Direct SOFT32 Example X0 X1 Y0 OUT X2 Y1 OUT X3 Y2 OUT Handheld Mnem STR X0 AND X1 OUT Y0 AND X2 OUT Y1 AND X3 OUT Y2 END Parallel Elements Direct SOFT32 Example X0 Y0 OUT X1 Handheld Mnemonics STR X0 OR X1 OUT Y0 END END You may also have to join contacts in parallel. The OR instruction allows you to do this. The following example shows two contacts in parallel and a single output coil. The instructions would be STR X0, OR X1, followed by OUT Y0. 56 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Boolean Instructions Joining Series Branches in Parallel Quite often it is necessary to join several groups of series elements in parallel. The Or Store (ORSTR) instruction allows this operation. The following example shows a simple network consisting of series elements joined in parallel. Direct SOFT32 Example X0 X1 Y0 OUT X2 X3 END Handheld Mnemonics STR X0 AND X1 STR X2 AND X3 ORSTR OUT Y0 END Joining Parallel Branches in Series You can also join one or more parallel branches in series. The And Store (ANDSTR) instruction allows this operation. The following example shows a simple network with contact branches in series with parallel contacts. Direct SOFT32 Example X0 X1 Y0 OUT X2 Handheld Mnemonics STR X0 STR X1 OR X2 ANDSTR OUT Y0 END END Combination Networks You can combine the various types of series and parallel branches to solve most any application problem. The following example shows a simple combination network. X0 X2 X5 Y0 OUT X1 X3 X4 X6 END Comparative Boolean Some PLC manufacturers make it really difficult to do a simple comparison of two numbers. Some of them require you to move the data all over the place before you can actually perform the comparison. The DL06 Micro PLCs provide Comparative Boolean instructions that allow you to quickly and easily solve this problem. The Comparative Boolean provides evaluation of two 4-digit values using boolean contacts. The valid evaluations are: equal to, not equal to, equal to or greater than, and less than. In the following example when the value in VV1400 K1234 memory location V1400 is equal to the constant value 1234, Y3 will energize. DL06 Micro PLC User Manual, 1st Ed., Rev. A 57 Chapter 5: Standard RLL Instructions - Boolean Instructions Boolean Stack There are limits to how many elements you can include in a rung. This is because the DL06 PLCs use an 8-level boolean stack to evaluate the various logic elements. The boolean stack is a temporary storage area that solves the logic for the rung. Each time the program encounters a STR instruction, the instruction is placed on the top of the stack. Any other STR instructions already on the boolean stack are pushed down a level. The ANDSTR, and ORSTR instructions combine levels of the boolean stack when they are encountered. An error will occur during program compilation if the CPU encounters a rung that uses more than the eight levels of the boolean stack. The following example shows how the boolean stack is used to solve boolean logic. X0 STR STR X1 ORSTR AND X4 Y0 OUT Output STR X2 AND X3 ANDSTR X5 OR STR X2 1 2 3 4 5 6 7 8 STR X2 STR X1 STR X0 STR X0 1 2 3 4 5 6 7 8 STR X0 STR X1 1 2 3 4 5 6 7 8 STR X1 STR X0 AND X3 1 2 3 4 5 6 7 8 X2 AND X3 STR X1 STR X0 ORSTR 1 2 3 . . AND X4 1 2 3 . . ORNOT X5 1 2 3 . . X1 or (X2 AND X3) STR X0 X4 AND {X1 or (X2 AND X3)} STR X0 NOT X5 OR X4 AND {X1 OR (X2 AND X3)} STR X0 8 8 8 ANDSTR 1 2 3 . . XO AND (NOT X5 or X4) AND {X1 or (X2 AND X3)} 8 58 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Boolean Instructions Immediate Boolean The DL06 Micro PLCs can usually complete an operation cycle in a matter of milliseconds. However, in some applications you may not be able to wait a few milliseconds until the next I/O update occurs. The DL06 PLCs offer Immediate input and outputs which are special boolean instructions that allow reading directly from inputs and writing directly to outputs during the program execution portion of the CPU cycle. You may recall that this is normally done during the input or output update portion of the CPU cycle. The immediate instructions take longer to execute because the program execution is interrupted while the CPU reads or writes the I/O point. This function is not normally done until the read inputs or the write outputs portion of the CPU cycle. NOTE: Even though the immediate input instruction reads the most current status from the input point, it only uses the results to solve that one instruction. It does not use the new status to update the image register. Therefore, any regular instructions that follow will still use the image register values. Any immediate instructions that follow will access the I/O again to update the status. The immediate output instruction will write the status to the I/O and update the image register. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 PWR RUN CPU TX1 RX1 TX2 RX2 LOGIC K oyo 06 TERM PORT1 PORT2 RUN STOP CPU Scan Read Inputs X11 OFF ... X2 X1 X0 ... ON OFF OFF Input Image Register, The CPU reads the inputs from the local base and stores the status in an input image register . OFF OFF X0 X1 Read Inputs from Specialty I/O Solve the Application Program X0 I Y0 Immediate instruction does not use the input image register , but instead reads the status from the module immediately . I/O Point X0 Changes ON OFF Write Outputs Write Outputs to Specialty I/O Diagnostics X0 X1 DL06 Micro PLC User Manual, 1st Ed., Rev. A 59 Chapter 5: Standard RLL Instructions - Boolean Instructions Boolean Instructions Store (STR) The Store instruction begins a new rung or an additional branch in a rung with a normally open contact. Status of the contact will be the same state as the associated image register point or memory location. Aaaa Store Not (STRN) The Store Not instruction begins a new rung or an additional branch in a rung with a normally closed contact. Status of the contact will be opposite the state of the associated image register point or memory location. Operand Data Type ....................................A Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT Special Relay . . . . . . . . . . . . . . . . . . . . . . . . . . SP Aaaa DL06 Range aaa 0777 0777 01777 01777 0377 0177 0777 In the following Store example, when input X1 is on, output Y2 will energize. Direct SOFT32 X1 Y2 OUT Handheld Programmer Keystrokes $ STR GX OUT C 2 B 1 ENT ENT In the following Store Not example, when input X1 is off output Y2 will energize. Direct SOFT32 X1 Y2 OUT Handheld Programmer Keystrokes SP STRN GX OUT B 1 C 2 ENT ENT 510 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Boolean Instructions Store Bit-of-Word (STRB) The Store Bit-of-Word instruction begins a new rung or an additional branch in a rung with a normally open contact. Status of the contact will be the same state as the bit referenced in the associated memory location. Aaaa.bb Store Not Bit-of-Word (STRNB) The Store Not instruction begins a new rung or an additional branch in a rung with a normally closed contact. Status of the contact will be opposite the state of the bit referenced in the associated memory location. Operand Data Type ..................................... V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A B PB Aaaa.bb DL06 Range aaa See memory map See memory map bb BCD, 0 to 15 BCD, 0 to 15 In the following Store Bit-of-Word example, when bit 12 of V-memory location V1400 is on, output Y2 will energize. DirectSOFT32 B1400.12 Y2 OUT Handheld Programmer Keystrokes STR SHFT K OUT B 1 2 2 ENT V ENT 1 4 0 0 In the following Store Not Bit-of-Word example, when bit 12 of V-memory location V1400 is off, output Y2 will energize. DirectSOFT32 B1400.12 Y2 OUT Handheld Programmer Keystrokes STRN SHFT K OUT B 1 2 2 ENT V ENT 1 4 0 0 DL06 Micro PLC User Manual, 1st Ed., Rev. A 511 Chapter 5: Standard RLL Instructions - Boolean Instructions Or (OR) The Or instruction logically ors a normally open contact in parallel with another contact in a rung. The status of the contact will be the same state as the associated image register point or memory location. Aaaa Or Not (ORN) The Or Not instruction logically ors a normally closed contact in parallel with another contact in a rung. The status of the contact will be opposite the state of the associated image register point or memory location. Operand Data Type ....................................A Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT Special Relay . . . . . . . . . . . . . . . . . . . . . . . . . . SP Aaaa DL06 Range aaa 0-777 0-777 01777 01777 0377 0177 0-777 In the following Or example, when input X1 or X2 is on, output Y5 will energize. Direct SOFT32 X1 Y5 OUT X2 Handheld Programmer Keystrokes $ STR Q OR GX OUT F 5 C 2 B 1 ENT ENT ENT In the following Or Not example, when input X1 is on or X2 is off, output Y5 will energize. Direct SOFT32 X1 Y5 OUT X2 Handheld Programmer Keystrokes $ STR R ORN GX OUT C 2 F 5 B 1 ENT ENT ENT 512 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Boolean Instructions Or Bit-of-Word (ORB) The Or Bit-of-Word instruction logically ors a normally open contact in parallel with another contact in a rung. Status of the contact will be the same state as the bit referenced in the associated memory location. Aaaa.bb Or Not Bit-of-Word (ORNB) The Or Not Bit-of-Word instruction logically ors a normally closed contact in parallel with another contact in a rung. Status of the contact will be opposite the state of the bit referenced in the associated memory location. Operand Data Type ..................................... V memory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A B PB Aaaa.bb DL06 Range aaa See memory map See memory map bb BCD, 0 to 15 BCD, 0 to 15 In the following Or Bit-of-Word example, when input X1 or bit 7 of V1400 is on, output Y5 will energize. DirectSOFT32 X1 Y7 OUT B1400.7 Handheld Programmer Keystrokes STR OR SHFT K OUT 1 B 7 7 ENT ENT ENT V 1 4 0 0 In the following Or Bit-of-Word example, when input X1 is on or bit 7 of V1400 is off, output Y7 will energize. DirectSOFT32 X1 Y7 OUT B1400.7 Handheld Programmer Keystrokes STR ORN SHFT K OUT 1 B 7 7 ENT ENT ENT V 1 4 0 0 DL06 Micro PLC User Manual, 1st Ed., Rev. A 513 Chapter 5: Standard RLL Instructions - Boolean Instructions And (AND) The And instruction logically ands a normally open contact in series with another contact in a rung. The status of the contact will be the same state as the associated image register point or memory location. Aaaa And Not (ANDN) The And Not instruction logically ands a normally closed contact in series with another contact in a rung. The status of the contact will be opposite the state of the associated image register point or memory location. Operand Data Type ....................................A Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT Special Relay . . . . . . . . . . . . . . . . . . . . . . . . . . SP Aaaa DL06 Range aaa 0777 0777 01777 01777 0377 0177 0777 In the following And example, when input X1 and X2 are on output Y5 will energize. Direct SOFT32 X1 X2 Y5 OUT Handheld Programmer Keystrokes $ STR V AND GX OUT C 2 F 5 B 1 ENT ENT ENT In the following And Not example, when input X1 is on and X2 is off output Y5 will energize. Direct SOFT32 X1 X2 Y5 OUT Handheld Programmer Keystrokes $ STR W ANDN GX OUT C 2 F 5 B 1 ENT ENT ENT 514 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Boolean Instructions AND Bit-of-Word (ANDB) The And Bit-of-Word instruction logically ands a normally open contact in series with another contact in a rung. The status of the contact will be the same state as the bit referenced in the associated memory location. Aaaa.bb And Not Bit-of-Word (ANDNB) The And Not Bit-of-Word instruction logically ands a normally closed contact in series with another contact in a rung. The status of the contact will be opposite the state of the bit referenced in the associated memory location. Operand Data Type ..................................... V memory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A B PB Aaaa.bb DL06 Range aaa See memory map See memory map bb BCD, 0 to 15 BCD, 0 to 15 In the following And Bit-of-Word example, when input X1 and bit 4 of V1400 is on output Y5 will energize. DirectSOFT32 X1 B1400.4 Y5 OUT Handheld Programmer Keystrokes STR AND SHFT K OUT 1 B 4 5 ENT V ENT ENT 1 4 0 0 In the following And Not Bit-of-Word example, when input X1 is on and bit 4 of V1400 is off output Y5 will energize. DirectSOFT32 X1 B1400.4 Y5 OUT Handheld Programmer Keystrokes STR ANDN SHFT K OUT 1 B 4 5 ENT ENT ENT V 1 4 0 0 DL06 Micro PLC User Manual, 1st Ed., Rev. A 515 Chapter 5: Standard RLL Instructions - Boolean Instructions And Store (AND STR) The And Store instruction logically ands two branches of a rung in series. Both branches must begin with the Store instruction. OUT 1 2 Or Store (OR STR) The Or Store instruction logically ors two branches of a rung in parallel. Both branches must begin with the Store instruction. 1 OUT 2 In the following And Store example, the branch consisting of contacts X2, X3, and X4 have been anded with the branch consisting of contact X1. Direct SOFT32 X1 X2 X3 Y5 OUT $ X4 STR V AND Q OR L ANDST GX OUT ENT F 5 ENT D 3 E 4 Handheld Programmer Keystrokes $ STR C 2 B 1 ENT ENT ENT ENT In the following Or Store example, the branch consisting of X1 and X2 have been ored with the branch consisting of X3 and X4. Direct SOFT32 X1 X2 Y5 OUT X3 X4 Handheld Programmer Keystrokes $ STR V AND $ STR V AND M ORST GX OUT ENT F 5 ENT E 4 C 2 D 3 B 1 ENT ENT ENT ENT 516 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Boolean Instructions Out (OUT) Aaaa The Out instruction reflects the status of the rung (on/off ) and OUT outputs the discrete (on/off ) state to the specified image register point or memory location. Multiple Out instructions referencing the same discrete location should not be used since only the last Out instruction in the program will control the physical output point. Instead, use the next instruction, the Or Out. Operand Data Type DL06 Range ....................................A Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C aaa 0777 0777 01777 In the following Out example, when input X1 is on, output Y2 and Y5 will energize. Direct SOFT32 X1 Y2 OUT Y5 OUT Handheld Programmer Keystrokes $ STR GX OUT GX OUT C 2 F 5 B 1 ENT ENT ENT Or Out (OR OUT) The Or Out instruction allows more than one rung of discrete logic to control a single output. Multiple Or Out instructions referencing the same output coil may be used, since all contacts controlling the output are logically ORed together. If the status of any rung is on, the output will also be on. Operand Data Type ....................................A Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C A aaa OR OUT DL06 Range aaa 0777 0-777 01777 In the following example, when X1 or X4 is on, Y2 will energize. Direct SOFT32 X1 Y2 OR OUT Handheld Programmer Keystrokes $ STR O INST# $ STR D 3 E 4 D 3 F 5 F 5 B 1 ENT ENT ENT ENT ENT C 2 ENT ENT C 2 ENT X4 Y2 OR OUT O INST# DL06 Micro PLC User Manual, 1st Ed., Rev. A 517 Chapter 5: Standard RLL Instructions - Boolean Instructions Out Bit-of-Word (OUTB) The Out Bit-of-Word instruction reflects the status of the rung (on/off ) and outputs the discrete (on/off ) state to the specified bit in the referenced memory location. Multiple Out Bit-of-Word instructions referencing the same bit of the same word generally should not be used since only the last Out instruction in the program will control the status of the bit. Operand Data Type V memory Pointer A B PB Aaaa.bb OUT DL06 Range aaa See memory map See memory map bb BCD, 0 to 15 BCD, 0 to 15 In the following Out Bit-of-Word example, when input X1 is on, bit 3 of V1400 and bit 6 of V1401 will turn on. DirectSOFT32 X1 B1400.3 OUT B1401.6 Handheld Programmer Keystrokes OUT STR OUT SHFT K OUT SHFT K 1 B 3 B 6 ENT ENT V 1 4 0 1 ENT V 1 4 0 0 The following Out Bit-of-Word example contains two Out Bit-of-Word instructions using the same bit in the same memory word. The final state bit 3 of V1400 is ultimately controlled by the last rung of logic referencing it. X1 will override the logic state controlled by X0. To avoid this situation, multiple outputs using the same location must not be used in programming. X0 B1400.3 OUT X1 B1400.3 OUT 518 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Boolean Instructions Not (NOT) The Not instruction inverts the status of the rung at the point of the instruction. In the following example when X1 is off, Y2 will energize. This is because the Not instruction inverts the status of the rung at the Not instruction. DirectSOFT32 X1 Y2 OUT SHFT GX OUT Handheld Programmer Keystrokes $ STR N TMR B 1 O INST# C 2 ENT T MLR ENT ENT NOTE: DirectSOFT Release 1.1i and later supports the use of the NOT instruction. The above example rung is merely intended to show the visual representation of the NOT instruction. The rung cannot be created or displayed in DirectSOFT versions earlier than 1.1i. Positive Differential (PD) The Positive Differential instruction is typically known as a one shot. When the input logic produces an off to on transition, the output will energize for one CPU scan. Operand Data Type ....................................A Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C A aaa PD DL06 Range aaa 0777 0777 01777 In the following example, every time X1 makes an off to on transition, C0 will energize for one scan. DirectSOFT32 X1 C0 PD SHFT Handheld Programmer Keystrokes $ STR P CV B 1 SHFT ENT D 3 A 0 DL06 Micro PLC User Manual, 1st Ed., Rev. A 519 Chapter 5: Standard RLL Instructions - Boolean Instructions Store Positive Differential (STRPD) The Store Positive Differential instruction begins a new rung or an additional branch in a rung with a contact. The contact closes for one CPU scan when the state of the associated image register point makes an Off-to-On transition. Thereafter, the contact remains open until the next Off-to-On transition (the symbol inside the contact represents the transition). This function is sometimes called a one-shot. Aaaa Store Negative Differential (STRND) The Store Negative Differential instruction begins a new rung or an additional branch in a rung with a contact. The contact closes for one CPU scan when the state of the associated image register point makes an On-to-Off transition. Thereafter, the contact remains open until the next On-to-Off transition (the symbol inside the contact represents the transition). Operand Data Type ....................................A Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT Aaaa DL06 Range aaa 0777 0777 01777 01777 0377 0177 In the following example, each time X1 is makes an Off-to-On transition, Y4 will energize for one scan. DirectSOFT32 X1 Y4 OUT Handheld Programmer Keystrokes $ STR GX OUT SHFT P CV E 4 D 3 ENT B 1 ENT In the following example, each time X1 is makes an On-to-Off transition, Y4 will energize for one scan. DirectSOFT32 X1 Y4 OUT Handheld Programmer Keystrokes $ STR GX OUT SHFT N TMR E 4 D 3 ENT B 1 ENT 520 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Boolean Instructions Or Positive Differential (ORPD) The Or Positive Differential instruction logically ors a contact in parallel with another contact in a rung. The status of the contact will be open until the associated image register point makes an Off-to-On transition, closing it for one CPU scan. Thereafter, it remains open until another Off-to-On transition. Aaaa Or Negative Differential (ORND) The Or Negative Differential instruction logically ors a contact in parallel with another contact in a rung. The status of the contact will be open until the associated image register point makes an On-to-Off transition, closing it for one CPU scan. Thereafter, it remains open until another On-to-Off transition. Operand Data Type ....................................A Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT Aaaa DL06 Range aaa 0777 0777 01777 01777 0377 0177 In the following example, Y 5 will energize whenever X1 is on, or for one CPU scan when X2 transitions from Off to On. DirectSOFT32 X1 Y5 OUT X2 Handheld Programmer Keystrokes $ STR Q OR GX OUT SHFT P CV F 5 B 1 ENT D 3 ENT C 2 ENT In the following example, Y 5 will energize whenever X1 is on, or for one CPU scan when X2 transitions from On to Off. DirectSOFT32 X1 Y5 OUT X2 Handheld Programmer Keystrokes $ STR Q OR GX OUT SHFT B 1 N TMR F 5 ENT D 3 ENT C 2 ENT DL06 Micro PLC User Manual, 1st Ed., Rev. A 521 Chapter 5: Standard RLL Instructions - Boolean Instructions And Positive Differential (ANDPD) The And Positive Differential instruction logically ands a normally open contact in parallel with another contact in a rung. The status of the contact will be open until the associated image register point makes an Off-to-On transition, closing it for one CPU scan. Thereafter, it remains open until another Off-to-On transition. Aaaa And Negative Differential (ANDND) The And Negative Differential instruction logically ands a normally open contact in parallel with another contact in a rung.The status of the contact will be open until the associated image register point makes an On-to-Off transition, closing it for one CPU scan. Thereafter, it remains open until another On-to-Off transition. Operand Data Type ....................................A Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT Aaaa DL06 Range aaa 0777 0777 01777 01777 0377 0177 In the following example, Y5 will energize for one CPU scan whenever X1 is on and X2 transitions from Off to On. DirectSOFT32 X1 X2 Y5 OUT Handheld Programmer Keystrokes $ STR Q OR GX OUT SHFT P CV F 5 B 1 ENT D 3 ENT C 2 ENT In the following example, Y5 will energize for one CPU scan whenever X1 is on and X2 transitions from On to Off. DirectSOFT32 X1 X2 Y5 OUT Handheld Programmer Keystrokes $ STR Q OR GX OUT SHFT B 1 N TMR F 5 ENT D 3 ENT C 2 ENT 522 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Boolean Instructions Set (SET) The Set instruction sets or turns on an image register point/memory location or a consecutive range of image register points/memory locations. Once the point/location is set it will remain on until it is reset using the Reset instruction. It is not necessary for the input controlling the Set instruction to remain on. Optional memory range A aaa aaa SET Reset (RST) The Reset instruction resets or turns off an image register point/memory location or a range of image registers points/memory locations. Once the point/location is reset it is not necessary for the input to remain on. Operand Data Type ....................................A Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT Optional Memory range . A aaa RST aaa DL06 Range aaa 0777 0777 01777 01777 0377 0177 In the following example when X1 is on, Y2 through Y5 will energize. DirectSOFT32 X1 Y2 SET Y5 Handheld Programmer Keystrokes $ STR X SET C 2 B 1 ENT F 5 ENT In the following example when X1 is on, Y2 through Y5 will be reset or deenergized. DirectSOFT32 X2 Y2 RST Y5 Handheld Programmer Keystrokes $ STR S RST C 2 B 1 ENT F 5 ENT DL06 Micro PLC User Manual, 1st Ed., Rev. A 523 Chapter 5: Standard RLL Instructions - Boolean Instructions Set Bit-of-Word (SETB) The Set Bit-of-Word instruction sets or turns on a bit in a V memory location. Once the bit is set it will remain on until it is reset using the Reset Bit-of-Word instruction. It is not necessary for the input controlling the Set Bit-of-Word instruction to remain on. Aaaa.bb SET Reset Bit-of-Word (RSTB) The Reset Bit-of-Word instruction resets or turns off a bit in a V memory location. Once the bit is reset it is not necessary for the input to remain on. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . PB A aaa.bb RST DL06 Range aaa See memory map See memory map bb BCD, 0 to 15 BCD, 0 to 15 In the following example when X1 turns on, bit 1 in V1400 is set to the on state. DirectSOFT32 X1 B1400.1 SET Handheld Programmer Keystrokes STR SET SHFT K 1 B 1 ENT ENT V 1 4 0 0 In the following example when X2 turns on, bit 1 in V1400 is reset to the off state. DirectSOFT32 X2 B1400.1 RST Handheld Programmer Keystrokes STR RST SHFT K 2 B 1 ENT ENT V 1 4 0 0 524 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Boolean Instructions Pause (PAUSE) The Pause instruction disables the output update on a range of outputs. The ladder program will continue to run and update the image register. However, the outputs in the range specified in the Pause instruction will be turned off at the output points. Operand Data Type Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Y aaa aaa PAUSE DL06 Range aaa 0777 In the following example, when X1 is ON, Y5Y7 will be turned OFF. The execution of the ladder program will not be affected. DirectSOFT32 X1 Y5 Y7 PAUSE Since the D2HPP Handheld Programmer does not have a specific Pause key, you can use the corresponding instruction number for entry (#960), or type each letter of the command. Handheld Programmer Keystrokes $ STR O INST# J 9 G 6 B 1 ENT A 0 ENT ENT D 3 F 5 ENT In some cases, you may want certain output points in the specified pause range to operate normally. In that case, use Aux 58 to over-ride the Pause instruction. DL06 Micro PLC User Manual, 1st Ed., Rev. A 525 Chapter 5: Standard RLL Instructions - Comparative Boolean Comparative Boolean Store If Equal (STRE) The Store If Equal instruction begins a new rung or additional branch in a rung with a normally open comparative contact. The contact will be on when Vaaa equals Bbbb . V aaa B bbb Store If Not Equal (STRNE) The Store If Not Equal instruction begins a new rung or additional branch in a rung with a normally closed comparative contact. The contact will be on when Vaaa does not equal Bbbb. Operand Data Type ....................................B V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K V aaa B bbb DL06 Range bbb See memory map See memory map 09999 aaa See memory map See memory map In the following example, when the value in V memory location V2000 = 4933 , Y3 will energize. DirectSOFT32 V2000 K4933 Y3 OUT Handheld Programmer Keystrokes $ STR SHFT E 4 GX OUT D 3 E 4 J 9 D 3 ENT D 3 C 2 A 0 ENT A 0 A 0 In the following example, when the value in V memory location V2000 = 5060, Y3 will / energize. DirectSOFT32 V2000 K5060 Y3 OUT Handheld Programmer Keystrokes SP STRN SHFT F 5 GX OUT D 3 E 4 A 0 G 6 ENT A 0 C 2 A 0 ENT A 0 A 0 526 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Comparative Boolean Or If Equal (ORE) The Or If Equal instruction connects a normally open comparative contact in parallel with another contact. The contact will be on when Vaaa = Bbbb. V aaa B bbb Or If Not Equal (ORNE) The Or If Not Equal instruction connects a normally closed comparative contact in parallel with another contact. The contact will be on when Vaaa does not equal Bbbb. Operand Data Type ....................................B V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K V aaa B bbb DL06 Range aaa See memory map See memory map bbb See memory map See memory map 09999 In the following example, when the value in V memory location V2000 = 4500 or V2002 = / 2500, Y3 will energize. DirectSOFT32 V2000 K4500 Y3 OUT Handheld Programmer Keystrokes $ STR E 4 V2002 K2345 Q OR C 2 GX OUT SHFT F 5 SHFT D 3 D 3 E 4 E 4 F 5 ENT E 4 A 0 A 0 C 2 ENT C 2 ENT A 0 A 0 C 2 A 0 A 0 A 0 In the following example, when the value in V memory location V2000 = 3916 or V2002 050, Y3 will energize. DirectSOFT32 V2000 K3916 Y3 OUT Handheld Programmer Keystrokes $ STR D 3 R ORN C 2 GX OUT SHFT J 9 SHFT F 5 D 3 E 4 A 0 A 0 ENT E 4 B 1 G 6 C 2 ENT C 2 ENT A 0 A 0 C 2 A 0 A 0 A 0 V2002 K2500 DL06 Micro PLC User Manual, 1st Ed., Rev. A 527 Chapter 5: Standard RLL Instructions - Comparative Boolean And If Equal (ANDE) The And If Equal instruction connects a normally open comparative contact in series with another contact. The contact will be on when Vaaa = Bbbb. V aaa B bbb And If Not Equal (ANDNE) The And If Not Equal instruction connects a normally closed comparative contact in series with another contact. The contact will be on when Vaaa does not equal Bbbb V aaa B bbb Operand Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K DL06 Range aaa See memory map See memory map bbb See memory map See memory map 09999 In the following example, when the value in V memory location V2000 = 5000 and V2002 = 2345, Y3 will energize. DirectSOFT32 V2000 K5000 V2002 K2345 Y3 OUT Handheld Programmer Keystrokes $ STR F 5 V AND C 2 GX OUT SHFT A 0 SHFT D 3 D 3 E 4 E 4 F 5 ENT E 4 A 0 A 0 C 2 ENT C 2 ENT A 0 A 0 C 2 A 0 A 0 A 0 In the following example, when the value in V memory location V2000 = 5000 and V2002 = / 2345, Y3 will energize. DirectSOFT32 V2000 K5000 V2002 K2345 Y3 OUT Handheld Programmer Keystrokes $ STR F 5 V AND C 2 GX OUT SHFT A 0 SHFT D 3 D 3 E 4 E 4 F 5 ENT E 4 A 0 A 0 C 2 ENT C 2 ENT A 0 A 0 C 2 A 0 A 0 A 0 528 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Comparative Boolean Store (STR) The Comparative Store instruction begins a new rung or additional branch in a rung with a normally open comparative contact. The contact will be on when Aaaa is equal to or greater than Bbbb. A aaa B bbb Store Not (STRN) The Comparative Store Not instruction begins a new rung or additional branch in a rung with a normally closed comparative contact. The contact will be on when Aaaa < Bbbb. Operand Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT A aaa B bbb DL06 Range aaa See memory map See memory map 0377 0177 bbb See memory map See memory map 09999 In the following example, when the value in V memory location V2000 energize. DirectSOFT32 V2000 K1000 Y3 OUT Handheld Programmer Keystrokes $ STR B 1 GX OUT D 3 SHFT A 0 V AND A 0 ENT C 2 A 0 1000, Y3 will A 0 ENT A 0 A 0 In the following example, when the value in V memory location V2000 < 4050, Y3 will energize. DirectSOFT32 V2000 K4050 Y3 OUT Handheld Programmer Keystrokes SP STRN E 4 GX OUT D 3 SHFT A 0 V AND F 5 ENT C 2 A 0 A 0 ENT A 0 A 0 DL06 Micro PLC User Manual, 1st Ed., Rev. A 529 Chapter 5: Standard RLL Instructions - Comparative Boolean Or (OR) The Comparative Or instruction connects a normally open comparative contact in parallel with another contact. The contact will be on when Aaaa is equal to or greater than Bbbb. A aaa B bbb Or Not (ORN) The Comparative Or Not instruction connects a normally open comparative contact in parallel with another contact. The contact will be on when Aaaa < Bbbb. Operand Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT A aaa B bbb DL06 Range aaa See memory map See memory map 0377 0177 bbb See memory map See memory map 09999 In the following example, when the value in V memory location V2000 = 6045 or V2002 2345, Y3 will energize. DirectSOFT32 V2000 K6045 Y3 OUT Handheld Programmer Keystrokes $ STR G 6 V2002 K2345 Q OR C 2 GX OUT D 3 D 3 SHFT A 0 E 4 E 4 SHFT E 4 F 5 V AND F 5 ENT C 2 ENT C 2 ENT A 0 A 0 C 2 A 0 A 0 A 0 In the following example when the value in V memory location V2000 = 1000 or V2002 < 2500, Y3 will energize. DirectSOFT32 V2000 K1000 Y3 OUT Handheld Programmer Keystrokes $ STR B 1 V2002 K2500 R ORN C 2 GX OUT F 5 D 3 SHFT A 0 E 4 A 0 SHFT A 0 A 0 V AND A 0 ENT C 2 ENT C 2 ENT A 0 A 0 C 2 A 0 A 0 A 0 530 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Comparative Boolean And (AND) The Comparative And instruction connects a normally open comparative contact in series with another contact. The contact will be on when Aaaa is equal to or greater than Bbbb. A aaa B bbb And Not (ANDN) The Comparative And Not instruction connects a normally open comparative contact in parallel with another contact. The contact will be on when Aaaa < Bbbb. Operand Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT A aaa B bbb DL06 Range aaa See memory map See memory map 0377 0177 bbb See memory map See memory map 09999 In the following example, when the value in V memory location V2000 = 5000, and V2002 2345, Y3 will energize. DirectSOFT32 V2000 K5000 V2002 K2345 Y3 OUT Handheld Programmer Keystrokes $ STR F 5 V AND C 2 GX OUT D 3 D 3 SHFT A 0 E 4 A 0 SHFT E 4 A 0 V AND F 5 ENT C 2 ENT C 2 ENT A 0 A 0 C 2 A 0 A 0 A 0 In the following example, when the value in V memory location V2000 = 7000 and V2002 < 2500, Y3 will energize. DirectSOFT32 V2000 K7000 V2002 K2500 Y3 OUT Handheld Programmer Keystrokes $ STR H 7 W ANDN C 2 GX OUT F 5 SHFT A 0 E 4 A 0 SHFT A 0 SHFT A 0 V AND A 0 Y AND C 2 ENT C 2 ENT D 3 ENT A 0 A 0 C 2 A 0 A 0 A 0 DL06 Micro PLC User Manual, 1st Ed., Rev. A 531 Chapter 5: Standard RLL Instructions - Immediate Instructions Immediate Instructions Store Immediate (STRI) The Store Immediate instruction begins a new rung or additional branch in a rung. The status of the contact will be the same as the status of the associated input point at the time the instruction is executed. The image register is not updated. X aaa Store Not Immediate (STRNI) The Store Not Immediate instruction begins a new rung or additional branch in a rung. The status of the contact will be opposite the status of the associated input point at the time the instruction is executed. The image register is not updated. Operand Data Type Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X X aaa DL06 Range aaa 0777 In the following example when X1 is on, Y2 will energize. DirectSOFT32 X1 Y2 OUT GX OUT C 2 ENT Handheld Programmer Keystrokes $ STR SHFT I 8 B 1 ENT In the following example when X1 is off, Y2 will energize. DirectSOFT32 X1 Y2 OUT Handheld Programmer Keystrokes SP STRN GX OUT SHFT I 8 C 2 ENT B 1 ENT Or Immediate (ORI) The Or Immediate connects two contacts in parallel. The status of the contact will be the same as the status of the associated input point at the time the instruction is executed. The image register is not updated. X aaa Or Not Immediate (ORNI) The Or Not Immediate connects two contacts in parallel. The status of the contact will be opposite the status of the associated input point at the time the instruction is executed. The image register is not updated. X aaa 532 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Immediate Instructions OR Not Immediate Instructions Contd Operand Data Type Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X DL06 Range aaa 0777 In the following example, when X1 or X2 is on, Y5 will energize. DirectSOFT32 X1 Y5 OUT X2 Handheld Programmer Keystrokes $ STR Q OR GX OUT SHFT I 8 F 5 ENT B 1 ENT C 2 ENT In the following example, when X1 is on or X2 is off, Y5 will energize. DirectSOFT32 X1 Y5 OUT X2 Handheld Programmer Keystrokes $ STR R ORN GX OUT SHFT I 8 F 5 ENT B 1 ENT C 2 ENT And Immediate (ANDI) The And Immediate connects two contacts in series. The status of the contact will be the same as the status of the associated input point at the time the instruction is executed. The image register is not updated. X aaa And Not Immediate (ANDNI) The And Not Immediate connects two contacts in series. The status of the contact will be opposite the status of the associated input point at the time the instruction is executed. The image register is not updated. Operand Data Type Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X X aaa DL06 Range aaa 0777 In the following example, when X1 and X2 are on, Y5 will energize. DirectSOFT32 X1 X2 Y5 OUT Handheld Programmer Keystrokes $ STR V AND GX OUT SHFT I 8 F 5 ENT B 1 ENT C 2 ENT In the following example, when X1 is on and X2 is off, Y5 will energize. DirectSOFT32 X1 X2 Y5 OUT Handheld Programmer Keystrokes $ STR W ANDN GX OUT SHFT I 8 F 5 ENT B 1 ENT C 2 ENT DL06 Micro PLC User Manual, 1st Ed., Rev. A 533 Chapter 5: Standard RLL Instructions - Immediate Instructions Out Immediate (OUTI) The Out Immediate instruction reflects the status of the rung (on/off ) and outputs the discrete (on/off ) status to the specified module output point and the image register at the time the instruction is executed. If multiple Out Immediate instructions referencing the same discrete point are used it is possible for the module output status to change multiple times in a CPU scan. See Or Out Immediate. Y aaa OUTI Or Out Immediate (OROUTI) The Or Out Immediate instruction has been designed to use more than 1 rung of discrete logic to control a single output. Multiple Or Out Immediate instructions referencing the same output coil may be used, since all contacts controlling the output are ored together. If the status of any rung is on at the time the instruction is executed, the output will also be on. Operand Data Type Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Y aaa OROUTI DL06 Range aaa 0777 In the following example, when X1 is on, output point Y2 on the output module will turn on. For instruction entry on the Handheld Programmer, you can use the instruction number (#350) as shown, or type each letter of the command. DirectSOFT32 X1 Y2 OUTI Handheld Programmer Keystrokes $ STR O INST# D 3 C 2 F 5 ENT B 1 ENT A 0 ENT ENT In the following example, when X1 or X4 is on, Y2 will energize. DirectSOFT32 X1 Y2 OR OUTI Handheld Programmer Keystrokes $ STR O INST# D 3 C 2 $ STR O INST# D 3 C 2 F 5 ENT F 5 ENT E 4 ENT A 0 ENT ENT B 1 ENT A 0 ENT ENT X4 Y2 OR OUTI 534 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Immediate Instructions Out Immediate Formatted (OUTIF) The Out Immediate Formatted instruction outputs a 132 bit binary value from the accumulator to specified output points at the time the instruction is executed. Accumulator bits that are not used by the instruction are set to zero. Operand Data Type Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Y aaa OUTIF K bbb DL06 Range aaa 0-777 1-32 In the following example when C0 is on,the binary pattern for X10 X17 is loaded into the accumulator using the Load Immediate Formatted instruction. The binary pattern in the accumulator is written to Y30Y37 using the Out Immediate Formatted instruction. This technique is useful to quickly copy an input pattern to outputs (without waiting for the CPU scan). DirectSOFT32 CO LDIF K8 X10 Location X10 Unused accumulator bits are set to zero Constant K8 X17 X16 X15 X14 X13 X12 X11 X10 ON OFF ON ON OFF ON OFF ON Load the value of 8 consecutive locations into the accumulator, starting with X10. 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 7 6 5 1 0 1 4 3 1 0 2 1 0 1 1 0 OUTIF K8 Y30 Copy the value in the lower 8 bits of the accumulator to Y30-Y37 Location Y30 Constant K8 Y37 Y36 Y35 Y34 Y33 Y32 Y31 Y30 ON OFF ON ON OFF ON OFF ON Handheld Programmer Keystrokes $ STR SHFT GX OUT L ANDST SHFT NEXT D 3 I 8 F 5 NEXT I 8 NEXT F 5 D 3 A 0 NEXT A 0 B 1 ENT A 0 I 8 I 8 ENT ENT DL06 Micro PLC User Manual, 1st Ed., Rev. A 535 Chapter 5: Standard RLL Instructions - Immediate Instructions Set Immediate (SETI) The Set Immediate instruction immediately sets, or turns on an output or a range of outputs in the image register and the corresponding output point(s) at the time the instruction is executed. Once the outputs are set it is not necessary for the input to remain on. The Reset Immediate instruction can be used to reset the outputs. Y aaa aaa SETI Reset Immediate (RSTI) The Reset Immediate instruction immediately resets, or turns off an output or a range of outputs in the image register and the output point(s) at the time the instruction is executed. Once the outputs are reset it is not necessary for the input to remain on. Operand Data Type Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Y aaa aaa RSTI DL06 Range aaa 0777 In the following example, when X1 is on, Y2 through Y5 will be set on in the image register and on the corresponding output points. DirectSOFT32 X1 Y2 Y5 SETI Handheld Programmer Keystrokes $ STR X SET SHFT I 8 B 1 ENT C 2 F 5 ENT In the following example, when X1 is on, Y5 through Y22 will be reset (off ) in the image register and on the corresponding output module(s). DirectSOFT32 Handheld Programmer Keystrokes X1 Y5 Y22 RSTI $ STR S RST SHFT I 8 B 1 ENT F 5 C 2 C 2 ENT 536 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Immediate Instructions Load Immediate (LDI) The Load Immediate instruction loads a 16-bit V-memory value into the accumulator. The valid address range includes all input point addresses on the local base. The value reflects the current status of the input points at the time the instruction is executed. This instruction may be used instead of the LDIF instruction which requires you to specify the number of input points. Operand Data Type Inputs V LDI V aaa DL06 Range aaa 40400 - 40437 In the following example, when C0 is on, the binary pattern of X0X17 will be loaded into the accumulator using the Load Immediate instruction. The Out Immediate instruction could be used to copy the 16 bits in the accumulator to output points, such as Y40Y57. This technique is useful to quickly copy an input pattern to output points (without waiting for a full CPU scan to occur). DirectSOFT32 C0 LDI V40400 Load the inputs from X0 to X17 into the accumulator, immediately Location V40400 X17 X16 X15 X14 X13 X12 X11 X10 X7 X6 X5 X4 X3 X2 X1 X0 ON OFF ON ON OFF ON OFF OFF ON OFF ON ON OFF ON OFF ON Unused accumulator bits are set to zero 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 8 0 7 6 5 1 0 1 4 3 1 0 2 1 0 1 1 0 OUTI V40502 Output the value in the accumulator to output points Y40 to Y57 Location V40502 Y57 Y56 Y55 Y54 Y53 Y52 Y51 Y50 Y47 Y46 Y45 Y44 Y43 Y42 Y41 Y40 ON OFF ON ON OFF ON OFF OFF ON OFF ON ON OFF ON OFF ON Handheld Programmer Keystrokes $ STR SHFT GX OUT L ANDST SHFT NEXT D 3 I 8 NEXT I 8 NEXT E 4 NEXT NEXT E 4 A 0 A 0 A 0 F 5 ENT E 4 A 0 A 0 C 2 A 0 ENT ENT DL06 Micro PLC User Manual, 1st Ed., Rev. A 537 Chapter 5: Standard RLL Instructions - Immediate Instructions Load Immediate Formatted (LDIF) The Load Immediate Formatted instruction loads a 132 bit binary value into the accumulator. The value reflects the current status of the input module(s) at the time the instruction is executed. Accumulator bits that are not used by the instruction are set to zero. Operand Data Type aaa Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K 0-777 -- LDIF K bbb X aaa DL06 Range bbb -1-32 In the following example, when C0 is on, the binary pattern of X10X17 will be loaded into the accumulator using the Load Immediate Formatted instruction. The Out Immediate Formatted instruction could be used to copy the specified number of bits in the accumulator to the specified outputs on the output module, such as Y30Y37. This technique is useful to quickly copy an input pattern to outputs (without waiting for the CPU scan). DirectSOFT32 C0 LDIF K8 Load the value of 8 consecutive location into the accumulator starting with X10 Acc. Unused accumulator bits are set to zero 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 7 6 5 1 0 1 4 3 1 0 2 1 0 1 X10 Location X10 Constant K8 X17 X16 X15 X14 X13 X12 X11 X10 ON OFF ON ON OFF ON OFF ON 1 0 OUTIF K8 Y30 Location Constant K8 Y37 Y36 Y35 Y34 Y33 Y32 Y31 Y30 ON OFF ON ON OFF ON OFF ON Copy the value of the lower 8 bits of the accumulator to Y30 - Y37 Y30 Handheld Programmer Keystrokes $ STR SHFT GX OUT L ANDST SHFT NEXT D 3 I 8 F 5 NEXT I 8 NEXT F 5 D 3 A 0 NEXT A 0 B 1 ENT A 0 I 8 I 8 ENT ENT 538 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions Timer, Counter and Shift Register Instructions Using Timers Timers are used to time an event for a desired length of time. The single input timer will time as long as the input is on. When the input changes from on to off the timer current value is reset to 0. There is a tenth of a second and a hundredth of a second timer available with a maximum time of 999.9 and 99.99 seconds respectively. There is a discrete bit associated with each timer to indicate that the current value is equal to or greater than the preset value. The timing diagram below shows the relationship between the timer input, associated discrete bit, current value, and timer preset. 0 X1 1 2 3 Seconds 4 5 6 7 8 X1 TMR K30 T1 Timer Preset T1 T1 Current Value 0 10 20 30 40 1/10 Seconds 50 60 0 Timer Preset Y0 OUT There are those applications that need an accumulating timer, meaning it has the ability to time, stop, and then resume from where it previously stopped. The accumulating timer works similarly to the regular timer, but two inputs are required. The enable input starts and stops the timer. When the timer stops, the elapsed time is maintained. When the timer starts again, the timing continues from the elapsed time. When the reset input is turned on, the elapsed time is cleared and the timer will start at 0 when it is restarted. There is a tenth of a second and a hundredth of a second timer available with a maximum time of 9999999.9 and 999999.99 seconds respectively. The timing diagram below shows the relationship between the timer input, timer reset, associated discrete bit, current value, and timer preset. 0 X1 1 2 3 Seconds 4 5 6 7 8 X1 TMRA K30 T0 Enable Enable X2 X2 Reset Input Reset Input T0 Current Value 0 10 10 20 30 1/10 Seconds 40 50 0 DL06 Micro PLC User Manual, 1st Ed., Rev. A 539 Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions Timer (TMR) and Timer Fast (TMRF) The Timer instruction is a 0.1 second single input timer that times to a maximum of 999.9 seconds. The Timer Fast instruction is a 0.01 second single input timer that times up to T aaa TMR a maximum of 99.99 seconds. These timers will be enabled if B bbb the input logic is true (on) and will be reset to 0 if the input logic is false (off ). Preset Timer# Instruction Specifications Timer Reference (Taaa): Specifies the timer number. Preset Value (Bbbb): Constant value (K) or a V memory location. TMRF T aaa B bbb Current Value: Timer current values are accessed by referencing the associated V or T memory location*. For example, the timer current value for T3 physically resides in VTimer# Preset memory location V3. Discrete Status Bit: The discrete status bit is referenced by the associated T memory location. Operating as a timer done bit, it will be on if the current value is equal to or greater than the preset value. For example, the discrete status bit for Timer 2 is T2. NOTE: Timer preset constants (K) may be changed by using a handheld programmer, even when the CPU is in Run Mode. Therefore, a V-memory preset is required only if the ladder program must change the preset. Operand Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T V memory for preset values . . . . . . . . . . . . . . . V DL06 Range aaa 0777 bbb 12007377 74007577 10000-17777 12007377 74007577 10000-17777 09999 0377 or V4110041107 0377 Pointers (preset only) . . . . . . . . . . . . . . . . . . . . P Constants (preset only) . . . . . . . . . . . . . . . . . . K Timer discrete status bits . . . . . . . . . . . . . . . T/V Timer current values . . . . . . . . . . . . . . . . . . V /T* NOTE: * With the HPP, both the Timer discrete status bits and current value are accessed with the same data reference. DirectSOFT uses separate references, such as T2 for discrete status bit for Timer T2, and TA2 for the current value of Timer T2. You can perform functions when the timer reaches the specified preset using the discrete status bit. Or, use comparative contacts to perform functions at different time intervals, based on one timer. The examples on the following page show these two methods of programming timers. 540 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions Timer Example Using Discrete Status Bits In the following example, a single input timer is used with a preset of 3 seconds. The timer discrete status bit (T2) will turn on when the timer has timed for 3 seconds. The timer is reset when X1 turns off, turning the discrete status bit off and resetting the timer current value to 0. Direct SOFT32 X1 TMR K30 T2 Y0 OUT T2 X1 T2 Timing Diagram 0 1 2 3 Seconds 4 5 6 7 8 Handheld Programmer Keystrokes $ STR N TMR $ STR GX OUT C 2 SHFT A 0 T MLR ENT C 2 B 1 ENT D 3 A 0 ENT ENT Y0 Current Value 0 10 20 30 40 50 60 0 1/10th Seconds Timer Example Using Comparative Contacts In the following example, a single input timer is used with a preset of 4.5 seconds. Comparative contacts are used to energize Y3, Y4, and Y5 at one second intervals respectively. When X1 is turned off the timer will be reset to 0 and the comparative contacts will turn off Y3, Y4, and Y5. Direct SOFT32 X1 TMR K45 TA20 K10 Y3 OUT X1 Y3 Y4 Y5 TA20 K30 Y5 OUT T2 Current Value Handheld Programmer Keystrokes $ STR N TMR $ STR GX OUT $ STR GX OUT $ STR GX OUT C 2 SHFT D 3 SHFT E 4 SHFT F 5 B 1 ENT A 0 T MLR ENT T MLR ENT T MLR ENT C 2 A 0 D 3 A 0 ENT C 2 A 0 C 2 A 0 ENT C 2 A 0 E 4 F 5 ENT B 1 A 0 ENT 0 10 20 30 40 50 60 0 T20 Timing Diagram Seconds 0 1 2 3 4 5 6 7 8 TA20 K20 Y4 OUT 1/10th Seconds DL06 Micro PLC User Manual, 1st Ed., Rev. A 541 Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions Accumulating Timer (TMRA) The Accumulating Timer is a 0.1 second two input timer that will time to a maximum of 9999999.9. Enable T aaa TMRA B bbb Reset Accumulating Fast Timer (TMRAF) The Accumulating Fast Timer is a 0.01 second two-input Timer# Preset timer that will time to a maximum of 99999.99. Each one uses two timer registers in V-memory. These timers have two inputs, an enable and a reset. The timer starts timing when the enable is on and stops when the enable is off (without resetting the count). The reset will reset the timer T aaa Enable TMRAF when on and allow the timer to time when off. B bbb Instruction Specifications Reset Timer Reference (Taaa): Specifies the timer number. Preset Value (Bbbb): Constant value (K) or a V memory Timer# Preset location. Current Value: Timer current values are accessed by referencing the associated V or T memory location*. For example, the timer current value for T3 resides in V-memory location V3. Discrete Status Bit: The discrete status bit is accessed by referencing the associated T memory location. Operating as a timer done bit, it will be on if the current value is equal to or greater than the preset value. For example the discrete status bit for timer 2 would be T2. NOTE: The accumulating type timer uses two consecutive V-memory locations for the 8-digit value, and therefore two consecutive timer locations. For example, if TMRA 1 is used, the next available timer number is TMRA 3. Operand Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T V memory for preset values . . . . . . . . . . . . . . . V Pointers (preset only) . . . . . . . . . . . . . . . . . . . . P Constants (preset only) . . . . . . . . . . . . . . . . . . K Timer discrete status bits . . . . . . . . . . . . . . . T/V Timer current values . . . . . . . . . . . . . . . . . . V /T* DL06 Range aaa 0376 bbb 12007377 74007577 10000-17777 12007377 74007577 10000-17777 099999999 0376 or V4110041117 0376 NOTE: * With the HPP, both the Timer discrete status bits and current value are accessed with the same data reference. DirectSOFT uses separate references, such as T2 for discrete status bit for Timer T2, and TA2 for the current value of Timer T2. The following examples show two methods of programming timers. One performs functions when the timer reaches the preset value using the discrete status bit, or use comparative contacts to perform functions at different time intervals. 542 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions Accumulating Timer Example using Discrete Status Bits In the following example, a two input timer (accumulating timer) is used with a preset of 3 seconds. The timer discrete status bit (T6) will turn on when the timer has timed for 3 seconds. Notice in this example that the timer times for 1 second , stops for one second, then resumes timing. The timer will reset when C10 turns on, turning the discrete status bit off and resetting the timer current value to 0. Direct SOFT32 X1 TMRA K30 C10 C10 T6 X1 Timing Diagram 0 1 2 3 Seconds 4 5 6 7 8 T6 Y7 OUT T6 Current Value 0 10 10 20 30 40 50 0 Handheld Programmer Keystrokes $ STR $ STR N TMR SHFT B 1 SHFT A 0 ENT C 2 G 6 B 1 A 0 ENT Handheld Programmer Keystrokes (cont) D 3 $ STR GX OUT A 0 ENT SHFT B 1 T MLR A 0 G 6 ENT ENT Accumulator Timer Example Using Comparative Contacts In the following example, a single input timer is used with a preset of 4.5 seconds. Comparative contacts are used to energized Y3, Y4, and Y5 at one second intervals respectively. The comparative contacts will turn off when the timer is reset. Contacts Direct SOFT32 X1 TMRA K45 C10 C10 Y3 T20 X1 0 1 2 3 Timing Diagram Seconds 4 5 6 7 8 TA20 K10 Y3 OUT Y4 TA20 K20 Y4 OUT T20 TA20 K30 Y5 OUT Current Value 0 10 10 20 30 40 50 0 Y5 Handheld Programmer Keystrokes $ STR $ STR N TMR $ STR GX OUT $ STR SHFT B 1 SHFT A 0 SHFT D 3 SHFT T MLR ENT T MLR C 2 A 0 C 2 A 0 ENT C 2 ENT C 2 C 2 A 0 B 1 A 0 B 1 A 0 ENT E 4 A 0 F 5 ENT ENT Handheld Programmer Keystrokes (cont) GX OUT $ STR D 3 GX OUT A 0 E 4 SHFT ENT F 5 ENT ENT T MLR C 2 A 0 DL06 Micro PLC User Manual, 1st Ed., Rev. A 543 Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions Using Counters Counters are used to count events . The counters available are up counters, up/down counters, and stage counters (used with RLLPLUS programming). The up counter (CNT) has two inputs, a count input and a reset input. The maximum count value is 9999. The timing diagram below shows the relationship between the counter input, counter reset, associated discrete bit, current value, and counter preset. X1 X1 X2 CT1 Current alue 1 2 Counts 3 4 0 X2 CNT CT1 K3 Up Reset Counter preset The up down counter (UDC) has three inputs, a count up input, count down input and reset input. The maximum count value is 99999999. The timing diagram below shows the relationship between the counter up and down inputs, counter reset, associated discrete bit, current value, and counter preset. X1 X1 UDC CT2 K3 Up X2 X3 CT2 Current Value 1 2 1 Counts 2 3 0 X2 Down X3 Reset Counter Preset The stage counter (SGCNT) has a count input and is reset by the RST instruction. This instruction is useful when programming using the RLLPLUS structured programming. The maximum count value is 9999. The timing diagram below shows the relationship between the counter input, associated discrete bit, current value, counter preset and reset instruction. X1 CT2 Current Value RST CT2 1 2 Counts 3 4 0 X1 SGCNT K3 CT2 Counter preset 544 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions Counter (CNT) The Counter is a two input counter that increments when the count input logic transitions from off to on. When the counter reset input is on the counter resets to 0. When the current value equals the preset value, the counter status Counter# bit comes on and the counter continues to count up to a maximum count of 9999. The maximum Count CNT CT aaa value will be held until the counter is reset. B bbb Instruction Specifications Reset Counter Reference (CTaaa): Specifies the counter number. Preset Value (Bbbb): Constant value (K) or a V Preset memory location. Current Values: Counter current values are accessed by referencing the associated V or CT memory locations*. The V-memory location is the counter location + 1000. For example, the counter current value for CT3 resides in V memory location V1003. Discrete Status Bit: The discrete status bit is accessed by referencing the associated CT memory location. It will be on if the value is equal to or greater than the preset value. For example the discrete status bit for counter 2 would be CT2. NOTE: Counter preset constants (K) may be changed by using a programming device, even when the CPU is in Run Mode. Therefore, a V-memory preset is required only if the ladder program must change the preset. Operand Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT V memory (preset only) . . . . . . . . . . . . . . . . . . V Pointers (preset only) . . . . . . . . . . . . . . . . . . . . P Constants (preset only) . . . . . . . . . . . . . . . . . . K Counter discrete status bits . . . . . . . . . . . . CT/V Counter current values . . . . . . . . . . . . . . . V /CT* DL06 Range aaa 0177 bbb 12007377 74007577 10000-17777 12007377 74007577 10000-17777 09999 0177 or V4114041147 1000-1177 NOTE: * With the HPP, both the Counter discrete status bits and current value are accessed with the same data reference. DirectSOFT uses separate references, such as CT2 for discrete status bit for Counter CT2, and CTA2 for the current value of Counter CT2. DL06 Micro PLC User Manual, 1st Ed., Rev. A 545 Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions Counter Example Using Discrete Status Bits In the following example, when X1 makes an off to on transition, counter CT2 will increment by one. When the current value reaches the preset value of 3, the counter status bit CT2 will turn on and energize Y7. When the reset C10 turns on, the counter status bit will turn off and the current value will be 0. The current value for counter CT2 will be held in V memory location V1002. DirectSOFT32 X1 CNT K3 C10 C10 CT2 or Y7 Current Value 1 2 3 4 0 CT2 X1 Counting diagram CT2 Y7 OUT Handheld Programmer Keystrokes $ STR $ STR GY CNT B 1 SHFT C 2 ENT C 2 D 3 B 1 A 0 ENT ENT Handheld Programmer Keystrokes (cont) $ STR GX OUT SHFT B 1 C 2 A 0 SHFT ENT T MLR C 2 ENT Counter Example Using Comparative Contacts In the following example, when X1 makes an off to on transition, counter CT2 will increment by one. Comparative contacts are used to energize Y3, Y4, and Y5 at different counts. When the reset C10 turns on, the counter status bit will turn off and the counter current value will be 0, and the comparative contacts will turn off. DirectSOFT32 X1 CNT K3 C10 C10 CT2 X1 Counting diagram CTA2 K1 Y3 OUT Y3 Y4 CTA2 K2 Y4 OUT Y5 Current Value 1 2 3 4 0 CTA2 K3 Y5 OUT Handheld Programmer Keystrokes $ STR $ STR GY CNT $ STR B 1 GX OUT B 1 SHFT C 2 SHFT ENT D 3 ENT C 2 ENT C 2 D 3 SHFT B 1 A 0 ENT T MLR C 2 ENT Handheld Programmer Keystrokes (cont) $ STR C 2 GX OUT $ STR D 3 GX OUT SHFT ENT E 4 SHFT ENT F 5 ENT ENT C 2 SHFT T MLR C 2 C 2 SHFT T MLR C 2 546 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions Stage Counter (SGCNT) The Stage Counter is a single input counter that increments when the input logic transitions from off to Counter# on. This counter differs from other counters since it will hold its current value until reset using the RST CT aaa SGCNT instruction. The Stage Counter is designed for use in B bbb RLLPLUS programs but can be used in relay ladder logic programs. When the current value equals the preset Preset value, the counter status bit turns on and the counter continues to count up to a maximum count of 9999. The maximum value will be held until the counter is reset. Instruction Specifications Counter Reference (CTaaa): Specifies the counter number. Preset Value (Bbbb): Constant value (K) or a V memory location. Current Values: Counter current values are accessed by referencing the associated V or CT memory locations*. The V-memory location is the counter location + 1000. For example, the counter current value for CT3 resides in V memory location V1003. Discrete Status Bit: The discrete status bit is accessed by referencing the associated CT memory location. It will be on if the value is equal to or greater than the preset value. For example the discrete status bit for counter 2 would be CT2. Operand Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT V memory (preset only) . . . . . . . . . . . . . . . . . . V Pointers (preset only) . . . . . . . . . . . . . . . . . . . . P Constants (preset only) . . . . . . . . . . . . . . . . . . K Counter discrete status bits . . . . . . . . . . . . CT/V Counter current values . . . . . . . . . . . . . . . V /CT* DL06 Range aaa 0177 bbb 12007377 74007577 10000-17777 12007377 74007577 10000-17777 09999 0177 or V4114041147 10001177 NOTE: * With the HPP, both the Counter discrete status bits and current value are accessed with the same data reference. DirectSOFT uses separate references, such as CT2 for discrete status bit for Counter CT2, and CTA2 for the current value of Counter CT2. DL06 Micro PLC User Manual, 1st Ed., Rev. A 547 Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions Stage Counter Example Using Discrete Status Bits In the following example, when X1 makes an off to on transition, stage counter CT7 will increment by one. When the current value reaches 3, the counter status bit CT7 will turn on and energize Y7. The counter status bit CT7 will remain on until the counter is reset using the RST instruction. When the counter is reset, the counter status bit will turn off and the counter current value will be 0. The current value for counter CT7 will be held in V memory location V1007. DirectSOFT32 X1 SGCNT K3 CT7 Counting diagram X1 Y7 Current Value RST CT7 CT7 Y7 OUT 1 2 3 4 0 C5 CT7 RST Handheld Programmer Keystrokes $ STR SHFT H 7 $ STR S RST B 1 SHFT D 3 SHFT ENT G 6 ENT C 2 SHFT T MLR H 7 ENT SHFT GY CNT Handheld Programmer Keystrokes (cont) GX OUT $ STR S RST B 1 SHFT SHFT C 2 C 2 A 0 ENT F 5 SHFT ENT T MLR H 7 ENT Stage Counter Example Using Comparative Contacts In the following example, when X1 makes an off to on transition, counter CT2 will increment by one. Comparative contacts are used to energize Y3, Y4, and Y5 at different counts. Although this is not shown in the example, when the counter is reset using the Reset instruction, the counter status bit will turn off and the current value will be 0. The current value for counter CT2 will be held in V memory location V1002. DirectSOFT32 X1 SGCNT CT2 K10 X1 CT2 K1 Y3 OUT Y3 Counting diagram Y4 CT2 K2 Y4 OUT Y5 Current Value RST CT2 Handheld Programmer Keystrokes $ STR SHFT C 2 $ STR B 1 GX OUT S RST G 6 B 1 SHFT ENT D 3 ENT GX OUT C 2 B 1 ENT SHFT A 0 GY CNT ENT SHFT T MLR C 2 GX OUT $ STR D 3 Handheld Programmer Keystrokes (cont) $ STR C 2 SHFT ENT E 4 SHFT ENT F 5 ENT ENT C 2 SHFT T MLR C 2 C 2 SHFT T MLR C 2 1 2 3 4 0 CT2 K3 Y5 OUT 548 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions Up Down Counter (UDC) This Up/Down Counter counts up on each off to on transition of the Up input and counts down on CT aaa each off to on transition of the Down input. The Up UDC B bbb counter is reset to 0 when the Reset input is on. Down The count range is 099999999. The count input Counter # not being used must be off in order for the active count input to function. Reset Preset Instruction Specification Counter Reference (CTaaa): Specifies the counter Caution: The UDC uses two number. V memory locations for the 8 digit current value. This means that the Preset Value (Bbbb): Constant value (K) or two UDC uses two consecutive consecutive V memory locations. counter locations. If UDC CT1 is Current Values: Current count is a double word used in the program, the next available counter is CT3. value accessed by referencing the associated V or CT memory locations*. The V-memory location is the counter location + 1000. For example, the counter The counter discrete status bit and the current value are not specified in current value for CT5 resides in V memory location the counter instruction V1005 and V1006. Discrete Status Bit: The discrete status bit is accessed by referencing the associated CT memory location. Operating as a counter done bit it will be on if the value is equal to or greater than the preset value. For example the discrete status bit for counter 2 would be CT2. Operand Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT V memory (preset only) . . . . . . . . . . . . . . . . . . V Pointers (preset only) . . . . . . . . . . . . . . . . . . . . P Constants (preset only) . . . . . . . . . . . . . . . . . . K Counter discrete status bits . . . . . . . . . . . . CT/V Counter current values . . . . . . . . . . . . . . . V /CT* DL06 Range aaa 0176 bbb 12007377 74007577 10000-17777 12007377 74007577 10000-17777 099999999 0176 or V4114041147 1000-1176 NOTE: * With the HPP, both the Counter discrete status bits and current value are accessed with the same data reference. DirectSOFT32 uses separate references, such as CT2 for discrete status bit for Counter CT2, and CTA2 for the current value of Counter CT2. DL06 Micro PLC User Manual, 1st Ed., Rev. A 549 Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions Up / Down Counter Example Using Discrete Status Bits In the following example, if X2 and X3 are off, when X1 toggles from off to on the counter will increment by one. If X1 and X3 are off the counter will decrement by one when X2 toggles from off to on. When the count value reaches the preset value of 3, the counter status bit will turn on. When the reset X3 turns on, the counter status bit will turn off and the current value will be 0. DirectSOFT32 X1 UDC K3 X2 X2 X3 X3 CT2 X1 Counting Diagram CT2 CT2 Y7 OUT Current Value 1 2 1 2 3 0 Handheld Programmer Keystrokes $ STR $ STR $ STR SHFT U ISG D 3 D 3 C 2 B 1 ENT ENT ENT C 2 C 2 Handheld Programmer Keystrokes (cont) D 3 $ STR GX OUT ENT SHFT B 1 C 2 A 0 SHFT ENT T MLR C 2 ENT Up / Down Counter Example Using Comparative Contacts In the following example, when X1 makes an off to on transition, counter CT2 will increment by one. Comparative contacts are used to energize Y3 and Y4 at different counts. When the reset (X3) turns on, the counter status bit will turn off, the current value will be 0, and the comparative contacts will turn off. DirectSOFT32 X1 UDC V2000 X2 X2 X3 X3 CT2 X1 Counting Diagram CTA2 K1 Y3 OUT Y3 Y4 CTA2 K2 Y4 OUT Current Value 1 2 3 4 0 Handheld Programmer Keystrokes $ STR $ STR $ STR SHFT SHFT $ STR U ISG V AND C 2 SHFT C 2 D 3 A 0 D 3 C 2 B 1 ENT ENT ENT C 2 A 0 SHFT A 0 T MLR C 2 ENT C 2 Handheld Programmer Keystrokes (cont) B 1 GX OUT $ STR C 2 GX OUT ENT D 3 SHFT ENT E 4 ENT ENT C 2 SHFT T MLR C 2 550 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Timer, Counter and Shift Register Instructions Shift Register (SR) The Shift Register instruction shifts data through a predefined number of control relays. The control ranges in the shift register block must start at the beginning of an 8 bit boundary use 8-bit blocks. The Shift Register has three contacts. Data determines the value (1 or 0) that will enter the register Clock shifts the bits one position on each low to high transition Reset resets the Shift Register to all zeros. DATA SR From A aaa CLOCK To RESET B bbb With each off to on transition of the clock input, the bits which make up the shift register block are shifted by one bit position and the status of the data input is placed into the starting bit position in the shift register. The direction of the shift depends on the entry in the From and To fields. From C0 to C17 would define a block of sixteen bits to be shifted from left to right. From C17 to C0 would define a block of sixteen bits, to be shifted from right to left. The maximum size of the shift register block depends on the number of available control relays. The minimum block size is 8 control relays. Operand Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B Control Relay . . . . . . . . . . . . . . . . . . . . . . . . . . . C Direct SOFT32 X1 Data Input DL06 Range aaa 01777 bbb 01777 Handheld Programmer Keystrokes $ SR $ STR C STR $ STR To Reset Input C17 SHFT S RST B 1 D 3 SHFT H 7 2 B 1 ENT ENT ENT R ORN ENT SHFT A 0 X2 From Clock Input C0 X3 Inputs on Successive Scans Data Clock Reset Shift Register Bits C0 C17 1 0 0 1 0 0 0-1-0 0-1-0 0-1-0 0-1-0 0-1-0 0 0 0 0 0 0 1 Indicates Indicates ON ON Indicates Indicates OFF OFF DL06 Micro PLC User Manual, 1st Ed., Rev. A 551 Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data Accumulator / Stack Load and Output Data Instructions Using the Accumulator The accumulator in the DL06 internal CPUs is a 32 bit register which is used as a temporary storage location for data that is being copied or manipulated in some manner. For example, you have to use the accumulator to perform math operations such as add, subtract, multiply, etc. Since there are 32 bits, you can use up to an 8-digit BCD number. The accumulator is reset to 0 at the end of every CPU scan. Copying Data to the Accumulator The Load and Out instructions and their variations are used to copy data from a V-memory location to the accumulator, or to copy data from the accumulator to V memory. The following example copies data from V-memory location V2000 to V-memory location V2010. X1 V2000 LD V2000 Copy data from V2000 to the lower 16 bits of the accumulator Unused accumulator bits are set to zero Acc. 0 0 0 0 88 99 33 55 8 9 3 5 OUT V2010 Copy data from the lower 16 bits of the accumulator to V2010 8 9 3 5 V2010 Since the accumulator is 32 bits and V memory locations are 16 bits, the Load Double and Out Double (or variations thereof ) use two consecutive V-memory locations or 8 digit BCD constants to copy data either to the accumulator from a V-memory address or from a Vmemory address to the accumulator. For example if you wanted to copy data from V2000 and V2001 to V2010 and V2011 the most efficient way to perform this function would be as follows: X1 LDD V2000 Copy data from V2000 and V2001 to the accumulator Acc. 6 7 3 9 55 00 22 66 6 V2001 7 3 9 5 V2000 0 2 6 OUTD V2010 Copy data from the accumulator to V2010 and V2011 6 7 3 9 5 0 2 6 V2011 V2010 552 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data Changing the Accumulator Data Instructions that manipulate data also use the accumulator. The result of the manipulated data resides in the accumulator. The data that was being manipulated is cleared from the accumulator. The following example loads the constant value 4935 into the accumulator, shifts the data right 4 bits, and outputs the result to V2010. X1 LD K4935 Load the value 4935 into the accumulator Acc. Constant 4 9 3 5 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 8 1 7 0 6 5 0 1 4 3 1 0 2 1 1 0 0 1 The upper 16 bits of the accumulator will be set to 0 Shifted out of accumulator SHFR K4 Shift the data in the accumulator 4 bits (K4) to the right Acc. 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 8 0 7 1 6 5 0 0 4 3 1 0 2 0 1 1 0 1 OUT V2010 Output the lower 16 bits of the accumulator to V2010 0 4 9 3 V2010 Some of the data manipulation instructions use 32 bits. They use two consecutive V memory locations or an 8 digit BCD constant to manipulate data in the accumulator. In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into the accumulator using the Load Double instruction. The value in the accumulator is added with the value in V2006 and V2007 using the Add Double instruction. The value in the accumulator is copied to V2010 and V2011 using the Out Double instruction. V2001 X1 LDD V2000 Load the value in V2000 and V2001 into the accumulator 6 ADDD V2006 Add the value in the accumulator with the value in V2006 and V2007 OUTD V2010 Copy the value in the accumulator to V2010 and V2011 8 7 3 9 9 0 7 2 + 2 Acc. 8 7 0 7 3 0 3 9 0 9 5 4 9 0 0 0 2 4 7 6 6 2 (Accumulator) (V2006&V2007) 6 7 3 9 5 V2000 0 2 6 V2011 V2010 DL06 Micro PLC User Manual, 1st Ed., Rev. A 553 Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data Using the Accumulator Stack The accumulator stack is used for instructions that require more than one parameter to execute a function or for user defined functionality. The accumulator stack is used when more than one Load instruction is executed without the use of an Out instruction. The first load instruction in the scan places a value into the accumulator. Every Load instruction thereafter without the use of an Out instruction places a value into the accumulator and the value that was in the accumulator is placed onto the accumulator stack. The Out instruction nullifies the previous load instruction and does not place the value that was in the accumulator onto the accumulator stack when the next load instruction is executed. Every time a value is placed onto the accumulator stack the other values in the stack are pushed down one location. The accumulator is eight levels deep (eight 32 bit registers). If there is a value in the eighth location when a new value is placed onto the stack, the value in the eighth location is pushed off the stack and cannot be recovered. X1 LD K3245 Load the value 3245 into the accumulator Constant Current Acc. value Acc. 0 0 0 0 3 2 4 5 Level 1 Previous Acc. value Acc. X X X X X X X X X Level 2 Level 3 Level 4 Level 5 Level 6 LD K5151 Load the value 5151 into the accumulator, pushing the value 3245 onto the stack Constant Current Acc. value Acc. 0 0 0 0 5 5 1 5 1 Accumulator Stack 0 3 2 4 5 3 2 4 5 Level 1 Level 2 Level 3 Level 4 Level 5 Level 6 LD K6363 Load the value 6363 into the accumulator, pushing the value 5151 to the 1st stack location and the value 3245 to the 2nd stack location Constant Current Acc. value Acc. 0 0 0 0 6 3 6 3 6 3 6 3 Accumulator Stack 0 5 5 1 5 1 Level 1 Level 2 Level 3 Level 4 Level 5 Level 6 Level 7 Level 8 0 0 0 X X X X X X 0 0 0 X X X X X X 0 0 5 1 5 1 Bucket 6 3 6 3 Level 7 Level 8 0 X X X X X X X 0 X X X X X X X 0 X X X X X X X 0 X X X X X X X 3 X X X X X X X 2 X X X X X X X 4 X X X X X X X 5 X X X X X X X Bucket 5 1 5 1 Level 7 Level 8 X X X X X X X X X X Accumulator Stack X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X 3 2 4 5 Previous Acc. value Acc. 0 0 0 Previous Acc. value Acc. 0 0 0 0 0 3 2 4 5 0 0 X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Bucket The POP instruction rotates values upward through the stack into the accumulator. When a POP is executed the value which was in the accumulator is cleared and the value that was on top of the stack is in the accumulator. The values in the stack are shifted up one position in the stack. 554 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data X1 POP Previous Acc. value Acc. X X X X X X X X X X X Accumulator Stack 0 4 5 4 5 4 5 Level 1 Level 2 Level 3 Level 4 0 0 X X X X X X 0 0 X X X X X X 0 0 X X X X X X 0 0 X X X X X X 3 7 X X X X X X 7 9 X X X X X X 9 3 X X X X X X 2 0 X X X X X X POP the 1st value on the stack into the accumulator and move stack values up one location Current Acc. value Acc. 0 0 0 OUT V2000 Copy data from the accumulator to V2000 Level 5 V2000 4 5 4 5 Level 6 Level 7 Level 8 POP Previous Acc. value Acc. 0 0 0 0 4 5 4 5 4 5 4 5 Accumulator Stack 0 3 7 9 2 3 7 9 2 Level 1 Level 2 Level 3 Level 4 0 X X X X X X X 0 X X X X X X X 0 X X X X X X X 0 X X X X X X X 7 X X X X X X X 9 X X X X X X X 3 X X X X X X X 0 X X X X X X X POP the 1st value on the stack into the accumulator and move stack values up one location Current Acc. value Acc. 0 0 0 OUT V2001 Copy data from the accumulator to V2001. Level 5 V2001 3 7 9 2 Level 6 Level 7 Level 8 Previous Acc. value POP Acc. 0 0 0 0 3 4 6 0 3 7 9 2 Accumulator Stack Current Acc. value POP the 1st value on the stack into the accumulator and move stack values up one location Acc. X X X X 77 99 33 00 Level 1 Level 2 Level 3 Level 4 Level 5 OUT V2002 Copy data from the accumulator to V2002 V2002 7 9 3 0 Level 6 Level 7 Level 8 X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Using Pointers Many of the DL06 series instructions will allow V-memory pointers as a operand (commonly known as indirect addressing). Pointers allow instructions to obtain data from V-memory locations referenced by the pointer value. NOTE: DL06 V-memory addressing is in octal. However, the pointers reference a V-memory location with values viewed as HEX. Use the Load Address (LDA) instruction to move an address into the pointer location. This instruction performs the Octal to Hexadecimal conversion automatically. In the following simple example we are using a pointer operand in a Load instruction. Vmemory location 2000 is being used as the pointer location. V2000 contains the value 440 which the CPU views as the Hex equivalent of the Octal address V-memory location V2100. The CPU will copy the data from V2100 which in this example contains the value 2635 into the lower word of the accumulator. DL06 Micro PLC User Manual, 1st Ed., Rev. A 555 Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data X1 LD P2000 V2000 (P2000) contains the value 440 HEX. 440 HEX. = 2100 Octal which contains the value 2635. V2000 0 4 4 0 V2076 V2077 V2100 V2101 V2102 V2103 V2104 V2105 X X 2 X X X X X X X 6 X X X X X X X 3 X X X X X X X 5 X X X X X Accumulator 2 6 3 5 OUT V2200 Copy the data from the lower 16 bits of the accumulator to V2200. V2200 V2201 2 X 6 X 3 X 5 X The following example is identical to the one above with one exception. The LDA (Load Address) instruction automatically converts the Octal address to Hex. X1 LDA O 2100 Load the lower 16 bits of the accumulator with Hexadecimal equivalent to Octal 2100 (440) 2 Unused accumulator bits are set to zero Acc. 0 0 0 0 1 0 0 2100 Octal is converted to Hexadecim 440 and loaded into the accumulator 00 44 44 00 OUT V 2000 Copy the data from the lower 16 bits of the accumulator to V2000 0 4 4 0 V2000 V2076 V2077 LD P 2000 V2000 (P2000) contains the value 440 Hex. 440 Hex. = 2100 Octal which contains the value 2635 V2100 0 4 4 0 V2100 V2101 V2102 V2103 V2104 V2105 X X 2 X X X X X X X 6 X X X X X X X 3 X X X X X X X 5 X X X X X 0 0 Accumulator 0 0 22 66 33 55 OUT V 2200 Copy the data from the lower 16 bits of the accumulator to V2200 V2200 V2201 2 X 6 X 3 X 5 X 556 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data Load (LD) The Load instruction is a 16 bit instruction that loads the value (Aaaa), which is either a V memory location or a 4 digit constant, into the lower 16 bits of the accumulator. The upper 16 bits of the accumulator are set to 0. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K LD A aaa DL06 Range aaa See memory map See memory map 0FFFF Discrete Bit Flags SP53 SP70 SP76 Description on when the pointer is outside of the available range. On anytime the value in the accumulator is negative. On when any instruction loads a value of zero into the accumulator. NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the accumulator stack. In the following example, when X1 is on, the value in V2000 will be loaded into the accumulator and output to V2010. Direct SOFT32 X1 LD V2000 Load the value in V2000 into the lower 16 bits of the accumulator OUT V2010 Copy the value in the lower 16 bits of the accumulator to V2010 Handheld Programmer Keystrokes $ STR SHFT C 2 GX OUT L ANDST A 0 D 3 A 0 SHFT A 0 V AND ENT C 2 A 0 B 1 A 0 ENT B 1 X SET 8 9 3 5 The unused accumulator bits are set to zero Acc. 0 0 0 0 8 9 3 5 8 9 3 5 8 V2000 9 3 5 V2010 DL06 Micro PLC User Manual, 1st Ed., Rev. A 557 Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data Load Double (LDD) The Load Double instruction is a 32 bit instruction that loads the value (Aaaa), which is either two consecutive V memory locations or an 8 digit constant value, into the accumulator. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K LDD A aaa DL06 Range aaa See memory map See memory map 0FFFF Discrete Bit Flags SP53 SP70 SP76 Description on when the pointer is outside of the available range. On anytime the value in the accumulator is negative. On when any instruction loads a value of zero into the accumulator. NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the accumulator stack. In the following example, when X1 is on, the 32 bit value in V2000 and V2001 will be loaded into the accumulator and output to V2010 and V2011. Direct SOFT32 X1 LDD V2000 Load the value in V2000 and V2001 into the 32 bit accumulator Acc. 6 7 3 9 65 00 22 66 6 V2001 7 3 9 5 V2000 0 2 6 OUTD V2010 Copy the value in the 32 bit accumulator to V2010 and V2011 Handheld Programmer Keystrokes $ STR SHFT C 2 GX OUT C 2 L ANDST A 0 SHFT A 0 D 3 B 1 A 0 ENT D 3 A 0 A 0 B 1 ENT D 3 ENT 6 7 3 9 5 0 2 6 V2011 V2010 558 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data Load Formatted (LDF) The Load Formatted instruction loads 132 consecutive bits from discrete memory locations into the accumulator. The instruction requires a starting location (Aaaa) and the number of bits (Kbbb) to be loaded. Unused accumulator bit locations are set to zero. Operand Data Type ..................................... Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . Stage Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Timer Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Counter Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A X Y C S T CT SP K LDF K bbb A aaa DL06 Range aaa 0777 0777 01777 01777 0377 0177 0777 bbb 132 Discrete Bit Flags SP70 SP76 Description On anytime the value in the accumulator is negative. On when any instruction loads a value of zero into the accumulator. NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the accumulator stack. In the following example, when C0 is on, the binary pattern of C10C16 (7 bits) will be loaded into the accumulator using the Load Formatted instruction. The lower 7 bits of the accumulator are output to Y0Y6 using the Out Formatted instruction. Direct SOFT32 C0 LDF K7 Load the status of 7 consecutive bits (C10C16) into the accumulator C10 Location C10 Constant K7 C16 C15 C14 C13 C12 C11 C10 OFF OFF OFF ON ON ON OFF The unused accumulator bits are set to zero 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 7 0 6 5 0 0 4 3 0 1 2 1 1 1 0 0 OUTF K7 Y0 Location Y0 Constant K7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 Copy the value from the specified number of bits in the accumulator to Y0 Y6 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT A 0 L ANDST C 2 SHFT F 5 H 7 ENT SHFT D 3 B 1 A 0 C 2 F 5 H 7 ENT A 0 ENT OFF OFF OFF ON ON ON OFF DL06 Micro PLC User Manual, 1st Ed., Rev. A 559 Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data Load Address (LDA) The Load Address instruction is a 16 bit instruction. It converts any octal value or address to the HEX equivalent value and loads the HEX value into the accumulator. This instruction is useful when an address parameter is required since all addresses for the DL06 system are in octal. Operand Data Type Octal Address . . . . . . . . . . . . . . . . . . . . . . . . . . O LDA O aaa DL06 Range aaa See memory map Discrete Bit Flags SP70 SP76 Description On anytime the value in the accumulator is negative. On when any instruction loads a value of zero into the accumulator. NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the accumulator stack. In the following example when X1 is on, the octal number 40400 will be converted to a HEX 4100 and loaded into the accumulator using the Load Address instruction. The value in the lower 16 bits of the accumulator is copied to V2000 using the Out instruction. Direct SOFT32 X1 LDA O 40400 Load The HEX equivalent to the octal number into the lower 16 bits of the accumulator 4 0 Octal 4 0 0 Hexadecimal 4 1 0 0 The unused accumulator bits are set to zero Acc. 0 0 0 0 4 1 0 0 OUT V2000 Copy the value in lower 16 bits of the accumulator to V2000 Handheld Programmer Keystrokes $ STR SHFT E 4 GX OUT L ANDST A 0 D 3 E 4 SHFT A 0 V AND C 2 B 1 ENT A 0 A 0 ENT A 0 A 0 A 0 ENT 4 1 0 0 V2000 560 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data Load Accumulator Indexed (LDX) Load Accumulator Indexed is a 16 bit instruction that specifies a source address (V memory) which will be offset by the value in the first stack location. This instruction LDX interprets the value in the first stack location as HEX. The A aaa value in the offset address (source address + offset) is loaded into the lower 16 bits of the accumulator. The upper 16 bits of the accumulator are set to 0. Helpful Hint: The Load Address instruction can be used to convert an octal address to a HEX address and load the value into the accumulator. Operand Data Type A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P DL06 Range aaa See memory map See memory map aaa See memory map See memory map NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the accumulator stack. In the following example when X1 is on, the HEX equivalent for octal 25 will be loaded into the accumulator (this value will be placed on the stack when the Load Accumulator Indexed instruction is executed). V memory location V1410 will be added to the value in the 1st. level of the stack and the value in this location (V1435 = 2345) is loaded into the lower 16 bits of the accumulator using the Load Accumulator Indexed instruction. The value in the lower 16 bits of the accumulator is output to V1500 using the Out instruction. X1 LDA O 25 Load The HEX equivalent to octal 25 into the lower 16 bits of the accumulator Octal 2 5 Hexadecimal 0 0 1 5 The unused accumulator bits are set to zero Acc. 0 0 0 0 0 0 1 5 LDX V1410 Move the offset to the stack. Load the accumulator with the address to be offset Octal V 1 4 1 0 HEX Value in 1st stack location + 1 5 = V 1 Octal 4 3 5 Level 1 Level 2 The unused accumulator bits are set to zero OUT V1500 Copy the value in the lower 16 bits of the accumulator to V1500 Acc. 0 0 0 0 2 3 4 5 Level 3 Level 4 Level 5 The value in V1435 is 2345 2 3 4 5 Level 6 Level 7 Level 8 0 X X X X X X X Accumulator Stack 0 X X X X X X X 0 X X X X X X X 0 0 0 X X X X X X X 1 X X X X X X X 5 X X X X X X X X X X X X X X X X X X X X X V1500 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST L ANDST D 3 D 3 PREV B 1 ENT A 0 X SET PREV PREV B 1 B 1 F 5 C 2 E 4 A 0 F 5 ENT B 1 A 0 A 0 ENT ENT DL06 Micro PLC User Manual, 1st Ed., Rev. A 561 Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data Load Accumulator Indexed from Data Constants (LDSX) The Load Accumulator Indexed from Data Constants is a 16 bit instruction. The instruction specifies a Data Label LDSX K aaa Area (DLBL) where numerical or ASCII constants are stored. This value will be loaded into the lower 16 bits. The LDSX instruction uses the value in the first level of the accumulator stack as an offset to determine which numerical or ASCII constant within the Data Label Area will be loaded into the accumulator. The LDSX instruction interprets the value in the first level of the accumulator stack as a HEX value. Helpful Hint: The Load Address instruction can be used to convert octal to HEX and load the value into the accumulator. Operand Data Type Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K DL06 Range aaa 1-FFFF NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the accumulator stack. In the following example when X1 is on, the offset of 1 is loaded into the accumulator. This value will be placed into the first level of the accumulator stack when the LDSX instruction is executed. The LDSX instruction specifies the Data Label (DLBL K2) where the numerical constant(s) are located in the program and loads the constant value, indicated by the offset in the stack, into the lower 16 bits of the accumulator. Hexadecimal X1 LD K1 Load the offset value of 1 (K1) into the lower 16 bits of the accumulator. LDSX K2 Move the offset to the stack. Load the accumulator with the data label number OUT V2000 . . . Copy the value in the lower 16 bits of the accumulator to V2000 K 0 Constant 0 0 2 0 The unused accumulator bits are set to zero Acc. 0 0 0 0 0 0 0 1 Level 1 Level 2 Level 3 Level 4 Level 5 Level 6 Level 7 0 0 2 Level 8 0 0 1 Value in 1st. level of stack is used as offset. The value is 1 Accumulator Stack 0 X X X X X X X 0 X X X X X X X 0 X X X X X X X 0 0 0 X X X X X X X 0 X X X X X X X 1 X X X X X X X X X X X X X X X X X X X X X The unused accumulator bits are set to zero Acc. 0 0 0 0 0 The unused accumulator bits are set to zero Acc. 0 0 0 0 2 3 2 3 END DLBL DLBL K2 2 NCON K3333 Offset 0 3 2 3 V2000 NCON K2323 Offset 1 NCON K4549 Offset 2 562 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data $ STR SHFT SHFT SHFT SHFT SHFT SHFT SHFT GX OUT L ANDST L ANDST E 4 D 3 N TMR N TMR N TMR B 1 D 3 D 3 N TMR L ANDST C 2 C 2 C 2 SHFT ENT SHFT S RST D 3 B 1 O INST# O INST# O INST# V AND X SET ENT L ANDST N TMR N TMR N TMR C 2 A 0 C 2 D 3 C 2 E 4 A 0 K JMP B 1 C 2 Handheld Programmer Keystrokes ENT ENT ENT D 3 D 3 F 5 A 0 E 4 ENT C 2 J 9 D 3 D 3 D 3 ENT ENT ENT Load Real Number (LDR) The Load Real Number instruction loads a real number contained in two consecutive V-memory locations, or an 8-digit constant into the accumulator. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Real Constant . . . . . . . . . . . . . . . . . . . . . . . . . . R LDR A aaa DL06 Range aaa See memory map See memory map -3.402823E+038 to + -3.402823E+038 DirectSOFT32 allows you to enter real numbers directly, by using the leading R to indicate a real number entry. You can enter a constant such as Pi, shown in the example to the right. To enter negative numbers, use a minus () after the R. For very large numbers or very small numbers, you can use exponential notation. The number to the right is 5.3 million. The OUTD instruction stores it in V1400 and V1401. These real numbers are in the IEEE 32-bit floating point format, so they occupy two V-memory locations, regardless of how big or small the number may be! If you view a stored real number in hex, binary, or even BCD, the number shown will be very difficult to decipher. Just like all other number types, you must keep track of real number locations in memory, so they can be read with the proper instructions later. The previous example above stored a real number in V1400 and V1401. Suppose that now we want to retrieve that number. Just use the Load Real with the V data type, as shown to the right. Next we could perform real math on it, or convert it to a binary number. LDR R3.14159 LDR R5.3E6 OUTD V1400 LDR V1400 DL06 Micro PLC User Manual, 1st Ed., Rev. A 563 Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data Out (OUT) The Out instruction is a 16 bit instruction that copies the value in the lower 16 bits of the accumulator to a specified V memory location (Aaaa). Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P OUT A aaa DL06 Range aaa See memory map See memory map Discrete Bit Flags SP53 Description On if CPU cannot solve the logic. In the following example, when X1 is on, the value in V2000 will be loaded into the lower 16 bits of the accumulator using the Load instruction. The value in the lower 16 bits of the accumulator are copied to V2010 using the Out instruction.V2000 Direct SOFT32 X1 LD V2000 Load the value in V2000 into the lower 16 bits of the accumulator OUT V2010 Copy the value in the lower 16 bits of the accumulator to V2010 8 9 3 5 8 The unused accumulator bits are set to zero Acc. 0 0 0 0 8 9 3 5 8 9 3 5 V2000 9 3 5 Handheld Programmer Keystrokes $ STR SHFT C 2 GX OUT L ANDST A 0 D 3 A 0 SHFT A 0 V AND ENT C 2 A 0 B 1 A 0 ENT B 1 ENT V2010 Out Double (OUTD) The Out Double instruction is a 32 bit instruction that copies the value in the accumulator to two consecutive V memory locations at a specified starting location (Aaaa). Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P OUTD A aaa DL06 Range aaa See memory map See memory map Discrete Bit Flags SP53 Description On if CPU cannot solve the logic. In the following example, when X1 is on, the 32 bit value in V2000 and V2001 will be loaded into the accumulator using the Load Double instruction. The value in the accumulator is output to V2010 and V2011 using the Out Double instruction. Direct SOFT32 6 X1 LDD V2000 SHFT Load the value in V2000 and V2001 into the accumulator OUTD V2010 Copy the value in the accumulator to V2010 and V2011 6 7 3 9 5 0 2 6 Acc. 6 7 3 9 5 0 2 6 5 0 2 6 C 2 GX OUT C 2 V2011 V2010 V2001 7 3 9 5 V2000 0 2 6 Handheld Programmer Keystrokes $ STR L ANDST A 0 SHFT A 0 D 3 B 1 A 0 ENT D 3 A 0 A 0 B 1 ENT D 3 ENT 564 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data Out Formatted (OUTF) The Out Formatted instruction outputs 132 bits from the accumulator to the specified discrete memory locations. The instruction requires a starting location (Aaaa) for the destination and the number of bits (Kbbb) to be output. Operand Data Type ....................................A Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K OUTF A aaa K bbb DL06 Range aaa 0777 0777 01777 bbb 132 In the following example, when C0 is on, the binary pattern of C10C16 (7 bits) will be loaded into the accumulator using the Load Formatted instruction. The lower 7 bits of the accumulator are output to Y0Y6 using the Out Formatted instruction. Direct SOFT32 C0 LDF K7 Load the status of 7 consecutive bits (C10C16) into the accumulator C10 Location C10 Constant K7 C16 C15 C14 C13 C12 C11 C10 OFF OFF OFF ON ON ON OFF The unused accumulator bits are set to zero 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 0 7 0 6 5 0 0 4 3 0 1 2 1 1 1 0 0 OUTF K7 Y20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Accumulator Copy the value of the specified number of bits from the accumulator to Y20Y26 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT A 0 L ANDST C 2 SHFT F 5 H 7 ENT SHFT D 3 B 1 A 0 C 2 F 5 H 7 ENT A 0 ENT Location Y0 Constant K7 Y26 Y25 Y24 Y23 Y22 Y21 Y20 OFF OFF OFF ON ON ON OFF Pop (POP) The Pop instruction moves the value from the first level of the accumulator stack (32 bits) to the accumulator and shifts each value in the stack up one level. POP Discrete Bit Flags SP63 Description on when the result of the instruction causes the value in the accumulator to be zero. DL06 Micro PLC User Manual, 1st Ed., Rev. A 565 Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data Pop Instruction Continued In the example below, when C0 is on, the value 4545 that was on top of the stack is moved into the accumulator using the Pop instruction The value is output to V2000 using the Out instruction. The next Pop moves the value 3792 into the accumulator and outputs the value to V2001. The last Pop moves the value 7930 into the accumulator and outputs the value to V2002. Please note if the value in the stack were greater than 16 bits (4 digits) the Out Double instruction would be used and 2 V memory locations for each Out Double must be allocated. Direct SOFT32 C0 POP Previous Acc. value Acc. X X X X X X X X X X X X Accumulator Stack 0 4 5 4 5 4 5 4 5 Level 1 Level 2 Level 3 OUT V2000 V2000 Copy the value in the lower 16 bits of the accumulator to V2000 4 5 4 5 Level 4 Level 5 Level 6 Level 7 Level 8 POP Previous Acc. value Acc. 0 Pop the 1st. value on the stack into the accumulator and move stack values up one location 0 0 0 4 5 4 5 4 5 4 5 Accumulator Stack 0 3 7 9 2 Level 1 Level 2 OUT V2001 Copy the value in the lower 16 bits of the accumulator to V2001 Level 3 Level 4 Level 5 V2001 3 7 9 2 Level 6 Level 7 POP Level 8 0 X X X X X X X 0 X X X X X X X 0 X X X X X X X 0 X X X X X X X 7 X X X X X X X 9 X X X X X X X 3 X X X X X X X 0 X X X X X X X 0 0 0 X X X X X X 0 0 0 X X X X X X 0 0 X X X X X X 0 0 X X X X X X 3 7 X X X X X X 7 9 X X X X X X 9 3 X X X X X X 2 0 X X X X X X Current Acc. value Pop the 1st. value on the stack into the accumulator and move stack values up one location Acc. 0 0 0 Current Acc. value Acc. 0 0 0 Pop the 1st. value on the stack into the accumulator and move stack values up one location Previous Acc. value Acc. 0 0 0 0 3 7 9 2 Accumulator Stack 0 7 9 3 0 Level 1 Level 2 Level 3 Level 4 Level 5 V2002 7 9 3 0 X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Current Acc. value OUT V2002 Copy the value in the lower 16 bits of the accumulator to V2002 Acc. 0 0 0 Handheld Programmer Keystrokes $ STR SHFT GX OUT SHFT GX OUT SHFT GX OUT P CV P CV P CV SHFT SHFT SHFT SHFT SHFT SHFT SHFT C 2 O INST# V AND O INST# V AND O INST# V AND P CV C 2 P CV C 2 P CV C 2 A 0 ENT ENT A 0 ENT A 0 ENT A 0 A 0 C 2 ENT A 0 B 1 ENT A 0 A 0 ENT Level 6 Level 7 Level 8 566 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data Out Indexed (OUTX) The Out Indexed instruction is a 16 bit instruction. It copies a 16 bit or 4 digit value from the first level of the accumulator stack to a source address offset by the value in the accumulator(V memory + offset).This instruction interprets the offset value as a HEX number. The upper 16 bits of the accumulator are set to zero. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P O UT X A aaa DL06 Range aaa See memory map See memory map In the following example, when X1 is on, the constant value 3544 is loaded into the accumulator. This is the value that will be output to the specified offset V memory location (V1525). The value 3544 will be placed onto the stack when the Load Address instruction is executed. Remember, two consecutive Load instructions places the value of the first load instruction onto the stack. The Load Address instruction converts octal 25 to HEX 15 and places the value in the accumulator. The Out Indexed instruction outputs the value 3544 which resides in the first level of the accumulator stack to V1525. DirectSOFT32 X1 LD K3544 Load the accumulator with the value 3544 The unused accumulator bits are set to zero Acc. 0 0 0 0 3 5 4 4 3 Constant 5 4 4 LDA O25 Load the HEX equivalent to octal 25 into the lower 16 bits of the accumulator. This is the offset for the Out Indexed instruction, which determines the final destinaltion address OUTX V1500 Copy the value in the first level of the stack to the offset address 1525 (V1500+25) Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST L ANDST SHFT D 3 D 3 X SET A 0 B 1 F 5 B 1 ENT PREV D 3 C 2 F F Octal 2 5 0 HEX 0 1 5 The unused accumulator bits are set to zero Acc. 0 0 0 0 0 0 1 5 Octal V 1 5 0 0 Octal + 2 5 = V 1 3 Octal 5 5 2 4 5 Accumulator Stack 4 Level 1 Level 2 Level 3 Level 4 Level 5 Level 6 0 X X X X X X X 0 0 0 X X X X X X X 3 X X X X X X X 5 4 4 X X X X X X X The hex 15 converts to 25 octal, which is added to the base address of V1500 to yield the final answer V1525 X X X X X X X X X X X X X X X X X X X X X X X X X X X X E 5 5 4 ENT A 0 0 E 4 ENT Level 7 Level 8 A ENT DL06 Micro PLC User Manual, 1st Ed., Rev. A 567 Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data Out Least (OUTL) The Out Least instruction copies the value in the lower eight O UT L bits of the accumulator to the lower eight bits of the specified A aaa V-memory location (i.e., it copies the low byte of the low word of the accumulator). In the following example, when X1 is on, the value in V1400 will be loaded into the lower 16 bits of the accumulator using the Load instruction. The value in the lower 8 bits of the accumulator are copied to V1500 using the Out Least instruction. DirectSOFT32 X1 LD V1400 OUTL V1500 Handheld Programmer Keystrokes $ STR SHFT GX OUT L ANDST SHFT D 3 L ANDST B 1 B 1 ENT B 1 F 5 E 4 A 0 A 0 A 0 A 0 0 ENT V1500 ENT 0 3 5 Load the value in V1400 into the lower 16 bits of the accumulater Copy the value in the lower 8 bits of the accumulator to V1500 V1400 8 The unused accumulator bits are set to zero Acc. 0 0 0 0 8 9 3 5 9 3 5 Out Most (OUTM) The Out Most instruction copies the value in the upper eight bits of the lower sixteen bits of the accumulator to the upper eight bits of the specified V-memory location (i.e., it copies the high byte of the low word of the accumulator). Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P O UT M A aaa DL06 Range aaa See memory map See memory map In the following example, when X1 is on, the value in V1400 will be loaded into the lower 16 bits of the accumulator using the Load instruction. The value in the upper 8 bits of the lower 16 bits of the accumulator are copied to V1500 using the Out Most instruction. DirectSOFT32 X1 LD V1400 OUTM V1500 Load the value in V1400 into the lower 16 bits of the accumulator Copy the value in the upper 8 bits of the lower 16 bits of the accumulator to 1500 V1400 8 The unused accumulator bits are set to zero Acc. 0 0 0 0 8 9 3 5 9 3 5 Handheld Programmer Keystrokes $ STR SHFT GX OUT L ANDST SHFT D 3 M ORST B 1 B 1 ENT B 1 F 5 E 4 A 0 A 0 A 0 A 0 ENT ENT 8 9 0 0 V1500 568 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Logical Logical Instructions (Accumulator) And (AND) The And instruction is a 16 bit instruction that logically ands the value in the lower 16 bits of the accumulator with a specified V memory location (Aaaa). The result resides in the accumulator. The discrete status flag indicates if the result of the And is zero. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P AND A aaa DL06 Range aaa See memory map See memory map Discrete Bit Flags SP63 SP70 Description Will be on if the result in the accumulator is zero. on when the value loaded into the accumulator by any instruction is zero. NOTE: The status flags are only valid until another instruction that uses the same flags is executed. In the following example, when X1 is on, the value in V2000 will be loaded into the accumulator using the Load instruction. The value in the accumulator is anded with the value in V2006 using the And instruction. The value in the lower 16 bits of the accumulator is output to V2010 using the Out instruction. Direct SOFT32 X1 LD V2000 Load the value in V2000 into the lower 16 bits of the accumulator Acc. AND V2006 AND the value in the accumulator with the value in V2006 Acc. 6A38 AND (V2006) Acc. OUT V2010 Copy the lower 16 bits of the accumulator to V2010 Handheld Programmer Keystrokes $ STR SHFT V AND GX OUT L ANDST D 3 SHFT SHFT V AND V AND C 2 C 2 A 0 B 1 ENT C 2 A 0 B 1 A 0 A 0 A 0 A 0 G 6 A 0 ENT ENT ENT 2 8 3 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 The upper 16 bits of the accumulator will be set to 0 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 8 0 7 0 6 5 1 1 4 3 1 1 2 0 1 1 0 0 2 V2000 8 7 A V2010 DL06 Micro PLC User Manual, 1st Ed., Rev. A 569 Chapter 5: Standard RLL Instructions - Logical And Double (ANDD) The And Double is a 32 bit instruction that logically ands the value in the accumulator with two consecutive V memory locations or an 8 digit (max.) constant value (Aaaa). The result resides in the accumulator. Discrete status flags indicate if the result of the And Double is zero or a negative number (the most significant bit is on). Operand Data Type V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K ANDD K aaa DL06 Range aaa See memory map See memory map 0FFFFFFFF Discrete Bit Flags SP63 SP70 Description Will be on if the result in the accumulator is zero. Will be on if the result in the accumulator is negative NOTE: The status flags are only valid until another instruction that uses the same flags is executed. In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into the accumulator using the Load Double instruction. The value in the accumulator is anded with 36476A38 using the And Double instruction. The value in the accumulator is output to V2010 and V2011 using the Out Double instruction. Direct SOFT32 X1 LDD V2000 Load the value in V2000 and V2001 into the accumulator Acc. ANDD K36476A38 AND the value in the accumulator with the constant value 36476A38 Acc. AND 36476A38 Acc. 0 0 0 1 0 0 0 1 0 1 1 0 1 0 0 0 1 1 1 0 1 0 5 V2000 4 7 E 2 V2000 8 7 A 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 8 0 7 0 6 5 1 1 4 3 1 1 2 0 1 1 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 1 0 0 1 0 0 1 1 0 1 1 1 0 1 0 1 0 0 0 0 0 1 0 1 1 1 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 1 0 0 0 0 0 OUTD V2010 Copy the value in the accumulator to V2010 and V2011 1 4 4 6 2 8 3 8 V2011 V2010 Handheld Programmer Keystrokes $ STR SHFT V AND GX OUT L ANDST SHFT SHFT D 3 D 3 D 3 B 1 ENT D 3 SHFT C 2 C 2 K JMP A 0 D 3 B 1 A 0 A 0 G 6 A 0 E 4 ENT A 0 ENT H 7 G 6 SHFT A 0 SHFT D 3 I 8 ENT 570 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Logical And Formatted (ANDF) The And Formatted instruction logically ANDs the binary value in the accumulator and a specified range of discrete memory bits (132). The instruction requires a starting location (Aaaa) and number of bits (Kbbb) to be ANDed. Discrete status flags indicate if the result is zero or a negative number (the most significant bit =1). Operand Data Type ....................................B Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C Stage Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S Timer Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter Bits . . . . . . . . . . . . . . . . . . . . . . . . . . CT Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . SP Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K ANDF A aaa K bbb DL06 Range aaa 0-777 0-777 0-1777 0-1777 0-377 177 0-777 - bbb 1-32 Discrete Bit Flags SP63 SP70 Description Will be on if the result in the accumulator is zero. Will be on if the result in the accumulator is negative NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on the Load Formatted instruction loads C10C13 (4 binary bits) into the accumulator. The accumulator contents is logically ANDed with the bit pattern from Y20Y23 using the And Formatted instruction. The Out Formatted instruction outputs the accumulators lower four bits to C20C23. DirectSOFT32 X1 LDF K4 Load the status of 4 consecutive bits (C10-C13) into the accumulator ANDF K4 And the binary bit pattern (Y20-Y23) with the value in the accumulator OUTF K4 Copy the value in the lower 4 bits in accumulator to C20-C23 Handheld Programmer Keystrokes $ STR SHFT V AND GX OUT L ANDST SHFT SHFT D 3 F 5 F 5 B 1 ENT F 5 NEXT PREV NEXT C 2 PREV C 2 NEXT A 0 A 0 NEXT NEXT E 4 B 1 ENT E 4 ENT A 0 E 4 ENT Location C20 Constant K4 C23 C22 C21 C20 ON OFF OFF OFF C20 Acc. 0 0 0 0 0 0 0 0 0 0 0 Acc. AND (Y20-Y23) Y20 C10 Location C10 Constant K4 C13 C12 C11 C10 ON ON ON OFF The unused accumulator bits are set to zero 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 7 6 5 0 0 0 4 3 0 1 2 1 0 0 1 1 Accumulator 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 1 0 0 0 0 0 Y23 Y22 Y21 Y20 ON OFF OFF OFF DL06 Micro PLC User Manual, 1st Ed., Rev. A 571 ndard RLL Chapter 5: Standard RLL Instructions - Logical And with Stack (ANDS) The And with Stack instruction is a 32 bit instruction that logically ands the value in the accumulator with the first level of the accumulator stack. The result resides in the accumulator. The value in the first level of the accumulator stack is removed from the stack and all values are moved up one level. Discrete status flags indicate if the result of the And with Stack is zero or a negative number (the most significant bit is on). Discrete Bit Flags SP63 SP70 ANDS Description Will be on if the result in the accumulator is zero. Will be on if the result in the accumulator is negative NOTE: Status flags are valid only until another instruction uses the same flag. In the following example when X1 is on, the binary value in the accumulator will be anded with the binary value in the first level or the accumulator stack. The result resides in the accumulator. The 32 bit value is then output to V1500 and V1501. DirectSOFT32 X1 LDD V1400 Load the value in V1400 and 1401 into the accumulator 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 Acc. ANDS Acc. AND the value in the accumulator with the first level of the accumulator stack OUTD V1500 Copy the value in the accumulator to V1500 and 1501 Handheld Programmer Keystrokes $ STR SHFT V AND GX OUT L ANDST SHFT SHFT D 3 S RST D 3 B 1 ENT D 3 ENT B 1 F 5 A 0 A 0 ENT B 1 E 4 A 0 A 0 ENT 1 4 4 6 2 8 3 8 V1501 36476A38 AND (top of stack) Acc. 0 0 0 0 1 1 0 1 0 1 1 0 0 0 1 0 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 1 0 1 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 0 0 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 8 7 0 0 6 5 1 1 4 3 1 2 1 1 0 0 5 V1401 4 7 E 2 V1400 8 7 A 1 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 V1500 572 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Logical Or (OR) The Or instruction is a 16 bit instruction that logically ors the value in the lower 16 bits of the accumulator with a specified V memory location (Aaaa). The result resides in the accumulator. The discrete status flag indicates if the result of the Or is zero. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P OR A aaa DL06 Range aaa See memory map See memory map Discrete Bit Flags SP63 SP70 Description Will be on if the result in the accumulator is zero. on when the value loaded into the accumulator by any instruction is zero. NOTE: The status flags are only valid until another instruction that uses the same flags is executed. In the following example, when X1 is on, the value in V2000 will be loaded into the accumulator using the Load instruction. The value in the accumulator is ored with V2006 using the Or instruction. The value in the lower 16 bits of the accumulator are output to V2010 using the Out instruction. Direct SOFT32 X1 LD V2000 Load the value in V2000 into the lower 16 bits of the accumulator Acc. OR V2006 Or the value in the accumulator with the value in V2006 Acc. 6A38 OR (V2006) Acc. OUT V2010 Copy the value in the lower 16 bits of the accumulator to V2010 Handheld Programmer Keystrokes $ STR SHFT Q OR GX OUT L ANDST D 3 SHFT SHFT V AND V AND C 2 C 2 A 0 B 1 ENT C 2 A 0 B 1 A 0 A 0 A 0 A 0 G 6 A 0 ENT ENT ENT 6 A 7 A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 1 1 1 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 0 0 The upper 16 bits of the accumulator will be set to 0 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 8 0 7 0 6 5 1 1 4 3 1 1 2 0 1 1 0 0 2 8 V2000 7 A V2010 DL06 Micro PLC User Manual, 1st Ed., Rev. A 573 Chapter 5: Standard RLL Instructions - Logical Or Double (ORD) The Or Double is a 32 bit instruction that ors the value in the accumulator with the value (Aaaa), which is either two consecutive V memory locations or an 8 digit (max.) constant value. The result resides in the accumulator. Discrete status flags indicate if the result of the Or Double is zero or a negative number (the most significant bit is on). Operand Data Type V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K ORD K aaa DL06 Range aaa See memory map See memory map 0FFFFFFFF Discrete Bit Flags SP63 SP70 Description Will be on if the result in the accumulator is zero. Will be on if the result in the accumulator is negative NOTE: The status flags are only valid until another instruction that uses the same flags is executed. In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into the accumulator using the Load Double instruction. The value in the accumulator is ored with 36476A38 using the Or Double instruction. The value in the accumulator is output to V2010 and V2011 using the Out Double instruction. Direct SOFT32 X1 LDD V2000 Load the value in V2000 and V2001 into accumulator 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 Acc. ORD K36476A38 OR the value in the accumulator with the constant value 36476A38 OUTD V2010 Copy the value in the accumulator to V2010 and V2011 Handheld Programmer Keystrokes $ STR SHFT Q OR GX OUT L ANDST SHFT SHFT D 3 D 3 D 3 B 1 ENT D 3 SHFT C 2 C 2 K JMP A 0 D 3 B 1 A 0 A 0 G 6 A 0 E 4 ENT A 0 ENT H 7 G 6 SHFT A 0 SHFT D 3 I 8 ENT 7 6 7 F 6 A 7 A Acc. OR 36476A38 Acc. 0 0 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 0 1 1 1 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1 1 0 0 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 1 1 1 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 0 0 0 1 0 1 0 0 0 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 8 0 7 0 6 5 1 1 4 3 1 1 2 0 1 1 0 0 V2001 5 4 7 E 2 V2000 8 7 A V2011 V2010 574 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Logical Or Formatted (ORF) The Or Formatted instruction logically ORs the binary value in the accumulator and a specified range of discrete bits (132). The instruction requires a starting location (Aaaa) and the number of bits (Kbbb) to be ORed. Discrete status flags indicate if the result is zero or negative (the most significant bit =1). Operand Data Type A/B Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C Stage Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S Timer Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter Bits . . . . . . . . . . . . . . . . . . . . . . . . . . CT Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . SP Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K ORF K bbb A aaa DL06 Range bbb -------1-32 aaa 0-777 0-777 0-1777 0-1777 0-377 0-177 0-777 - Discrete Bit Flags SP63 SP70 Description Will be on if the result in the accumulator is zero. on when the value loaded into the accumulator by any instruction is zero. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on the Load Formatted instruction loads C10C13 (4 binary bits) into the accumulator. The Or Formatted instruction logically ORs the accumulator contents with Y20Y23 bit pattern. The Out Formatted instruction outputs the accumulators lower four bits to C20C23. DirectSOFT32 X1 LDF K4 Load the status fo 4 consecutive bits (C10-C13) into the accumulator ORF K4 OR the binary bit pattern (Y20 - Y23) with the value in the accumulator OUTF K4 Copy the specified number of bits from the accumulator to C20-C23 Handheld Programmer Keystrokes $ STR SHFT Q OR GX OUT L ANDST SHFT SHFT D 3 F 5 F 5 B 1 Location ENT F 5 NEXT PREV NEXT C 2 PREV C 2 NEXT A 0 A 0 NEXT NEXT E 4 B 1 ENT E 4 ENT A 0 E 4 ENT C20 Constant K4 C23 C22 C21 C20 ON ON ON OFF C20 OR (Y20- Y23) Acc. Y20 Acc. C10 Location C10 Constant K4 C13 C12 C11 C10 OFF ON ON OFF The unused accumulator bits are set to zero 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 7 6 5 0 0 0 4 3 0 0 2 1 0 0 1 1 Y23 Y22 Y21 Y20 ON OFF OFF OFF 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 DL06 Micro PLC User Manual, 1st Ed., Rev. A 575 Chapter 5: Standard RLL Instructions - Logical Or with Stack (ORS) The Or with Stack instruction is a 32 bit instruction that logically ors the value in the accumulator with the first level of the accumulator stack. The result resides in the accumulator. The value in the first level of the accumulator stack is removed from the stack and all values are moved up one level. Discrete status flags indicate if the result of the Or with Stack is zero or a negative number (the most significant bit is on). Discrete Bit Flags SP63 SP70 OR S Description Will be on if the result in the accumulator is zero. on when the value loaded into the accumulator by any instruction is zero. In the following example when X1 is on, the binary value in the accumulator will be ored with the binary value in the first level of the stack. The result resides in the accumulator. DirectSOFT32 X1 LDD V1400 Load the value in V1400 and V1401 in the accumulator 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 Acc. ORS Acc. OR the value in the accumulator with the value in the first level of the accumulator stack OUTD V1500 Copy the value in the accumulator to V1500 and V1501 36476A38 OR (top of stack) Acc. 0 0 0 1 0 1 0 0 1 1 1 0 1 0 1 1 0 0 0 0 0 1 1 1 0 1 0 1 1 0 1 1 0 0 0 0 0 1 1 1 0 1 0 1 0 0 1 1 0 0 0 0 1 1 1 1 1 1 0 1 0 1 0 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 8 7 0 0 6 5 1 1 4 3 1 2 1 1 0 0 5 V1401 4 7 E 2 V1400 8 7 A 1 0 0 1 0 1 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 0 0 0 0 1 1 0 0 1 0 0 0 1 0 7 6 7 F 6 A 7 A V1501 V1500 Handheld Programmer Keystrokes $ STR SHFT Q OR GX OUT L ANDST SHFT SHFT D 3 S RST D 3 B 1 ENT D 3 ENT B 1 F 5 A 0 A 0 ENT B 1 E 4 A 0 A 0 ENT 576 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Logical Exclusive Or (XOR) The Exclusive Or instruction is a 16 bit instruction that performs an exclusive or of the value in the lower 16 bits of the accumulator and a specified V memory location (Aaaa). The result resides in the in the accumulator. The discrete status flag indicates if the result of the XOR is zero. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P XOR A aaa DL06 Range aaa See memory map See memory map Discrete Bit Flags SP63 SP70 Description Will be on if the result in the accumulator is zero. on when the value loaded into the accumulator by any instruction is zero. NOTE: The status flags are only valid until another instruction that uses the same flags is executed. In the following example, when X1 is on, the value in V2000 will be loaded into the accumulator using the Load instruction. The value in the accumulator is exclusive ored with V2006 using the Exclusive Or instruction. The value in the lower 16 bits of the accumulator are output to V2010 using the Out instruction. Direct SOFT32 X1 LD V2000 Load the value in V2000 into the lower 16 bits of the accumulator Acc. XOR V2006 XOR the value in the accumulator with the value in V2006 Acc. 6A38 XOR (V2006) Acc. OUT V2010 Copy the lower 16 bits of the accumulator to V2010 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST X SET SHFT D 3 SHFT SHFT Q OR V AND C 2 X SET B 1 SHFT ENT V AND SHFT A 0 C 2 V AND B 1 C 2 A 0 A 0 A 0 ENT A 0 A 0 A 0 ENT G 6 ENT 4 2 4 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 1 1 0 1 1 0 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 The upper 16 bits of the accumulator will be set to 0 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 8 0 7 0 6 5 1 1 4 3 1 1 2 0 1 1 0 0 V2000 2 8 7 A V2010 DL06 Micro PLC User Manual, 1st Ed., Rev. A 577 Chapter 5: Standard RLL Instructions - Logical Exclusive Or Double (XORD) The Exclusive OR Double is a 32 bit instruction that performs an exclusive or of the value in the accumulator and the value (Aaaa), which is either two consecutive V memory locations or an 8 digit (max.) constant. The result resides in the accumulator. Discrete status flags indicate if the result of the Exclusive Or Double is zero or a negative number (the most significant bit is on). Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K XORD K aaa DL06 Range aaa See memory map See memory map 0FFFFFFFF Discrete Bit Flags SP63 SP70 Description Will be on if the result in the accumulator is zero. Will be on if the result in the accumulator is negative NOTE: The status flags are only valid until another instruction that uses the same flags is executed. In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into the accumulator using the Load Double instruction. The value in the accumulator is exclusively ored with 36476A38 using the Exclusive Or Double instruction. The value in the accumulator is output to V2010 and V2011 using the Out Double instruction. Direct SOFT32 X1 LDD V2000 Load the value in V2000 and V2001 into the accumulator XORD K36476A38 XORD the value in the accumulator with the constant value 36476A38 OUTD V2010 Copy the value in the accumulator to V2010 and V2011 Handheld Programmer Keystrokes $ STR SHFT SHFT D 3 GX OUT L ANDST X SET G 6 SHFT D 3 E 4 D 3 Q OR B 1 ENT D 3 SHFT H 7 C 2 D 3 G 6 SHFT A 0 C 2 A 0 SHFT A 0 B 1 A 0 K JMP SHFT A 0 D 3 ENT I 8 ENT A 0 ENT Acc. XORD 36476A38 Acc. 0 0 0 1 0 1 0 0 1 0 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 0 0 0 0 0 0 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 1 1 0 1 1 0 1 1 0 0 0 0 1 0 1 0 0 0 Acc. 5 V2001 4 7 E 2 V2000 8 7 A 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 8 0 7 0 6 5 1 1 4 3 1 1 2 0 1 1 0 0 6 2 3 9 4 2 4 2 V2011 V2010 578 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Logical Exclusive Or Formatted (XORF) The Exclusive Or Formatted instruction performs an XO R F A aaa exclusive OR of the binary value in the accumulator and a K bbb specified range of discrete memory bits (132). The instruction requires a starting location (Aaaa) and the number of bits (Bbbb) to be exclusive ORed. Discrete status flags indicate if the result of the Exclusive Or Formatted is zero or negative (the most significant bit =1). Operand Data Type DL06 Range A/B Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C Stage Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S Timer Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter Bits . . . . . . . . . . . . . . . . . . . . . . . . . . CT Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . SP Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K aaa 0-777 0-777 0-1777 0-1777 0-377 177 0-777 - bbb 1-32 Discrete Bit Flags SP63 SP70 Description Will be on if the result in the accumulator is zero. on when the value loaded into the accumulator by any instruction is zero. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the binary pattern of C10C13 (4 bits) will be loaded into the accumulator using the Load Formatted instruction. The value in the accumulator will be logically Exclusive Ored with the bit pattern from Y20Y23 using the Exclusive Or Formatted instruction. The value in the lower 4 bits of the accumulator are output to C20C23 using the Out Formatted instruction. DirectSOFT32 X1 Location LDF K4 Load the status of 4 consecutive bits (C10-C13) into the accumulator X0RF K4 Exclusive OR the binary bit pattern (Y20-Y23) with the value in the accumulator OUTF K4 Copy the specified number of bits from the accumulator to C20-C23 Location Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST X SET SHFT D 3 Q OR F 5 B 1 ENT F 5 SHFT F 5 PREV PREV NEXT NEXT NEXT C 2 NEXT C 2 A 0 NEXT A 0 E 4 B 1 E 4 ENT A 0 ENT E 4 ENT C20 Constant K4 C23 C22 C21 C20 ON ON ON OFF C20 Acc. 0 0 0 0 0 0 0 0 0 0 0 Acc. Y20 The unused accumulator bits are set to zero 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 7 6 5 0 0 0 4 3 0 0 2 1 0 0 C10 C10 Constant K4 C13 C12 C11 C10 OFF ON ON OFF 1 1 Accumulator 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 1 0 1 0 0 0 Y23 Y22 Y21 Y20 XORF (Y20-Y23) ON OFF OFF OFF DL06 Micro PLC User Manual, 1st Ed., Rev. A Standard RLL 579 Chapter 5: Standard RLL Instructions - Logical Exclusive Or with Stack (XORS) The Exclusive Or with Stack instruction is a 32 bit instruction that performs an exclusive or of the value in the accumulator with the first level of the accumulator stack. The result resides in the accumulator. The value in the first level of the accumulator stack is removed from the stack and all values are moved up one level. Discrete status flags indicate if the result of the Exclusive Or with Stack is zero or a negative number (the most significant bit is on). NOTE: Status flags are valid only until another instruction uses the same flag. XO R S Discrete Bit Flags SP63 SP70 Description Will be on if the result in the accumulator is zero. on when the value loaded into the accumulator by any instruction is zero. In the following example when X1 is on, the binary value in the accumulator will be exclusive ored with the binary value in the first level of the accumulator stack. The result will reside in the accumulator. DirectSOFT32 X1 LDD V1400 Load the value in V1400 and V1401 into the accumulator 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 Acc. XORS Acc. Exclusive OR the value in the accumulator with the value in the first level of the accumulator stack OUTD V1500 Copy the value in the accumulator to V1500 and V1501 6 2 3 9 4 2 4 2 V1501 V1500 0 1 0 1 0 0 1 1 1 1 0 0 0 0 0 1 1 0 1 0 1 1 0 0 0 0 0 0 0 1 1 0 1 0 1 0 1 0 1 0 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0 0 0 0 1 1 1 0 1 0 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 1 1 0 1 1 0 1 0 1 0 0 0 1 0 1 0 0 0 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 8 7 0 0 6 5 1 1 4 3 1 2 1 1 0 0 5 V1401 4 7 E 2 V1400 8 7 A 1 0 36476A38 XOR (1st level of Stack) 0 Acc. 0 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST X SET SHFT D 3 Q OR D 3 B 1 ENT D 3 SHFT S RST B 1 B 1 ENT F 5 A 0 A 0 ENT E 4 A 0 A 0 ENT 580 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Logical Compare (CMP) The compare instruction is a 16 bit instruction that compares the value in the lower 16 bits of the accumulator with the value in a specified V memory location (Aaaa). The corresponding status flag will be turned on indicating the result of the comparison. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P CMP A aaa DL06 Range aaa See memory map See memory map Discrete Bit Flags SP60 SP61 SP62 Description On when the value in the accumulator is less than the instruction value. On when the value in the accumulator is equal to the instruction value. On when the value in the accumulator is greater than the instruction value. NOTE: The status flags are only valid until another instruction that uses the same flags is executed. In the following example when X1 is on, the constant 4526 will be loaded into the lower 16 bits of the accumulator using the Load instruction. The value in the accumulator is compared with the value in V2000 using the Compare instruction. The corresponding discrete status flag will be turned on indicating the result of the comparison. In this example, if the value in the accumulator is less than the value specified in the Compare instruction, SP60 will turn on energizing C30. Direct SOFT32 X1 LD K4526 Load the constant value 4526 into the lower 16 bits of the accumulator 4 CONSTANT 5 2 6 The unused accumulator bits are set to zero Acc. 0 0 0 0 44 55 22 66 CMP V2000 Compare the value in the accumulator with the value in V2000 SP60 C30 8 Compared with 9 4 5 V2000 Handheld Programmer Keystrokes $ STR SHFT SHFT $ STR GX OUT L ANDST C 2 D 3 SHFT SHFT SHFT M ORST SP STRN C 2 B 1 ENT SHFT P CV G 6 D 3 A 0 A 0 K JMP E 4 C 2 ENT ENT A 0 F 5 A 0 C 2 A 0 G 6 ENT ENT DL06 Micro PLC User Manual, 1st Ed., Rev. A 581 Chapter 5: Standard RLL Instructions Logical Compare Double (CMPD) The Compare Double instruction is a 32bit instruction that compares the value in the accumulator with the value (Aaaa), which is either two consecutive V memory locations or an 8digit (max.) constant. The corresponding status flag will be turned on indicating the result of the comparison. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K CMPD A aaa DL06 Range aaa See memory map See memory map 0FFFFFFFF Discrete Bit Flags SP60 SP61 SP62 Description On when the value in the accumulator is less than the instruction value. On when the value in the accumulator is equal to the instruction value. On when the value in the accumulator is greater than the instruction value. NOTE: The status flags are only valid until another instruction that uses the same flags is executed. In the following example when X1 is on, the value in V2000 and V2001 will be loaded into the accumulator using the Load Double instruction. The value in the accumulator is compared with the value in V2010 and V2011 using the CMPD instruction. The corresponding discrete status flag will be turned on indicating the result of the comparison. In this example, if the value in the accumulator is less than the value specified in the Compare instruction, SP60 will turn on energizing C30. Direct SOFT32 X1 LDD V2000 Load the value in V2000 and V2001 into the accumulator Acc. 4 5 2 6 77 72 9 9 V2001 4 5 2 6 7 V2000 2 9 9 CMPD V2010 Compare the value in the accumulator with the value in V2010 and V2011 SP60 C30 6 7 3 Compared with 9 5 0 2 6 V2011 V2010 Handheld Programmer Keystrokes $ STR SHFT SHFT $ STR GX OUT L ANDST C 2 D 3 SHFT SHFT SHFT B 1 ENT D 3 M ORST SP STRN C 2 P CV G 6 D 3 A 0 A 0 D 3 ENT ENT C 2 A 0 C 2 A 0 A 0 A 0 ENT B 1 A 0 ENT 582 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Logical Compare Formatted (CMPF) The Compare Formatted compares the value in the accumulator with a specified number of discrete locations (132). The instruction requires a starting location (Aaaa) and the number of bits (Kbbb) to be compared. The corresponding status flag will be turned on indicating the result of the comparison. Operand Data Type ..................................... Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . Stage Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Timer Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Counter Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B X Y C S T CT SP K aaa 0-777 0-777 0-1777 0-1777 0-377 0-177 0-777 - C MP F A aaa K bbb DL06 Range bbb 1-32 Discrete Bit Flags SP60 SP61 SP62 Description On when the value in the accumulator is less than the instruction value. On when the value in the accumulator is equal to the instruction value. On when the value in the accumulator is greater than the instruction value. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on the Load Formatted instruction loads the binary value (6) from C10C13 into the accumulator. The CMPF instruction compares the value in the accumulator to the value in Y20Y23 (E hex). The corresponding discrete status flag will be turned on indicating the result of the comparison. In this example, if the value in the accumulator is less than the value specified in the Compare instruction, SP60 will turn on energizing C30. DirectSOFT32 X1 LDF K4 C10 Load the value of the specified discrete locations (C10- C13) into the accumulator Compare the value in the accumulator with the value of the specified discrete location (Y20- Y23) Location C10 The unused accumulator bits are set to zero 0 0 0 0 0 0 0 6 Constant K4 C13 C12 C11 C10 OFF ON ON OFF CMPF K4 SP60 Y20 Acc. Y23 Y22 Y21 Y20 ON ON ON OFF C30 OUT Compared with E DL06 Micro PLC User Manual, 1st Ed., Rev. A 583 Chapter 5: Standard RLL Instructions - Logical Compare with Stack (CMPS) The Compare with Stack instruction is a 32-bit instruction that compares the value in the accumulator with the value in the first level of the accumulator stack. The corresponding status flag will be turned on indicating the result of the comparison. This does not affect the value in the accumulator. Discrete Bit Flags Description SP60 SP61 SP62 C MP S On when the value in the accumulator is less than the instruction value. On when the value in the accumulator is equal to the instruction value. On when the value in the accumulator is greater than the instruction value. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example when X1 is on, the value in V1400 and V1401 is loaded into the accumulator using the Load Double instruction. The value in V1410 and V1411 is loaded into the accumulator using the Load Double instruction. The value that was loaded into the accumulator from V1400 and V1401 is placed on top of the stack when the second Load instruction is executed. The value in the accumulator is compared with the value in the first level or the accumulator stack using the CMPS instruction. The corresponding discrete status flag will be turned on indicating the result of the comparison. In this example, if the value in the accumulator is less than the value in the stack, SP60 will turn on, energizing C30. DirectSOFT32 V1401 LDD V1400 Load the value in V1410 and V1411 into the accumulator V1410 CMPS Compare the value in the accumulator with the value in the first level of the accumulator stack V1411 5 0 0 V1410 5 4 4 Acc. 6 5 0 0 3 5 4 4 Load the value in V1400 and V1401 into the accumulator 6 5 0 0 3 V1400 5 4 4 X1 LDD 5 3 SP60 C30 OUT Acc. 5 5 0 0 3 5 4 4 Handheld Programmer Keystrokes $ STR SHFT SHFT SHFT $ STR GX OUT L ANDST L ANDST C 2 PREV D 3 D 3 SHFT G 6 NEXT D 3 M ORST A 0 NEXT P CV ENT NEXT SHFT C 2 D 3 A 0 ENT B 1 ENT D 3 B 1 S RST B 1 E 4 ENT E 4 B 1 A 0 A 0 A 0 ENT ENT Compared with Top of Stack 584 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Logical Compare Real Number (CMPR) The Compare Real Number instruction compares a real number value in the accumulator with two consecutive V memory locations containing a real number. The corresponding status flag will be turned on indicating the result of the comparison. Both numbers being compared are 32 bits long. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . R C MP R A aaa DL06 Range aaa See memory map See memory map -3.402823E+038 to + -3.402823E+038 Discrete Bit Flags SP60 SP61 SP62 SP71 SP75 Description On when the value in the accumulator is less than the instruction value. On when the value in the accumulator is equal to the instruction value. On when the value in the accumulator is greater than the instruction value. On anytime the V-memory specified by a pointer (P) is not valid On if a BCD number is expected and a nonBCD number is encountered. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example when X1 is on, the LDR instruction loads the real number representation for 7 decimal into the accumulator. The CMPR instruction compares the accumulator contents with the real representation for decimal 6. Since 7 > 6, the corresponding discrete status flag is turned on (special relay SP60). DirectSOFT32 X1 LDR R7.0 Acc. CMPR R6.0 CMPR SP60 C1 OUT 4 0 D 0 0 0 0 0 4 0 E 0 0 0 0 0 DL06 Micro PLC User Manual, 1st Ed., Rev. A 585 Chapter 5: Standard RLL Instructions -Math Math Instructions Add (ADD) Add is a 16 bit instruction that adds a BCD value in the accumulator with a BCD value in a V memory location (Aaaa). The result resides in the accumulator. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P ADD A aaa DL06 Range aaa See memory map See memory map Discrete Bit Flags SP63 SP66 SP67 SP70 SP75 Description On when the result of the instruction causes the value in the accumulator to be zero. On when the 16 bit addition instruction results in a carry. On when the 32 bit addition instruction results in a carry. On anytime the value in the accumulator is negative. On when a BCD instruction is executed and a NONBCD number was encountered. NOTE: The status flags are only valid until another instruction that uses the same flags is executed. In the following example, when X1 is on, the value in V2000 will be loaded into the accumulator using the Load instruction. The value in the lower 16 bits of the accumulator are added to the value in V2006 using the Add instruction. The value in the accumulator is copied to V2010 using the Out instruction. Direct SOFT32 X1 LD V2000 Load the value in V2000 into the lower 16 bits of the accumulator ADD V2006 Add the value in the lower 16 bits of the accumulator with the value in V2006 OUT V2010 Copy the value in the lower 16 bits of the accumulator to V2010 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST A 0 D 3 D 3 SHFT D 3 V AND C 2 A 0 B 1 ENT C 2 C 2 B 1 A 0 A 0 A 0 A 0 A 0 A 0 ENT G 6 ENT ENT 7 4 3 5 The unused accumulator bits are set to zero 0 0 0 0 4 + Acc. 2 7 4 V2000 9 3 5 9 5 4 3 0 3 5 0 5 (Accumulator) (V2006) V2010 586 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions -Math Add Double (ADDD) Add Double is a 32 bit instruction that adds the BCD value in the accumulator with a BCD value (Aaaa), which is either two consecutive V memory locations or an 8digit (max.) BCD constant. The result resides in the accumulator. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K ADDD A aaa DL06Range aaa See memory map See memory map 099999999 Discrete Bit Flags SP63 SP66 SP67 SP70 SP75 Description On when the result of the instruction causes the value in the accumulator to be zero. On when the 16 bit addition instruction results in a carry. On when the 32 bit addition instruction results in a carry. On anytime the value in the accumulator is negative. On when a BCD instruction is executed and a NONBCD number was encountered. NOTE: The status flags are only valid until another instruction that uses the same flags is executed. In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into the accumulator using the Load Double instruction. The value in the accumulator is added with the value in V2006 and V2007 using the Add Double instruction. The value in the accumulator is copied to V2010 and V2011 using the Out Double instruction. Direct SOFT32 X1 LD V2000 Load the value in V2000 into the lower 16 bits of the accumulator ADD V2006 Add the value in the lower 16 bits of the accumulator with the value in V2006 OUT V2010 Copy the value in the lower 16 bits of the accumulator to V2010 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST A 0 D 3 D 3 SHFT D 3 V AND C 2 A 0 B 1 ENT C 2 C 2 B 1 A 0 A 0 A 0 A 0 A 0 A 0 ENT G 6 ENT ENT 7 4 3 5 The unused accumulator bits are set to zero 0 0 0 0 4 + Acc. 2 7 4 V2000 9 3 5 9 5 4 3 0 3 5 0 5 (Accumulator) (V2006) V2010 DL06 Micro PLC User Manual, 1st Ed., Rev. A 587 Chapter 5: Standard RLL Instructions - Math Add Real (ADDR) The Add Real instruction adds a real number in the accumulator with either a real constant or a real number occupying two consecutive Vmemory locations. The result resides in the accumulator. Both numbers must conform to the IEEE floating point format. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . R ADDR A aaa DL06 Range aaa See memory map See memory map -3.402823E +038 to+-3.402823E +038 Discrete Bit Flags SP63 SP70 SP71 SP72 SP73 SP74 SP75 Description On when the result of the instruction causes the value in the accumulator to be zero. On anytime the value in the accumulator is negative. On anytime the V-memory specified by a pointer (P) is not valid. On anytime the value in the accumulator is an invalid floating point number. on when a signed addition or subtraction results in a incorrect sign bit. On anytime a floating point math operation results in an underflow error. On if a BCD number is expected and a nonBCD number is encountered. NOTE: Status flags are valid only until another instruction uses the same flag. DirectSOFT32 X1 LDR R7.0 Load the real number 7.0 into the accumulator 7 + 1 2 ADDR R15.0 Add the real number 15.0 to the accumulator contents, which is in real number format. 4 V1401 1 B 0 0 V1400 0 0 0 (Hex number) 5 2 (decimal) 4 + 4 Acc. 4 0 1 1 E 7 B 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (Accumulator) (ADDR) 4 0 E 0 0 0 0 0 Real Value 8 4 OUTD V1400 Copy the result in the accumulator to V1400 and V1401. Acc. 0 1 2 0 1 0 8 0 4 2 0 0 1 1 8 1 4 0 2 1 1 1 8 0 4 0 2 0 1 0 8 4 0 0 2 0 1 0 8 0 4 2 0 0 1 0 8 0 4 0 2 1 0 0 8 0 4 0 2 0 1 0 Sign Bit Exponent (8 bits) Mantissa (23 bits) 128 + 2 + 1 = 131 131 - 127 = 4 Implies 2 (exp 4) 1.011 x 2 (exp 4) = 10110. binary= 22 decimal NOTE: The current HPP does not support real number entry with automatic conversion to the 32-bit IEEE format. You must use DirectSOFT32 for this feature. 588 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions -Math Subtract (SUB) Subtract is a 16 bit instruction that subtracts the BCD value (Aaaa) in a V memory location from the BCD value in the lower 16 bits of the accumulator. The result resides in the accumulator. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P SUB A aaa DL06Range aaa See memory map See memory map Discrete Bit Flags SP63 SP64 SP65 SP70 SP75 Description On when the result of the instruction causes the value in the accumulator to be zero. On when the 16 bit subtraction instruction results in a borrow On when the 32 bit subtraction instruction results in a borrow On anytime the value in the accumulator is negative. On when a BCD instruction is executed and a NONBCD number was encountered. NOTE: The status flags are only valid until another instruction that uses the same flags is executed. In the following example, when X1 is on, the value in V2000 will be loaded into the accumulator using the Load instruction. The value in V2006 is subtracted from the value in the accumulator using the Subtract instruction. The value in the accumulator is copied to V2010 using the Out instruction. DL06 Micro PLC User Manual, 1st Ed., Rev. A 589 Chapter 5: Standard RLL Instructions - Math Subtract Double (SUBD) Subtract Double is a 32 bit instruction that subtracts the BCD value (Aaaa), which is either two consecutive V memory locations or an 8digit (max.) constant, from the BCD value in the accumulator. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K SUBD A aaa DL06 Range aaa See memory map See memory map 099999999 Discrete Bit Flags SP63 SP64 SP65 SP70 SP75 Description On when the result of the instruction causes the value in the accumulator to be zero. On when the 16 bit subtraction instruction results in a borrow On when the 32 bit subtraction instruction results in a borrow On anytime the value in the accumulator is negative. On when a BCD instruction is executed and a NONBCD number was encountered. NOTE: The status flags are only valid until another instruction that uses the same flags is executed. In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into the accumulator using the Load Double instruction. The value in V2006 and V2007 is subtracted from the value in the accumulator. The value in the accumulator is copied to V2010 and V2011 using the Out Double instruction. Direct SOFT32 X1 0 LDD V2000 Load the value in V2000 and V2001 into the accumulator SUBD V2006 The in V2006 and V2007 is subtracted from the value in the accumulator OUTD V2010 Copy the value in the accumulator to V2010 and V2011 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST S RST SHFT D 3 SHFT D 3 U ISG C 2 B 1 ENT D 3 B 1 A 0 D 3 B 1 A 0 C 2 A 0 C 2 A 0 A 0 ENT A 0 ENT A 0 G 6 ENT 0 0 3 9 0 8 9 9 ACC. _ 0 0 V2001 1 0 6 3 V2000 2 7 4 0 1 0 6 3 6 7 9 3 2 0 2 3 8 7 7 9 4 5 9 V2011 V2010 590 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions -Math Subtract Real (SUBR) The Subtract Real instruction subtracts a real number in the accumulator from either a real constant or a real number occupying two consecutive V-memory locations. The result resides in the accumulator. Both numbers must conform to the IEEE floating point format. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . R S UBR A aaa DL06 Range aaa See memory map See memory map -3.402823E +038 to+-3.402823E +038 Discrete Bit Flags SP63 SP70 SP71 SP72 SP73 SP74 SP75 Description On when the result of the instruction causes the value in the accumulator to be zero. On anytime the value in the accumulator is negative. On anytime the V-memory specified by a pointer (P) is not valid. On anytime the value in the accumulator is an invalid floating point number. On when a signed addition or subtraction results in a incorrect sign bit. On anytime a floating point math operation results in an underflow error. On when a BCD instruction is executed and a NONBCD number was encountered. NOTE: Status flags are valid only until another instruction uses the same flag. DirectSOFT32 X1 LDR R22.0 Load the real number 22.0 into the accumulator. 2 1 2 5 7 SUBR R15.0 Subtract the real number 15.0 from the accululator contents, which is in real number format. 4 V1401 0 E 0 0 V1400 0 0 0 (Hex number) (decimal) 4 + 4 Acc. 4 1 1 0 B 7 E 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (Accumulator) (SUBR) 4 1 B 0 0 0 0 0 Real Value 8 4 OUTD V1400 Copy the result in the accumulator to V1400 and V1401. Acc. 0 1 2 0 1 0 8 0 4 2 0 0 1 0 8 1 4 1 2 1 1 0 8 0 4 0 2 0 1 0 8 4 0 0 2 0 1 0 8 0 4 2 0 0 1 0 8 0 4 0 2 1 0 0 8 0 4 0 2 0 1 0 Sign Bit 128 + 1 = 129 129 - 127 = 2 Implies 2 (exp 2) 1.11 x 2 (exp 2) = 111. binary= 7 decimal NOTE: The current HPP does not support real number entry with automatic conversion to the 32-bit IEEE format. You must use DirectSOFT32 for this feature DL06 Micro PLC User Manual, 1st Ed., Rev. A 591 ndard RLL s tructions Exponent (8 bits) Mantissa (23 bits) Chapter 5: Standard RLL Instructions- -Math Multiply (MUL) Multiply is a 16 bit instruction that multiplies the BCD value (Aaaa), which is either a V memory location or a 4digit (max.) constant, by the BCD value in the lower 16 bits of the accumulator The result can be up to 8 digits and resides in the accumulator. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K MUL A aaa DL06 Range aaa See memory map See memory map 09999 Discrete Bit Flags SP63 SP70 SP75 Description On when the result of the instruction causes the value in the accumulator to be zero. On anytime the value in the accumulator is negative. On when a BCD instruction is executed and a NONBCD number was encountered. NOTE: The status flags are only valid until another instruction that uses the same flags is executed. In the following example, when X1 is on, the value in V2000 will be loaded into the accumulator using the Load instruction. The value in V2006 is multiplied by the value in the accumulator. The value in the accumulator is copied to V2010 and V2011 using the Out Double instruction. Direct SOFT32 X1 LD V2000 Load the value in V2000 into the lower 16 bits of the accumulator MUL V2006 The value in V2006 is multiplied by the value in the accumulator 0 OUTD V2010 Copy the value in the accumulator to V2010 and V2011 0 0 2 5 0 0 0 The unused accumulator bits are set to zero 0 X Acc. 0 0 0 2 5 0 0 0 0 1 0 0 0 2 0 5 0 (Accumulator) (V2006) V2000 1 0 0 0 V2011 V2010 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST M ORST SHFT D 3 U ISG D 3 L ANDST C 2 B 1 ENT C 2 C 2 A 0 B 1 A 0 A 0 A 0 A 0 A 0 A 0 ENT G 6 ENT ENT 592 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions -Math Multiply Double (MULD) Multiply Double is a 32 bit instruction that multiplies the 8-digit BCD value in the accumulator by the 8-digit BCD value in the two consecutive V-memory locations specified in the instruction. The lower 8 digits of the results reside in the accumulator. Upper digits of the result reside in the accumulator stack. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P MULD A aaa DL06 Range aaa See memory map See memory map Discrete Bit Flags SP63 SP70 SP75 Description On when the result of the instruction causes the value in the accumulator to be zero. On anytime the value in the accumulator is negative. On when a BCD instruction is executed and a NONBCD number was encountered. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the constant Kbc614e hex will be loaded into the accumulator. When converted to BCD the number is 12345678. That numbers stored in V1400 and V1401. After loading the constant K2 into the accumulator, we multiply it times 12345678, which is 24691356. Direct SOFT32 Display X1 LDD Kbc614e Load the hex equivalent of 12345678 decimal into the accumulator. Convert the value to BCD format. It will occupy eight BCD digits (32 bits). Output the number to V1400 and V1401 using the OUTD instruction. Load the constant K2 into the accumulator. 2 4 6 9 1 3 5 6 V1401 1 2 3 4 5 V1400 6 7 8 1 2 3 4 5 6 7 8 (Accumulator) BCD OUTD V1400 X Acc. 2 4 6 9 1 3 5 2 6 (Accumulator) LD K2 MULD V1400 Multiply the accumulator contents (2) by the 8-digit number in V1400 and V1401. Move the result in the accumulator to V1402 and V1403 using the OUTD instruction. V1403 V1402 OUTD V1402 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT SHFT SHFT GX OUT L ANDST B 1 SHFT L ANDST M ORST SHFT D 3 D 3 U ISG D 3 L ANDST D 3 C 2 D 3 B 1 ENT D 3 ENT B 1 PREV D 3 B 1 PREV SHFT B 1 C 2 SHFT G 6 B 1 E 4 SHFT E 4 ENT E 4 C 2 A 0 ENT B 1 A 0 ENT E 4 C 0 2 A 0 ENT A 0 ENT E 4 A DL06 Micro PLC User Manual, 1st Ed., Rev. A 593 Chapter 5: Standard RLL Instructions - Math Multiply Real (MULR) The Multiply Real instruction multiplies a real number in the accumulator with either a real constant or a real number occupying two consecutive V-memory locations. The result resides in the accumulator. Both numbers must conform to the IEEE floating point format. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Real Constant . . . . . . . . . . . . . . . . . . . . . . . . . . R MULR A aaa DL06 Range aaa See memory map See memory map -3.402823E+038 to + -3.402823E+038 Discrete Bit Flags SP63 SP70 SP71 SP72 SP73 SP74 SP75 Description On when the result of the instruction causes the value in the accumulator to be zero. On anytime the value in the accumulator is negative. On anytime the V-memory specified by a pointer (P) is not valid. On anytime the value in the accumulator is an invalid floating point number. On when a signed addition or subtraction results in a incorrect sign bit. On anytime a floating point math operation results in an underflow error. On when a real number instruction is executed and a non-real number was encountered. NOTE: Status flags are valid only until another instruction uses the same flag. DirectSOFT32 Display X1 LDR R 7.0 Load the real number 7.0 into the accumulator. 7 x 1 MULR R 15.0 Multiply the accumulator contents by the real number 15.0 4 V1401 2 D 2 0 V1400 0 0 0 (Hex number) 1 0 5 5 (decimal) 4 X 4 Acc. 4 0 1 2 E 7 D 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 (Accumulator) (MULR) 4 0 E 0 0 0 0 0 Real Value 8 4 OUTD V1400 Copy the result in the accumulator to V1400 and V1401. Acc. 0 1 2 0 1 0 8 0 4 2 0 1 1 0 8 1 4 1 2 1 0 1 8 0 4 0 2 1 1 0 8 4 0 0 2 0 1 0 8 0 4 2 0 0 1 0 8 0 4 0 2 1 0 0 8 0 4 0 2 0 1 0 Sign Bit 128 + 4 + 1 = 133 133 - 127 = 6 Implies 2 (exp 6) Exponent (8 bits) Mantissa (23 bits) 1.101001 x 2 (exp 6) = 1101001. binary= 105 decimal NOTE: The current HPP does not support real number entry with automatic conversion to the 32-bit IEEE format. You must use DirectSOFT32 for this feature. 594 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions -Math Divide (DIV) Divide is a 16 bit instruction that divides the BCD value in the accumulator by a BCD value (Aaaa), which is either a V memory location or a 4-digit (max.) constant. The first part of the quotient resides in the accumulator and the remainder resides in the first stack location. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K DIV A aaa DL06 Range aaa See memory map See memory map 09999 Discrete Bit Flags SP53 SP63 SP70 SP75 Description On when the value of the operand is larger than the accumulator can work with. On when the result of the instruction causes the value in the accumulator to be zero. On anytime the value in the accumulator is negative. On when a BCD instruction is executed and a NONBCD number was encountered. NOTE: The status flags are only valid until another instruction that uses the same flags is executed. In the following example, when X1 is on, the value in V2000 will be loaded into the accumulator using the Load instruction. The value in the accumulator will be divided by the value in V2006 using the Divide instruction. The value in the accumulator is copied to V2010 using the Out instruction. Direct SOFT32 X1 LD V2000 Load the value in V2000 into the lower 16 bits of the accumulator DIV V2006 The value in the accumulator is divided by the value in V2006 Acc. 1 0 2 0 0 0 0 0 0 0 2 First stak location contains the remainder The unused accumulator bits are set to zero 0 0 0 0 5 V2000 5 0 0 0 0 0 4 0 9 (Accumulater) V2006 OUT V2010 Copy the value in the lower 16 bits of the accumulator to V2010 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST D 3 D 3 I 8 SHFT V AND V AND C 2 B 1 ENT C 2 C 2 A 0 B 1 A 0 A 0 A 0 A 0 A 0 A 0 ENT G 6 ENT 1 0 2 V2010 ENT DL06 Micro PLC User Manual, 1st Ed., Rev. A 595 Chapter 5: Standard RLL Instructions Divide Double (DIVD) Divide Double is a 32 bit instruction that divides the BCD value in the accumulator by a BCD value (Aaaa), which must be obtained from two consecutive V memory locations. (You cannot use a constant as the parameter in the box.) The first part of the quotient resides in the accumulator and the remainder resides in the first stack location. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P DIVD A aaa DL06 Range aaa See memory map See memory map Discrete Bit Flags SP53 SP63 SP70 SP75 Description On when the value of the operand is larger than the accumulator can work with. On when the result of the instruction causes the value in the accumulator to be zero. On anytime the value in the accumulator is negative. On when a BCD instruction is executed and a NONBCD number was encountered. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into the accumulator using the Load Double instruction. The value in the accumulator is divided by the value in V1420 and V1421 using the Divide Double instruction. The first part of the quotient resides in the accumulator an the remainder resides in the first stack location. The value in the accumulator is copied to V1500 and V1501 using the Out Double instruction. Direct SOFT32 X1 LDD V1400 Load the value in V1400 and V1401 into the accumulator DIVD V1420 The value in the accumulator is divided by the value in V1420 and V1421 Acc. The unused accumulator bits are set to zero 0 0 0 1 0 0 5 0 0 0 0 3 0 0 0 0 0 0 0 5 0 0 0 0 (Accumulator) (V1421 and V1420) 0 0 0 0 0 0 0 0 0 V1401 1 5 0 0 V1400 0 0 0 First stack location contains the remainder OUTD V1500 Copy the value in the accumulator to V1500 and V1501 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST D 3 D 3 I 8 SHFT V AND V AND C 2 B 1 ENT C 2 C 2 A 0 B 1 A 0 A 0 A 0 A 0 A 0 A 0 ENT G 6 ENT ENT 0 0 0 3 0 0 0 0 V1501 V1500 596 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions -Math Divide Real (DIVR) The Divide Real instruction divides a real number in the accumulator by either a real constant or a real number occupying two consecutive V-memory locations. The result resides in the accumulator. Both numbers must conform to the IEEE floating point format. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Real Constant . . . . . . . . . . . . . . . . . . . . . . . . . . R DIVR A aaa DL06 Range aaa See memory map See memory map -3.402823E+038 to + -3.402823E+038 Discrete Bit Flags SP63 SP70 SP71 SP72 SP73 SP74 SP75 Description On when the result of the instruction causes the value in the accumulator to be zero. On anytime the value in the accumulator is negative. On anytime the V-memory specified by a pointer (P) is not valid. On anytime the value in the accumulator is an invalid floating point number. On when a signed addition or subtraction results in a incorrect sign bit. On anytime a floating point math operation results in an underflow error. On when a real number instruction is executed and a non-real number was encountered. NOTE: Status flags are valid only until another instruction uses the same flag. DirectSOFT32 Display X1 LDR R15.0 Load the real number 15.0 into the accumulator. 1 1 5 0 1 . 5 DIVR R10.0 Divide the accumulator contents by the real number 10.0. 3 V1401 F C 0 0 V1400 0 0 0 (Hex number) (decimal) 4 4 1 1 F 7 2 C 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (Accumulator) (DIVR ) 4 1 7 0 0 0 0 0 Acc. 3 Real Value 8 4 OUTD V1400 Copy the result in the accumulator to V1400 and V1401. Acc. 0 0 2 1 1 1 8 1 4 2 1 1 1 1 8 1 4 1 2 1 0 0 8 0 4 0 2 0 1 0 8 4 0 0 2 0 1 0 8 0 4 2 0 0 1 0 8 0 4 0 2 1 0 0 8 0 4 0 2 0 1 0 Sign Bit Exponent (8 bits) Mantissa (23 bits) 64 + 32 + 16 + 8 + 4 + 2 + 1 = 127 127 - 127 = 0 Implies 2 (exp 0) 1.1 x 2 (exp 0) = 1.1 binary= 1.5 decimal NOTE: The current HPP does not support real number entry with automatic conversion to the 32-bit IEEE format. You must use DirectSOFT32 for this feature. DL06 Micro PLC User Manual, 1st Ed., Rev. A 597 d d RLL Chapter 5: Standard RLL Instructions - Math Increment (INC) The Increment instruction increments a BCD value in a specified V memory location by 1 each time the instruction is executed. INC A aaa Decrement (DEC) The Decrement instruction decrements a BCD value in a specified V memory location by 1 each time the instruction is executed. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P DEC A aaa DL06 Range aaa See memory map See memory map Discrete Bit Flags SP63 SP75 Description On when the result of the instruction causes the value in the accumulator to be zero. On when a BCD instruction is executed and a NONBCD number was encountered. NOTE: Status flags are valid only until another instruction uses the same flag. In the following increment example, when C5 is on the value in V1400 increases by one. Direct SOFT32 C5 INC V1400 Increment the value in V1400 by 1. Handheld Programmer Keystrokes $ STR SHFT I 8 NEXT N TMR NEXT C 2 NEXT NEXT B 1 F 5 E 4 ENT A 0 A 0 ENT 8 V1400 9 3 6 8 V1400 9 3 5 In the following decrement example, when C5 is on the value in V1400 is decreased by one. Direct SOFT32 C5 DEC V1400 Decrement the value in V1400 by 1. 8 Handheld Programmer Keystrokes $ STR SHFT D 3 NEXT E 4 NEXT C 2 NEXT NEXT B 1 F 5 E 4 ENT A 0 A 0 ENT 8 V1400 9 3 5 V1400 9 3 4 598 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions -Math Add Binary (ADDB) Add Binary is a 16 bit instruction that adds the unsigned 2s complement binary value in the lower 16 bits of the accumulator with an unsigned 2s complement binary value (Aaaa), which is either a V memory location or a 16-bit constant. The result can be up to 32 bits (unsigned 2s complement) and resides in the accumulator. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K ADDB A aaa DL06 Range aaa See memory map See memory map 0-FFFF Discrete Bit Flags SP63 SP66 SP67 SP70 SP73 Description On when the result of the instruction causes the value in the accumulator to be zero. On when the 16-bit addition instruction results in a carry. On when the 32-bit addition instruction results in a carry. On anytime the value in the accumulator is negative. On when a signed addition or subtraction results in an incorrect sign bit. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the value in V1400 will be loaded into the accumulator using the Load instruction. The binary value in the accumulator will be added to the binary value in V1420 using the Add Binary instruction. The value in the accumulator is copied to V1500 and V1501 using the Out instruction. DirectS OF T 32 Dis play X1 0 LD V1400 Load the value in V1400 into the lower 16 bits of the accumulator T he unus ed accumulator bits are s et to zero 0 0 0 0 0 + V1420 T he binary value in the accumulator is added to the binary value in V1420 Acc. 1 C C 9 1 V1400 A 0 5 A 2 0 C 5 4 (Accumulator) (V1420) ADDB OU T D V1500 C opy the value in the lower 16 bits of the accumulator to V1500 and V1501 Handheld Programmer Keys trokes STR S HF T S HF T OU T L A S HF T X(IN) D D D 1 V D E NT 1 B V 1 4 0 V 5 1 C C 9 V1500 0 1 0 E NT 4 0 2 E NT 0 E NT DL06 Micro PLC User Manual, 1st Ed., Rev. A 599 Chapter 5: Standard RLL Instructions -Math Add Binary Double (ADDBD) Add Binary Double is a 32 bit instruction that adds the unsigned 2s complement binary value in the accumulator with the value (Aaaa), which is either two consecutive V memory locations or 32-bit unsigned 2s complement binary constant. The result resides in the accumulator. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K ADDBD A aaa DL06 Range aaa See memory map See memory map 0-FFFF FFFF Discrete Bit Flags SP63 SP66 SP67 SP70 SP73 Description On when the result of the instruction causes the value in the accumulator to be zero. On when the 16-bit addition instruction results in a carry. On when the 32-bit addition instruction results in a carry. On anytime the value in the accumulator is negative. On when a signed addition or subtraction results in an incorrect sign bit. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into the accumulator using the Load Double instruction. The binary value in the accumulator is added with the binary value in V1420 and V1421 using the Add Binary Double instruction. The value in the accumulator is copied to V1500 and V1501 using the Out Double instruction. DirectS OF T 32 Dis play X1 LDD V1400 Load the value in V1400 and V1401 into the accumulator 0 V1401 0 0 0 0 V1400 A 0 1 0 + 1 Acc. 1 0 0 0 0 0 0 0 0 0 0 C C A 0 A 0 1 1 1 0 1 (Accumulator) (V1421 and V1420) ADDBD V1420 T he binary value in the accumulator is added with the value in V1420 and V1421 1 OU T D V1500 C opy the value in the accumulator to V1500 and V1501 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST A 0 SHFT D 3 D 3 D 3 D 3 B 1 B 1 ENT D 3 B 1 F 5 D 3 A 0 A 0 B 1 E 4 B 1 A 0 E 4 ENT A 0 0 0 0 C A 1 1 V1501 V1500 ENT C 2 A 0 ENT 5100 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions -Math Subtract Binary (SUBB) Subtract Binary is a 16 bit instruction that subtracts the unsigned 2s complement binary value (Aaaa), which is either a V memory location or a 16-bit 2s complement binary value, from the binary value in the accumulator. The result resides in the accumulator. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K S UBB A aaa DL06 Range aaa See memory map See memory map 0-FFFF Discrete Bit Flags SP63 SP64 SP65 SP70 Description On when the result of the instruction causes the value in the accumulator to be zero. On when the 16-bit subtraction instruction results in a borrow. On when the 32-bit subtraction instruction results in a borrow. On anytime the value in the accumulator is negative. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the value in V1400 will be loaded into the accumulator using the Load instruction. The binary value in V1420 is subtracted from the binary value in the accumulator using the Subtract Binary instruction. The value in the accumulator is copied to V1500 using the Out instruction. DirectS OF T 32 Dis play X1 1 LD V1400 Load the value in V1400 into the lower 16 bits of the accumulator T he unus ed accumulator bits are s et to zero 0 0 0 0 1 y V1420 T he binary value in V1420 is s ubtracted from the value in the accumulator Acc. 0 6 1 9 0 V1400 0 2 4 0 A 2 0 4 B (Accumulator) (V1420) S U BB OU T V1500 C opy the value in the lower 16 bits of the accumulator to V1500 0 6 1 9 V1500 Handheld Programmer Keys trokes STR S HF T S HF T V OU T L S 1 S HF T X(IN) D S HF T 4 D 1 V U 2 E NT 1 B 0 V 4 B E NT 1 5 0 0 E NT 0 0 E NT DL06 Micro PLC User Manual, 1st Ed., Rev. A 5101 Chapter 5: Standard RLL Instructions - Math Subtract Binary Double (SUBBD) Subtract Binary Double is a 32 bit instruction that subtracts S UBBD the unsigned 2s complement binary value (Aaaa), which is A aaa either two consecutive V memory locations or a 32-bit unsigned 2s complement binary constant, from the binary value in the accumulator The result resides in the accumulator. Operand Data Type DL06 Range ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K aaa See memory map See memory map 0-FFFF FFFF Discrete Bit Flags SP63 SP64 SP65 SP70 Description On when the result of the instruction causes the value in the accumulator to be zero. On when the 16-bit subtraction instruction results in a borrow. On when the 32-bit subtraction instruction results in a borrow. On anytime the value in the accumulator is negative. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into the accumulator using the Load Double instruction. The binary value in V1420 and V1421 is subtracted from the binary value in the accumulator using the Subtract Binary Double instruction. The value in the accumulator is copied to V1500 and V1501 using the Out Double instruction. DirectS OF T 32 Dis play X1 0 LDD V1400 Load the value in V1400 and V1401 into the accumulator y Acc. V1401 0 0 6 0 V1400 0 F F 0 0 0 0 0 0 0 0 0 6 0 5 0 1 E 0 A 6 F 0 F F 1 E (Accumulator) (V1421 and V1420) S U BBD V1420 T he binary value in V1420 and V1421 is s ubtracted from the binary value in the accumulator 0 OU T D V1500 C opy the value in the accumulator to V1500 and V1501 0 0 5 E 6 F E V1501 V1500 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST S RST SHFT D 3 SHFT D 3 U ISG B 1 B 1 ENT D 3 B 1 F 5 B 1 A 0 B 1 D 3 A 0 E 4 A 0 B 1 ENT A 0 ENT E 4 C 2 A 0 ENT 5102 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions -Math Multiply Binary (MULB) Multiply Binary is a 16 bit instruction that multiplies the unsigned 2s complement binary value (Aaaa), which is either a V memory location or a 16-bit unsigned 2s complement binary constant, by the16-bit binary value in the accumulator The result can be up to 32 bits and resides in the accumulator. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K MULB A aaa DL06 Range aaa See memory map See memory map 0-FFFF Discrete Bit Flags SP63 SP70 Description On when the result of the instruction causes the value in the accumulator to be zero. On anytime the value in the accumulator is negative. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the value in V1400 will be loaded into the accumulator using the Load instruction. The binary value in V1420 is multiplied by the binary value in the accumulator using the Multiply Binary instruction. The value in the accumulator is copied to V1500 using the Out instruction. DirectS OF T 32 Dis play X1 LD V1400 Load the value in V1400 into the lower 16 bits of the accumulator T he unus ed accumulator bits are s et to zero 0 0 0 0 Acc. 0 0 0 1 0 V1400 A 0 1 0 0 C A 0 C 0 2 2 1 E E (Accumulator) (V1420) MU LB V1420 T he binary value in V1420 is multiplied by the binary value in the accumulator OU T D V1500 C opy the value in the lower 16 bits of the accumulator to V1500 and V1501 Handheld Programmer Keys trokes STR S HF T S HF T OU T L M S HF T X D U D 1 V L E NT 1 B V 1 4 0 0 0 1 C C 2 E V1501 V1500 0 V 5 0 1 0 E NT 4 0 2 E NT 0 E NT DL06 Micro PLC User Manual, 1st Ed., Rev. A 5103 Chapter 5: Standard RLL Instructions -Math Divide Binary (DIVB) Divide Binary is a 16 bit instruction that divides the unsigned 2s complement binary value in the accumulator by a binary value (Aaaa), DIVB which is either a V memory location or a 16-bit unsigned 2s A aaa complement binary constant. The first part of the quotient resides in the accumulator and the remainder resides in the first stack location. Operand Data Type DL06 Range ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K aaa See memory map See memory map 0-FFFF Discrete Bit Flags SP53 SP63 SP70 Description On when the value of the operand is larger than the accumulator can work with. On when the result of the instruction causes the value in the accumulator to be zero. On anytime the value in the accumulator is negative. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the value in V1400 will be loaded into the accumulator using the Load instruction. The binary value in the accumulator is divided by the binary value in V1420 using the Divide Binary instruction. The value in the accumulator is copied to V1500 using the Out instruction. DirectS OF T32 Dis play X1 F LD V1400 Load the value in V1400 into the lower 16 bits of the accumulator The unus ed accumulator bits are s et to zero 0 DIVB V1420 The binary value in the accumulator is divided by the binary value in V1420 Acc. 0 3 2 0 0 0 0 0 0 0 0 0 F irs t s tack location contains the remainder 0 0 0 F 0 A 0 0 5 1 0 (Accumulator) (V1420) V1400 A 0 1 OUT V1500 Copy the value in the lower 16 bits of the accumulator to V1500 0 3 2 0 V1500 Handheld Programmer Keys trokes S TR S HF T S HF T OUT L D S HF T X D I D 1 V V E NT 1 B V 1 4 0 V 5 0 1 0 E NT 4 0 2 E NT 0 E NT 5104 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions -Math Increment Binary (INCB) The Increment Binary instruction increments a binary value in a specified V memory location by 1 each time the instruction is executed. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P INCB A aaa DL06 Range aaa See memory map See memory map Discrete Bit Flags SP63 Description On when the result of the instruction causes the value in the accumulator to be zero. In the following example when C5 is on, the binary value in V2000 is increased by 1. Direct SOFT32 C5 INCB V2000 Increment the binary value in the accumulator by1 4 4 V2000 A 3 C Handheld Programmer Keystrokes $ STR SHFT V2000 A 3 D I 8 SHFT N TMR C 2 C 2 B 1 F 5 ENT C 2 A 0 A 0 A 0 ENT Decrement Binary (DECB) The Decrement Binary instruction decrements a binary value in a specified V memory location by 1 each time the instruction is executed. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P DECB A aaa DL06 Range aaa See memory map See memory map Discrete Bit Flags SP63 Description On when the result of the instruction causes the value in the accumulator to be zero. NOTE: The status flags are only valid until another instruction that uses the same flags is executed. In the following example when C5 is on, the value in V2000 is decreased by 1. Direct SOFT32 C5 4 DECB V2000 Decrement the binary value in the accumulator by1 4 V2000 A 3 B V2000 A 3 C Handheld Programmer Keystrokes $ STR SHFT D 3 SHFT E 4 C 2 C 2 B 1 F 5 ENT C 2 A 0 A 0 A 0 ENT DL06 Micro PLC User Manual, 1st Ed., Rev. A 5105 Chapter 5: Standard RLL Instructions -Math Add Formatted (ADDF) Add Formatted is a 32 bit instruction that adds the BCD value in the accumulator with the BCD value (Aaaa) which is a range of discrete bits. The specified range (Kbbb) can be 1 to 32 consecutive bits. The result resides in the accumulator. Operand Data Type ..................................... Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . Stage Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Timer Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Counter Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . Global I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A X Y C S T CT SP GX K ADDF A aaa K bbb DL06 Range aaa 0777 0777 01777 01777 0377 0177 0-137 320-717 0-3777 bbb 132 Discrete Bit Flags SP63 SP66 SP67 SP70 SP75 Description On when the result of the instruction causes the value in the accumulator to be zero. On when the 16 bit addition instruction results in a carry. On when the 32 bit addition instruction results in a carry. On anytime the value in the accumulator is negative. On when a BCD instruction is executed and a NON-BCD number was encountered. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X6 is on, the value formed by discrete locations X0X3 is loaded into the accumulator using the Load Formatted instruction. The value formed by discrete locations C0C3 is added to the value in the accumulator using the Add Formatted instruction. The value in the lower four bits of the accumulator is copied to Y10Y13 using the Out Formatted instruction. Direct SOFT32 Display X6 LDF K4 X0 Load the value represented by discrete locations X0X3 into the accumulator X3 X2 X1 Z0 ON OFF OFF OFF The unused accumulator bits are set to zero ADDF K4 C0 Add the value in the accumulator with the value represented by discrete location C0C3 Copy the lower 4 bits of the accumulator to discrete locations Y10Y14 0 + Acc. 0 0 0 1 0 0 0 0 0 0 0 0 0 8 3 1 (Accumulator) (C0-C3) C3 C2 C1 C0 OFF OFF ON ON OUTF K5 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST A 0 SHFT F 5 D 3 D 3 D 3 B G 6 ENT F 5 F Y10 Y13 Y12 Y11 Y10 OFF OFF OFF ON A 0 5 A 1 0 NEXT E 4 NEXT E 4 ENT NEXT ENT NEXT A 0 E 4 ENT 5106 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions -Math Subtract Formatted (SUBF) Subtract Formatted is a 32 bit instruction that subtracts the BCD value (Aaaa), which is a range of discrete bits, from the BCD value in the accumulator. The specified range (Kbbb) can be 1 to 32 consecutive bits. The result resides in the accumulator. Operand Data Type ..................................... Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . Stage Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Timer Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Counter Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . Global I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A X Y C S T CT SP GX K S UBF A aaa K bbb DL06 Range aaa bbb 132 0777 0777 01777 01777 0377 0177 0-137 320-717 0-3777 Discrete Bit Flags SP63 SP64 SP65 SP70 SP75 Description On when the result of the instruction causes the value in the accumulator to be zero. On when the 16 bit subtraction instruction results in a borrow On when the 32 bit subtraction instruction results in a borrow On any time the value in the accumulator is negative. On when a BCD instruction is executed and a NON-BCD number was encountered. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X6 is on, the value formed by discrete locations X0X3 is loaded into the accumulator using the Load Formatted instruction. The value formed by discrete location C0C3 is subtracted from the value in the accumulator using the Subtract Formatted instruction. The value in the lower four bits of the accumulator is copied to DirectSOFT32 Display X6 LDF K4 X0 Load the value represented by discrete locations X0- X3 into the accumulator X3 X2 X1 X0 ON OFF OFF ON The unused accumulator bits are set to zero 0 y ACC. 0 OUTF K4 Handheld Programmer Keystrokes Y13 Y12 Y11 Y10 $ STR SHFT SHFT GX OUT L ANDST S RST SHFT D 3 SHFT F 5 U ISG B 1 G 6 ENT F 5 B 1 A 0 F 5 A 0 E 4 NEXT E 4 ENT NEXT ENT NEXT NEXT A 0 E 4 ENT OFF OFF OFF ON Y10 Copy the lower 4 bits of the accumulator to discrete locations Y10- Y13 0 0 0 0 0 0 0 0 0 0 0 0 9 8 1 (Accumulator) (C0- C3) C3 C2 C1 C0 SUBF K4 C0 Subtract the value represented by C0- C3 from the value in the accumulator ON OFF OFF OFF DL06 Micro PLC User Manual, 1st Ed., Rev. A 5107 Chapter 5: Standard RLL Instructions -Math Multiply Formatted (MULF) Multiply Formatted is a 16 bit instruction that multiplies the BCD value in the accumulator by the BCD value (Aaaa) which is a range of discrete bits. The specified range (Kbbb) can be 1 to 16 consecutive bits. The result resides in the accumulator. Operand Data Type ..................................... Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . Stage Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Timer Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Counter Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . Global I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A X Y C S T CT SP GX K MULF A aaa K bbb DL06 Range aaa 0777 0777 01777 01777 0377 0177 0-137 320-717 0-3777 bbb 116 Discrete Bit Flags SP63 SP70 SP75 Description On when the result of the instruction causes the value in the accumulator to be zero. On any time the value in the accumulator is negative. On when a BCD instruction is executed and a NON-BCD number was encountered. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X6 is on, the value formed by discrete locations X0X3 is loaded into the accumulator using the Load Formatted instruction. The value formed by discrete locations C0C3 is multiplied by the value in the accumulator using the Multiply Formatted instruction. The value in the lower four bits of the accumulator is copied to Y10Y13 using the Out Formatted instruction. DirectSOFT32 Display X6 LDF K4 X0 Load the value represented by discrete locations X0- X3 into the accumulator X3 X2 X1 X0 OFF OFF ON ON The unused accumulator bits are set to zero MULF K4 C0 Multiply the value in the accumulator with the value represented by discrete locations C0- C3 Copy the lower 4 bits of the accumulator to discrete locations Y10- Y13 - 0 Acc. 0 0 0 0 0 0 0 3 2 (Accumulator) (C0- C3) - C3 C2 C1 C0 OFF OFF ON OFF 0 0 0 0 0 0 6 OUTF K4 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST M ORST SHFT D 3 U ISG F 5 G 6 ENT F 5 L ANDST Y10 Y13 Y12 Y11 Y10 OFF ON ON OFF A 0 F 5 B 1 A 0 NEXT E 4 NEXT E 4 ENT NEXT ENT NEXT A 0 E 4 ENT 5108 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions -Math Divide Formatted (DIVF) Divide Formatted is a 16 bit instruction that divides the BCD value in the accumulator by the BCD value (Aaaa), a range of discrete bits. The specified range (Kbbb) can be 1 to 16 consecutive bits. The first part of the quotient resides in the accumulator and the remainder resides in the first stack location. Operand Data Type ..................................... Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . Stage Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Timer Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Counter Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . Global I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A X Y C S T CT SP GX K DIVF K bbb A aaa DL06 Range aaa 0777 0777 01777 01777 0377 0177 0-137 320-717 0-3777 bbb 116 Discrete Bit Flags SP53 SP63 SP70 SP75 Description On when the value of the operand is larger than the accumulator can work with. On when the result of the instruction causes the value in the accumulator to be zero. On any time the value in the accumulator is negative. On when a BCD instruction is executed and a NON-BCD number was encountered. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X6 is on, the value formed by discrete locations X0X3 is loaded into the accumulator using the Load Formatted instruction. The value in the accumulator is divided by the value formed by discrete location C0C3 using the Divide Formatted instruction. The value in the lower four bits of the accumulator is copied to Y10Y13 using the Out Formatted instruction. DirectSOFT32 Display X6 LDF K4 X0 Load the value represented by discrete locations X0- X3 into the accumulator X3 X2 X1 X0 ON OFF OFF OFF The unused accumulator bits are set to zero DIVF K4 C0 Divide the value in the accumulator with the value represented by discrete location C0- C3 Copy the lower 4 bits of the accumulator to discrete locations Y10- Y13 0 Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 8 2 4 (Accumulator) (C0- C3) 0 0 0 0 0 C3 C2 C1 C0 OFF OFF ON OFF 0 0 0 OUTF K4 Y10 First stack location contains the remainder Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST D 3 SHFT F 5 D 3 I 8 G 6 ENT F 5 V AND F 5 B 1 A 0 A 0 NEXT E 4 NEXT E 4 ENT NEXT ENT NEXT A 0 E 4 Y13 Y12 Y11 Y10 OFF ON OFF OFF ENT DL06 Micro PLC User Manual, 1st Ed., Rev. A 5109 Chapter 5: Standard RLL Instructions -Math Add Top of Stack (ADDS) Add Top of Stack is a 32 bit instruction that adds the BCD value in the accumulator with the BCD value in the first level of the accumulator stack. The result resides in the accumulator. The value in the first level of the accumulator stack is removed and all stack values are moved up one level. Discrete Bit Flags SP63 SP66 SP67 SP70 SP75 ADDS Description On when the result of the instruction causes the value in the accumulator to be zero. On when the 16 bit addition instruction results in a carry. On when the 32 bit addition instruction results in a carry. On anytime the value in the accumulator is negative. On when a BCD instruction is executed and a NON-BCD number was encountered. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into the accumulator using the Load Double instruction. The value in V1420 and V1421 is loaded into the accumulator using the Load Double instruction, pushing the value previously loaded in the accumulator onto the accumulator stack. The value in the first level of the accumulator stack is added with the value in the accumulator using the Add Stack instruction. The value in the accumulator is copied to V1500 and V1501 using the Out Double instruction. DirectS OF T 32 Dis play X1 LDD V1400 Load the value in V1400 and V1401 into the accumulator 0 V1401 0 3 9 5 V1400 0 2 6 Level 1 Acc. 0 0 3 9 5 0 2 6 Level 2 Level 3 V1421 LDD V1420 Load the value in V1420 and V1421 into the accumulator Acc. 0 0 1 7 2 V1420 0 5 6 Level 4 Level 5 Level 6 0 0 1 7 2 0 5 6 Level 7 Level 8 X X X X X X X X Accumulator s tack after 1s t LDD X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ADDS Add the value in the accumulator with the value in the firs t level of the accumulator s tack Acc. 0 0 5 6 7 0 8 2 Accumulator s tack after 2nd LDD Level 1 Level 2 0 X X X X X X X 0 X X X X X X X 3 X X X X X X X 9 X X X X X X X 5 X X X X X X X 0 X X X X X X X 2 X X X X X X X 6 X X X X X X X OU T D V1500 Handheld Programmer Keystrokes $ STR SHFT SHFT SHFT GX OUT L ANDST L ANDST A 0 SHFT D 3 D 3 D 3 D 3 D 3 D 3 S RST B 1 B 1 ENT D 3 C opy the value in the accumulator to V1500 and V1501 0 0 5 6 7 0 8 2 Level 3 Level 4 Level 5 Level 6 V1501 V1500 B 1 B 1 ENT F 5 E 4 E 4 A 0 C 2 A 0 A 0 ENT ENT Level 7 Level 8 A 0 A 0 ENT 5110 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions -Math Subtract Top of Stack (SUBS) Subtract Top of Stack is a 32 bit instruction that subtracts the BCD value in the first level of the accumulator stack from the BCD value in the accumulator. The result resides in the accumulator. The value in the first level of the accumulator stack is removed and all stack values are moved up one level. Discrete Bit Flags SP63 SP64 SP65 SP70 SP75 S UBS Description On when the result of the instruction causes the value in the accumulator to be zero. On when the 16 bit subtraction instruction results in a borrow On when the 32 bit subtraction instruction results in a borrow On any time the value in the accumulator is negative. On when a BCD instruction is executed and a NON-BCD number was encountered. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into the accumulator using the Load Double instruction. The value in V1420 and V1421 is loaded into the accumulator using the Load Double instruction, pushing the value previously loaded into the accumulator onto the accumulator stack. The BCD value in the first level of the accumulator stack is subtracted from the BCD value in the accumulator using the Subtract Stack instruction. The value in the accumulator is copied to V1500 and V1501 using the Out Double instruction. DirectSOFT32 Display X1 LDD V1400 Acc. 0 0 1 7 2 0 5 6 Load the value in V1400 and V1401 into the accumulator 0 V1401 0 1 7 2 V1400 0 5 6 Level 1 Level 2 Level 3 LDD V1420 Load the value in V1420 and V1421 into the accumulator V1421 0 0 3 9 5 V1420 0 2 6 Level 4 Level 5 Level 6 Level 7 SUBS Subtract the value in the first level of the accumulator stack from the value in the accumulator Acc. 0 0 3 9 5 0 2 6 Level 8 X X X X X X X X Accumulator stack after 1st LDD X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Acc. 0 0 2 2 2 9 7 0 Accumulator stack after 2nd LDD OUTD V1500 Copy the value in the accumulator to V1500 and V1501 0 0 2 2 2 9 7 0 Level 1 Level 2 Level 3 Level 4 Level 5 Level 6 Level 7 0 X X X X X X X 0 1 7 2 0 5 6 X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Sta $ STR SHFT SHFT SHFT GX OUT L ANDST L ANDST S RST SHFT D 3 D 3 SHFT D 3 B 1 V1501 Handheld Programmer Keystrokes ENT D 3 D 3 U ISG B 1 B 1 B 1 S RST F 5 B 1 E 4 ENT A 0 A 0 ENT E 4 C 2 A 0 A 0 A 0 ENT ENT V1500 Level 8 DL06 Micro PLC User Manual, 1stDL06 Micro PLC User Manual, 1st Ed., Rev. A Ed., Rev. A 5111 Chapter 5: Standard RLL Instructions -Math Multiply Top of Stack (MULS) Multiply Top of Stack is a 16 bit instruction that multiplies a 4digit BCD value in the first level of the accumulator stack by a 4-digit BCD value in the accumulator. The result resides in the accumulator. The value in the first level of the accumulator stack is is removed and all stack values are moved up one level. Discrete Bit Flags SP63 SP70 SP75 MULS Description On when the result of the instruction causes the value in the accumulator to be zero. On any time the value in the accumulator is negative. On when a BCD instruction is executed and a NON-BCD number was encountered. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the value in V1400 will be loaded into the accumulator using the Load instruction. The value in V1420 is loaded into the accumulator using the Load instruction, pushing the value previously loaded in the accumulator onto the accumulator stack. The BCD value in the first level of the accumulator stack is multiplied by the BCD value in the accumulator using the Multiply Stack instruction. The value in the accumulator is copied to V1500 and V1501 using the Out Double instruction. DirectSOFT32 Display X1 LD V1400 Load the value in V1400 into the accumulator 5 The unused accumulator bits are set to zero Acc. 0 0 0 0 5 0 0 0 V1400 0 0 0 Level 1 Level 2 Level 3 V1420 LD V1420 Load the value in V1420 into the accumulator 0 The unused accumulator bits are set to zero Acc. 0 MULS Multiply the value in the accumulator with the value in the first level of the accumulator stack 0 0 0 0 2 0 0 2 0 0 Level 4 Level 5 Level 6 Level 7 Level 8 X X X X X X X X Accumulator stack after 1st LDD X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Acc. 0 1 0 0 0 0 0 0 Accumulator stack after 2nd LDD OUTD V1500 Copy the value in the accumulator to V1500 and V1501 Level 1 Level 2 0 1 0 0 0 0 0 0 Level 3 Level 4 Level 5 Level 6 V1501 V1500 0 X X X X X X X 0 X X X X X X X 0 X X X X X X X 0 5 0 X X X X X X X 0 X X X X X X X 0 X X X X X X X X X X X X X X X X X X X X Handheld Programmer Keystrokes $ STR SHFT SHFT SHFT GX OUT L ANDST L ANDST M ORST SHFT D 3 D 3 U ISG D 3 L ANDST B 1 S RST B 1 B 1 ENT B 1 E 4 ENT F 5 A 0 A 0 ENT E 4 C 2 A 0 A 0 A 0 ENT ENT Level 7 Level 8 5112 DL06 Micro PLC User Manual, 1st Ed., Rev. A S d d RLL X Chapter 5: Standard RLL Instructions -Math Divide by Top of Stack (DIVS) Divide Top of Stack is a 32 bit instruction that divides the 8-digit BCD value in the accumulator by a 4-digit BCD value in the first level of the accumulator stack. The result resides in the accumulator and the remainder resides in the first level of the accumulator stack. Discrete Bit Flags SP53 SP63 SP70 SP75 DIVS Description On when the value of the operand is larger than the accumulator can work with. On when the result of the instruction causes the value in the accumulator to be zero. On any time the value in the accumulator is negative. On when a BCD instruction is executed and a NON-BCD number was encountered. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the Load instruction loads the value in V1400 into the accumulator. The value in V1420 is loaded into the accumulator using the Load Double instruction, pushing the value previously loaded in the accumulator onto the accumulator stack. The BCD value in the accumulator is divided by the BCD value in the first level of the accumulator stack using the Divide Stack instruction. The Out Double instruction copies the value in the accumulator to V1500 and V1501. DirectSOFT32 Display X1 LD V1400 Load the value in V1400 into the accumulator 0 The unused accumulator bits are set to zero Acc. 0 0 0 0 0 0 2 0 V1400 0 2 0 Level 1 Level 2 Level 3 Level 4 V1421 LDD V1420 Load the value in V1420 and V1421 into the accumulator 0 0 5 0 0 V1420 0 0 0 Level 5 Level 6 Level 7 Level 8 Acc. 0 0 5 0 0 0 0 0 Accumulator stack after 2nd LDD DIVS Divide the value in the accumulator by the value in the first level of the accumulator stack Acc. 0 0 0 2 5 0 0 0 Level 1 Level 2 Level 3 Level 4 OUTD V1500 Copy the value in the accumulator to V1500 and V1501 Level 5 0 0 0 2 5 0 0 0 Level 6 Level 7 Level 8 Handheld Programmer Keystrokes $ STR SHFT SHFT SHFT GX OUT L ANDST L ANDST D 3 SHFT D 3 D 3 D 3 I 8 D 3 V AND S RST B 1 B 1 The remainder resides in the first stack location ENT Level 1 B 1 B 1 ENT F 5 A 0 A 0 ENT E 4 E 4 A 0 C 2 A 0 ENT A 0 ENT Level 2 Level 3 Level 4 Level 5 Level 6 Level 7 Level 8 0 X X X X X X X 0 X X X X X X X 0 X X X X X X X 0 0 0 X X X X X X X 0 X X X X X X X 0 X X X X X X X X X X X X X X X X X X X X X V1501 V1500 0 0 0 X X X X X X X 0 X X X X X X X 0 0 2 X X X X X X X 0 X X X X X X X Accumulator stack after 1st LDD X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X DL06 Micro PLC User Manual, 1st Ed., Rev. A 5113 Chapter 5: Standard RLL Instructions -Math Add Binary Top of Stack (ADDBS) Add Binary Top of Stack instruction is a 32 bit instruction that adds the binary value in the accumulator with the binary value in the first level of the accumulator stack. The result resides in the accumulator. The value in the first level of the accumulator stack is removed and all stack values are moved up one level. Discrete Bit Flags SP63 SP66 SP67 SP70 SP73 ADDBS Description On when the result of the instruction causes the value in the accumulator to be zero. On when the 16 bit addition instruction results in a carry. On when the 32 bit addition instruction results in a carry. On anytime the value in the accumulator is negative. On when a signed addition or subtraction results in an incorrect sign bit. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into the accumulator using the Load Double instruction. The value in V1420 and V1421 is loaded into the accumulator using the Load Double instruction, pushing the value previously loaded in the accumulator onto the accumulator stack. The binary value in the first level of the accumulator stack is added with the binary value in the accumulator using the Add Stack instruction. The value in the accumulator is copied to V1500 and V1501 using the Out Double instruction. DirectS OF T 32 Dis play X1 LDD V1400 Load the value in V1400 and V1401 into the accumulator 0 V1401 0 3 A 5 V1400 0 C 6 Level 1 Acc. 0 0 3 A 5 0 C 6 Level 2 Level 3 V1421 LDD V1420 Load the value in V1420 and V1421 into the accumulator Acc. 0 0 1 7 B V1420 0 5 F Level 4 Level 5 Level 6 0 0 1 7 B 0 5 F Level 7 Level 8 X X X X X X X X Accumulator s tack after 1s t LDD X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ADDBS Add the binary value in the accumulator with the binary value in the firs t level of the accumulator s tack Acc. 0 0 5 2 0 1 2 5 Accumulator s tack after 2nd LDD Level 1 0 X X X X X X X 0 X X X X X X X 3 X X X X X X X A X X X X X X X 5 X X X X X X X 0 X X X X X X X C X X X X X X X 6 X OU T D V1500 Level 4 Handheld Programmer Keystrokes $ STR SHFT SHFT SHFT GX OUT L ANDST L ANDST A 0 SHFT D 3 D 3 D 3 D 3 D 3 B 1 D 3 B 1 B 1 ENT D 3 B 1 S RST F 5 B 1 E 4 ENT A 0 A 0 ENT E 4 C 2 A 0 A 0 A 0 ENT ENT Level 5 Level 6 Level 7 Level 8 X X X X X 5114 DL06 Micro PLC User Manual, 1st Ed., Rev. A S tandard R LL C opy the value in the accumulator to V1500 and V1501 0 0 5 2 0 1 2 5 Level 2 Level 3 X Chapter 5: Standard RLL Instructions -Math Subtract Binary Top of Stack (SUBBS) Subtract Binary Top of Stack is a 32 bit instruction that subtracts the binary value in the first level of the accumulator stack from the binary value in the accumulator. The result resides in the accumulator. The value in the first level of the accumulator stack is removed and all stack locations are moved up one level. Discrete Bit Flags SP63 SP64 SP65 SP70 S UBBS Description On when the result of the instruction causes the value in the accumulator to be zero. On when the 16 bit subtraction instruction results in a borrow On when the 32 bit subtraction instruction results in a borrow On any time the value in the accumulator is negative. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into the accumulator using the Load Double instruction. The value in V1420 and V1421 is loaded into the accumulator using the Load Double instruction, pushing the value previously loaded in the accumulator onto the accumulator stack. The binary value in the first level of the accumulator stack is subtracted from the binary value in the accumulator using the Subtract Stack instruction. The value in the accumulator is copied to V1500 and V1501 using the Out Double instruction. DirectSOFT32 Display X1 LDD V1400 Load the value in V1400 and V1401 into the accumulator Acc. 0 V1401 0 1 A 2 V1400 0 5 B Level 1 0 0 1 A 2 0 5 B Level 2 Level 3 V1421 LDD V1420 Load the value in V1420 and V1421 into the accumulator 0 0 3 A 5 V1420 0 C 6 Level 4 Level 5 Level 6 Level 7 Acc. 0 0 3 A 5 0 C 6 Level 8 Accumulator stack after 1st LDD X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X SUBBS Subtract the binary value in the first level of the accumulator stack from the binary value in the accumulator Copy the value in the accumulator to V1500 and V1501 Acc. 0 0 2 0 3 0 6 B Accumulator stack after 2nd LDD Level 1 Level 2 0 0 1 X X X X X X X A 2 X X X X X X X X X X X X X X 0 X X X X X X X 5 X X X X X X X B X X X X X X X OUTD V1500 X X X X X X X X X X X X X X 0 0 2 0 3 0 6 B Level 3 Level 4 Level 5 V1501 Handheld Programmer Keystrokes $ STR SHFT SHFT SHFT GX OUT L ANDST L ANDST S RST SHFT D 3 D 3 SHFT D 3 U ISG B 1 D 3 B 1 F 5 B 1 B 1 ENT D 3 B 1 B 1 E 4 S RST A 0 E 4 C 2 ENT A 0 ENT A 0 A 0 A 0 ENT ENT V1500 Level 6 Level 7 Level 8 DL06 Micro PLC User Manual, 1st Ed., Rev. A 5115 Chapter 5: Standard RLL Instructions -Math Multiply Binary Top of Stack (MULBS) Multiply Binary Top of Stack is a 16 bit instruction that multiplies the 16 bit binary value in the first level of the accumulator stack by the 16 bit binary value in the accumulator. The result resides in the accumulator and can be 32 bits (8 digits max.). The value in the first level of the accumulator stack is removed and all stack locations are moved up one level. Discrete Bit Flags SP63 SP70 MULBS Description On when the result of the instruction causes the value in the accumulator to be zero. On any time the value in the accumulator is negative. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the Load instruction moves the value in V1400 into the accumulator. The value in V1420 is loaded into the accumulator using the Load instruction, pushing the value previously loaded in the accumulator onto the stack. The binary value in the accumulator stacks first level is multiplied by the binary value in the accumulator using the Multiply Binary Stack instruction. The Out Double instruction copies the value in the accumulator to V1500 and V1501. DirectSOFT32 Display X1 LD V1400 Load the value in V1400 into the accumulator C The unused accumulator bits are set to zero Acc. 0 0 0 0 C 3 5 0 V1400 3 5 0 Level 1 Level 2 Level 3 Level 4 V1420 0 LD V1420 Load the value in V1420 into the accumulator The unused accumulator bits are set to zero Acc. 0 0 0 0 0 0 1 4 0 1 4 Level 5 Level 6 Level 7 Level 8 X X X X X X X X Accumulator stack after 1st LDD X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X MULBS Multiply the binary value in the accumulator with the binary value in the first level of the accumulator stack Acc. 0 0 0 F 4 2 4 0 Accumulator stack after 2nd LDD Level 1 Level 2 0 X X X X X X X 0 X X X X X X X 0 X X X X X X X 0 C X X X X X X X X X X X X X X 3 X X X X X X X 5 X X X X X X X 0 X X X OUTD V1500 Copy the value in the accumulator to V1500 and V1501 Level 3 0 0 0 F 4 2 4 0 Level 4 Level 5 Level 6 Level 7 V1501 V1500 Handheld Programmer Keystrokes $ STR SHFT SHFT SHFT GX OUT L ANDST L ANDST M ORST SHFT D 3 D 3 U ISG D 3 L ANDST B 1 B 1 B 1 B 1 ENT B 1 E 4 S RST F 5 E 4 C 2 ENT A 0 A 0 ENT A 0 A 0 A 0 ENT ENT X X X Level 8 5116 DL06 Micro PLC User Manual, 1st Ed., Rev. A Standard RLL Instructions X Chapter 5: Standard RLL Instructions -Math Divide Binary by Top OF Stack (DIVBS) Divide Binary Top of Stack is a 32 bit instruction that divides the 32 bit binary value in the accumulator by the 16 bit binary value in the first level of the accumulator stack. The result resides in the accumulator and the remainder resides in the first level of the accumulator stack. Discrete Bit Flags Description SP53 SP63 SP70 DIVBS On when the value of the operand is larger than the accumulator can work with. On when the result of the instruction causes the value in the accumulator to be zero. On any time the value in the accumulator is negative. NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the value in V1400 will be loaded into the accumulator using the Load instruction. The value in V1420 and V1421 is loaded into the accumulator using the Load Double instruction also, pushing the value previously loaded in the accumulator onto the accumulator stack. The binary value in the accumulator is divided by the binary value in the first level of the accumulator stack using the Divide Binary Stack instruction. The value in the accumulator is copied to V1500 and V1501 using the Out Double instruction. DirectSOFT32 Display X1 LD V1400 Load the value in V1400 into the accumulator 0 The unused accumulator bits are set to zero Acc. 0 0 0 0 0 0 1 4 V1400 0 1 4 Level 1 Level 2 Level 3 Level 4 V1421 0 LDD V1420 Load the value in V1420 and V1421 into the accumulator Acc. 0 0 0 0 C 3 5 0 Accumulator stack after 2nd LDD DIVBS Divide the binary value in the accumulator by the binary value in the first level of the accumulator stack Level 1 Acc. 0 0 0 0 0 9 C 4 Level 2 Level 3 Level 4 Level 5 OUTD V1500 Copy the value in the accumulator to V1500 and V1501 0 0 0 0 0 9 C 4 Level 6 Level 7 Level 8 0 X X X X X X X 0 0 0 0 0 1 4 X X X X X X X 0 0 0 C V1420 3 5 0 Level 5 Level 6 Level 7 Level 8 X X X X X X X X Accumulator stack after 1st LDD X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X V1501 Handheld Programmer Keystrokes $ STR SHFT SHFT SHFT GX OUT L ANDST L ANDST D 3 SHFT D 3 D 3 D 3 I 8 D 3 V AND B 1 B 1 B 1 ENT B 1 B 1 S RST F 5 E 4 E 4 ENT A 0 A 0 ENT A 0 C 2 A 0 V1500 The remainder resides in the first stack location Level 1 ENT A 0 ENT Level 2 Level 3 Level 4 Level 5 Level 6 Level 7 Level 8 0 X X X X X X X 0 0 0 0 0 0 0 X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X DL06 Micro PLC User Manual, 1st Ed., Rev. A 5117 Chapter 5: Standard RLL Instructions - Transcendental Functions Transcendental Functions The DL06 CPU features special numerical functions to complement its real number capability. The transcendental functions include the trigonometric sine, cosine, and tangent, and also their inverses (arc sine, arc cosine, and arc tangent). The square root function is also grouped with these other functions. The transcendental math instructions operate on a real number in the accumulator (it cannot be BCD or binary). The real number result resides in the accumulator. The square root function operates on the full range of positive real numbers. The sine, cosine and tangent functions require numbers expressed in radians. You can work with angles expressed in degrees by first converting them to radians with the Radian (RAD) instruction, then performing the trig function. All transcendental functions utilize the following flag bits. Discrete Bit Flags SP53 SP63 SP70 SP72 SP73 SP75 Description On when the value of the operand is larger than the accumulator can work with. On when the result of the instruction causes the value in the accumulator to be zero. On anytime the value in the accumulator is negative. On anytime the value in the accumulator is a valid floating point number On anytime the value in the accumulator is negative. On when a real number instruction is executed and a non-real number was encountered. Sine Real (SINR) The Sine Real instruction takes the sine of the real number stored in the accumulator. The result resides in the accumulator. Both the original number and the result are in IEEE 32-bit format. Cosine Real (COSR) The Cosine Real instruction takes the cosine of the real number stored in the accumulator. The result resides in the accumulator. Both the original number and the result are in IEEE 32-bit format. S INR Tangent Real (TANR) The Tangent Real instruction takes the tangent of the real number stored in the accumulator. The result resides in the accumulator. Both the original number and the result are in IEEE 32-bit format. COSR Arc Sine Real (ASINR) The Arc Sine Real instruction takes the inverse sine of the real number stored in the accumulator. The result resides in the accumulator. Both the original number and the result are in IEEE 32-bit format. S INR AS INR 5118 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Transcendental Functions Arc Cosine Real (ACOSR) The Arc Cosine Real instruction takes the inverse cosine of the real number stored in the accumulator. The result resides in the accumulator. Both the original number and the result are in IEEE 32-bit format. COSR Arc Tangent Real (ATANR) The Arc Tangent Real instruction takes the inverse tangent of the real number stored in the accumulator. The result resides in the accumulator. Both the original number and the result are in IEEE 32-bit format. ATANR Square Root Real (SQRTR) The Square Root Real instruction takes the square root of the real number stored in the accumulator. The result resides in the accumulator. Both the original number and the result are in IEEE 32-bit format. SQR TR NOTE: The square root function can be useful in several situations. However, if you are trying to do the square-root extract function for an orifice flow meter measurement as the PV to a PID loop, note that the PID loop already has the square-root extract function built in. The following example takes the sine of 45 degrees. Since these transcendental functions operate only on real numbers, we do a LDR (load real) 45. The trig functions operate only in radians, so we must convert the degrees to radians by using the RADR command. After using the SINR (Sine Real) instruction, we use an OUTD (Out Double) instruction to move the result from the accumulator to V-memory. The result is 32-bits wide, requiring the Out Double to move it. DirectS OF T 32 Dis play X1 LDR R 45 Load the real number 45 into the accumulator. Accumula tor contents (viewed a s rea l number) 45. 000000 R ADR C onvert the degrees into radians , leaving the res ult in the accumulator. 0. 7358981 S INR Take the s ine of the number in the accumulator, which is in radians . 0. 7071067 OU T D V2000 C opy the value in the accumulator to V2000 and V2001. 0. 7071067 NOTE: The current HPP does not support real number entry with automatic conversion to the 32-bit IEEE format. You must use DirectSOFT32 for entering real numbers, using the LDR (Load Real) instruction. DL06 Micro PLC User Manual, 1st Ed., Rev. A 5119 Chapter 5: Standard RLL Instructions - Bit Operation Bit Operation Instructions Sum (SUM) The Sum instruction counts number of bits that are set to 1 in the accumulator. The HEX result resides in the accumulator. Discrete Bit Flags SP63 SUM Description On when the result of the instruction causes the value in the accumulator to be zero. In the following example, when X1 is on, the value formed by discrete locations X10X17 is loaded into the accumulator using the Load Formatted instruction. The number of bits in the accumulator set to 1 is counted using the Sum instruction. The value in the accumulator is copied to V1500 using the Out instruction. Direct SOFT32 Display X1 LDF K8 Load the value represented by discrete locations X10X17 into the accumulator Acc. X10 The unused accumulator bits are set to zero X17 X16 X15 X14 X13 X12 X11 X10 ON ON OFF OFF ON OFF ON ON 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 7 1 6 5 1 0 4 3 0 1 2 0 1 1 0 1 SUM Acc. 0 0 0 0 0 0 0 5 Sum the number of bits in the accumulator set to 1 OUT V1500 Copy the value in the lower 16 bits of the accumulator to V1500 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST S RST D 3 SHFT PREV U ISG PREV B 1 ENT F 5 M ORST PREV B 1 B 1 A 0 ENT F 5 A 0 A 0 ENT I 8 ENT 0 0 0 5 V1500 5120 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Bit Operation Shift Left (SHFL) Shift Left is a 32 bit instruction that shifts the bits in the accumulator a specified number (Aaaa) of places to the left. The vacant positions are filled with zeros and the bits shifted out of the accumulator are discarded. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K SHFL A aaa DL06 Range aaa See memory map 1-32 Discrete Bit Flags SP63 SP70 Description On when the result of the instruction causes the value in the accumulator to be zero. On anytime the value in the accumulator is negative. In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into the accumulator using the Load Double instruction. The bit pattern in the accumulator is shifted 2 bits to the left using the Shift Left instruction. The value in the accumulator is copied to V2010 and V2011 using the Out Double instruction. Direct SOFT32 X1 LDD V2000 Load the value in V2000 and V2001 into the accumulator 6 V2001 7 0 5 V2000 3 3 1 0 3 1 0 1 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 SHFL K2 The bit pattern in the accumulator is shifted 2 bit positions to the left Acc. 0 1 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 8 1 7 0 6 5 0 0 4 3 0 0 2 0 1 0 0 1 Shifted out of the accumulator . . . . OUTD V2010 Copy the value in the accumulator to V2010 and V2011 Acc. 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 1 0 0 0 0 1 0 1 1 0 0 0 0 0 0 1 0 0 1 0 0 1 1 0 0 0 1 0 8 0 7 0 6 5 0 0 4 3 0 0 2 1 1 0 0 0 9 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST S RST SHFT D 3 SHFT D 3 H 7 C 2 B 1 ENT D 3 F 5 C 2 L ANDST A 0 B 1 A 0 C 2 A 0 A 0 A 0 ENT ENT ENT C 1 4 C 4 0 4 V2011 V2010 DL06 Micro PLC User Manual, 1st Ed., Rev. A 5121 Chapter 5: Standard RLL Instructions - Bit Operation Shift Right (SHFR) Shift Right is a 32 bit instruction that shifts the bits in the accumulator a specified number (Aaaa) of places to the right. The vacant positions are filled with zeros and the bits shifted out of the accumulator are lost. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K SHFR A aaa DL06Range aaa See memory map 1-32 Discrete Bit Flags SP63 SP70 Description On when the result of the instruction causes the value in the accumulator to be zero. On anytime the value in the accumulator is negative. In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into the accumulator using the Load Double instruction. The bit pattern in the accumulator is shifted 2 bits to the right using the Shift Right instruction. The value in the accumulator is copied to V2010 and V2011 using the Out Double instruction. Direct SOFT32 X1 LDD V2000 Load the value in V2000 and V2001 into the accumulator 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 SHFR K2 The bit pattern in the accumulator is shifted 2 bit positions to the right Acc. 0 1 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 8 1 7 0 6 5 0 0 4 3 0 0 2 0 1 0 0 1 Constant 6 V2001 7 0 5 V2000 3 1 0 1 3 1 0 1 ... . 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 Acc. 0 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 1 1 0 8 0 7 0 6 5 1 0 4 3 0 0 Shifted out of the accumulator OUTD V2010 Copy the value in the accumulator to V2010 and V2011 2 0 1 0 0 0 1 9 C 1 4 C 4 0 V2011 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST S RST SHFT D 3 SHFT D 3 H 7 C 2 B 1 ENT D 3 F 5 C 2 R ORN A 0 B 1 A 0 C 2 A 0 A 0 A 0 ENT ENT ENT V2010 5122 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Bit Operation Rotate Left (ROTL) Rotate Left is a 32 bit instruction that rotates the bits in the accumulator a specified number (Aaaa) of places to the left. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K R OTL A aaa DL06 Range aaa See memory map 1-32 In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into the accumulator using the Load Double instruction. The bit pattern in the accumulator is rotated 2 bit positions to the left using the Rotate Left instruction. The value in the accumulator is copied to V1500 and V1501 using the Out Double instruction. DirectSOFT32 Display X1 V1401 LDD V1400 Load the value in V1400 and V1401 into the accumulator ROTL K2 The bit pattern in the accumulator is rotated 2 bit positions to the left Acc. 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 0 1 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 8 1 7 0 6 0 5 0 4 0 3 0 2 0 1 0 0 1 6 7 0 5 V1400 3 1 0 1 OUTD V1500 Copy the value in the accumulator to V1500 and V1501 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 Acc. 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 8 0 7 0 6 0 5 0 4 0 3 0 2 1 1 0 0 1 9 C 1 4 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST R ORN SHFT D 3 O INST# D 3 B 1 ENT D 3 T MLR L ANDST B 1 F 5 B 1 C 2 A 0 E 4 A 0 ENT A 0 ENT A 0 ENT V1501 C 4 0 5 V1500 DL06 Micro PLC User Manual, 1st Ed., Rev. A 5123 Chapter 5: Standard RLL Instructions- -Bit Operation Rotate Right (ROTR) Rotate Right is a 32 bit instruction that rotates the bits in the accumulator a specified number (Aaaa) of places to the right. Operand Data Type ....................................A V memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K R OTR A aaa DL06 Range aaa See memory map 1-32 In the following example, when X1 is on, the value in V1400 and V1401 will be loaded into the accumulator using the Load Double instruction. The bit pattern in the accumulator is rotated 2 bit positions to the right using the Rotate Right instruction. The value in the accumulator is copied to V1500 and V1501 using the Out Double instruction. Direct SOFT Display V1401 X1 LDD V1400 Load the value in V1400 and V1401 into the accumulator 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 ROTR K2 The bit pattern in the accumulator is rotated 2 bit positions to the right Acc. 0 1 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 8 1 7 0 6 5 0 0 4 3 0 0 2 0 1 0 0 1 6 7 0 5 3 V1400 1 0 1 OUTD V1500 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 Copy the value in the accumulator to V1500 and V1501 Acc. 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 1 0 0 1 0 0 1 1 0 8 0 7 0 6 5 1 0 4 3 0 0 2 0 1 0 0 0 5 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST R ORN SHFT D 3 O INST# D 3 B 1 ENT D 3 T MLR R ORN B 1 F 5 B 1 C 2 A 0 E 4 A 0 ENT A 0 ENT A 0 9 C 1 4 C 4 0 V1501 V1500 ENT 5124 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Bit Operation Encode (ENCO) The Encode instruction encodes the bit position in the accumulator having a value of 1, and returns the appropriate binary representation. If the most significant bit is set to 1 (Bit 31), the Encode instruction would place the value HEX 1F (decimal 31) in the accumulator. If the value to be encoded is 0000 or 0001, the instruction will place a zero in the accumulator. If the value to be encoded has more than one bit position set to a 1, the least significant 1 will be encoded and SP53 will be set on. Discrete Bit Flags SP53 SP63 SP70 ENCO Description On when the value of the operand is larger than the accumulator can work with. On when the result of the instruction causes the value in the accumulator to be zero. On anytime the value in the accumulator is negative. NOTE: The status flags are only valid until another instruction that uses the same flags is executed. In the following example, when X1 is on, The value in V2000 is loaded into the accumulator using the Load instruction. The bit position set to a 1 in the accumulator is encoded to the corresponding 5 bit binary value using the Encode instruction. The value in the lower 16 bits of the accumulator is copied to V2010 using the Out instruction. Direct SOFT32 X1 1 LD V2000 Load the value in V2000 into the lower 16 bits of the accumulator 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 8 0 7 0 6 5 0 0 4 3 0 0 2 0 1 0 0 0 V2000 0 0 0 Bit postion 12 is converted to binary ENCO 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 7 0 6 5 0 0 4 3 0 1 2 1 1 0 0 0 Encode the bit position set to 1 in the accumulator to a 5 bit binary value OUT V2010 Copy the value in the lower 16 bits of the accumulator to V2010 0 0 0 C Binary value for 12. V2010 Handheld Programmer Keystrokes $ STR SHFT SHFT GX OUT L ANDST E 4 D 3 N TMR SHFT C 2 V AND B 1 ENT C 2 O INST# C 2 A 0 ENT A 0 B 1 A 0 ENT A 0 A 0 ENT DL06 Micro PLC User Manual, 1st Ed., Rev. A 5125 Chapter 5: Standard RLL Instructions - Bit Operation Decode (DECO) The Decode instruction decodes a 5 bit binary value of 031 (01F HEX) in the accumulator by setting the appropriate bit DECO position to a 1. If the accumulator contains the value F (HEX), bit 15 will be set in the accumulator. If the value to be decoded is greater than 31, the number is divided by 32 until the value is less than 32 and then the value is decoded. In the following example when X1 is on, the value formed by discrete locations X10X14 is loaded into the accumulator using the Load Formatted instruction. The five bit binary pattern in the accumulator is decoded by setting the corresponding bit position to a 1 using the Decode instruction. Direct SOFT32 X1 LDF K5 Load the value in represented by discrete locations X10X14 into the accumulator Acc. X10 X14 X13 X12 X11 X10 OFF ON OFF ON ON 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 7 0 6 5 0 0 4 3 0 1 2 0 1 1 0 1 DECO 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 Decode the five bit binary pattern in the accumulator and set the corresponding bit position to a 1 Handheld Programmer Keystrokes $ STR SHFT SHFT L ANDST D 3 D 3 E 4 C 2 B 1 ENT F 5 O INST# B 1 ENT A 0 F 5 ENT Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 8 0 7 0 6 5 0 0 The binary vlaue is converted to bit position 11. 4 3 0 0 2 0 1 0 0 0 5126 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Number Conversion Number Conversion Instructions (Accumulator) Binary (BIN) The Binary instruction converts a BCD value in the accumulator to the equivalent binary value. The result resides in the accumulator. Discrete Bit Flags SP63 SP70 SP75 BIN Description On when the result of the instruction causes the value in the accumulator to be zero. On anytime the value in the accumulator is negative. On when a BCD instruction is executed and a NONBCD number was encountered. In the following example, when X1 is on, the value in V2000 and V2001 is loaded into the accumulator using the Load Double instruction. The BCD value in the accumulator is converted to the binary (HEX) equivalent using the BIN instruction. The binary value in the accumulator is copied to V2010 and V2011 using the Out Double instruction. (The handheld programmer will display the binary value in V2010 and V2011 as a HEX value.) DirectS OF T 32 X1 LDD V2000 Load the value in V2000 and V2001 into the accumulator 8 4 Acc. 0 0 2 0 1 0 8 0 4 2 0 0 1 0 8 0 4 0 2 1 0 0 8 0 4 0 2 1 1 0 8 4 1 0 2 0 1 0 8 0 4 2 1 0 1 1 8 0 4 0 2 1 1 0 8 1 4 0 2 0 1 1 0 V2001 0 0 2 8 V2000 5 2 9 BCD Value 28529 = 16384 + 8192 + 2048 + 1024 + 512 + 256 + 64 + 32 + 16 + 1 Binary Equivalent Value 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 Convert the BCD value in the accumulator to the binary equivalent value Acc. 0 2 1 4 7 4 4 8 3 6 4 8 0 0 1 0 7 3 7 4 1 8 2 4 5 3 6 8 7 0 9 1 2 0 2 6 8 4 3 5 4 5 6 0 1 3 4 2 1 7 7 2 8 0 6 7 1 0 8 8 6 4 0 0 3 3 5 5 4 4 3 2 1 6 7 7 7 2 1 6 0 8 3 8 8 6 0 8 0 4 1 9 4 3 0 4 0 2 0 9 7 1 5 2 0 0 1 0 4 8 5 7 6 5 2 4 2 8 8 0 2 6 2 1 4 4 0 1 3 1 0 7 2 0 6 5 5 3 6 0 3 2 7 6 8 1 1 1 6 3 8 4 8 1 9 2 0 4 0 9 6 1 2 0 4 8 1 1 0 2 4 1 1 5 2 1 5 2 6 7 0 6 5 1 1 3 2 4 3 1 0 1 8 6 2 0 4 1 0 2 0 1 1 BIN 1 6 2 4 8 OU T D V2010 Copy the binary data in the accumulator to V2010 and V2011 0 0 0 0 6 F 7 1 V2011 V2010 The Binary (HEX) value copied to V2010 S tandard R LL Ins tructions Handheld Programmer Keys trokes $ STR S HF T S HF T GX OU T L ANDS T B 1 B 1 D 3 I D 3 8 E NT D 3 N T MR E NT C 2 A 0 B 1 A 0 E NT C 2 A 0 A 0 A 0 E NT S HF T DL06 Micro PLC User Manual, 1st Ed., Rev. A 5127 Chapter 5: Standard RLL Instructions - Number Conversion Binary Coded Decimal (BCD) The Binary Coded Decimal instruction converts a binary value in the accumulator to the equivalent BCD value. The result resides in the accumulator. Discrete Bit Flags SP63 SP70 BCD Description On when the result of the instruction causes the value in the accumulator to be zero. On anytime the value in the accumulator is negative. In the following example, when X1 is on, the binary (HEX) value in V2000 and V2001 is loaded into the accumulator using the Load Double instruction. The binary value in the accumulator is converted to the BCD equivalent value using the BCD instruction. The BCD value in the accumulator is copied to V2010 and V2011 using the Out Double instruction. DirectS OF T 32 X1 LDD V2000 Load the value in V2000 and V2001 into the accumulator 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 Acc. 0 2 1 4 7 4 4 8 3 6 4 8 0 1 0 7 3 7 4 1 8 2 4 0 5 3 6 8 7 0 9 1 2 0 0 2 6 8 4 3 5 4 5 6 1 3 4 2 1 7 7 2 8 0 6 7 1 0 8 8 6 4 0 3 3 5 5 4 4 3 2 0 1 6 7 7 7 2 1 6 0 0 8 3 8 8 6 0 8 4 1 9 4 3 0 4 0 2 0 9 7 1 5 2 0 1 0 4 8 5 7 6 0 5 2 4 2 8 8 0 0 2 6 2 1 4 4 1 3 1 0 7 2 0 6 5 5 3 6 0 3 2 7 6 8 1 1 6 3 8 4 1 8 1 9 2 0 1 4 0 9 6 2 0 4 8 1 1 0 2 4 1 5 1 2 8 1 2 5 6 7 6 5 0 1 1 6 2 4 8 1 3 2 4 3 1 1 6 0 8 2 1 0 1 Binary Value 0 V2001 0 0 0 6 V2000 F 7 1 0 0 4 2 1 BC D 16384 + 8192 + 2048 + 1024 + 512 + 256 + 64 + 32 + 16 + 1 = 28529 BC D E quivalent Value 8 Acc. 0 4 2 0 0 1 8 4 0 2 1 0 0 8 4 2 0 1 8 0 0 4 2 1 0 8 1 4 2 0 0 1 8 4 1 2 1 0 1 8 4 2 1 1 8 0 1 4 2 1 1 C onvert the binary value in the accumulator to the BC D equivalent value 0 0 0 0 0 1 0 0 0 0 0 0 OU T D V2010 C opy the BC D value in the accumulator to V2010 and V2011 0 0 0 2 8 5 2 9 T he BC D value copied to V2010 and V2011 V2011 V2010 Handheld Programmer Keys trokes $ STR S HF T S HF T GX OU T L ANDS T B 1 S HF T D 3 D 3 C 2 D 3 B 1 E NT D 3 E NT C 2 A 0 B 1 A 0 E NT C 2 A 0 A 0 A 0 E NT 5128 DL06 Micro PLC User Manual, 1st Ed., Rev. A Chapter 5: Standard RLL Instructions - Number Conversion Invert (INV) The Invert instruction inverts or takes the ones INV complement of the 32 bit value in the accumulator. The result resides in the accumulator. In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into the accumulator using the Load Double instruction. The value in the accumulator is inverted using the Invert instruction. ...

Textbooks related to the document above:

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Walla Walla University - ENGR - 221
AnnouncementsInternal ForcesTodays ObjectiveUse the method of sections for determining internal forces in 2-D load casesClass Activities Applications Types of Internal Forces Steps for Determining Internal Forces ExamplesEngr221 Chapter 7
Walla Walla University - ENGR - 355
Engr355Embedded Systems DesignPCB LayoutRevised 1/25/2009NOTE: The following is an overview. For details necessary to complete board layout, refer to the tutorials found at:http:/www.wallawalla.edu/academics/departments/engineering/students/cl
Walla Walla University - ENGR - 355
Walla Walla University - ENGR - 354
INTEGRATED CIRCUITSDATA SHEETFor a complete data sheet, please also download: The IC06 74HC/HCT/HCU/HCMOS Logic Family Specifications The IC06 74HC/HCT/HCU/HCMOS Logic Package Information The IC06 74HC/HCT/HCU/HCMOS Logic Package Outlines74HC
Walla Walla University - CPTR - 350
Getting Started with xspim1Getting Started with xspimIf you are going to use xspim on Unix or Linux, this is the rst section to read. If you are going to use PCSpim on Microsoft Windows, skip to the next section and start there. After you read t
Walla Walla University - ENGR - 355
C8051F41x2.0 V, 32/16 kB, smaRTClock, 12-Bit ADC MCUAnalog Peripherals12-bit ADCHigh-Speed 8051 CPU--1 LSB INL; no missing codes Programmable Throughput up to 200 ksps Up to 24 External Inputs; programmable as single-ended or differential
Walla Walla University - ENGR - 434
Introduction to CMOS VLSI DesignSilicon-on-Insulator (SOI)Curtis Nelson Walla Walla CollegeOutlineOverview of Silicon-on-Insulator (SOI) Floating Body Voltage SOI Advantages SOI Disadvantages Implications for Circuit Styles SummarySilicon on
Walla Walla University - ENGR - 434
Introduction to CMOS VLSI DesignPackage, Power, and I/OCurtis Nelson Walla Walla CollegeOutlinePackaging Power Distribution I/O ProtectionPackage, Power, and I/OCMOS VLSI DesignSlide 21PackagesPackage functions Electrical connection
Walla Walla University - ENGR - 434
Curtis Nelson Walla Walla CollegeIntroduction to SPICE DC Analysis Transient Analysis Subcircuits EldoSPICE SimulationCMOS VLSI DesignSlide 21SPICE is the most commonly used analog circuit simulator The simulator was developed at the Univ
Walla Walla University - ENGR - 221
AnnouncementsEquilibrium of a Particle in 2-DTodays Objectives Draw a free body diagram (FBD) Apply equations of equilibrium to solve a 2-D problemClass Activities Applications What, why, and how of a Free Body Diagram Equations of equilibr
Walla Walla University - ENGR - 355
SN54AHC573, SN74AHC573 OCTAL TRANSPARENT D-TYPE LATCHES WITH 3-STATE OUTPUTSSCLS242J OCTOBER 1995 REVISED MARCH 2002D D DOperating Range 2-V to 5.5-V VCC 3-State Outputs Directly Drive Bus Lines Latch-Up Performance Exceeds 250 mA Per JESD 17
Walla Walla University - ENGR - 354
Engr354: Digital Logic CircuitsChapter 8 Sequential Logic Design Practices Dr. Curtis NelsonSequential Logic Design Principles Sequential-Circuit Documentation Standards Latches and Flip-Flops Sequential PLDs Counters Shift RegistersEngr
Walla Walla University - ENGR - 354
ENGR 354 - Digital Logic CircuitsIntroduction to &quot;REAL&quot; Logic GatesLogic FamiliesThe most commonly used logic circuits can be divided into two general categories. The first is TransistorTransistor Logic (TTL) and the second is Complementary Metal
Walla Walla University - ENGR - 354
SN54HC00, SN74HC00 QUADRUPLE 2-INPUT POSITIVE-NAND GATESSCLS181E DECEMBER 1982 REVISED AUGUST 2003D D DWide Operating Voltage Range of 2 V to 6 V Outputs Can Drive Up To 10 LSTTL Loads Low Power Consumption, 20-A Max ICCD D DTypical tpd =
Walla Walla University - ENGR - 355
Advanced High-Speed CMOS (AHC) Logic FamilySCAA034C December 20021IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to i
Walla Walla University - ENGR - 434
Introduction to CMOS VLSI DesignCurtis NelsonWalla Walla UniversityIntroductionCMOS VLSI DesignSlide 1OutlineCourse organization History of the integrated circuit Trends in the semiconductor industry System design versus custom chip design
Walla Walla University - ENGR - 355
Analog-to-Digital ConversionCurtis A. Nelson Engr355IntroductionConnecting digital circuitry to sensor devices is simple if the sensor devices are inherently digital themselves. Switches, relays, and encoders are easily interfaced with gate circ
Walla Walla University - ENGR - 355
Engr355 - Embedded Systems DesignBoard Assembly and TestingRevised 2/11/2009We will begin the process of &quot;stuffing&quot; your circuit boards on the afternoon of Wednesday, February 11. All work will be done in the Projects lab where your boards and pa
Walla Walla University - ENGR - 434
Introduction to CMOS VLSI DesignDesign for SkewCurtis Nelson Walla Walla CollegeOutlineClock Distribution Clock Skew Skew-Tolerant Static Circuits Traditional Domino Circuits Skew-Tolerant Domino CircuitsDesign for SkewCMOS VLSI DesignSli
Walla Walla University - ENGR - 434
Curtis Nelson Walla Walla CollegeIntroduction Wire Resistance Wire Capacitance Wire RC Delay Crosstalk Wire Engineering RepeatersWire EngineeringCMOS VLSI DesignSlide 21Chips are mostly made of wires called interconnect In stick diagram,
Walla Walla University - CPTR - 350
4.15Historical Perspective and Further Readingsupercomputer: Any machine still on the drawing board.Stan Kelly-Bootle, The Devil's DP Dictionary, 1981This section discusses the history of the first pipelined processors, the earliest superscala
Walla Walla University - ENGR - 354
Engr354Homework #6DUE: Friday, October 31Goals Learn about the features of the logic I/O board Gain experience in building a simple logic circuit Verify the theory of function reduction that we have been using in classTo DoBuild the circu
Walla Walla University - MATH - 181
Exam III Review SheetMATH 181, Spring 2008This exam will cover sections 3.4-3.9 in your text. You should know general terms and definitions from each of these sections, review the homework given for these sections, and pay particular attention to t
Walla Walla University - MATH - 181
Analytic Geometry and Calculus I (MATH 181)Winter Quarter, 2004Time/Place: Instructor: Oce: Oce Hours: Text: Webpage: MWRF 8:00-8:50 a.m. KRH 345Jonathan Duncan (duncjo@wwc.edu) Kretchmar Hall 330, phone: 527-2097 10:00 T, 11:00 R, 1:00 MTWRF, or
Walla Walla University - MATH - 181
Exam III Review SheetMATH 181, Fall 2006This exam will cover sections 3.3-4.1 in your text. You should know general terms and denitions from each of these sections, review the homework given for these sections, and pay particular attention to the s
Walla Walla University - MATH - 181
Exam II Review SheetMATH 181, Fall 2006This exam will cover sections 2.1-3.2 in your text. You should know general terms and denitions from each of these sections, review the homework given for these sections, and pay particular attention to the su
Walla Walla University - MATH - 181
Exam I Review SheetMATH 181, Spring 2008This exam will cover sections P.1-2.1 in your text. You should know general terms and denitions from each of these sections, review the homework given for these sections, and pay particular attention to the s
Walla Walla University - MATH - 181
Analytic Geometry and Calculus I (MATH 181)Final Exam Review Sheet, Spring 2008This exam will cover sections 1.1-4.4 in your text. You should know general terms and denitions from each of these sections, review previous exams, homework assignments,
Walla Walla University - MATH - 181
Final Exam Review SheetMATH 181, Winter 2004This exam will cover sections 1.1-4.4 in your text. You should know general terms and definitions from each of these sections, review previous exams, homework assignments, and review sheets, and pay parti
Walla Walla University - MATH - 181
Exam II Review SheetMATH 181, Spring 2008This exam will cover sections 2.2-3.3 in your text. You should know general terms and denitions from each of these sections, review the homework given for these sections, and pay particular attention to the
Walla Walla University - MATH - 250
Exam II Review SheetMATH 250, Spring 2007This exam will cover sections 4.1-4.3, 5.1-5.3, and 7.1, 7.2, and 7.4 in your text. You should know general terms and definitions, review the homework, and pay particular attention to the following topics an
Walla Walla University - MATH - 250
Exam II Review SheetMATH 250, Spring 2008This exam will cover sections 4.1-4.3, 5.1-5.3, 7.1, 7.2, and 7.4 in your text. You should know general terms and definitions, review the homework, and pay particular attention to the following topics and pr
Walla Walla University - MATH - 250
Exam III Review SheetMATH 250, Spring 2007This exam will cover sections 8.1-8.5, and 9.1-9.5 in your text. You should know general terms and definitions from each of these sections, review the homework given for these sections, and pay particular a
Walla Walla University - MATH - 250
Discrete Mathematics (MATH 250)Spring Quarter, 2004Time/Place: Instructor: Office: Office Hours: Text: Webpage: MWRF 12:00-12:50 p.m. KRH 345Jonathan Duncan (duncjo@wwc.edu) Kretchmar Hall 330, phone: 527-2097 10:00 MWRF, 12:00 T, 1:00 R, 3:00 M,
Walla Walla University - MATH - 250
Discrete Mathematics (MATH 250)Spring Quarter, 2003Time/Place: Instructor: Oce: Oce Hours: Text: Webpage: MWRF 12:00-12:50 p.m. KRH 345Jonathan Duncan (duncjo@wwc.edu) Kretchmar Hall 330, phone: 527-2097 10:00 MTWRF, 4:00 MWR, or by appointment D
Walla Walla University - MATH - 250
Exam III Review SheetMATH 250, Spring 2004This exam will cover sections 7.1-7.5, and 8.1-8.4 in your text. You should know general terms and denitions from each of these sections, review the homework given for these sections, and pay particular att
Walla Walla University - MATH - 250
Discrete Mathematics (MATH 250)Tentative Schedule, Spring Quarter 2003Last Modified 30 March 2003Week 12345678910Section &amp; Topic Homework Assignment Course Introduction, 1.1: Logic pg 15: 1,7,8,15,16,20,22,25,33,39 1.2: Propos
Walla Walla University - MATH - 250
Discrete Mathematics (MATH 250)Homework Sets, Spring Quarter 2007Last Modied: 20 March 2007Section 1.1 1.2 1.3 1.4 1.5 1.6 2.1 2.2 2.3 2.4 Exam I 4.1 4.2 4.3 5.1 5.2 5.3 7.1 7.2 7.4 7.5 7.6 Exam II 8.1 8.2 8.3 8.4 8.5 9.1 9.2 9.3 9.4 9.5 Exam III
Walla Walla University - MATH - 250
Final Exam Review SheetMATH 250, Spring 2004This exam will cover sections 1.1-1.6, 2.1-2.4, 4.1-4.3, 5.1-5.3, 7.1, 7.2, 7.4, 8.1-8.5, 9.1-9.5, 10.1, 10.3, and 10.4 in your text. You should know general terms, denitions and theorems from each of the
Walla Walla University - MATH - 250
Exam I Review SheetMATH 250, Spring 2008This exam will cover sections 1.1-1.6 and 2.1-2.4 in your text. You should know general terms and definitions from each of these sections, review the homework given for these sections, and pay particular atte
Walla Walla University - MATH - 250
Exam I - Answers to Review SheetMATH 250, Spring 20031. Let p : You get an A on the final, q : You do every exercise in this book, and r : You get an A in the class. Translate between English and propositional logic or as appropriate. Construct a t
Walla Walla University - MATH - 250
Exam I Review SheetMATH 250, Spring 2004This exam will cover sections 1.1-1.8 and 2.4 in your text. You should know general terms and denitions from each of these sections, review the homework given for these sections, and pay particular attention
Walla Walla University - MATH - 250
Exam III - Answers to Review SheetMATH 250, Spring 20031. Determine which of the properties: Reflexive, Symmetric, Antisymmetric, and Transitive, is enjoyed by each of the following relations. (a) Not reflexive, symmetric, antisymmetric, or transit
Walla Walla University - ENGR - 325
Physical Properties of Thermoelement MaterialsThermoelement MaterialProperty Melting point (solidus temp.) C F Resistivity cm at 0C at 20C cmil/ft at 0C at 20C Temperature coefficient of resistance, / C (0 to 100C)J Iron J, C, T Constantan T Copp
Walla Walla University - ENGR - 312
Effects of Neutrons on Programmable LogicWhite PaperDecember 2002Table of ContentsAbstract . Introduction.. Neutrons How and Why . What Happens When Neutrons Strike Silicon Integrated Circuits? .. Consequences of Neutron-Induced Single-Event U
Walla Walla University - ENGR - 433
Libraries GuideLibraries Guide - ISE 4Printed in U.S.A.Libraries GuideR&quot;Xilinx&quot; and the Xilinx logo shown above are registered trademarks of Xilinx, Inc. Any rights not expressly granted herein are reserved. CoolRunner, RocketChips, RocketI
Walla Walla University - R - 2
By Rob Frohne, KL7NAA High-Performance, SingleSignal, Direct-Conversion Receiver with DSP FilteringBy adding a DSP demodulator to a well-established and popular receiver designKK7Bs R2 you can have a bit of the latest filter technology at your fin
Walla Walla University - ENGR - 433
Digilent, Inc. 125 SE High Street Pullman, WA 99163 (509) 334 6306 (Voice and Fax) www.digilentinc.comPRELIMINARYDigilab DIO1 Reference ManualRevision: May 7, 2002 Overview The Digilab Digital I/O board 1 (DIO1) is one of several expansion board
Walla Walla University - ENGR - 433
1 Logic Implementation for a Xilinx FPGA using VHDL WWU Linux platform assumed. rev 12/01/08 The following steps (or design flow) are used to implement a digital system design described with VHDL targeting a Xilinx FPGA: - Create a directory for your
Walla Walla University - ENGR - 433
Digilent, Inc. 125 SE High Street Pullman, WA 99163 (509) 334 6306 (Voice and Fax) www.digilentinc.comPRELIMINARYDigilab 2E Reference ManualRevision: April 14, 2002 Overview The Digilab 2E (D2E) development board featuring the Xilinx Spartan 2E
Walla Walla University - ENGR - 433
Libraries GuideISE 8.1iRRRXilinx is disclosing this Document and Intellectual Property (hereinafter &quot;the Design&quot;) to you for use in the development of designs to operate on, or interface with Xilinx FPGAs. Except as stated herein, none of t
Walla Walla University - ENGR - 434
MOSIS PARAMETRIC TEST RESULTS RUN: N8BN TECHNOLOGY: SCN05H VENDOR: AMI FEATURE SIZE: 0.5 micronsINTRODUCTION: This report contains the lot average results obtained by MOSIS from measurements of MOSIS test structures on each wafer of this fabricatio
Walla Walla University - ENGR - 325
Reference TemperaturesWe cannot build a temperature divider as we can a voltage divider, nor can we add temperatures as we would add lengths to measure distance. We must rely upon temperatures established by physical phenomena which are easily obser
Walla Walla University - ENGR - 433
ENGR-433 HW # 1 Due Friday 1) As shown in the circuit below, a 74ALS04B inverter (A) is connected to eleven 74AS04 inverters. How many 74ALS04B inverters could also be driven simultaneously by inverter A without overloading it? (static currents assum
Walla Walla University - ENGR - 433
Development System Reference GuideRRXilinx is disclosing this Document and Intellectual Property (hereinafter &quot;the Design&quot;) to you for use in the development of designs to operate on, or interface with Xilinx FPGAs. Except as stated herein, non
Walla Walla University - ENGR - 433
Synthesis and Simulation Design Guide8.1iRRXilinx is disclosing this Document and Intellectual Property (hereinafter the Design) to you for use in the development of designs to operate on, or interface with Xilinx FPGAs. Except as stated here
Walla Walla University - CPTR - 350
Instruction fetch 0 MemRead ALUSrcA = 0 IorD = 0 IRWrite ALUSrcB = 01 ALUOp = 00 PCWrite PCSource = 00Instruction decode/ register fetch 1 ALUSrcA = 0 ALUSrcB = 11 ALUOp = 00StartMemory address computation 2 ALUSrcA = 1 ALUSrcB = 10 ALUOp = 00
Walla Walla University - CPTR - 215
This is from a Silicon Graphics Corp. assembly programming manual. Silicon Graphics company was a developer and user of MIPS processors.
Walla Walla University - ENGR - 433
HW #4Digital DesignA circuit sometimes needed in the design of computer arithmetic logic units is a comparator that will compare two binary numbers and determine if they are equal or not. For simplicity, assume that we need a comparator that will
Walla Walla University - ENGR - 433
0RSpartan-IIE 1.8V FPGA Family: Functional Description0 0DS077-2 (v2.0) November 18, 2002Product Specification Values stored in static memory cells control all the configurable logic elements and interconnect resources. These values load int
Walla Walla University - ENGR - 325
Introduction and Specifications SPECIFICATIONS11-4. SPECIFICA TIONSSpecifications for the 8842A are given in Table 1-1. External dimensions are shown in Figure 1-1.DC VOLTAGE Input Characteristics FULL SCALE 5 DIGITS 19.9999 mV 199.999 mV 1.99