0% found this document useful (0 votes)
38 views

dl06 2

Uploaded by

Daniel Situmeang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

dl06 2

Uploaded by

Daniel Situmeang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 370

DL06 User Manual

Manual Number: D0-06USER-M

Volume 2 of 2
WARNING
Thank you for purchasing automation equipment from Automationdirect.com®, doing business as,
AutomationDirect. 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 on-
line 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
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 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 disclaims any proprietary interest in the marks and names of others.
Copyright 2006, 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 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, en faisant des
affaires comme, AutomationDirect. Nous tenons à ce que votre nouvel équipement d'automatisation fonctionne en
toute sécurité. Toute personne qui installe ou utilise cet équipement doit lire la présente publication (et toutes les
autres publications pertinentes) avant de l'installer ou de l'utiliser.
Afin de réduire au minimum le risque d'éventuels problèmes de sécurité, vous devez respecter tous les codes locaux et
nationaux applicables régissant l'installation et le fonctionnement de votre équipement. Ces codes diffèrent d'une
région à l'autre et, habituellement, évoluent au fil du temps. Il vous incombe de déterminer les codes à respecter et
de vous assurer que l'équipement, l'installation et le fonctionnement sont conformes aux exigences de la version la
plus récente de ces codes.
Vous devez, à tout le moins, respecter toutes les sections applicables du Code national de prévention des incendies,
du Code national de l'électricité et des codes de la National Electrical Manufacturer's Association (NEMA). Des
organismes de réglementation ou des services gouvernementaux locaux peuvent également vous aider à déterminer
les codes ainsi que les normes à respecter pour assurer une installation et un fonctionnement sûrs.
L'omission de respecter la totalité des codes et des normes applicables peut entraîner des dommages à l'équipement
ou causer de graves blessures au personnel. Nous ne garantissons pas que les produits décrits dans cette publication
conviennent à votre application particulière 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 défaillances et ne sont ni conçus ni fabriqués pour l'utilisation ou la revente
en tant qu'équipement de commande en ligne dans des environnements dangereux nécessitant une sécurité absolue,
par exemple, l'exploitation d'installations nucléaires, les systèmes de navigation aérienne ou de communication, le
contrôle de la circulation aérienne, les équipements de survie ou les systèmes d'armes, pour lesquels la défaillance du
produit peut provoquer la mort, des blessures corporelles ou de graves dommages matériels ou environnementaux
(«activités à risque élevé»). La société AutomationDirect nie toute garantie expresse ou implicite d'aptitude à
l'emploi en ce qui a trait aux activités à risque élevé.
Pour des renseignements additionnels touchant la garantie et la sécurité, veuillez consulter la section Modalités 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 supplémentaires, n'hésitez pas à nous téléphoner au
770-844-4200.
Cette publication s'appuie sur l'information qui était disponible au moment de l'impression. À la société
AutomationDirect, nous nous efforçons constamment d'améliorer nos produits et services. C'est pourquoi nous
nous réservons le droit d'apporter des modifications aux produits ou aux publications en tout temps, sans préavis ni
quelque obligation que ce soit. La présente publication peut aussi porter sur des caractéristiques susceptibles de ne
pas être offertes dans certaines versions révisées du produit.

Marques de commerce
La présente publication peut contenir des références à des produits fabriqués ou offerts par d'autres entreprises. Les
désignations des produits et des entreprises peuvent être des marques de commerce et appartiennent exclusivement à
leurs propriétaires respectifs. AutomationDirect nie tout intérêt dans les autres marques et désignations.
Copyright 2006, Automationdirect.com Incorporated
Tous droits réservés
Nulle partie de ce manuel ne doit être copiée, reproduite ou transmise de quelque façon que ce soit sans le
consentement préalable écrit de la société Automationdirect.com Incorporated. AutomationDirect conserve les
droits exclusifs à l'égard de tous les renseignements contenus dans le présent document.
VOLUME ONE:
TABLE OF CONTENTS

Chapter 1: Getting Started


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1–2
The Purpose of this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1–2
Supplemental Manuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1–2
Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1–2
Conventions Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1–3
Key Topics for Each Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1–3
DL06 Micro PLC Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1–4
The DL06 PLC Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1–4
DirectSOFT 5 Programming for Windows™ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1–4
Handheld Programmer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1–5
I/O Quick Selection Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1–5
Quick Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1–6
Steps to Designing a Successful System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1–10
Questions and Answers about DL06 Micro PLCs . . . . . . . . . . . . . . . . . . . . . . . . . . .1–12

Chapter 2: Installation, Wiring, and Specifications


Safety Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–2
Plan for Safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–2
Three Levels of Protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–3
Emergency Stops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–3
Emergency Power Disconnect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–4
Orderly System Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–4
Class 1, Division 2 Approval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–4
Orientation to DL06 Front Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–5
Terminal Block Removal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–6
Table of Contents

Mounting Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–7


Unit Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–7
Enclosures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–7
Panel Layout & Clearances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–8
Using Mounting Rails . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–9
Environmental Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–10
Agency Approvals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–10
Marine Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–10
Wiring Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–11
Fuse Protection for Input Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–11
External Power Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–12
Planning the Wiring Routes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–12
Fuse Protection for Input and Output Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–13
I/O Point Numbering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–13
System Wiring Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–14
PLC Isolation Boundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–14
Connecting Operator Interface Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–15
Connecting Programming Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–15
Sinking / Sourcing Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–16
I/O “Common” Terminal Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–17
Connecting DC I/O to “Solid State” Field Devices . . . . . . . . . . . . . . . . . . . . . . . . .2–18
Solid State Input Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–18
Solid State Output Loads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–18
Relay Output Wiring Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–20
Surge Suppression For Inductive Loads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–21
Prolonging Relay Contact Life . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–22
DC Input Wiring Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–23
DC Output Wiring Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–24
High-Speed I/O Wiring Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–25
Wiring Diagrams and Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–26
D0–06AA I/O Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–26
D0–06AR I/O Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–28
D0–06DA I/O Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–30
D0–06DD1 I/O Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–32
D0–06DD2 I/O Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–34
D0–06DR I/O Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–36
D0–06DD1–D I/O Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–38

ii DL06 Micro PLC User Manual, 3rd Edition Rev. A


Table of Contents

D0–06DD2–D I/O Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–40


D0–06DR–D I/O Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–42
Glossary of Specification Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2–44

Chapter 3: CPU Specifications and Operation


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–2
DL06 CPU Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–2
CPU Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–3
CPU Hardware Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–4
Communication Port Pinout Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–4
Connecting the Programming Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–5
CPU Setup Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–5
Status Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–6
Mode Switch Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–6
Changing Modes in the DL06 PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–7
Mode of Operation at Power-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–7
Using Battery Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–8
Battery Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–8
Auxiliary Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–9
Clearing an Existing Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–9
Initializing System Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–9
Setting Retentive Memory Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–10
Using a Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–11
CPU Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–12
CPU Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–12
Program Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–13
Run Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–13
Read Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–14
Service Peripherals and Force I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–14
CPU Bus Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–15
Update Clock, Special Relays and Special Registers . . . . . . . . . . . . . . . . . . . . . . . . .3–15
Solve Application Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–16
Solve PID Loop Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–16
Write Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–16
Write Outputs to Specialty I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–16
Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–17

DL06 Micro PLC User Manual, 3rd Edition Rev. A. iii


Table of Contents

I/O Response Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–17


Is Timing Important for Your Application? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–17
Normal Minimum I/O Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–18
Normal Maximum I/O Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–18
Improving Response Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–19
CPU Scan Time Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–20
Reading Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–20
Writing Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–20
Service Peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–21
CPU Bus Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–21
Update Clock/Calendar, Special Relays, Special Registers . . . . . . . . . . . . . . . . . . . .3–21
Application Program Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–22
PLC Numbering Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–23
PLC Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–23
V–Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–24
Binary-Coded Decimal Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–24
Hexadecimal Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–24
Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–25
Octal Numbering System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–25
Discrete and Word Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–25
V-memory Locations for Discrete Memory Areas . . . . . . . . . . . . . . . . . . . . . . . . . . .3–25
Input Points (X Data Type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–26
Output Points (Y Data Type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–26
Control Relays (C Data Type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–26
Timers and Timer Status Bits (T Data Type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–26
Timer Current Values (V Data Type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–27
Counters and Counter Status Bits (CT Data type) . . . . . . . . . . . . . . . . . . . . . . . . . .3–27
Counter Current Values (V Data Type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–27
Word Memory (V Data Type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–28
Stages (S Data type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–28
Special Relays (SP Data Type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–28
DL06 System V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–29
System Parameters and Default Data Locations (V Data Type) . . . . . . . . . . . . . . . .3–29
DL06 Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–31
DL06 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–32
X Input/Y Output Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–33

iv DL06 Micro PLC User Manual, 3rd Edition Rev. A


Table of Contents

Stage Control/Status Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–34


Control Relay Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–36
Timer Status Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–38
Counter Status Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–38
GX and GY I/O Bit Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3–39

Chapter 4: System Design and Configuration


DL06 System Design Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–2
I/O System Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–2
Networking Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–2
Module Placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–3
Slot Numbering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–3
Automatic I/O Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–4
Manual I/O Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–4
Power Budgeting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–5
Power supplied . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–5
Power required by base unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–5
Power required by option cards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–5
Configuring the DL06’s Comm Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–7
DL06 Port Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–7
DL06 Port Pinouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–7
Choosing a Network Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–8
RS-232 Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–8
RS-422 Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–8
RS-485 Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–8
Connecting to MODBUS and DirectNET Networks . . . . . . . . . . . . . . . . . . . . . . . . .4–9
MODBUS Port Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–9
DirectNET Port Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–10
Non–Sequence Protocol (ASCII In/Out and PRINT) . . . . . . . . . . . . . . . . . . . . . . . .4–11
Non-Sequence Port Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–11
Network Slave Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–12
MODBUS Function Codes Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–12
Determining the MODBUS Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–12
If Your Host Software Requires the Data Type and Address . . . . . . . . . . . . . . . . . . .4–13

DL06 Micro PLC User Manual, 3rd Edition Rev. A. v


Table of Contents

Example 1: V2100 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–14


Example 2: Y20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–14
Example 3: T10 Current Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–14
Example 4: C54 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–14
If Your MODBUS Host Software Requires an Address ONLY . . . . . . . . . . . . . . . . . .4–15
Example 1: V2100 584/984 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–17
Example 2: Y20 584/984 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–17
Example 3: T10 Current Value 484 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–17
Example 4: C54 584/984 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–17
Network Master Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–18
Step 1: Identify Master Port # and Slave # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–19
Step 2: Load Number of Bytes to Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–19
Step 3: Specify Master Memory Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–20
Step 4: Specify Slave Memory Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–20
Communications from a Ladder Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–21
Multiple Read and Write Interlocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–21
Network Master Operation (using MRX and MWX Instructions) . . . . . . . . . . . . .4–22
MODBUS Function Codes Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–22
MODBUS Read from Network(MRX) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–23
MRX Slave Memory Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–24
MRX Master Memory Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–24
MRX Number of Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–24
MRX Exception Response Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–24
MODBUS Write to Network (MWX) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–25
MWX Slave Memory Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–26
MWX Master Memory Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–26
MWX Number of Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–26
MWX Exception Response Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–26
MRX/MWX Example in DirectSOFT 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–27
Multiple Read and Write Interlocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4–27

Chapter 5: Standard RLL Instructions


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–2
Using Boolean Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–5
END Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–5
Simple Rungs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–5

vi DL06 Micro PLC User Manual, 3rd Edition Rev. A


Table of Contents

Normally Closed Contact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–6


Contacts in Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–6
Midline Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–6
Parallel Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–7
Joining Series Branches in Parallel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–7
Joining Parallel Branches in Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–7
Combination Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–7
Comparative Boolean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–8
Boolean Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–8
Immediate Boolean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–9
Boolean Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–10
Comparative Boolean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–26
Immediate Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–32
Timer, Counter and Shift Register Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . .5–39
Using Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–39
Timer Example Using Discrete Status Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–41
Timer Example Using Comparative Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–41
Accumulating Timer Example using Discrete Status Bits . . . . . . . . . . . . . . . . . . . . .5–43
Accumulator Timer Example Using Comparative Contacts . . . . . . . . . . . . . . . . . . .5–43
Using Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–44
Counter Example Using Discrete Status Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–46
Counter Example Using Comparative Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . .5–46
Stage Counter Example Using Discrete Status Bits . . . . . . . . . . . . . . . . . . . . . . . . .5–48
Stage Counter Example Using Comparative Contacts . . . . . . . . . . . . . . . . . . . . . . .5–48
Up / Down Counter Example Using Discrete Status Bits . . . . . . . . . . . . . . . . . . . . .5–50
Up / Down Counter Example Using Comparative Contacts . . . . . . . . . . . . . . . . . .5–50
Accumulator/Stack Load and Output Data Instructions . . . . . . . . . . . . . . . . . . . .5–52
Using the Accumulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–52
Copying Data to the Accumulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–52
Changing the Accumulator Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–53
Using the Accumulator Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–54
Using Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–55
Logical Instructions (Accumulator) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–69
Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–86
Transcendental Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–118

DL06 Micro PLC User Manual, 3rd Edition Rev. A. vii


Table of Contents

Bit Operation Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–120


Number Conversion Instructions (Accumulator) . . . . . . . . . . . . . . . . . . . . . . . . .5–127
Shuffle Digits Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–139
Table Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–141
Copy Data From a Data Label Area to V-memory . . . . . . . . . . . . . . . . . . . . . . . . .5–143
Clock/Calendar Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–171
CPU Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–173
Program Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–175
Interrupt Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–183
Message Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–186
Move Block Instruction (MOVBLK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–189
Copy Data From a Data Label Area to V-memory . . . . . . . . . . . . . . . . . . . . . . . . .5–189
Intelligent I/O Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–194
Read from Intelligent Module (RD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–194
Write to Intelligent Module (WT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–195
Network Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–196
Direct Text Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–200
Embedding date and/or time variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–201
Embedding V-memory data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–201
Data Format Suffixes for Embedded V-memory Data . . . . . . . . . . . . . . . . . . . . . .5–202
Text Entry from V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–203
MODBUS RTU Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–204
MRX Slave Address Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–205
MWX Slave Address Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–208
MWX Master Memory Address Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–208
MWX Number of Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–208
MWX Exception Response Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–208
ASCII Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–210
Reading ASCII Input Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–210
Writing ASCII Output Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–210
Managing the ASCII Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–211
Intelligent Box (IBox) Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5–230

viii DL06 Micro PLC User Manual, 3rd Edition Rev. A


Table of Contents

VOLUME TWO:
TABLE OF CONTENTS
Chapter 6: Drum Instruction Programming
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–2
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–2
Drum Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–2
Drum Chart Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–3
Output Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–3
Step Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–4
Drum Instruction Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–4
Timer-Only Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–4
Timer and Event Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–5
Event-Only Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–6
Counter Assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–6
Last Step Completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–7
Overview of Drum Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–8
Drum Instruction Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–8
Powerup State of Drum Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–9
Drum Control Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–10
Drum Control Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–10
Self-Resetting Drum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–11
Initializing Drum Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–11
Using Complex Event Step Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–11
Drum Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–12
Timed Drum with Discrete Outputs (DRUM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–12
Event Drum (EDRUM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–14
Handheld Programmer Drum Mnemonics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–16

DL06 Micro PLC User Manual, 3rd Edition Rev. A. ix


Table of Contents

Masked Event Drum with Discrete Outputs (MDRMD) . . . . . . . . . . . . . . . . . . . . . .6–19


Masked Event Drum with Word Output (MDRMW) . . . . . . . . . . . . . . . . . . . . . . . .6–21

Chapter 7: RLLPLUS Stage Programming


Introduction to Stage Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–2
Overcoming “Stage Fright” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–2
Learning to Draw State Transition Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–3
Introduction to Process States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–3
The Need for State Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–3
A 2–State Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–3
RLL Equivalent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–4
Stage Equivalent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–4
Let’s Compare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–5
Initial Stages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–5
What Stage Bits Do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–6
Stage Instruction Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–6
Using the Stage Jump Instruction for State Transitions . . . . . . . . . . . . . . . . . . . . . .7–7
Stage Jump, Set, and Reset Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–7
Stage Program Example: Toggle On/Off Lamp Controller . . . . . . . . . . . . . . . . . . .7–8
A 4–State Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–8
Four Steps to Writing a Stage Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–9
1. Write a Word Description of the application. . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–9
2. Draw the Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–9
3. Draw the State Transition Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–9
4. Write the Stage Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–9
Stage Program Example: A Garage Door Opener . . . . . . . . . . . . . . . . . . . . . . . . .7–10
Garage Door Opener Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–10
Draw the Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–10
Draw the State Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–11
Add Safety Light Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–12
Modify the Block Diagram and State Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–12
Using a Timer Inside a Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–13
Add Emergency Stop Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–14
Exclusive Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–14
Stage Program Design Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–15

x DL06 Micro PLC User Manual, 3rd Edition Rev. A


Table of Contents

Stage Program Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–15


How Instructions Work Inside Stages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–16
Using a Stage as a Supervisory Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–17
Stage Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–17
Power Flow Transition Technique . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–18
Stage View in DirectSOFT 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–18
Parallel Processing Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–19
Parallel Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–19
Converging Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–19
Convergence Stages (CV) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–19
Convergence Jump (CVJMP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–20
Convergence Stage Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–20
RLLPLUS (Stage) Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–21
Stage (SG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–21
Initial Stage (ISG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–22
Jump (JMP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–22
Not Jump (NJMP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–22
Converge Stage (CV) and Converge Jump (CVJMP) . . . . . . . . . . . . . . . . . . . . . . . .7–23
Block Call (BCALL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–25
Block (BLK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–25
Block End (BEND) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–25
Questions and Answers about Stage Programming . . . . . . . . . . . . . . . . . . . . . . . .7–27

Chapter 8: PID Loop Operation


DL06 PID Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–2
DL06 PID Control Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–2
Introduction to PID Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–4
What is PID Control? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–4
Introducing DL06 PID Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–6
Process Control Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–8
PID Loop Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–9
Position Form of the PID Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–9
Reset Windup Protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–10
Freeze Bias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–11
Adjusting the Bias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–11

DL06 Micro PLC User Manual, 3rd Edition Rev. A. xi


Table of Contents

Step Bias Proportional to Step Change in SP . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–12


Eliminating Proportional, Integral or Derivative Action . . . . . . . . . . . . . . . . . . . . . .8–12
Velocity Form of the PID Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–12
Bumpless Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–13
Loop Alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–13
Loop Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–14
Special Loop Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–14
Ten Steps to Successful Process Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–16
PID Loop Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–18
Some Things to Do and Know Before Starting . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–18
PID Error Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–18
Establishing the Loop Table Size and Location . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–18
Loop Table Word Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–20
PID Mode Setting 1 Bit Descriptions (Addr + 00) . . . . . . . . . . . . . . . . . . . . . . . . . .8–21
PID Mode Setting 2 Bit Descriptions (Addr + 01) . . . . . . . . . . . . . . . . . . . . . . . . . .8–22
Mode/Alarm Monitoring Word (Addr + 06) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–23
Ramp/Soak Table Flags (Addr + 33) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–23
Ramp/Soak Table Location (Addr + 34) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–24
Ramp/Soak Table Programming Error Flags (Addr + 35) . . . . . . . . . . . . . . . . . . . . .8–24
Configure the PID Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–25
PID Loop Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–40
Open-Loop Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–40
Manual Tuning Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–41
Alternative Manual Tuning Procedures by Others . . . . . . . . . . . . . . . . . . . . . . . . . .8–44
Tuning PID Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–44
Auto Tuning Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–45
Use DirectSOFT 5 Data View with PID View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–49
Open a New Data View Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–49
Open PID View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–50
Using the Special PID Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–53
How to Change Loop Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–53
Operator Panel Control of PID Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–54
PLC Modes Effect on Loop Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–54
Loop Mode Override . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–54
PV Analog Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–55
Creating an Analog Filter in Ladder Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–56

xii DL06 Micro PLC User Manual, 3rd Edition Rev. A


Table of Contents

Use the DirectSOFT 5 Filter Intelligent Box Instructions . . . . . . . . . . . . . . . . . . . . .8-57


FilterB Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-57
Ramp/Soak Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–58
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–58
Ramp/Soak Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–59
Ramp/Soak Table Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–61
Ramp/Soak Generator Enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–61
Ramp/Soak Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–61
Ramp/Soak Profile Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–62
Ramp/Soak Programming Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–62
Testing Your Ramp/Soak Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–62
DirectSOFT 5 Ramp/Soak Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-63
Setup the Profile in PID Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-63
Program the Ramp/Soak Control in Relay Ladder . . . . . . . . . . . . . . . . . . . . . . . . . .8-63
Test the Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-64
Cascade Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–65
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–65
Cascaded Loops in the DL06 CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–66
Tuning Cascaded Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–67
Time-Proportioning Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–68
On/Off Control Program Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–69
Feedforward Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–70
Feedforward Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–71
PID Example Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–72
Program Setup for the PID Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–72
Troubleshooting Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–75
Glossary of PID Loop Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–77
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–79

Chapter 9: Maintenance and Troubleshooting


Hardware System Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–2
Standard Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–2
Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–2
Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–2

DL06 Micro PLC User Manual, 3rd Edition Rev. A. xiii


Table of Contents

Fatal Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–2


Non-fatal Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–2
V-memory Error Code Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–3
Special Relays (SP) Corresponding to Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . .9–3
DL06 Micro PLC Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–4
Program Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–5
CPU Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–6
PWR Indicator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–6
RUN Indicator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–7
CPU Indicator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–7
Communications Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–7
I/O Point Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–8
Possible Causes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–8
Some Quick Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–8
Handheld Programmer Keystrokes Used to Test an Output Point . . . . . . . . . . . . . . .9–9
Noise Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–10
Electrical Noise Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–10
Reducing Electrical Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–10
Machine Startup and Program Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . .9–11
Syntax Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–11
Special Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–12
Duplicate Reference Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–13
Run Time Edits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–14
Run Time Edit Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–15
Forcing I/O Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–16
Regular Forcing with Direct Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–18
Bit Override Forcing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–19
Bit Override Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–19

Chapter 10: LCD Display Panel


Introduction to the DL06 LCD Display Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–2
Keypad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–2
Snap-in installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–3
Display Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–4

xiv DL06 Micro PLC User Manual, 3rd Edition Rev. A


Table of Contents

Menu Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–5


Confirm PLC Type, Firmware Revision Level, Memory Usage, Etc. . . . . . . . . . . . .10–6
Examining Option Slot Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–8
Menu 2, M2:SYSTEM CFG. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–8
Monitoring and Changing Data Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–10
Menu 3, M3:MONITOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–10
Data Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–10
V-memory values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–10
Pointer values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–12
Bit Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–13
Bit status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–13
Changing Date and Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–14
Menu 4, M4 : CALENDAR R/W . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–14
Setting Password and Locking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–17
Menu 5, M5 : PASSWORD R/W . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–17
Reviewing Error History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–20
Menu 6, M6 : ERR HISTORY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–20
Toggle Light and Beeper, Test Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–21
Menu 7, M7 : LCD TEST&SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–21
PLC Memory Information for the LCD Display Panel . . . . . . . . . . . . . . . . . . . . . .10–22
Data Format Suffixes for Embedded V-memory Data . . . . . . . . . . . . . . . . . . . . . .10–22
Reserved memory registers for the LCD Display Panel . . . . . . . . . . . . . . . . . . . . .10–23
V7742 bit definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–24
Changing the Default Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–25
Example program for setting the default screen message . . . . . . . . . . . . . . . . . . .10–25
DL06 LCD Display Panel Instruction (LCD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–26
Source of message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–26
ASCII Character Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–27
Example program: alarm with embedded date/time stamp . . . . . . . . . . . . . . . . .10–28
Example program: alarm with embedded V-memory data . . . . . . . . . . . . . . . . . .10–29
Example program: alarm text from V-memory with embedded V-memory data . .10–30

Appendix A: Auxiliary Functions


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–2

DL06 Micro PLC User Manual, 3rd Edition Rev. A. xv


Table of Contents

Purpose of Auxiliary Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–2


Accessing AUX Functions via DirectSOFT 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–3
Accessing AUX Functions via the Handheld Programmer . . . . . . . . . . . . . . . . . . . . .A–3
AUX 2* — RLL Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–4
AUX 21 Check Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–4
AUX 22 Change Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–4
AUX 23 Clear Ladder Range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–4
AUX 24 Clear Ladders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–4
AUX 3* — V-memory Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–4
AUX 31 Clear V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–4
AUX 4* — I/O Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–5
AUX 41 Show I/O Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–5
AUX 5* — CPU Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–5
AUX 51 Modify Program Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–5
AUX 53 Display Scan Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–5
AUX 54 Initialize Scratchpad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–5
AUX 55 Set Watchdog Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–5
AUX 56 CPU Network Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–6
AUX 57 Set Retentive Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–6
AUX 58 Test Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–6
AUX 59 Bit Override . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–7
AUX 5B Counter Interface Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–7
AUX 5D Select PLC Scan Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–7
AUX 6* — Handheld Programmer Configuration . . . . . . . . . . . . . . . . . . . . . . . . . .A–8
AUX 61 Show Revision Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–8
AUX 62 Beeper On/Off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–8
AUX 65 Run Self Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–8
AUX 7* — EEPROM Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–8
Transferrable Memory Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–8
AUX 71 CPU to HPP EEPROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–8
AUX 72 HPP EEPROM to CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–9
AUX 73 Compare HPP EEPROM to CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–9
AUX 74 HPP EEPROM Blank Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–9
AUX 75 Erase HPP EEPROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–9
AUX 76 Show EEPROM Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–9

xvi DL06 Micro PLC User Manual, 3rd Edition Rev. A


Table of Contents

AUX 8* — Password Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–9


AUX 81 Modify Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–9
AUX 82 Unlock CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–10
AUX 83 Lock CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–10

Appenedix B: DL06 Error codes


DL06 Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .B–2

Appendix C: Instruction Execution Times


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–2
V-Memory Data Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–2
V-Memory Bit Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–2
How to Read the Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–2
Instruction Execution Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–3
Boolean Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–3
Comparative Boolean Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–4
Immediate Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–11
Bit of Word Boolean Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–12
Timer, Counter and Shift Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–13
Accumulator Data Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–14
Logical Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–15
Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–16
Differential Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–19
Bit Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–19
Number Conversion Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–20
Table Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–20
CPU Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–22
Program Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–22
Interrupt Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–22
Network Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–22
Intelligent I/O Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–23
Message Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–23
RLLplus Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–23
Drum Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–23
Clock / Calender Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–24
MODBUS Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–24

DL06 Micro PLC User Manual, 3rd Edition Rev. A. xvii


Table of Contents

ASCII Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–24

Appendix D: Special Relays


DL06 PLC Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D–2
Startup and Real-Time Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D–2
CPU Status Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D–2
System Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D–3
Accumulator Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D–3
HSIO Input Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D–4
HSIO Pulse Output Relay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D–4
Communication Monitoring Relay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D–4
Option Slot Communication Monitoring Relay . . . . . . . . . . . . . . . . . . . . . . . . . . . .D–4
Option Slot Special Relay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D–4
Counter 1 Mode 10 Equal Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D–5
Counter 2 Mode 10 Equal Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D–6

Appendix E: High-speed Input and Pulse Output Features


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–2
Built-in Motion Control Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–2
Availability of HSIO Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–2
Dedicated High- Speed I/O Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–3
Wiring Diagrams for Each HSIO Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–3
Choosing the HSIO Operating Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–4
Understanding the Six Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–4
Default Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–5
Configuring the HSIO Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–6
Configuring Inputs X0 – X3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–6
Mode 10: High-Speed Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–7
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–7
Functional Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–7
Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–8
Interfacing to Counter Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–8
Setup for Mode 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–9
Presets and Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–9
Absolute and Incremental Presets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–10
Preset Data Starting Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–11
Using Fewer than 24 Presets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–11

xviii DL06 Micro PLC User Manual, 3rd Edition Rev. A


Table of Contents

Equal Relay Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–12


Calculating Your Preset Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–13
X Input Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–14
Writing Your Control Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–15
Program Example 1: Counter Without Presets . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–16
Program Example 2: Counter With Presets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–18
Program Example 3: Counter With Preload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–21
Troubleshooting Guide for Mode 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–23
Symptom: The counter does not count. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–23
Symptom: The counter counts but the presets do not function. . . . . . . . . . . . . . . .E–23
Symptom: The counter counts up but will not reset. . . . . . . . . . . . . . . . . . . . . . . .E–23
Mode 20: Up/Down Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–24
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–24
Functional Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–24
Quadrature Encoder Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–26
Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–25
Interfacing to Encoder Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–25
Setup for Mode 20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–27
Presets and Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–27
X Input Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–28
Mode 20 Up/Down Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–28
Writing Your Control Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–29
Program Example 1: Quadrature Counting with an Interrupt . . . . . . . . . . . . . . . . .E–30
Program Example 2: Up/Down Counting with Standard Inputs . . . . . . . . . . . . . . .E–32
Program Example 3: Quadrature Counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–34
Troubleshooting Guide for Mode 20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–37
Symptom: The counter does not count. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–37
Symptom: The counter counts in the wrong direction . . . . . . . . . . . . . . . . . . . . . .E–37
Symptom: The counter counts up and down but will not reset. . . . . . . . . . . . . . . .E–37
Mode 30: Pulse Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–38
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–38
Functional Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–39
Wiring Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–40
Interfacing to Drive Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–40
Motion Profile Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–41
Physical I/O Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–41
Logical I/O Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–41

DL06 Micro PLC User Manual, 3rd Edition Rev. A. xix


Table of Contents

Setup for Mode 30 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–42


Profile / Velocity Select Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–43
Profile Parameter Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–43
Automatic Trapezoidal Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–43
Step Trapezoidal Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–44
Velocity Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–44
Step Trapezoidal Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–44
Choosing the Profile Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–45
Automatic Trapezoidal Profile Defined . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–45
Step Trapezoidal Profiles Defined . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–46
Velocity Control Defined . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–46
Automatic Trapezoidal Profile Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–47
Program Example 1: Automatic Trapezoidal Profile without External Interrupt . . . .E–48
Preload Position Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–49
Program Example 2: Automatic Trapezoidal Profile with External Interrupt . . . . . . .E–50
Program Example 3: Automatic Trapezoidal Profile with Home Search . . . . . . . . . .E–53
Step Trapezoidal Profile Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–55
Program Example 4: Step Trapezoidal Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–56
Velocity Profile Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–59
Program Example 5: Velocity Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–60
Automatic Trapezoidal Profile Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–62
Troubleshooting Guide for Mode 30 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–62
Symptom: The stepper motor does not rotate. . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–62
Symptom: The motor turns in the wrong direction. . . . . . . . . . . . . . . . . . . . . . . . .E–63
Mode 40: High-Speed Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–64
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–64
Functional Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–64
Setup for Mode 40 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–65
Interrupts and the Ladder Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–65
External Interrupt Timing Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–66
Timed Interrupt Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–66
X Input / Timed INT Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–66
Program Example 1: External Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–67
Program Example 2: Timed Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–68
Mode 50: Pulse Catch Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–69
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–69
Functional Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–69

xx DL06 Micro PLC User Manual, 3rd Edition Rev. A


Table of Contents

Pulse Catch Timing Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–69


Setup for Mode 50 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–70
X Input Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–71
Program Example 1: Pulse Catch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–72
Mode 60: Discrete Inputs with Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–73
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–73
Functional Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–73
Input Filter Timing Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–73
Setup for Mode 60 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–74
X Input Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–74
Program Example: Filtered Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–75

Appendix F: PLC Memory


DL06 PLC Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .F-2
Non-volatile V-memory in the DL06 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .F-3

Appendix G: ASCII Table


ASCII Conversion Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .G-2

Appendix H: Product Weights


Product Weight Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .H–2

Appendix I: Numbering Systems


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .I–2
Binary Numbering System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .I–2
Hexadecimal Numbering System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .I–3
Octal Numbering System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .I–4
Binary Coded Decimal (BCD) Numbering System . . . . . . . . . . . . . . . . . . . . . . . . . .I–5
Real (Floating Point) Numbering System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .I–5
BCD/Binary/Decimal/Hex/Octal -What is the Difference? . . . . . . . . . . . . . . . . . . . .I–6
Data Type Mismatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .I–7
Signed vs. Unsigned Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .I–8
AutomationDirect.com Products and Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . .I–9

DL06 Micro PLC User Manual, 3rd Edition Rev. A. xxi


Table of Contents

DirectLOGIC PLCs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .I–9


C-more/C-more Micro-Graphic Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .I–9

Appendix J: European Union Directives (CE)


European Union (EU) Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-2
Member Countries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-2
Applicable Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-2
Compliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-2
General Safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-3
Special Installation Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-4
Other Sources of Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-4
Basic EMC Installation Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-4
Enclosures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-4
AC Mains Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-5
Suppression and Fusing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-5
Internal Enclosure Grounding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-5
Equi–potential Grounding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-6
Communications and Shielded Cables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-6
Analog and RS232 Cables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-7
Multidrop Cables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-7
Shielded Cables within Enclosures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-7
Analog Modules and RF Interference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-7
Network Isolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-8
DC Powered Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-8
Items Specific to the DL06 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-9

Appendix K: Introduction to Serial Communications


Introduction to Serial Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .K–2
Wiring Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .K–2
Communications Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .K–3
DL06 Port Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .K–5
DL06 Port Pinouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .K–5
Port Setup Using DirectSOFT 5 or Ladder Logic Instructions . . . . . . . . . . . . . . . . . . .K–6
Port 2 Setup for RLL Using K-Sequence, DirectNET or MODBUS RTU . . . . . . . . . . . .K–7
K-Sequence Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .K–10
DirectNET Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .K–10

xxii DL06 Micro PLC User Manual, 3rd Edition Rev. A


Table of Contents

Step 1: Identify Master Port # and Slave # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .K–10


Step 2: Load Number of Bytes to Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .K–10
Step 3: Specify Master Memory Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .K–11
Step 4: Specify Slave Memory Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .K–12
Communications from a Ladder Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .K–13
Multiple Read and Write Interlocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .K–13
MODBUS RTU Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .K–14
ASCII Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .K–14

Index

DL06 Micro PLC User Manual, 3rd Edition Rev. A. xxiii


DRUM INSTRUCTION CHAPTER
PROGRAMMING
6
In This Chapter...
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–2
Step Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–4
Overview of Drum Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–8
Drum Control Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–10
Drum Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–12
Chapter 6: Drum Instruction Programming

1 Introduction
Purpose
2 The Event Drum (EDRUM) instruction in the DL06 CPU electronically simulates an
electro-mechanical drum sequencer. The instruction offers enhancements to the basic
3 principle, which we describe first.
Drum Terminology
4 Drum instructions are best suited for repetitive processes that consist of a finite number of
steps. They can do the work of many rungs of ladder logic with elegant simplicity. Therefore,
5 drums can save a lot of programming and debugging time.
We introduce some terminology associated with the drum instruction by describing the
6 original mechanical drum shown below. The mechanical drum generally has pegs on its
curved surface. The pegs are populated in a particular pattern, representing a set of desired
actions for machine control. A motor or solenoid rotates the drum a precise amount at
7 specific times. During rotation, stationary wipers sense the presence of pegs (present = on,
absent = off ). This interaction makes or breaks electrical contact with the wipers, creating
8 electrical outputs from the drum. The outputs are wired to devices on a machine for On/Off
control.
9 Drums usually have a finite number of positions within one rotation, called steps. Each step
represents some process step. At powerup, the drum resets to a particular step. The drum
rotates from one step to the next based on a timer, or on some external event. During special
10 conditions, a machine operator can manually increment the drum step using a jog control on
the drum’s drive mechanism. The contact closure of each wiper generates a unique on/off
11 pattern called a sequence, designed for controlling a specific machine. Because the drum is
circular, it automatically repeats the sequence once per rotation. Applications vary greatly, and
a particular drum may rotate once per second, or as slowly as once per week.
12 Pegs

13
14
A Wipers
Drum

B
C Outputs

D Electronic drums provide the benefits of mechanical drums and more. For example, they have
a preset feature that is impossible for mechanical drums: The preset function lets you move
from the present step directly to any other step on command!

6–2 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 6: Drum Instruction Programming

Drum Chart Representation


For editing purposes, the electronic drum is presented in chart form in DirectSOFT 5 and in 1
this manual. Imagine slicing the surface of a hollow drum cylinder between two rows of pegs,
then pressing it flat. Now you can view the drum as a chart as shown below. Each row
represents a step, numbered 1 through 16. Each column represents an output, numbered 0
2
through 15 (to match word bit numbering). The solid circles in the chart represent pegs (On
state) in the mechanical drum, and the open circles are empty peg sites (Off state). 3
OUTPUTS
STEP 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 4
1
2
3
4
5
5
6
7
8
6
9
10
11
12
7
13
14
15
16
8
Output Sequences 9
The mechanical drum sequencer derives its name from sequences of control changes on its
electrical outputs. The following figure shows the sequence of On/Off controls generated by 10
the drum pattern above. Compare the two, and you will find that they are equivalent! If you
can see their equivalence, you are well on your way to understanding drum instruction
operation.
11
Step
Output
1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
12
0 0

1
2
1
0
1
0
13
1
3
4
0
1
0
14
1
5
6
0
1
0
1
A
7 0

8
9
1
0
1
B
0
1
10
11
0
1
0
C
1
12
13
0
1
0
1
D
14 0
1
15 0

DL06 Micro PLC User Manual, 3rd Edition Rev. A 6–3


Chapter 6: Drum Instruction Programming

1 Step Transitions
Drum Instruction Types
2 There are two types of Drum instructions in the DL06 CPU:
• Timed Drum with Discrete Outputs (DRUM)
3 • Time and Event Drum with Discrete Outputs (EDRUM)
The two drum instructions include time-based step transitions, and the EDRUM includes
4 event-based transitions as well. Each drum has 16 steps, and each step has 16 outputs. Refer
to the figure below. Each output can be either a Y or C coil, offering programming flexibility.
5 We assign Step 1 an arbitrary unique output pattern.
Timer-Only Transitions
6 Drums move from one step to another based on time and/or an external event (input). Each
step has its own transition condition which you assign during the drum instruction entry. The
7 figure below shows how timer-only transitions work.
Step 1 Outputs : F f f f F f F f f f f F F f f f
8
9 Increment
count timer
10
11 No Ha s counts per
step expired?
12 Yes
13 Step 2 Outputs : f f f F f f f f F F f F f f F F

14
U s e next transition criteria
A The drum stays in Step 1 for a specific duration (user-programmable). The timebase of the
timer is programmable, from 0.01 seconds to 99.99 seconds. This establishes the resolution,
B or the duration of each “tick of the clock”. Each step uses the same timebase, but has its own
unique counts per step, which you program. When the counts for Step 1 have expired, then
the drum moves to Step 2. The outputs change immediately to match the new pattern for
C Step 2.
The drum spends a specific amount of time in each step, given by the formula:
D Time in step = 0.01 seconds X Timebase x Counts per step

6–4 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 6: Drum Instruction Programming

For example, if you program a 5 second time base and 12 counts for Step 1, then the drum
will spend 60 seconds in Step 1. The maximum time for any step is given by the formula: 1
Max Time per step = 0.01 seconds X 9999 X 9999
= 999,800 seconds = 277.7 hours = 11.6 days
2
NOTE: When first choosing the timebase resolution, a good rule of thumb is to make it about 1/10 the
duration of the shortest step in your drum. Then you will be able to optimize the duration of that step in
10% increments. Other steps with longer durations allow optimizing by even smaller increments (percentage-
3
wise). Also, note that the drum instruction executes once per CPU scan. Therefore, it is pointless to specify a
drum timebase that is much faster than the CPU scan time. 4
Timer and Event Transitions
Step transitions may also occur based on time and/or external events. The figure below shows
5
how step transitions work in these cases.
6
Step 1 Outputs : F f f f F f F f f f f F F f f f
7
No
8
Is Step event
true?
9
Yes
10
Increment
count timer
11
Has step
12
No
counts expired?
13
Yes
14
Step 2 Outputs : f f f F f f f f F F f F f f F F
A
U s e next tra ns ition criteria
B
When the drum enters Step 1, it sets the output pattern as shown. Then it begins polling the
external input programmed for that step. You can define event inputs as X, Y, or C discrete
point types. Suppose we select X0 for the Step 1 event input. If X0 is off, then the drum
C
remains in Step 1. When X0 is On, the event criteria is met and the timer increments. The
timer increments as long as the event (X0) remains true. When the counts for Step 1 have D
expired, then the drum moves to Step 2.The outputs change immediately to match the new
pattern for Step 2.

DL06 Micro PLC User Manual, 3rd Edition Rev. A 6–5


Chapter 6: Drum Instruction Programming

Event-Only Transitions
1 Step transitions do not require both the event and the timer criteria programmed for each
step. You have the option of programming just one of the two, and even mixing transition
2 types among all the steps of the drum. For example, you might want Step 1 to transition on
an event, Step 2 to transition on time only, and Step 3 to transition on both time and an
event. Furthermore, you may elect to use only part of the 16 steps, and only part of the 16
3 outputs.

4
Step 1 Outputs:

5
No Is Step event
6 true?

Yes
7 Step 2 Outputs:

8 Use next transition criteria

Counter Assignments
9 Each drum instruction uses the resources of four counters in the CPU. When programming
the drum instruction, you select the first counter number. The drum also uses the next three
10 counters automatically. The counter bit associated with the first counter turns on when the
drum has completed its cycle, going off when the drum is reset. These counter values and the
counter bit precisely indicate the progress of the drum instruction, and can be monitored by
11 your ladder program.
Counter Assignments
Suppose we program a timer drum to have 8
12 steps, and we select CT10 for the counter number
CT10
CT11
Counts in step V1010
Timer Value V1011
1528
0200
(remember, counter numbering is in octal).
CT12
13 Counter usage is shown to the right. The right
column holds typical values, interpreted below. CT13
Preset Step
Current Step
V1012
V1013
0001
0004

14 CT10 shows that we are at the 1528th count in the current step, which is step 4 (shown in
CT13). If we have programmed step 4 to have 3000 counts, then the step is just over half
completed. CT11 is the count timer, shown in units of 0.01 seconds. So, each least-
A significant-digit change represents 0.01 seconds. The value of 200 means that we have been in
the current count (1528) for 2 seconds (0.01 x 200). Finally, CT12 holds the preset step value
B which was programmed into the drum instruction. When the drum’s Reset input is active, it
presets to step 1 in this case. The value of CT12 changes only if the ladder program writes to
it, or the drum instruction is edited and the program is restarted. Counter bit CT10 turns on
C when the drum cycle is complete, and turns off when the drum is reset.

6–6 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 6: Drum Instruction Programming

Last Step Completion


The last step in a drum sequence may be any step number, since partial drums are valid. Refer 1
to the following figure. When the transition conditions of the last step are met, the drum sets
the counter bit corresponding to the counter named in the drum instruction box (such as
CT10). Then it moves to a final “drum complete” state. The drum outputs remain in the
2
pattern defined for the last step. Having finished a drum cycle, the Start and Jog inputs have
no effect at this point. The drum leaves the “drum complete” state when the Reset input 3
becomes active (or on a program-to–run mode transition). It resets the drum complete bit
(such as CT10), and then goes directly to the appropriate step number defined as the preset
step.
4
F F F f f f F f f F f F F FfF
5
Las t step Outputs :
6
No Are tra ns ition
conditions met?
(Timer a nd/or
Event criteria )
7
Yes
8
Set
CT10 = 1 S et Drum Complete bit 9
10
Complete Outputs : F F F f f f F f f F f F F Ff F
11
No R es et Input
Active?
12
Yes 13
R es et
CT10 = 0
Res et Drum Complete bit 14
G o to Pres et Step
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 6–7


Chapter 6: Drum Instruction Programming

1 Overview of Drum Operation


Drum Instruction Block Diagram
2 The drum instruction utilizes various inputs and outputs in addition to the drum pattern
itself. Refer to the figure below.
3 Inputs DRUM INSTRUCTION Outputs
Block Diagram
4 Start

Real time Jog


5 Input s
(from ladder ) Reset
Drum
6 Preset Step
Step
Step
f
f
f
f
f
f
F
f
f
f
f
f
f
f
F
f
f
f
Final
Drum
Counts/Step Control Poi nter Outputs
F F f F F f

7 Timebase
f
f
f
F
F
F
F
F
f
f
f
f
F
F
F
f
F
F
Programming f F F f f F

8 Selections Events
Counter #

9 Pattern

10
Counter Assignments
11 CTA10
Counts in step V1010 xxxx
CTA11
Timer Value V1011 xxxx
12 Preset Step
CTA12 V1012 xxxx
Current Step
CTA13 V1013 xxxx
13 The drum instruction accepts several inputs for step control, the main control of the
drum.The inputs and their functions are:
14 • Start – The Start input is effective only when Reset is off. When Start is on, the drum timer runs if
it is in a timed transition, and the drum looks for the input event during event transitions. When
A Start is off, the drum freezes in its current state (Reset must remain off ), and the drum outputs
maintain their current on/off pattern.
B • Jog – The jog input is only effective when Reset is off (Start may be either on or off ). The jog input
increments the drum to the next step on each off-to-on transition (only EDRUM supports the jog
input).
C • Reset – The Reset input has priority over the Start input. When Reset is on, the drum moves to its
preset step. When Reset is off, then the Start input operates normally.
D • Preset Step – A step number from 1 to 16 that you define (typically is step 1). The drum moves to
this step whenever Reset is on, and whenever the CPU first enters run mode.

6–8 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 6: Drum Instruction Programming

• Counts/Step – The number of timer counts the drum spends in each step. Each step has its own
counts parameter. However, programming the counts/step is optional. 1
• Timer Value – the current value of the counts/step timer.
• Counter # – The counter number specifies the first of four consecutive counters which the drum
uses for step control. You can monitor these to determine the drum’s progress through its control
2
cycle. The DL06 has 128 counters (CT0 – CT177 in octal).
• Events – Either an X, Y, C, S, T, or CT type discrete point serves as step transition inputs. Each step
3
has its own event. However, programming the event is optional.
WARNING: The outputs of a drum are enabled any time the CPU is in Run Mode. The Start 4
Input does not have to be on, and the Reset input does not disable the outputs. Upon entering Run
Mode, drum outputs automatically turn on or off according to the pattern of the current step of the
drum. This initial step number depends on the counter memory configuration: non-retentive versus
5
retentive.
6
Powerup State of Drum Registers
The choice of the starting step on powerup and program-to-run mode transitions are 7
important to consider for your application. Please refer to the following chart. If the counter
memory is configured as non-retentive, the drum is initialized the same way on every
powerup or program-to-run mode transition. However, if the counter memory is configured
8
to be retentive, the drum will stay in its previous state.
Initialization on Powerup
9
Counter Number Function
Non-Retentive Case Retentive Case
CTA(n) Current Step Count Initialize = 0 Use Previous (no change)
10
CTA(n + 1) Counter Timer Value Initialize = 0 Use Previous (no change)
CTA(n + 2) Preset Step Initialize = Preset Step # Use Previous (no change) 11
CTA(n + 3) Current Step # Initialize = Preset Step # Use Previous (no change)

Applications with relatively fast drum cycle times typically will need to be reset on powerup, 12
using the non-retentive option. Applications with relatively long drum cycle times may need
to resume at the previous point where operations stopped, using the retentive case. The
default option is the retentive case. This means that if you initialize scratchpad V-memory, the
13
memory will be retentive.
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 6–9


Chapter 6: Drum Instruction Programming

1 Drum Control Techniques Start X0

Setup
Drum Control Inputs Jog X1
Outputs
2 Now we are ready to put together the concepts
Info

on the previous pages and demonstrate general Reset X2

3 control of the drum instruction box. The


Steps f f F f f f
drawing to the right shows a simplified generic f f f f f f
f f f f F f
4 drum instruction. Inputs from ladder logic
control the Start, Jog, and Reset Inputs (only F
f
F
F
f
F
F
f
F
F
F
f
f
the EDRUM instruction supports the Jog f F F f F F
5 Input). The first counter bit of the drum f
f
F
F
f
F
f
f
F
f
F
F
(CT10, for example) indicates the drum cycle is
6 done.
The timing diagram below shows an arbitrary timer drum input sequence and how the drum
7 responds. As the CPU enters Run mode it initializes the step number to the preset step
number (typically it is Step 1). When the Start input turns on the drum begins running,
waiting for an event and/or running the timer (depends on the setup).
8 After the drum enters Step 2, Reset turns On while Start is still On. Since Reset has priority
over Start, the drum goes to the preset step (Step 1). Note that the drum is held in the preset
9 step during Reset, and that step does not run (respond to events or run the timer) until Reset
turns off.
10 After the drum has entered step 3, the Start input goes off momentarily, halting the drum’s
timer until Start turns on again.
S tart Reset Hold Resume Drum Reset
11 drum drum drum drum Complete drum

12 Inputs
S tart
1
0

13 J og
1
0
1
Reset 0
14
Drum S tatus
A S tep #
1
1 1 2 1 1 2 3 3 4 ... 15 16 16 16 1 1
Drum
Complete (CT10) 0
B Outputs (x 16)
1
0

C When the drum completes the last step (Step 16 in this example), the Drum Complete bit
(CT10) turns on, and the step number remains at 16. When the Reset input turns on, it
D turns off the Drum Complete bit (CT10), and forces the drum to enter the preset step.
NOTE: The timing diagram shows all steps using equal time durations. Step times can vary greatly,
depending on the counts/step programmed.

6–10 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 6: Drum Instruction Programming

In the figure below, we focus on how the Jog input works on event drums. To the left of the
diagram, note that the off-to-on transitions of the Jog input increments the step. Start may be 1
either on or off (however, Reset must be off ). Two jogs takes the drum to step three. Next, the
Start input turns on, and the drum begins running normally. During step 6 another Jog input
signal occurs. This increments the drum to step 7, setting the timer to 0. The drum begins
2
running immediately in step 7, because Start is already on. The drum advances to step 8
normally. 3
As the drum enters step 14, the Start input turns off. Two more Jog signals moves the drum
to step 16. However, note that a third Jog signal is required to move the drum through step 4
16 to “drum complete”. Finally, a Reset input signal arrives which forces the drum into the
preset step and turns off the drum complete bit.
Drum
5
Completed
Jog
drum
Jog
drum
Jog
drum
R es et
drum 6
Inputs
S tart
1
0 7
1
Jog 0

R es et
1
0
8
Drum S tatus
S tep #
1
1 2 3 3 3 4 5 6,7 8 ... 14 15 16 16 16 1 9
Drum
Complete (CT0)

Outputs (x 16)
0

1
0
10
Self-Resetting Drum
Applications often require drums that automatically start
X0
Start
Setup
11
Outputs
over once they complete a cycle. This is easily X1
Start Info.
accomplished, using the drum complete bit. In the figure X2
R es et
Steps f
f
f
f
F
f
f
f
f
f
f
f
12
to the right, the drum instruction setup is for CT10, so f f f f F f
we logically OR the drum complete bit (CT10) with the
Reset input. When the last step is done, the drum turns
CT10 F
f
f
F
F
F
f
F
F
F
f
f
F
F
F
f
f
F
13
f F f f F F
on CT10 which resets itself to the preset step, also
resetting CT10. Contact X2 still works as a manual reset.
f F F f f F
14
Initializing Drum Outputs
The outputs of a drum are enabled any time the CPU is in run mode. On program-to-run A
mode transitions, the drum goes to the preset step, and the outputs energize according to the
pattern of that step. If your application requires all outputs to be off at powerup, make the B
preset step in the drum a “reset step”, with all outputs off.
Using Complex Event Step Transitions C
Each event-based transition accepts only one contact reference for the event. However, this
does not limit events to just one contact. Just use a control relay contact such as C0 for the
step transition event. Elsewhere in ladder logic, you may use C0 as an output coil, making it
D
dependent on many other “events” (contacts).

DL06 Micro PLC User Manual, 3rd Edition Rev. A 6–11


Chapter 6: Drum Instruction Programming

1 Drum Instruction
The DL06 drum instructions may be programmed using DirectSOFT 5 or for the EDRUM
2 instruction only you can use a handheld programmer (firmware version v2.21 or later). This
section covers entry using DirectSOFT 5 for all instructions plus the handheld mnemonics
for the EDRUM instruction.
3 Timed Drum with Discrete Outputs (DRUM)
The Timed Drum with Discrete Outputs is the most basic of the DL06’s drum instructions.
4 It operates according to the principles covered on the previous pages. Below is the instruction
in chart form as displayed by DirectSOFT 5.
5 Direct SOFT 5 Display
Step Preset

6 Counter Number Timebase Discrete Output Assignment

Start
7
8
Control
Inputs { Reset

9 Step Number

Counts per Step


10
Output Pattern
11 쏔= Off, 쐽= On

12
13 The Timed Drum features 16 steps and 16 outputs. Step transitions occur only on a timed
basis, specified in counts per step. Unused steps must be programmed with “counts per step”
= 0 (this is the default entry). The discrete output points may be individually assigned as X, Y,
14 or C types, or may be left unused. The output pattern may be edited graphically with
DirectSOFT 5.
A Whenever the Start input is energized, the drum’s timer is enabled. It stops when the last step
is complete, or when the Reset input is energized. The drum enters the preset step chosen
upon a CPU program-to-run mode transition, and whenever the Reset input is energized.
B
Drum Parameters Field Data Types Ranges
C Counter Number
Preset Step
aaa --
bb
0 --174
K 1 -- 16
Timer base cccc K 0 -- 99.99 seconds
D Counts per step dddd K 0 -- 9999
Discrete Outputs Fffff X, Y, C see memory map

6–12 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 6: Drum Instruction Programming

Drum instructions use four counters in the CPU. The ladder program can read the counter
values for the drum’s status. The ladder program may write a new preset step number to 1
CTA(n+2) at any time. However, the other counters are for monitoring purposes only.
Counter Number Ranges of (n) Function Counter Bit Function 2
CTA(n) 0 -- 174 Counts in step CT(n) = Drum Complete
CTA( n+1)
CTA( n+2)
1 -- 175
2 -- 176
Timer value
Preset Step
CT(n+1) = (not used)
CT(n+2) = (not used)
3
CTA( n+3) 3 -- 177 Current Step CT(n+3) = (not used)
4
The following ladder program shows the DRUM instruction in a typical ladder program, as
shown by DirectSOFT 5. Steps 1 through 10 are used, and twelve of the sixteen output
points are used. The preset step is step 1. The timebase runs at (K10 x 0.01) = 0.1 second per
5
count. Therefore, the duration of step 1 is (25 x 0.1) = 2.5 seconds. In the last rung, the
Drum Complete bit (CT10) turns on output Y0 upon completion of the last step (step 10). 6
A drum reset also resets CT10.
7
Start
8
Reset
9
10
11
12
13
Drum Complete
14
Direct SOFT 5 Display A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 6–13


Chapter 6: Drum Instruction Programming

Event Drum (EDRUM)


1 The Event Drum (EDRUM) features time-based and event-based step transitions. It operates
according to the general principles of drum operation covered in the beginning of this
2 chapter. Below is the instruction as displayed by DirectSOFT 5.
Direct SOFT 5 Display
3 Counter Number Step Preset
Timebase Discrete Output Assignment
4
Start

5
6
Control
Inputs { Jog

Reset

Step Number
7 Counts per Step

8 Event per Step

Output Pattern
9 쏔= Off, 쐽= On

10
The Event Drum features 16 steps and 16 discrete outputs. Step transitions occur on timed
11 and/or event basis. The jog input also advances the step on each off-to-on transition. Time is
specified in counts per step, and events are specified as discrete contacts. Unused steps and
12 events must be left blank. The discrete output points may be individually assigned.
Drum Parameters Field Data Types Ranges
13 Counter Number aa -- 0 -- 174
Preset Step bb K 1 -- 16

14 Timer base
Counts per step
cccc
dddd
K
K
0 -- 99.99 seconds
0 -- 9999
Event Eeeee X, Y, C, S, T, CT, SP see memory map
A Discrete Outputs ffff X, Y, C see memory map

Whenever the Start input is energized, the drum’s timer is enabled. As long as the event is true
B for the current step, the timer runs during that step. When the step count equals the counts
per step, the drum transitions to the next step. This process stops when the last step is
C complete, or when the Reset input is energized. The drum enters the preset step chosen upon
a CPU program-to-run mode transition, and whenever the Reset input is energized.
D

6–14 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 6: Drum Instruction Programming

Drum instructions use four counters in the CPU. The ladder program can read the counter
values for the drum’s status. The ladder program may write a new preset step number to 1
CTA(n+2) at any time. However, the other counters are for monitoring purposes only.

Counter Number Ranges of (n) Function Counter Bit Function


2
CTA(n) 0 -- 174 Counts in step CT(n )= Drum Complete
CTA( n+1) 1 -- 175 Timer value CT(n+1) = (not used) 3
CTA( n+2) 2 -- 176 Preset Step CT(n+2) = (not used)
CTA( n+3) 3 -- 177 Current Step CT(n+3) = (not used) 4
The following ladder program shows the EDRUM instruction in a typical ladder program, as
shown by DirectSOFT 5. Steps 1 through 11 are used, and all sixteen output points are used.
5
The preset step is step 1. The timebase runs at (K10 x 0.01) = 0.1 second per count.
Therefore, the duration of step 1 is (1 x 0.1) = 0.1 second. Note that step 1 is time-based only 6
(event is left blank). And, the output pattern for step 1 programs all outputs off, which is a
typically desirable powerup condition. In the last rung, the Drum Complete bit (CT4) turns
on output Y0 upon completion of the last step (step 11). A drum reset also resets CT4.
7
8
Start 9
Jog
10
Reset
11
12
13
14
Drum Complete
A
Direct SOFT 5 Display B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 6–15


Chapter 6: Drum Instruction Programming

1 Handheld Programmer Drum Mnemonics


The EDRUM instruction can also be programmed using a handheld programmer. This
section explains entry via the handheld programmer.
2 First, enter Store instructions for the ladder rungs X0
Start
Setup Outputs
controlling the drum’s ladder inputs. In the
3 example to the right, the timer drum’s Start, Jog,
X1
J og Info
Ma s k
f f F f f f
and Reset inputs are controlled by X0, X1 and X2 X2 Steps
R es et f f f f f f
4 respectively. The required keystrokes are listed
beside the mnemonic.
f f f f F
F F f F F
f
f
f F F f F f
These keystrokes precede the EDRUM instruction f F F f F F
5 mnemonic. Note that the ladder rungs for Start,
f F f f F
f F F f f
F
F
Jog, and Reset inputs are not limited to being
6 single–contact rungs.
Handheld Programmer Keys trokes

$ A
Store X0 STR 0
E NT

7 (Repeat for Store X1 and Store X2)


Handheld Programmer Keystrokes
8 EDRUM CNT4 SHFT E
4
D
3
R
ORN
U
ISG
M
ORST
E 4 ENT

9 After the Store instructions, enter the EDRUM (using Counter CT0) as shown:
After entering the EDRUM mnemonic as above, the handheld programmer creates an input
10 form for all the drum parameters. The input form consists of approximately fifty or more
default mnemonic entries containing DEF (define) statements. The default mnemonics are
already “input” for you, so they appear automatically. Use the NXT and PREV keys to move
11 forward and backward through the form. Only the editing of default values is required, thus
eliminating many keystrokes. The entries required for the basic timer drum are in the chart
12 below.
NOTE: Default entries for output points and events are “DEF 0000”, which means they are unassigned. If
13 you need to go back and change an assigned output as unused again, enter “K0000”. The entry will again
show as “DEF 0000”.

14 Drum Multiple Default Valid Data


Mnemonic / Entry Ranges
Parameters Entries Mnemonic Types
A Start Input -- STR (plus input rung) -- -- --
Jog Input -- STR (plus input rung) -- -- --
B Reset Input
Drum Mnemonic
--
--
STR (plus input rung)
DRUM CNT aa
--
--
--
CT
--
0 -- 174
Preset Step 1 bb DEF K0000 K 1 -- 16
C Timer base 1 cccc DEF K0000 K 1 -- 9999
Output points 16 ffff DEF 0000 X, Y, C see memory map
D Counts per step
Events
16
16
dddd
dddd
DEF K0000
DEF K0000
K
X, Y, C, S, T, CT, SP
0 -- 9999
see memory map
Output pattern 16 gggg DEF K0000 K 0 -- FFFF

6–16 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 6: Drum Instruction Programming

Using the DRUM entry chart (two pages before), we show the method of entry for the basic
time/event drum instruction. First, we convert the output pattern for each step to the 1
equivalent hex number, as shown in the following example.
Step 1 Outputs : f f f f F f f F f f f F F f F f 2
- converts to: 15 0
0 9 1 A
3
The following diagram shows the method for entering the previous EDRUM example on the
HHP. The default entries of the form are in parenthesis. After the drum instruction entry (on 4
the fourth row), the remaining keystrokes over-write the numeric portion of each default
DEF statement. NOTE: Drum editing requires Handheld Programmer firmware version 2.21
or later.
5
NOTE: You may use the NXT and PREV keys to skip past entries for unused outputs or steps. 6
Handheld Programmer Keystrokes

Start $
STR
A
0
ENT Note: You may use the NXT and PREV keys
7
to skip past entries for unused outputs or steps.
Jog $ B ENT

Reset $
STR

STR
C
1

2
ENT
8
E D R U M E
Drum Inst.

Preset Step
SHFT
4

( DEF K0001)
3

NEXT
ORN ISG ORST 4 ENT
9
Handheld Programmer Keystrokes cont’d
Time Base

1
( DEF K0000 )

( DEF 0000 )
G

SHFT
6
E

C
4
NEXT

H NEXT 1 ( DEF K0000 ) F NEXT


10
2 7 5

( DEF 0000 ) SHFT


C

Y
2
B

B
1
A
0
NEXT ( DEF K0000 )
C

B
2
A

F
0
NEXT

A
11
( DEF 0000 ) SHFT NEXT ( DEF K0000 ) NEXT
MLS 1 1 5 0

( DEF 0000 ) SHFT


Y
MLS
E
4
NEXT ( DEF K0000 )
E
4
F
5
NEXT 12
Y F B I A
( DEF 0000 ) SHFT NEXT ( DEF K0000 ) NEXT
MLS 5 1 8 0

( DEF 0000 ) SHFT


Y
MLS
G
6
NEXT ( DEF K0000 )
J
9
C
2
D
3
NEXT 13
C E B C A
( DEF 0000 ) SHFT NEXT ( DEF K0000 ) NEXT

( DEF 0000 ) SHFT


C
2

2
C
4

2
NEXT
Counts/ ( DEF K0000 )
I
1

8
G
2

6
E
0

4
NEXT
14
Outputs Step
( DEF 0000 ) Y A B C A A

( DEF 0000 )
SHFT

SHFT Y
MLS

MLS
C
0

2
NEXT

NEXT
( DEF K0000 )

( DEF K0000 ) E
1

4
A
2

0
A
0

0
NEXT
0
NEXT
A
( DEF 0000 )

( DEF 0000 )
SHFT

SHFT
C

C
2
B

D
1
E

A
4
NEXT

NEXT
( DEF K0000 )

( DEF K0000 )
NEXT

NEXT
B
2 3 0

( DEF 0000 ) SHFT Y

Y
MLS
G

H
6
NEXT ( DEF K0000 ) NEXT
skip over
unused steps
C
( DEF 0000 ) SHFT NEXT ( DEF K0000 ) NEXT
MLS 7

( DEF 0000 ) SHFT


C
2
D
3
E
4
NEXT ( DEF K0000 ) NEXT D
16 ( DEF 0000 ) SHFT Y B NEXT 16 ( DEF K0000 ) NEXT
MLS 1

(Continued on next page )

DL06 Micro PLC User Manual, 3rd Edition Rev. A 6–17


Chapter 6: Drum Instruction Programming

1
2 Handheld Programmer Keystrokes cont’d Handheld Programmer Keystrokes cont’d

skip over unused event


3 1 ( DEF 0000 )

( DEF 0000 )
NEXT

Y E
1
( DEF K0000 ) NEXT step 1 pattern = 0000
SHFT NEXT J I B C
MLS 4 ( DEF K0000 ) NEXT
9 8 1 2

4 ( DEF 0000 ) SHFT X


SET
B
1
NEXT
( DEF K0000 )
C
2
I
8
J
9
E
4
NEXT

( DEF 0000 ) SHFT X C NEXT E E H G

5 ( DEF 0000 ) SHFT C


SET

2
A
2

0
NEXT
( DEF K0000 )

( DEF K0000 ) F
4

B
4

G
7

J
6
NEXT

NEXT
5 1 6 9

6 ( DEF 0000 ) SHFT C

X
2
B

A
1
NEXT
( DEF K0000 ) J
9
D
3
E
4
D
3
NEXT

( DEF 0000 ) SHFT NEXT E E I G


SET 0 ( DEF K0000 ) NEXT
4 4 8 6
7 Outputs
( DEF 0000 ) SHFT X
SET
F
5
NEXT Output ( DEF K0000 ) J
9
E
4
F
5
J
9
NEXT

X D
Pattern
( DEF 0000 ) SHFT NEXT D I A
8 ( DEF 0000 ) SHFT Y
SET

MLS
H
3

7
NEXT
( DEF K0000 )

F
3

I
8
SHFT

G E
0
NEXT

NEXT
( DEF K0000 ) 5 8 6 4

9 ( DEF 0000 ) SHFT C


2
C
2
A
0
NEXT
( DEF K0000 )
I
8
E
4
E
4
H
7
NEXT

( DEF 0000 ) NEXT


( DEF K0000 ) NEXT

10 ( DEF 0000 ) NEXT


( DEF K0000 ) NEXT

( DEF 0000 ) NEXT


unused steps
11 ( DEF 0000 ) NEXT
( DEF K0000 ) NEXT

NEXT
( DEF K0000 )

12 16 ( DEF 0000 ) NEXT 16


( DEF K0000 ) NEXT

$ GY E
4 NEXT
STR CNT
13 Last rung
SHFT Y
MLS
A
0
NEXT

14 NOTE: you may use the NXT and PREV keys to skip past entries for unused outputs or steps.

A NOTE: For ease of operation when using the EDRUM instruction, we recommend using DirectSOFT 5
over the handheld programmer.
B
C
D

6–18 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 6: Drum Instruction Programming

Masked Event Drum with Discrete Outputs (MDRMD)


The Masked Event Drum with Discrete Outputs has all the features of the basic Event Drum 1
plus final output control for each step. It operates according to the general principles of drum
operation covered in the beginning of this section. Below is the instruction in chart form as
displayed by DirectSOFT 5.
2
Direct SOFT 5 Display
Counter Number Step Preset Discrete Output Assignment 3
Output Mask Word
Timebase
4
Start
5
Control
Inputs { Jog

Reset
6
Step Number
7
Counts per Step

Event per Step 8


Output Pattern
쏔= Off, 쐽= On 9
10
The Masked Event Drum with Discrete Outputs features sixteen steps and sixteen outputs.
Drum outputs are logically ANDed bit-by-bit with an output mask word for each step. The 11
Ggggg field specifies the beginning location of the 16 mask words. Step transitions occur on
timed and/or event basis. The jog input also advances the step on each off-to-on transition.
Time is specified in counts per step, and events are specified as discrete contacts. Unused steps
12
and events can be left blank (this is the default entry). Whenever the Start input is energized,
the drum’s timer is enabled. As long as the event is true for the current step, the timer runs 13
during that step. When the step count equals the counts per step, the drum transitions to the
next step. This process stops when the last step is complete, or when the Reset input is
energized. The drum enters the preset step chosen upon a CPU program-to-run mode
14
transition, and whenever the Reset input is energized.
A
Drum Parameters Field Data Types Ranges
Counter Number aaa – 0 – 174 B
Preset Step bb K 1 – 16
Timer base
Counts per step
cccc
dddd
K
K
0 – 99.99 seconds
0 – 9999
C
Event eeee X, Y, C, S, T, ST, GX, GY. CT, SP
Discrete Outputs Fffff X, Y, C, GX, GY see memory map
D
Output Mask Ggggg V

DL06 Micro PLC User Manual, 3rd Edition Rev. A 6–19


Chapter 6: Drum Instruction Programming

Drum instructions use four counters in the CPU. The ladder program can read the counter
1 values for the drum’s status. The ladder program may write a new preset step number to
CTA(n+2) at any time. However, the other counters are for monitoring purposes only.
2 Counter Number Ranges of (n) Function Counter Bit Function
CTA(n) 0 – 174 Counts in step CT(n) = Drum Complete
3 CTA( n+1)
CTA( n+2)
1 – 175
2 –176
Timer value
Preset Step
CT(n+1) = (not used)
CT(n+2) = (not used)
CTA( n+3) 3 –177 Current Step CT(n+1) = (not used)
4 The following ladder program shows the MDRMD instruction in a typical ladder program,
as shown by DirectSOFT 5. Steps 1 through 11 are used, and all 16 output points are used.
5 The output mask word is at V2000. The final drum outputs are shown above the mask word
as individual bits. The data bits in V2000 are logically ANDed with the output pattern of the
6 current step in the drum. If you want all drum outputs to be off after powerup, write zeros to
V2000 on the first scan. Ladder logic may update the output mask at any time to enable or
disable the drum outputs The preset step is step 1. The timebase runs at (K10 x 0.01)=0.1
7 second per count. Therefore, the duration of step 1 is (5 x 0.1) = 0.5 seconds. Note that step
1 is time-based only (event is left blank). In the last rung, the Drum Complete bit (CT10)
8 turns on output Y0 upon completion of the last step (step 10). A drum reset also resets CT10.

9 Start

10 Jog

Reset
11
12
13
14 Drum Complete

A Set Mask Registers

B
C Direct SOFT 5 Display

D NOTE: The ladder program must load constants in V2000 through V2012 to cover all mask registers for the
eleven steps used in this drum

6–20 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 6: Drum Instruction Programming

Masked Event Drum with Word Output (MDRMW)


The Masked Event Drum with Word Output features outputs organized as bits of a single 1
word, rather than discrete points. It operates according to the general principles of drum
operation covered in the beginning of this section. Below is the instruction in chart form as
displayed by DirectSOFT 5.
2
Direct SOFT 5 Display
Counter Number Step Preset Word Output Assignment 3
Timebase Output Mask Word
4
Start
5
Control
Inputs { Jog

Reset
6
Step Number

Counts per Step


7
Event per Step 8
Output Pattern
쏔= Off, 쐽= On 9
10
The Masked Event Drum with Word Output features sixteen steps and sixteen outputs.
Drum outputs are logically ANDed bit-by-bit with an output mask word for each step. The 11
Ggggg field specifies the beginning location of the 16 mask words, creating the final output
(Fffff field). Step transitions occur on timed and/or event basis. The jog input also advances
the step on each off-to-on transition. Time is specified in counts per step, and events are
12
specified as discrete contacts. Unused steps and events can be left blank (this is the default
entry). 13
Whenever the Start input is energized, the drum’s timer is enabled. As long as the event is true
for the current step, the timer runs during that step. When the step count equals the counts 14
per step, the drum transitions to the next step. This process stops when the last step is
complete, or when the Reset input is energized. The drum enters the preset step chosen upon
a CPU program-to-run mode transition, and whenever the Reset input is energized.
A
Drum Parameters
Counter Number
Field
aaa
Data Types

Ranges
0 – 174
B
Preset Step
Timer base cccc
bb K
K
1 – 16
0 – 99.99 seconds
C
Counts per step dddd K 0 – 9999
Event eeee X, Y, C, S, T, ST, GX, GY, SP see memory map D
Word Output Fffff V see memory map
Output Mask Ggggg V see memory map

DL06 Micro PLC User Manual, 3rd Edition Rev. A 6–21


Chapter 6: Drum Instruction Programming

Drum instructions use four counters in the CPU. The ladder program can read the counter
1 values for the drum’s status. The ladder program may write a new preset step number to
CTA(n+2) at any time. However, the other counters are for monitoring purposes only.
2 Counter Number Ranges of (n) Function Counter Bit Function
CTA(n) 0 – 174 Counts in step CT(n) = Drum Complete
3 CTA( n+1)
CTA( n+2)
1 – 175
2 –176
Timer value
Preset Step
CT(n+1) = (not used)
CT(n+2) = (not used)
CTA( n+3) 3 –177 Current Step CT(n+1) = (not used)
4
The following ladder program shows the MDRMD instruction in a typical ladder program,
5 as shown by DirectSOFT 5. Steps 1 through 11 are used, and all sixteen output points are
used. The output mask word is at V2000. The final drum outputs are shown above the mask
word as a word at V2001. The data bits in V2000 are logically ANDed with the output
6 pattern of the current step in the drum, generating the contents of V2001. If you want all
drum outputs to be off after powerup, write zeros to V2000 on the first scan. Ladder logic
7 may update the output mask at any time to enable or disable the drum outputs. The preset
step is step 1. The timebase runs at (K50 x 0.01)=0.5 seconds per count. Therefore, the
duration of step 1 is (5 x 0.5) = 2.5 seconds. Note that step 1 is time-based only (event is left
8 blank). In the last rung, the Drum Complete bit (CT14) turns on output Y0 upon
completion of the last step (step 10). A drum reset also resets CT14.
9
10 Start

Jog
11
Reset
12
13
14
A Drum Complete

B Set Mask Registers

C
Direct SOFT 5 Display

D NOTE: The ladder program must load constants in V2000 through V2012 to cover all mask registers for the
eleven steps used in this drum

6–22 DL06 Micro PLC User Manual, 3rd Edition Rev. A


PLUS
RLL STAGE CHAPTER
PROGRAMMING
7
In This Chapter...
Introduction to Stage Programming . . . . . . . . . . . . . . . . . . . . . . . .7–2
Learning to Draw State Transition Diagrams . . . . . . . . . . . . . . . . . .7–3
Using the Stage Jump Instruction for State Transitions . . . . . . . . . . .7–7
Stage Program Example: Toggle On/Off Lamp Controller . . . . . . . .7–8
Four Steps to Writing a Stage Program . . . . . . . . . . . . . . . . . . . . . .7–9
Stage Program Example: A Garage Door Opener . . . . . . . . . . . . . .7–10
Stage Program Design Considerations . . . . . . . . . . . . . . . . . . . . . .7–15
Parallel Processing Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–19
RLLPLUS (Stage) Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7–21
Questions and Answers about Stage Programming . . . . . . . . . . . .7–27
Chapter 7: RLLPLUS Stage Programming

1 Introduction to Stage Programming


Stage Programming provides a way to organize and program complex applications with
2 relative ease, when compared to purely relay ladder logic (RLL) solutions. Stage programming
does not replace or negate the use of traditional boolean ladder programming. This is why
Stage Programming is also called RLL PLUS You won’t have to discard any training or
3 experience you already have. Stage programming simply allows you to divide and organize a
RLL program into groups of ladder instructions called stages. This allows quicker and more
4 intuitive ladder program development than traditional RLL alone provides.
Overcoming “Stage Fright”
5 Many PLC programmers in the industry have
become comfortable using RLL for every PLC
X0 C0
RST
program they write... but often remain skeptical or
6 even fearful of learning new techniques such as
X4 C1 Y0
SET
stage programming. While RLL is great at solving
7 boolean logic relationships, it has disadvantages as
well: STAGE!

8 • Large programs can become almost unmanageable,


because of a lack of structure. X3 Y2
OUT
• When a process gets stuck, it is difficult to find the
9 rung where the error occurred.
• Programs become difficult to modify later, because
10 they do not intuitively resemble the application
problem they are solving.
11 It’s easy to see that these inefficiencies consume a
lot of additional time, and time is money. Stage
programming overcomes these obstacles! We believe a few moments of studying the stage concept
12 is one of the greatest investments in programming speed and efficiency a PLC programmer
can make!
13 So, we encourage you to study stage programming and add it to your “toolbox” of
programming techniques. This chapter is designed as a self-paced tutorial on stage
14 programming. For best results:
• Start at the beginning and do not skip over any sections.
A • Study each stage programming concept by working through each example. The examples build
progressively on each other.
• Read the Stage Questions and Answers at the end of the chapter for a quick review.
B
C
D

7–2 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 7: RLLPLUS Stage Programming

Learning to Draw State Transition Diagrams 1


Introduction to Process States
Those familiar with ladder program execution know that Inputs
Ladder
Program
Outputs 2
the CPU must scan the ladder program repeatedly, over
and over. Its three basic steps are: 3
1. Read the inputs
2. Execute the ladder program 1) Read Execute Write 4
3. Write the outputs 2) Read Execute Write
The benefit is that a change at the inputs can affect the 3) Read (Etc.....)
5
outputs in just a few milliseconds.
Most manufacturing processes consist of a series of activities or conditions , each lasting for 6
several seconds. minutes, or even hours. We might call these “process states”, which are either
active or inactive at any particular time. A challenge for RLL programs is that a particular
input event may last for just a brief instant. We typically create latching relays in RLL to
7
preserve the input event in order to maintain a process state for the required duration.
We can organize and divide ladder logic into sections called “stages”, representing process
8
states. But before we describe stages in detail, we will reveal the secret to understanding stage
programming: state transition diagrams. 9
The Need for State Diagrams
Sometimes we need to forget about the scan nature of PLCs, and focus our thinking toward 10
the states of the process we need to identify. Clear thinking and concise analysis of an
application gives us the best chance at writing efficient, bug-free programs. State diagrams are 11
just a tool to help us draw a picture of our process! You’ll discover that if we can get the picture
right, our program will also be right! Inputs
ON
Outputs
12
A 2–State Process X0 Motor
Ladder
Consider the simple process shown to the right, which controls OFF
an industrial motor. We will use a green momentary SPST
X1
Program
Y0
13
pushbutton to turn the motor on, and a red one to turn it off.
The machine operator will press the appropriate pushbutton for State X0
Transition condition
14
just a second or so. The two states of our process are ON and
OFF. OFF
X1
ON
A
The next step is to draw a state transition diagram, as shown to Output equation: Y0 = On
the right. It shows the two states OFF and ON, with two
transition lines in-between. When the event X0 is true, we transition from OFF to ON.
B
When X1 is true, we transition from ON to OFF.
If you’re following along, you are very close to grasping the concept and the problem-solving
C
power of state transition diagrams. The output of our controller is Y0, which is true any time
we are in the ON state. In a boolean sense, Y0=ON state. D
Next, we will implement the state diagram first as RLL, then as a stage program. This will
help you see the relationship between the two methods in problem solving.

DL06 Micro PLC User Manual, 3rd Edition Rev. A 7–3


Chapter 7: RLLPLUS Stage Programming

The state transition diagram to the right is a picture


1 of the solution we need to create. The beauty of it is
this: it expresses the problem independently of the X0
2 programming language we may use to realize it. In
other words, by drawing the diagram we have already OFF ON
solved the control problem! X1
3 First, we’ll translate the state diagram to traditional Output equation Y0 = ON
RLL. Then we’ll show how easy it is to translate the
4 diagram into a stage programming solution.
RLL Equivalent Set Reset Output
5 The RLL solution is shown to the right. Output X0 X1 Y0
control relay, Y0, has a dual pupose. It turns the OUT
6 motor on and off and acts as a latching relay. When
the On pushbutton (X0) is pressed, output coil Y0
turns on and the Y0 contact on the second row
7 latches itself on. So, X0 turns on the motor output
Latch
Y0
Y0 which now has power flow and sets the latch Y0.
8 It will remain on after the X0 contact opens.
When the Off pushbutton (X1) is pressed, it opens
9 the normally-closed X1 contact, which turns off
moter output Y0 and also resets the latch.
10 Stage Equivalent
SG
The stage program solution is shown to the right. S0 OFF State
11 The two inline stage boxes S0 and S1 correspond to
the two states OFF and ON. The ladder rung(s) Transition
below each stage box belong to each respective stage. X0 S1
12 This means that the PLC only has to scan those JMP
rungs when the corresponding stage is active!
13 For now, let’s assume we begin in the OFF State, so SG ON State
stage S0 is active. When the On pushbutton (X0) is S1
pressed, a stage transition occurs. The JMP S1 Output
14 instruction executes, which simply turns off the Stage SP1 Always On Y0
bit S0 and turns on Stage bit S1. So on the next PLC OUT
A scan, the CPU will not execute Stage S0, but will
Transition
execute stage S1!
X1 S0
B In the On State (Stage S1), we want the motor to
always be on. The special relay contact SP1 is defined
JMP

as always on, so Y0 turns the motor on.


C When the Off pushbutton (X1) is pressed, a transition back to the Off State occurs. The JMP
S0 instruction executes, which simply turns off the Stage bit S1 and turns on Stage bit S0. On
D the next PLC scan, the CPU will not execute Stage S1, so the motor output Y0 will turn off.
The Off state (Stage 0) will be ready for the next cycle.

7–4 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 7: RLLPLUS Stage Programming

Let’s Compare
Right now, you may be thinking “I don’t see the big advantage to Stage Programming... in 1
fact, the stage program is longer than the plain RLL program”. Well, now is the time to
exercise a bit of faith. As control problems grow in complexity, stage programming quickly
out-performs RLL in simplicity, program size, etc.
2
For example, consider the diagram below. Notice how easy
it is to correlate the OFF and ON states of the state SG
3
S0 OFF State
transition diagram below to the stage program at the right.
Now, we challenge anyone to
X0 S1
JMP
4
easily identify the same states
in the RLL program on the
previous page!
SG
S1 ON State 5
SP1 Y0

Initial Stages X0
OUT 6
X1 S0
At powerup and Program-to- OFF ON
Run Mode transitions, the
PLC always begins with all
X1
JMP
7
normal stages (SG) off. So, the stage programs shown so far
have actually had no way to get started (because rungs are ISG
Powerup in OFF State
8
S0 Initial Stage
not scanned unless their stage is active).
Assume that we want to always begin in the Off state X0 S1
JMP
9
(motor off ), which is how the RLL program works. The
Initial Stage (ISG) is defined to be active at powerup. In
the modified program to the right, we have changed stage
SG
S1
10
S0 to the ISG type. This ensures the PLC will scan
contact X0 after powerup, because Stage S0 is active.
SP1 Y0
OUT 11
After powerup, an Initial Stage (ISG) works just like any X1 S0

other stage! JMP


12
We can change both programs so that the motor is ON at
powerup. In the RLL below, we must add a first scan relay
SP0, latching Y0 on. In the stage example to the right, we SG
Powerup in ON State 13
simply make Stage S1 an initial stage (ISG) instead of S0. S0

X0 S1 14
JMP
Powerup in ON State
X0 X1 Y0 ISG
S1
Initial Stage A
OUT
SP1
Y0
First Scan
Y0
OUT B
X1 S0
SP0
JMP C
NOTE: If the ISG is within the retentive range for stages, the ISG will remain in the state it was in before
D
power down and will NOT turn itself on during the first scan.

DL06 Micro PLC User Manual, 3rd Edition Rev. A 7–5


Chapter 7: RLLPLUS Stage Programming

We can mark our desired powerup state as shown to Powerup


1 the right, which helps us remember to use the X0
appropriate Initial Stages when creating a stage
OFF ON
2 program. It is permissible to have as many initial
stages as the process requires. X1

3 What Stage Bits Do


You may recall that a stage is just a section of ladder program which is either active or inactive
at a given moment. All stage bits (S0 to 1777) reside in the PLC’s image register as individual
4 status bits. Each stage bit is either a boolean 0 or 1 at any time.
Program execution always reads ladder rungs from top to bottom, and from left to right. The
5 drawing below shows the effect of stage bit status. The ladder rungs below the stage
instruction continuing until the next stage instruction or the end of program belong to stage
6 0. Its equivalent operation is shown on the right. When S0 is true, the two rungs have power
flow.
7 • If Stage bit S0 = 0, its ladder rungs are not scanned (executed).
• If Stage bit S0 = 1, its ladder rungs are scanned (executed).

8 Actual Program Appearance Functionally Equivalent Ladder

9 SG
S0
S0

10
(includes all rungs in stage)
11
Stage Instruction Characteristics SG
12 The inline stage boxes on the left power rail divide the ladder
S0

program rungs into stages. Some stage rules are:


13 • Execution – Only logic in active stages are executed on any
scan. SG
S1
14 • Transitions – Stage transition instructions take effect on the
next occurrence of the stages involved.

A • Octal numbering – Stages are numbered in octal, like I/O


points, etc. So “S8” is not valid.
SG
• Total Stages – The DL06 offers up to 1024 stages S2
B (S0 to 1777 in octal).
• No duplicates –Each stage number is unique and can be used
C just once.
END
• Any order – You can skip numbers and sequence the stage
D numbers in any order.
• Last Stage – The last stage in the ladder program includes all
rungs from its stage box until the end coil.

7–6 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 7: RLLPLUS Stage Programming

Using the Stage Jump Instruction for State Transitions 1


Stage Jump, Set, and Reset Instructions
The Stage JMP instruction we have used deactivates the stage in which the instruction occurs, 2
while activating the stage in the JMP instruction. Refer to the state transition shown below.
When contact X0 energizes, the state transition from S0 to S1 occurs. The two stage examples 3
shown below are equivalent. So, the Stage Jump instruction is equal to a Stage Reset of the
current stage, plus a Stage Set instruction for the stage to which we want to transition.
X0
4
S0 S1 5
SG
S0
SG
S0 6
S1
Equivalent S0
X0 X0
JMP RST 7
S1
SET
8
Please Read Carefully – The jump instruction is easily misunderstood. The “jump” does not
occur immediately like a GOTO or GOSUB program control instruction when executed.
9
Here’s how it works:
• The jump instruction resets the stage bit of the stage in which it occurs. All rungs in the stage still 10
finish executing during the current scan, even if there are other rungs in the stage below the jump
instruction! 11
• The reset will be in effect on the following scan, so the stage that executed the jump instruction
previously will be inactive and bypassed.
• The stage bit of the stage named in the Jump instruction will be set immediately, so the stage will be
12
executed on its next occurrence. In the left program shown below, stage S1 executes during the same
scan as the JMP S1 occurs in S0. In the example on the right, Stage S1 executes on the next scan
after the JMP S1 executes, because stage S1 is located above stage S0.
13
Executes on next
14
SG SG
S0 S1 scan after Jmp
X0 S1
S1 Y0
A
JMP
OUT

SG Executes on same SG
B
S1 scan as Jmp S0

S1 Y0
X0 S1 C
JMP
OUT
D
NOTE: Assume we start with Stage 0 active and Stage 1 inactive for both examples.

DL06 Micro PLC User Manual, 3rd Edition Rev. A 7–7


Chapter 7: RLLPLUS Stage Programming

1 Stage Program Example: Toggle On/Off Lamp Controller Inputs Outputs


A 4–State Process
2 In the process shown to the right, we use an ordinary Toggle
X0 Ladder Y0
momentary pushbutton to control a light bulb. The Program
3 ladder program will latch the switch input, so that we
will push and release to turn on the light, push and
4 release again to turn it off (sometimes called toggle
function). Sure, we could just buy a mechanical switch
Powerup
X0
with the alternate on/off action built in... However, this
5 example is educational and also fun! Next we draw the
OFF
X0
ON

state transition diagram.


6 A typical first approach is to use X0 for both transitions
Output equation: Y0 = ON

(like the example shown to the right). However, this is incorrect (please keep reading).
7 Note that this example differs from the motor example, because now we have just one
pushbutton. When we press the pushbutton, both transition conditions are met. We would
just transition around the state diagram at top speed. If implemented in Stage, this solution
8 would flash the light on or off each scan (obviously undesirable)!
The solution is to make the push and the release of the pushbutton separate events. Refer to
9 the new state transition diagram below. At powerup we enter the OFF state. When switch X0
is pressed, we enter the Press-ON state. When it is released, we enter the ON state. Note that
10 X0 with the bar above it denotes X0 NOT.

11 Powerup X0 Push–ON X0
ISG
S0 OFF State

X0 S1
12 OFF ON JMP

13 X0
Push–OFF
X0
SG
S1 Push–On State

X0 S2
14 When in the ON state, another push and release cycle
JMP

similarly takes us back to the OFF state. Now we have


A two unique states (OFF and ON) used when the
pushbutton is released, which is what was required to
SG
S2
ON State
Output
SP1 Y0
solve the control problem.
B The equivalent stage program is shown to the right. The
OUT
X0 S3
desired powerup state is OFF, so we make S0 an initial
C stage (ISG). In the ON state, we add special relay
JMP

contact SP1, which is always on. SG


S3
Push–Off State
D Note that even as our programs grow more complex, it X0 S0
is still easy to correlate the state transition diagram with JMP
the stage program!

7–8 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 7: RLLPLUS Stage Programming

Four Steps to Writing a Stage Program 1


By now, you’ve probably noticed that we follow the same steps to solve each example
problem. The steps will probably come to you automatically if you work through all the
examples in this chapter. It’s helpful to have a checklist to guide us through the problem 2
solving. The following steps summarize the stage program design procedure:
1. Write a Word Description of the application. 3
Describe all functions of the process in your own words. Start by listing what happens first,
then next, etc. If you find there are too many things happening at once, try dividing the 4
problem into more than one process. Remember, you can still have the processes
communicate with each other to coordinate their overall activity. 5
2. Draw the Block Diagram.
Inputs represent all the information the process needs for decisions, and outputs connect to 6
all devices controlled by the process.
• Make lists of inputs and outputs for the process. 7
• Assign I/O point numbers (X and Y) to physical inputs and outputs.
3. Draw the State Transition Diagram. 8
The state transition diagram describes the central function of the block diagram, reading
inputs and generating outputs. 9
• Identify and name the states of the process.
• Identify the event(s) required for each transition between states. 10
• Ensure the process has a way to re-start itself, or is cyclical.
• Choose the powerup state for your process. 11
• Write the output equations.
4. Write the Stage Program. 12
Translate the state transition diagram into a stage program.
• Make each state a stage. Remember to number stages in octal. Up to 1024 total stages are available
in the DL06, numbered 0 to 1777 in octal.
13
• Put transition logic inside the stage which originates each transition (the stage each arrow points
away from).
14
• Use an initial stage (ISG) for any states that must be active at powerup.
• Place the outputs or actions in the appropriate stages.
A
You’ll notice that Steps 1 through 3 just prepare us to write the stage program in Step 4.
However, the program virtually writes itself because of the preparation beforehand. Soon B
you’ll be able to start with a word description of an application and create a stage program in
one easy session! C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 7–9


Chapter 7: RLLPLUS Stage Programming

1 Stage Program Example: A Garage Door Opener


Garage Door Opener Example
2 In this next stage programming example we’ll create a
garage door opener controller. Hopefully most readers
3 are familiar with this application, and we can have
fun besides!
4 The first step we must take is to describe how the
door opener works. We will start by achieving the
basic operation, waiting to add extra features later.
5 Stage programs are very easy to modify.
Our garage door controller has a motor which raises
6 or lowers the door on command. The garage owner
pushes and releases a momentary pushbutton once to
7 raise the door. After the door is up, another push-
release cycle will lower the door.
8 In order to identify the inputs and outputs of the
system, it’s sometimes helpful to sketch its main
Up limit switch

components, as shown in the door side view to the


9 right. The door has an up limit and a down limit Motor Raise
switch. Each limit switch closes only when the door Lower
10 has reach the end of travel in the corresponding
direction. In the middle of travel, neither limit switch
is closed.
11 The motor has two command inputs: raise and lower.
When neither input is active, the motor is stopped. Door
12 The door command is just a simple pushbutton. Command
Whether wall-mounted as shown, or a radio-remote
13 control, all door control commands logical OR
together as one pair of switch contacts.
Down limit switch

14 Draw the Block Diagram


The block diagram of the controller is shown to the
A right. Input X0 is from the pushbutton door control.
Input X1 energizes when the door reaches the full up
Inputs Outputs
Toggle
position. Input X2 energizes when the door reaches X0
B the full down position. When the door is positioned
Up limit
Ladder To motor:
between fully up or down, both limit switches are Program
X1 Y1
C open. Raise

The controller has two outputs to drive the motor. Down limit
X2 Y2
D Y1 is the up (raise the door) command, and Y2 is the
down (lower the door) command.
Lower

7–10 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 7: RLLPLUS Stage Programming

Draw the State Diagram


Now we are ready to draw the state transition diagram. Like the previous light bulb controller 1
example, this application also has just one switch for the command input. Refer to the figure
below. 2
• When the door is down (DOWN state), nothing happens until X0 energizes. Its push and release
brings us to the RAISE state, where output Y1 turns on and causes the motor to raise the door.
• We transition to the UP state when the up limit switch (X1) energizes, and turns off the motor.
3
• Then nothing happens until another X0 press-release cycle occurs. That takes us to the LOWER
state, turning on output Y2 to command the motor to lower the door. We transition back to the 4
DOWN state when the down limit switch (X2) energizes.
5
Powerup X0 Push–UP
X0
RAISE X1 6
ISG DOWN State
S0

DOWN UP X0 S1 7
JMP

X2 LOWER Push–DOWN X0
SG
S1 Push–UP State 8
X0 X0 S2

Output equations: Y1 = Raise Y2 = Lower


JMP 9
SG
The equivalent stage program is shown to the right. For now, we S2
RAISE State
10
will assume the door is down at powerup, so the desired powerup SP1 Y1
OUT
state is DOWN. We make S0 an initial stage (ISG). Stage S0
remains active until the door control pushbutton activates. Then X1 S3 11
JMP
we transition (JMP) to Push-UP stage, S1.
A push-release cycle of the pushbutton takes us through stage S1 SG
S3
UP State 12
to the RAISE stage, S2. We use the always-on contact SP1 to X0 S4
energize the motor’s raise command, Y1. When the door reaches
the fully-raised position, the up limit switch X1 activates. This
JMP 13
SG Push–DOWN State
takes us to the UP Stage S3, where we wait until another door
control command occurs.
S4
X0 S5
14
JMP
In the UP Stage S3, a push-release cycle of the pushbutton will
take us to the LOWER Stage S5, where we activate Y2 to SG LOWER State
A
command the motor to lower the door. This continues until the S5

door reaches the down limit switch, X2. When X2 closes, we


transition from Stage S5 to the DOWN stage S0, where we began.
SP1 Y2
OUT
B
X2 S0
NOTE: The only special thing about an initial stage (ISG) is that it is JMP C
automatically active at powerup. Afterwards, it is just like any other.
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 7–11


Chapter 7: RLLPLUS Stage Programming

Add Safety Light Feature


1 Next we will add a safety light feature to the door
opener system. It’s best to get the main function
2 working first as we have done, then adding the
secondary features.
Safety light
3 The safety light is standard on many commercially-
available garage door openers. It is shown to the
right, mounted on the motor housing. The light
4 turns on upon any door activity, remaining on for
approximately 3 minutes afterwards.
5 This part of the exercise will demonstrate the use of
parallel states in our state diagram. Instead of using
6 the JMP instruction, we’ll use the set and reset
commands.
7 Modify the Block Diagram and State Diagram Inputs Outputs
To control the light bulb, we add an output to our
Toggle
controller block diagram, shown to the right, Y3 is the
8 light control output.
X0 Y1
Raise

In the diagram below, we add an additional state Up limit


9 called “LIGHT”. Whenever the garage owner presses X1 Y2
Lower
the door control switch and releases, the RAISE or
10 LOWER state is active and the LIGHT state is
simultaneously active. The line to the Light state is
Down limit
X2 Y3 Light
dashed, because it is not the primary path.
11 We can think of the Light state as a parallel process to the raise and lower state. The paths to
the Light state are not a transition (Stage JMP), but a State Set command. In the logic of the
12 Light stage, we will place a three-minute timer. When it expires, timer bit T0 turns on and
resets the Light stage. The path out of the Light stage goes nowhere, indicating the Light stage
13 just becomes inactive, and the light goes out!

Output equations: Y1 = RAISE


14 X0
Y2 = LOWER
Y3 = LIGHT
A X0 Push–UP RAISE X1

X0
B
DOWN LIGHT T0 UP
C
D X0

X2 LOWER Push–DOWN X0
X0

7–12 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 7: RLLPLUS Stage Programming

Using a Timer Inside a Stage


The finished modified program is shown to the right. The 1
shaded areas indicate the program additions.
In the Push-UP stage S1, we add the Set Stage Bit S6
ISG
2
instruction. When contact X0 closes, we transition from S1 S0 DOWN State
and go to two new active states: S2 and S6. In the Push-
DOWN state S4, we make the same additions. So, any time
X0 S1 3
JMP
someone presses the door control pushbutton, the light turns
on. SG
S1 Push–UP State 4
Most new stage programmers would be concerned about
where to place the Light Stage in the ladder, and how to
X0 S2
JMP 5
number it. The good news is that it doesn’t matter! S6
• Just choose an unused Stage number, and use it for the new
stage and as the reference from other stages.
SG
S2 RAISE State
SET 6
• Placement in the program is not critical, so we place it at the
end.
SP1 Y1
OUT
7
You might think that each stage has to be directly under the
stage that transitions to it. While it is good practice, it is not
X1 S3
JMP 8
required (that’s good, because our two locations for the Set SG
S6 instruction make that impossible). Stage numbers and
how they are used determines the transition paths.
S3
UP State
9
X0 S4

In stage S6, we turn on the safety light by energizing Y3.


Special relay contact SP1 is always on. Timer T0 times at 0.1
JMP
10
SG Push–DOWN State
second per count. To achieve 3 minutes time period, we S4
calculate: X0 S5
11
JMP
K = 3 min. x 60 sec/min
0.1 sec/count
S6
SET
12
SG
K = 1800 counts S5 LOWER State
13
SP1 Y2
The timer has power flow whenever stage S6 is active. The OUT
corresponding timer bit T0 is set when the timer expires. So X2 S0
14
three minutes later, T0=1 and the instruction Reset S6 causes JMP
the stage to be inactive.
SG LIGHT State
A
While Stage S6 is active and the light is on, stage transitions S6
in the primary path continue normally and independently of
Stage 6. That is, the door can go up, down, or whatever, but
SP1 Y3
OUT
B
the light will be on for precisely 3 minutes.
TMR T0
K1800
C
T0 S6
RST D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 7–13


Chapter 7: RLLPLUS Stage Programming
Add Emergency Stop Feature
Some garage door openers today will detect an object under
1 the door. This halts further lowering of the door. Usually
implemented with a photocell (“electric-eye”), a door in the
2 process of being lowered will halt and begin raising. We will
define our safety feature to work in this way, adding the
input from the photocell to the block diagram as shown to
3 the right. X3 will be on if an object is in the path of the
door.
4 Next, we make a simple addition to the state transition Inputs Outputs
diagram, shown in shaded areas in the figure below. Note Toggle
X0 Y1
5 the new transition path at the top of the LOWER state. If
we are lowering the door and detect an obstruction (X3),
Up limit
X1 Y2
Raise

Lower
Ladder
we then jump to the Push-UP State. We do this instead of Program
6 jumping directly to the RAISE state, to give the Lower
Down limit
X2 Y3 Light
output Y2 one scan to turn off, before the Raise output Y1 Obstruction
X3
7 energizes.
X0

8 X0 Push–UP
X0
RAISE X1

9
DOWN X3 LIGHT T0 UP

10
X0

11 X2 X3
LOWER Push–DOWN X0
X0
12 Exclusive Transitions
It is theoretically possible that the down limit (X2) and the obstruction input (X3) could
13 energize at the same moment. In that case, we would “jump” to the Push-UP and DOWN
states simultaneously, which does not make sense.
14 Instead, we give priority to the obstruction by
changing the transition condition to the DOWN SG
LOWER State
A state to [X2 AND NOT X3]. This ensures the
obstruction event has the priority. The
S5

SP1 Y2
modifications we must make to the LOWER Stage
B (S5) logic are shown to the right. The first rung
OUT
X2 X3 to DOWN S0
remains unchanged. The second and third rungs
C implement the transitions we need. Note the JMP
opposite relay contact usage for X3, which ensures X3 to Push-UP S2
D the stage will execute only one of the JMP
instructions.
JMP

7–14 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 7: RLLPLUS Stage Programming

Stage Program Design Considerations 1


Stage Program Organization
The examples so far in this chapter used one self-contained state diagram to represent the 2
main process. However, we can have multiple processes implemented in stages, all in the same
ladder program. New stage programmers sometimes try to turn a stage on and off each scan, 3
based on the false assumption that only one stage can be on at a time. For ladder rungs that
you want to execute each scan, just put them in a stage that is always on.
The following figure shows a typical application. During operation, the primary
4
manufacturing activity Main Process, Powerup Initialization, E-Stop and Alarm Monitoring,
and Operator Interface are all running. At powerup, three initial stages shown begin 5
operation.
XXX = ISG
Main Process 6
Idle Fill Agitate Rinse Spin
7
Powerup Initialization E-Stop and Alarm Monitoring Operator Interface

Powerup Monitor Control Recipe 8


9
Status

In a typical application, the separate stage sequences above operate as follows: 10


• Powerup Initialization – This stage contains ladder rung tasks done just once at powerup. Its last
rung resets the stage, so this stage is only active for one scan (or only as many scans 11
that are required).
• Main Process –This stage sequence controls the heart of the process or machine. One pass through
the sequence represents one part cycle of the machine, or one batch in the process.
12
• E-Stop and Alarm Monitoring –This stage is always active because it is watching for errors that
could indicate an alarm condition or require an emergency stop. It is common for 13
this stage to reset stages in the main process or elsewhere, in order to initialize them
after an error condition. 14
• Operator Interface –This is another task that must always be active and ready to respond to an
operator. It allows an operator interface to change modes, etc. independently of the
current main process step. A
Although we have separate processes, there can be
coordination among them. For example, in an error Operator Interface B
condition, the Status Stage may want to Control Recipe
automatically switch the operator interface to the
status mode to show error information as shown to
C
the right. The monitor stage could set the stage bit
for Status and Reset the stages Control and Recipe.
Monitor Status D
E-Stop and
Alarm Monitoring

DL06 Micro PLC User Manual, 3rd Edition Rev. A 7–15


Chapter 7: RLLPLUS Stage Programming

How Instructions Work Inside Stages


1 We can think of states or stages as simply dividing up our ladder program as depicted in the
figure below. Each stage contains only the ladder rungs which are needed for the
2 corresponding state of the process. The logic for transitioning out of a stage is contained
within that stage. It’s easy to choose which ladder rungs are active at powerup by using an
“initial” stage type (ISG).
3 Stage 0 Stage 1

4
Stage 2

5
6 Most all instructions work just like they do in standard RLL. You can think of a stage just like
a miniature RLL program which is either active or inactive.
7 Output Coils – As expected, output coils in active stages will turn on or off outputs
according to power flow into the coil. However, note the following:
8 • Outputs work as usual, provided each output reference (such as “Y3”) is used in only one stage.
• An output can be referenced from more than one stage, as long as only one of the stages is active at
9 a time.
• If an output coil is controlled by more than one stage simultaneously, the active stage nearest the
bottom of the program determines the final output status during each scan. Therefore, use the
10 OROUT instruction instead when you want multiple stages to have a logical OR control of an
output.
11 One-Shot or PD coils – Use care if you must use a Positive Differential coil in a stage.
Remember that the input to the coil must make a 0–1 transition. If the coil is already
12 energized on the first scan when the stage becomes active, the PD coil will not work. This is
because the 0–1 transition did not occur.
13 PD coil alternative: If there is a task which you want to do only once (on 1 scan), it can be
placed in a stage which transitions to the next stage on the same scan.
Counter – In using a counter inside a stage, the stage must be active for one scan before the
14 input to the counter makes a 0–1 transition. Otherwise, there is no real transition and the
counter will not count.
A The ordinary Counter instruction does have a restriction inside stages: it may not be reset
from other stages using the RST instruction for the counter bit. However, the special Stage
B counter provides a solution (see next paragraph).
Stage Counter – The Stage Counter has the benefit that its count may be globally reset from
C other stages by using the RST instruction. It has a count input, but no reset input. This is the
only difference from a standard counter.
D Drum – Realize that the drum sequencer is its own process, and is a different programming
method than stage programming. If you need to use a drum with stages, be sure to place the
drum instruction in an ISG stage that is always active.

7–16 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 7: RLLPLUS Stage Programming

Using a Stage as a Supervisory Process


You may recall the light bulb on-off controller 1
example from earlier in this chapter. For the purpose
of illustration, suppose we want to monitor the
“productivity” of the lamp process, by counting the
Toggle
X0 Ladder Y0
2
number of on-off cycles which occurs. This Program
application will require the addition of a simple 3
counter, but the key decision is in where to put the
counter. 4
Powerup
ISG OFF State
5
S0
Supervisor Supervisor Process
X0 S1
JMP
6
Powerup X0 X0
Push–ON
SG
S1 Push–On State 7
OFF Main Process ON S2
X0
JMP
8
Push–OFF
X0
X0
SG
S2
ON State 9
New stage programming students will typically try to place
the counter inside one the the stages of the process they are
trying to monitor. The problem with this approach is that
SP1 Y0
OUT
10
the stage is active only part of the time. In order for the S3
counter to count, the count input must transition from off
X0
JMP
11
to on at least one scan after its stage activates. Ensuring this
requires extra logic that can be tricky.
In this case, we only need to add another supervisory stage
SG
S3
Push–Off State 12
X0 S0
as shown above, to “watch” the main process. The counter
inside the supervisor stage uses the stage bit S1 of the main
JMP 13
process as its count input. Stage bits used as a contact let us
monitor a process!
ISG
S4
Supervisor State 14
NOTE: Both the Supervisor stage and the OFF stage are initial S1
stages. The supervisor stage remains active indefinitely.
SGCNT
K5000
CT0
A
Stage Counter B
The counter in the above example is a special Stage Counter. Note that it does not have a
reset input. The count is reset by executing a Reset instruction, naming the counter bit (CT0
in this case). The Stage Counter has the benefit that its count may be globally reset from
C
other stages. The standard Counter instruction does not have this global reset capability. You
may still use a regular Counter instruction inside a stage... however, the reset input to the D
counter is the only way to reset it.

DL06 Micro PLC User Manual, 3rd Edition Rev. A 7–17


Chapter 7: RLLPLUS Stage Programming

Power Flow Transition Technique


1 Our discussion of state transitions has shown how the Stage JMP instruction makes the
current stage inactive and the next stage (named in the JMP) active. As an alternative way to
2 enter this in DirectSOFT 5, you may use the power flow method for stage transitions.
The main requirement is that the current stage be located directly above the next (jump-to)
3 stage in the ladder program. This arrangement is shown in the diagram below, by stages S0
and S1, respectively.
4 S0 X0
S1

5 SG
S0
SG
S0
S1
Equivalent
X0
6 JMP
All other rungs in stage...

X0
SG
7 S1 Power flow
transition

8 SG
S1

9 Recall that the Stage JMP instruction may occur anywhere in the current stage, and the result
is the same. However, power flow transitions (shown above) must occur as the last rung in a
10 stage. All other rungs in the stage will precede it. The power flow transition method is also
achievable on the handheld programmer, by simply following the transition condition with
the Stage instruction for the next stage.
11 The power flow transition method does eliminate one Stage JMP instruction, its only
advantage. However, it is not as easy to make program changes as using the Stage JMP.
12 Therefore, we advise using Stage JMP transitions for most programmers.
Stage View in DirectSOFT 5
13 The Stage View option in DirectSOFT 5 will let you view the ladder program as a flow chart.
The figure below shows the symbol convention used in the diagrams. You may find the stage
14 view useful as a tool to verify that your stage program has faithfully reproduced the logic of
the state transition diagram you intend to realize.
A SG
Stage Reference to Transition
J Jump S Set Stage
a Stage Logic

B R Reset Stage

The following diagram is a typical stage view of a ladder program containing stages. Note the
C left-to-right direction of the flow chart.

D ISG
SO
J
SG
S1
J
SG
S2 S
SG
S4

SG SG
J J S5
S3

7–18 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 7: RLLPLUS Stage Programming

Parallel Processing Concepts 1


Parallel Processes
Previously in this chapter we discussed how a state may transition to either one state or 2
another, called an exclusive transition. In other cases, we may need to branch simultaneously to
two or more parallel processes, as shown below. It is acceptable to use all JMP instructions as 3
shown, or we could use one JMP and a Set Stage bit instruction(s) (at least one must be a
JMP, in order to leave S1). Remember that all instructions in a stage execute, even when it
transitions (the JMP is not a GOTO).
4
Process A
S2 S3
SG
S1
X0
Push–On State

S2
5
S0 S1 X0

S4 S5
JMP

S4
6
Process B JMP

Note that if we want Stages S2 and S4 to energize exactly on the same scan, both stages must
7
be located below or above Stage S1 in the ladder program (see the explanation at the bottom
of page 7–7). Overall, parallel branching is easy! 8
Converging Processes
Now we consider the opposite case of parallel branching, which is converging processes. This 9
simply means we stop doing multiple things and continue doing one thing at a time. In the
figure below, processes A and B converge when stages S2 and S4 transition to S5 at some
point in time. So, S2 and S4 are Convergence Stages.
10
Process A S1 S2 11
= Convergence Stage S5 S6

Process B S3 S4
12
Convergence Stages (CV) 13
While the converging principle is simple enough, it brings a new complication. As parallel
processing completes, the multiple processes almost never finish at the same time. In other
words, how can we know whether Stage S2 or S4 will finish last? This is an important point,
14
because we have to decide how to transition to Stage S5.
The solution is to coordinate the transition condition out of CV Convergence
A
S2
Stages
convergence stages. We accomplish this with a stage type designed
for this purpose: the Convergence Stage (type CV). In the example CV B
to the right, convergence stages S2 and S4 are required to be S4

grouped together as shown. No logic is permitted between CV


stages! The transition condition (X3 in this case) must be located
X3 S5
CVJMP
C
in the last convergence stage. The transition condition only has
power flow when all convergence stages in the group are active. SG
S5
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 7–19


Chapter 7: RLLPLUS Stage Programming

Convergence Jump (CVJMP)


1 Recall the last convergence stage only has power flow CV
when all CV stages in the group are active. To S2 Convergence
2 complement the convergence stage, we need a new
jump instruction. The Convergence Jump (CVJMP)
Jump

CV
shown to the right will transition to Stage S5 when
3 X3 is active (as one might expect), but it also
S4

X3 S5
automatically resets all convergence stages in the group.
4 This makes the CVJMP jump a very powerful
CVJMP

instruction. Note that this instruction may only be SG


5 used with convergence stages. S5

Convergence Stage Guidelines


6 The following summarizes the requirements in the use of convergence stages, including some
tips for their effective application:
7 • A convergence stage is to be used as the last stage of a process which is running in parallel to another
process or processes. A transition to the convergence stage means that a particular process is
through, and represents a waiting point until all other parallel processes also finish.
8 • The maximum number of convergence stages which make up one group is 16. In other words, a
maximum of 16 stages can converge into one stage.
9 • Convergence stages of the same group must be placed together in the program, connected on the
power rail without any other logic in between.

10 • Within a convergence group, the stages may occur in any order, top to bottom. It does not matter
which stage is last in the group, because all convergence stages have to be active before the last stage
has power flow.
11 • The last convergence stage of a group may have ladder logic within the stage. However, this logic
will not execute until all convergence stages of the group are active.
12 • The convergence jump (CVJMP) is the intended method to be used to transition from the
convergence group of stages to the next stage. The CVJMP resets all convergence stages of the
group, and energizes the stage named in the jump.
13 • The CVJMP instruction must only be used in a convergence stage, as it is invalid in regular or
initial stages.
14 • Convergence Stages or CVJMP instructions may not be used in subroutines or interrupt routines.

A
B
C
D

7–20 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 7: RLLPLUS Stage Programming

RLLPLUS (Stage) Instructions 1


Stage (SG)
The Stage instructions are used to create structured RLLPLUS 2
programs. Stages are program segments which can be activated by SG
transitional logic, a jump or a set stage that is executed from an S aaa 3
active stage. Stages are deactivated one scan after transitional logic, a
jump, or a reset stage instruction is executed.
4
Operand Data Type DL06 Range
aaa 5
Stage S 0–1777
The following example is a simple RLLPLUS
program. This program utilizes an initial stage, 6
stage, and jump instructions to create a structured program.
7
Direct SOFT

ISG S0
Handheld Programmer Keystrokes

U A ENT
8
ISG 0
$

GX
STR
A

A
0
ENT
9
X0 Y0 ENT
OUT 0
OUT $
STR
B
1
ENT 10
X1 S2 X S C
SHFT ENT
SET
$
SET
F
RST

ENT
2
11
STR 5
X5 S1

JMP
K

2
JMP
B

B
1
ENT
12
ENT
SG 1
SG S1 $
STR
C
2
ENT 13
GX B ENT

X2 Y1 2
OUT
C
1

ENT
14
SG 2
OUT
$

GX
STR
G

C
6
ENT
A
ENT
SG S2 OUT 2
$
STR
H
7
ENT B
V SHFT S B ENT
X6 Y2
OUT K
AND
A
RST

ENT
1
C
JMP 0

X7 S1 S0

JMP
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 7–21


Chapter 7: RLLPLUS Stage Programming

Initial Stage (ISG)


1 The Initial Stage instruction is normally used as the first
segment of an RLLPLUS program. Multiple Initial Stages are ISG
2 allowed in a program. They will be active when the CPU
enters the Run mode allowing for a starting point in the
S aaa
program. Initial Stages are also activated by transitional logic,
3 a jump or a set stage executed from an active stage.

4 Operand Data Type DL06 Range


aaa
Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S 0–1777
5
NOTE: If the ISG is within the retentive range for stages, the ISG will remain in the state it was in before
6 power down and will NOT turn itself on during the first scan.

Jump (JMP)
7 The Jump instruction allows the program to transition from
an active stage containing the jump instruction to another
8 stage (specified in the instruction). The jump occurs when S aaa
the input logic is true. The active stage containing the Jump JMP
9 will deactivate 1 scan later.

Operand Data Type DL06 Range


10 aaa
Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S 0–1777
11
Not Jump (NJMP)
12 The Not Jump instruction allows the program to transition
from an active stage which contains the jump instruction to S aaa
13 another which is specified in the instruction. The jump will
occur when the input logic is off. The active stage that
NJMP

contains the Not Jump will be deactivated 1 scan after the


14 Not Jump instruction is executed.
Operand Data Type DL06 Range
A aaa
Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S 0–1777
B In the following example, only stage ISG0 will be active when program execution. begins.
When X1 is on, program execution will jump from Initial Stage 0 to Stage 1.
C
D

7–22 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 7: RLLPLUS Stage Programming

DirectSOFT
Direct SOFT32 Handheld Programmer Keystrokes
1
ISG S0 U A

$
ISG
B
0
ENT
2
ENT
S1 STR 1
X1
JMP K
JMP
B
1
ENT
3
SG S1
2
SG
B
1
ENT
4
$ C ENT
STR 2
X2
Y5

OUT
GX
OUT
F
5
ENT
5
X7
S2

JMP
$
STR
H
7
ENT
6
K C ENT
JMP 2
X7
S3

NJMP
SHFT N
TMR
SHFT K
JMP
D
3
ENT
7
8
Converge Stage (CV) and Converge Jump (CVJMP)
The Converge Stage instruction is used to group certain stages together by defining them as 9
Converge Stages.
When all of the Converge Stages within a group become active,
the CVJMP instruction (and any additional logic in the final CV
CV 10
S aaa
stage) will be executed. All preceding CV stages must be active
before the final CV stage logic can be executed. All Converge 11
Stages are deactivated one scan after the CVJMP instruction is executed.
Additional logic instructions are only allowed following the 12
last Converge Stage instruction and before the CVJMP
instruction. Multiple CVJMP instructions are allowed.
S aaa
13
Converge Stages must be programmed in the main body of
CVJMP
the application program. This means they cannot be
programmed in Subroutines or Interrupt Routines.
14
A
Operand Data Type DL06 Range B
aaa
Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S 0–1777 C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 7–23


Chapter 7: RLLPLUS Stage Programming

In the following example, when Converge Stages S10 and S11 are both active the CVJMP
1 instruction will be executed when X4 is on. The CVJMP will deactivate S10 and S11, and
activate S20. Then, if X5 is on, the program execution will jump back to the initial stage, S0.
2 DirectSOFT
Direct SOFT32 Handheld Programmer Keystrokes

U A ENT

3 $
ISG

STR
A
0

0
ENT

ISG S0
4 GX

$
OUT
A

B
0
ENT

ENT
X0 Y0 STR 1

5 OUT K
JMP
B
1
ENT

K B A ENT
6 X1 S1
JMP 2
JMP
B
1

ENT
0

SG 1

7 S10
JMP
$
STR
C
2
ENT

K B B ENT
JMP 1 1
8 SG S1 SHFT C
2
V
AND
B
1
A
0
ENT

C V B B
9 X2 S11
$
SHFT
2
D
AND 1 1
ENT

JMP STR 3
ENT

10 GX
OUT
D
3
ENT

$ E
CV S10 ENT

11 STR

SHFT C
2
V
AND
4

SHFT K
JMP
C
2
A
0
ENT

CV S11
12 2

$
SG
C

F
2
A
0
ENT

ENT
X3 Y3 STR 5

13 OUT K
JMP
A
0
ENT

14 X4 S20
CVJMP

A SG S20

B X5 S0
JMP

C
D

7–24 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 7: RLLPLUS Stage Programming

Block Call (BCALL)


The stage block instructions are used to activate a block of stages. The Block Call, Block, and 1
Block End instructions must be used together. The BCALL instruction is used to activate a
stage block. There are several things you need to know about the BCALL instruction. 2
• Uses CR Numbers — The BCALL appears as an output
C aaa
coil, but does not actually refer to a Stage number as you
might think. Instead, the block is identified with a Control BCALL 3
Relay (Caaa). This control relay cannot be used as an
output anywhere else in the program. 4
• Must Remain Active — The BCALL instruction actually controls all the stages between the
BLK and the BEND instructions even after the stages inside the block have started 5
executing. The BCALL must remain active or all the stages in the block will automatically
be turned off. If either the BCALL instruction, or the stage that contains the BCALL
instruction goes off, then the stages in the defined block will be turned off automatically.
6
• Activates First Block Stage — When the BCALL is executed it automatically activates the
first stage following the BLK instructions.
7
Operand Data Type DL06 Range 8
aaa
Control Relay . . . . . . . . . . . . . . . . . . . . . . . . . . . S 0–1777 9
Block (BLK) 10
The Block instruction is a label which marks the beginning of a
block of stages that can be activated as a group. A Stage instruction
must immediately follow the Start Block instruction. Initial Stage
BLK 11
C aaa
instructions are not allowed in a block. The control relay (Caaa)
specified in Block instruction must not be used as an output any 12
where else in the program.
Operand Data Type DL06 Range 13
aaa
Control Relay . . . . . . . . . . . . . . . . . . . . . . . . . . . S 0–1777 14
Block End (BEND)
The Block End instruction is a label used with the Block A
instruction. It marks the end of a block of stages. There is no
operand with this instruction. Only one Block End is
allowed per Block Call.
BEND B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 7–25


Chapter 7: RLLPLUS Stage Programming
DirectSOFT
Direct SOFT32
In this example, the Block Call is executed when
stage 1 is active and X6 is on. The Block Call then
1 automatically activates stage S10, which
SG
S1
Y5
X2
immediately follows the Block instruction. OUT
2 This allows the stages between S10 and the Block
X6 C0
End instruction to operate as programmed. If the BCALL
BCALL instruction is turned off, or if the stage
3 containing the BCALL instruction is turned off, BLK
C0
then all stages between the BLK and BEND
4 instructions are automatically turned off. SG
S10
If you examine S15, you will notice that X7 could Y6
X3
5 reset Stage S1, which would disable the BCALL,
thus resetting all stages within the block.
OUT

Handheld Programmer Keystrokes BEND


6 SG S(SG) 1 ENT SG
S15
STR X(IN) 2 ENT
7 OUT Y(OUT) 5 ENT
X7 S1
RST
STR X(IN) 6 ENT

8 SHFT B C A L L C(CR) 0 ENT

SHFT B L K C(CR) 0 ENT

9 SG S(SG) 1 0 ENT

STR X(IN) 3 ENT

10 OUT Y(OUT) 6 ENT

SHFT B E N D ENT

11 SG S(SG) 1 5 ENT

STR X(IN) 7 ENT

12 RST S(SG) 1 ENT

Stage View in DirectSOFT 5


13 The Stage View option in DirectSOFT 5 will let you view the ladder program as a flow
chart. The figure below shows the symbol convention used in the diagrams. You may find the
14 stage view useful as a tool to verify that your stage program has faithfully reproduced the
logic of the state transition diagram you intend to realize.
A SG Stage Reference to
Transition
Logic J Jump S Set Stage
a Stage
B Output R Reset Stage

The following diagram is a typical stage view of a ladder program containing stages. Note the
C left-to-right direction of the flow chart.
ISG SG SG SG
D S0 J S1 J S2 S S4

SG SG
J J S5
S3

7–26 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 7: RLLPLUS Stage Programming

Questions and Answers about Stage Programming 1


We include the following commonly-asked questions about Stage Programming as an aid to
new students. All question topics are covered in more detail in this chapter.
2
Q. What does stage programming do that I can’t do with regular RLL programs?
A. Stages allow you to identify all the states of your process before you begin programming.
This approach is more organized, because you divide up a ladder program into sections. As
3
stages, these program sections are active only when they are actually needed by the process.
Most processes can be organized into a sequence of stages, connected by event-based 4
transitions.
Q. What are Stage Bits? 5
A. A stage bit is just a single bit in the CPU’s image register, representing the active/inactive
status of the stage in real time. For example, the bit for Stage 0 is referenced as “S0”. If S0 6
= 0, then the ladder rungs in Stage 0 are bypassed (not executed) on each CPU scan. If S0
= 1, then the ladder rungs in Stage 0 are executed on each CPU scan. Stage bits, when used
as contacts, allow one part of your program to monitor another part by detecting stage
7
active/inactive status.
Q. How does a stage become active?
8
A. There are three ways:
• If the Stage is an initial stage (ISG), it is automatically active at powerup.
9
• Another stage can execute a Stage JMP instruction naming this stage, which makes it active upon its
next occurrence in the program. 10
• A program rung can execute a Set Stage Bit instruction (such as Set S0).
Q. How does a stage become inactive? 11
A. There are three ways:
• Standard Stages (SG) are automatically inactive at powerup. 12
• A stage can execute a Stage JMP instruction, resetting its Stage Bit to 0.
• Any rung in the program can execute a Reset Stage Bit instruction (such as Reset S0). 13
Q. What about the power flow technique of stage transitions? 14
A. The power flow method of connecting adjacent stages (directly above or below in the
program) actually is the same as the Stage Jump instruction executed in the stage above,
naming the stage below. Power flow transitions are more difficult to edit in DirectSOFT 5, A
we list them separately from two preceding questions.
Q. Can I have a stage which is active for only one scan? B
A. Yes, but this is not the intended use for a stage. Instead, just make a ladder rung active for
1 scan by including a stage Jump instruction at the bottom of the rung. Then the ladder
will execute on the last scan before its stage jumps to a new one.
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 7–27


Chapter 7: RLLPLUS Stage Programming

Q. Isn’t a Stage JMP just like a regular GOTO instruction used in software?
1 A. No, it is very different. A GOTO instruction sends the program execution immediately to
the code location named by the GOTO. A Stage JMP simply resets the Stage Bit of the
2 current stage, while setting the Stage Bit of the stage named in the JMP instruction. Stage
bits are 0 or 1, determining the inactive/active status of the corresponding stages. A stage
JMP has the following results:
3 • When the JMP is executed, the remainder of the current stage’s rungs are executed, even if they
reside past(under) the JMP instruction. On the following scan, that stage is not executed, because it
4 is inactive.
• The Stage named in the Stage JMP instruction will be executed upon its next occurrence. If located
5 past (under) the current stage, it will be executed on the same scan. If located before (above) the
current stage, it will be executed on the following scan.

6 Q. How can I know when to use stage JMP, versus a Set Stage Bit or Reset Stage
Bit?
7 A. These instructions are used according to the state diagram topology you have derived:
• Use a Stage JMP instruction for a state transition... moving from one state to another.
8 • Use a Set Stage Bit instruction when the current state is spawning a new parallel state or stage
sequence, or when a supervisory state is starting a state sequence under its command.
• Use a Reset Bit instruction when the current state is the last state in a sequence and its task is
9 complete, or when a supervisory state is ending a state sequence under its command.
Q. What is an initial stage, and when do I use it?
10 A. An initial stage (ISG) is automatically active at powerup. Afterwards, it works just like any
other stage. You can have multiple initial stages, if required. Use an initial stage for ladder
11 that must always be active, or as a starting point.
Q. Can I place program ladder rungs outside of the stages, so they are always on?
12 A. It is possible, but it’s not good software design practice. Place ladder that must always be
active in an initial stage, and do not reset that stage or use a Stage JMP instruction inside
13 it. It can start other stage sequences at the proper time by setting the appropriate Stage
Bit(s).
14 Q. Can I have more than one active stage at a time?
A. Yes, and this is a normal occurrence for many programs. However, it is important to
A organize your application into separate processes, each made up of stages. And a good
process design will be mostly sequential, with only one stage on at a time. However, all the
processes in the program may be active simultaneously.
B
C
D

7–28 DL06 Micro PLC User Manual, 3rd Edition Rev. A


C HHAPTER
A PT ER
PID LOOP OPERATION
8
In This Chapter:..
DL06 PID Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–2
Introduction to PID Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–4
Introducing DL06 PID Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–6
PID Loop Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–9
Ten Steps to Successful Process Control . . . . . . . . . . . . . . . . . . . . . . .8–16
PID Loop Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–18
PID Loop Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–40
Using the Special PID Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–53
Ramp/Soak Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–58
DirectSOFT 5 Ramp/Soak Example . . . . . . . . . . . . . . . . . . . . . . . . . . .8–63
Cascade Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–65
Time-Proportioning Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–68
Feedforward Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–70
PID Example Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–72
Troubleshooting Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–75
Glossary of PID Loop Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . .8–77
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–79
Chapter 8: PID Loop Operation

1 DL06 PID Control


DL06 PID Control Features
2 Along with control functions discussed in this manual, the DL06 PLC features PID process
control capability. The DL06 PID process control loops offer the same features offered in
3 much larger PLCs. The primary features are:
• Up to 8 PID loops, individual programmable sample rates
4 • Manual, Automatic and Cascade loop operation modes
• Two types of bumpless transfer available
5 • Full-featured alarms
• Ramp/soak generator with up to 16 segments
6 • Auto Tuning
The DL06 CPU has process control loop capability in addition to ladder program execution.
7 You can select and configure up to eight loops. All sensor and actuator wiring connects
directly to DL06 analog modules. All process variables, gain values, alarm levels, etc.,
associated with each loop reside in a Loop Variable Table in the CPU. The DL06 CPU reads
8 process variable (PV) inputs during each scan. Then it makes PID loop calculations during a
dedicated time slice on each PLC scan, updating the control output value. The control loops
9 use a Proportional-Integral-Derivative (PID) algorithm to generate the control output. This
chapter describes how the loops operate, and how to configure and tune the loops.
10 Analog Input

11 DL06
PID Loop Calculations

12
13
14
Manufacturing Process

A
B Analog Output

DirectSOFT 5 programming software, release 5, or later, is used for configuring analog


C control loops in the DL06. DirectSOFT 5 uses dialog boxes to help you set up the individual
loops. After completing the setup, you can use DirectSOFT 5’s PID Trend View to tune each
loop. The configuration and tuning selections you make are stored in the DL06’s V-memory
D (RAM). The loop parameters also may be saved to disk for recall later.

8–2 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

PID Loop Feature Specifications


Number of loops
CPU V-memory needed
Selectable, 8 maximum
32 words (V locations) per loop selected, 64 words if using ramp/soak
1
PID algorithm Position or Velocity form of the PID equation
Control Output polarity Selectable direct-acting or reverse-acting 2
Error term curves Selectable as linear, square root of error, and error squared
Loop update rate (time between
PID calculation) 0.05 to 99.99 seconds, user programmable 3
0.05 seconds for 1 to 4 loops
Minimum loop update rate
Loop modes
0.1 seconds for 5 to 8 loops
Automatic, Manual (operator control), or Cascade control
4
Ramp/Soak Generator Up to 8 ramp/soak steps (16 segments) per loop with indication of ramp/soak step number
PV curves Select standard linear, or square-root extract (for flow meter input) 5
Set Point Limits Specify minimum and maximum setpoint values
Process Variable Limits
Proportional Gain
Specify minimum and maximum Process Variable values
Specify gains of 0.01 to 99.99
6
Integrator (Reset) Specify reset time of 0.1 to 99.99 in units of seconds or minutes
Derivative (Rate) Specify the derivative time from 0.01 to 99.99 seconds 7
Rate Limits Specify derivative gain limiting from 1 to 20
Bumpless Transfer I Automatically sets the bias equal to the control output and the setpoint equal to the process
variable when control switches from manual to automatic.
8
Automatically sets the bias equal to the control output when control switches from manual to
Bumpless Transfer II
Step Bias
automatic.
Provides proportional bias adjustment for large setpoint changes
9
For position form of PID, this inhibits integrator action when the control output reaches 0% or
Anti-windup (Freeze Bias) 100 % (speeds up loop recovery when output recovers from saturation)
Specify a tolerance (plus and minus) for the error term (SP–PV), so that no change in control
10
Error Deadband output value is made
11
Alarm Feature Specifications
PV Alarm Hysteresis
PV Alarm Points
Specify 1 to 200 (word/binary) does not affect all alarms, such as PV Rate-of-Change Alarm
Select PV alarm settings for Low–low, Low, High, and High-high conditions
12
PV Deviation Specify alarms for two ranges of PV deviation from the setpoint value
Rate of Change Detect when PV exceeds a rate of change limit you specify 13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–3


Chapter 8: PID Loop Operation

1 Introduction to PID Control


What is PID Control?
2 In this discussion, we will explain why PID control is used in process control instead of trying
to provide control by simply using an analog input and a discrete output.
3 There are many types of analog controllers available, and the proper selection will depend
upon the particular application. There are two types of analog controllers that are used
4 throughout industry:
1. The ON-OFF controller, sometimes referred to as an open loop controller.
5 2. The PID controller, sometimes called a closed loop controller.
Regardless of type, analog controllers require input signals from electronic sensors such as
6 pressure, differential pressure, level, flow meter or thermocouples. As an example, one of the
most common analog control applications is located in your house for controlling either heat
or air conditioning, the thermostat.
7 You wish for your house to be at a comfortable temperature so you set a thermostat to a
desired temperature (setpoint). You then select the “comfort” mode, either heat or A/C. A
8 temperature sensing device, normally a thermistor, is located within the thermostat. If the
thermostat is set for heat and the setpoint is set for 69, the furnace will be turned on to
9 provide heat at, normally, 2 below the setpoint. In this case, it would turn on at 67. When
the temperature reaches 71, 2 above setpoint, the furnace will turn off. In the opposite
example, if the thermostat is set for A/C (cooling), the thermostat will turn the A/C unit
10 on/off opposite the heat setting. For instance, if the thermostat is set to cool at 76, the A/C
unit will turn on when the sensed temperature reaches 2 above the setpoint or 78, and turn
11 off when the temperature reaches 74. This would be considered to be an ON-OFF
controller. The waveform below shows the action of the heating cycle. Note that there is a
slight overshoot at the turn-off point, also a slight undershoot at the turn-on point.
12
13 71°
OFF OFF

14 69° SETPOINT

A 67°
ON ON ON

B TIME

The ON-OFF controller is used in some industrial control applications, but is not practical
C in the majority of industrial control processes.
The most common process controller that is used in industry is the PID controller.
D

8–4 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

The PID controller controls a continuous feedback loop that keeps the process output
(control variable) flowing normally by taking corrective action whenever there is a deviation
from the desired value (setpoint) of the process variable (PV) such as, rate of flow,
1
temperature, voltage, etc. An “error” occurs when an operator manually changes the setpoint
or when an event (valve opened, closed, etc.) or a disturbance (cold water, wind, etc.) changes 2
the load, thus causing a change in the process variable.
The PID controller receives signals from sensors and computes corrective action to the 3
actuator from a computation based on the error (Proportional), the sum of all previous errors
(Integral) and the rate of change of the error (Derivative). 4
We can look at the PID controller in more simple terms. Take the cruise control on an
automobile as an example. Let’s say that we are cruising on an interstate highway in a car
equipped with cruise control. The driver decides to engage the cruise control by turning it
5
ON, then he manually brings the car to the desired cruising speed, say 70 miles per hour.
Once the cruise speed is reached, the SET button is pushed fixing the speed at 70 mph, the 6
setpoint. Now, the car is cruising at a steady 70 mph until it comes to a hill to go up. As the
car goes up the hill, it tends to slow down. The speed sensor senses this and causes the throttle
to increase the fuel to the engine. The vehicle speeds up to maintain 70 mph without jerking
7
the car and it reaches the top at the set speed. When the car levels out after reaching the top
of the hill it will speed up. The speed sensor senses this and signals the throttle to provide less 8
fuel to the engine, thus, the engine slows down allowing the car to maintain the 70 mph
speed. How does this application apply to PID control? Lets look at the function of P, I and
D terms:
9
• Proportional - is commonly referred to as Proportional Gain. The proportional term is
the corrective action which is proportional to the error, that is, the change of the 10
manipulated variable is equal to the proportional gain multiplied by the error (the
activating signal). In mathematical terms: 11
Proportional action = proportional gain X error
Error = Setpoint (SP) - Process Variable (PV)
Applying this to the cruise control, the speed was set at 70 mph which is the Setpoint.
12
The speed sensor senses the actual speed of the car and sends this signal to the cruise
controller as the Process Variable (PV). When the car is on a level highway, the speed is 13
maintained at 70 mph, thus, no error since the error would be SP - PV = 0. When the car
goes up the hill, the speed sensor detected a slow down of the car, SP-PV = error. The
proportional gain would cause the output of the speed controller to bring the car back to 14
the setpoint of 70 mph. This would be the Controlled Output.
• Integral - this term is often referred to as Reset action. It provides additional
compensation to the control output, which causes a change in proportion to the value of
A
the error over a period of time. In other words, the reset term is the integral sum of the
error values over a period of time. B
• Derivative - this term is referred to as rate. The Rate action adds compensation to the
control output, which causes a change in proportion to the rate of change of error. Its job
is to anticipate the probable growth of the error and generate a contribution to the output
C
in advance.
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–5


Chapter 8: PID Loop Operation

1 Introducing DL06 PID Control


The DL06 is capable of controlling a process variable such as those already mentioned. As
previously mentioned, the control of a variable, such as temperature, at a given level
2 (setpoint) as long as there are no disturbances (cold water) in the process.
The DL06 PLC has the ability to directly accept signals from electronic sensors, such as
3 thermocouples, pressure, VFDs, etc. These signals may be used in mathematically derived
control systems.
4 In addition, the DL06 has built-in PID control algorithms that can be implemented. The
basic function of PID closed loop process control is to maintain certain process characteristics
5 at desired setpoints. As a rule, the process deviates from the desired setpoint reference as a
result of load material changes and interaction with other processes. During this control, the
actual condition of the process characteristics (liquid level, temperature, motor control, etc.)
6 is measured as a process variable (PV) and compared with the target setpoint (SP). When
deviations occur, an error is generated by the difference between the process variable (actual
7 value) and the setpoint (desired value). Once an error is detected, the function of the control
loop is to modify the control output in order to force the error to zero.
8 The DL06 PID control provides feedback loops using the PID algorithm. The control output
is computed from the measured process variable as follows:
Let:
9 K = proportional gain
c
T = Reset or integral time
10 i
T = Derivative time or rate
d
SP = Setpoint
11 PV(t) = Process Variable at time “t”
e(t) = SP-PV(t) = PV deviation from setpoint at time “t” or PV error.
12 Then:
13 M(t) = Control output at time “t”

M(t) = Kc [ e(t) + 1/T 兰 e(x) dx + T d/dt e(t) ] + M


t
14 i 0 d o

The analog input module receives the process variable in analog form along with an operator
A entered setpoint; the CPU computes the error. The error is used in the algorithm
computation to provide corrective action at the control output. The function of the control
B action is based on an output control, which is proportional to the instantaneous error value.
The integral control action (reset action) provides additional compensation to the control
C output, which causes a change in proportion to the value of the change of error over a period
of time. The derivative control action (rate change) adds compensation to the control output,
which causes a change in proportion to the rate of change of error. These three modes are
D used to provide the desired control action in Proportional (P), Proportional-Integral (PI), or
Proportional-Integral-Derivative (PID) control fashion.

8–6 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Standard DL05/06 analog input modules are used to interface to field transmitters to obtain
the PV. These transmitters normally provide a 4-20mA current or an analog voltage of various
ranges for the control loop.
1
For temperature control, thermocouple or RTD can be connected directly to the appropriate
module. The PID control algorithm, residing in the CPU memory, receives information from 2
the user program, primarily control parameters and setpoints. Once the CPU makes the PID
calculation, the result may be used to directly control an actuator connected to a 4-20mA 3
current output module to control a valve.
With DirectSOFT 5, additional ladder logic programming, both time proportioning (eg.
heaters for temperature control) and position actuator (eg. reversible motor on a valve) type of
4
control schemes can be easily implemented. This chapter will explain how to set up the PID
control loop, how to implement the software and how to tune the loop. 5
The following block diagram shows the key parts of a PID control loop. The path from the
PLC to the manufacturing process and back to the PLC is the closed loop control. 6
7
Loop Configuring External
8
and Monitoring Disturbances
PLC System

Setpoint Value Error T erm Control Output


9
Loop Manufacturing
+  Calculation Process

Process Variable
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–7


Chapter 8: PID Loop Operation

Process Control Definitions


1 Manufacturing Process – the set of actions that adds value to raw materials. The process can
involve physical changes and/or chemical changes to the material. The changes render the
2 material more useful for a particular purpose, ultimately used in a final product.
Process Variable – The controlled variable part of the process that you wish to control. It may
3 be temperature, pressure, level, flow, composition, density, the ratio of two streams, etc. Also
known as the actual value.
Setpoint – This is the target for the process variable. When all conditions of the process are
4 correct, the process variable will equal the setpoint.
Control Output – The result of the loop calculation, which becomes a command for the
5 process (such as the heater level in an oven). This is sometimes referred to as control variable.
Error Term – The algebraic difference between the process variable and the setpoint. This is
6 the control loop error, and is equal to zero when the process variable is equal to the setpoint
(desired) value. A well-behaved control loop is able to maintain a small error term magnitude.
7 Manipulated Variable – This is what is used to effect the controlled variable. For example, the
fuel used in a furnace might be manipulated in order to control the temperature.
8 Disturbance – Something in the system that changes such that corrective action is required.
For instance, when controlling a flow and the upstream pressure drops, the control valve must
open wider in order to keep flow constant. The drop in upstream pressure is the disturbance.
9 Final Control Element – This is the physical device used to control the manipulated variable.
Valves are probably the most widely used final control element.
10 Lag Time – The time it takes for the process to respond to a change in manipulated variable.
This is also known as the capacitance of the system. When you’re in the shower and you turn
11 up the hot water a little, the time it takes before the water gets hot is the lag time.
Dead Time – The time it takes for a change in the process to be recognized. Composition
12 analyzers and quality control are usually sources of significant dead time.
Loop Configuring – Operator-initiated selections which set up and optimize the performance
13 of a control loop. The loop calculation function uses the configuration parameters in real time
to adjust gains, offsets, etc.
14 Loop Monitoring – The function which allows an operator to observe the status and
performance of a control loop. This is used in conjunction with the loop configuring to
optimize the performance of a loop (minimize the error term).
A
B
C
D

8–8 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

PID Loop Operation


The Proportional–Integral–Derivative (PID) algorithm is widely used in process control. The
1
PID method of control adapts well to electronic solutions, whether implemented in analog or
digital (CPU) components. The DL06 CPU implements the PID equations digitally by 2
solving the basic equations in software. I/O modules serve only to convert electronic signals
into digital form (or vice versa).
The DL06 uses two types of PID controls: “position” and “velocity”. These terms usually refer
3
to motion control situations, but here we use them in a different sense:
• PID Position Algorithm – The control output is calculated so it responds to the
4
displacement (position) of the PV from the SP (error term).
• PID Velocity Algorithm – The control output is calculated to represent the rate of change 5
(velocity) for the PV to become equal to the SP.
Position Form of the PID Equation 6
Referring to the control output equation on page 8-6, the DL06 CPU approximates the
output M(t) using a discrete position form of the PID equation. 7
Let:
Ts = Sample rate 8
Kc = Proportional gain
Ki = Kc * (Ts/Ti) = Coefficient of integral term
Kr = Kc * (Td/Ts) = Coefficient of derivative term 9
Ti = Reset or integral time
Td = Derivative time or rate
SP = Setpoint
10
PVn = Process variable at nth sample
en = SP – PVn = Error at nth sample
Mo = Value to which the controller output has been initialized
11
Then:
Mn = Control output at nth sample
12
n
Mn = Kc * en + Ki 兺 ei + Kr (en - en-1) + Mo
13
i=1

This form of the PID equation is referred to as the position form since the actual actuator
14
position is computed. The velocity form of the PID equation computes the change in
actuator position. The CPU modifies the standard equation slightly to use the derivative of A
the process variable instead of the error as follows:
n
B
Mn = Kc * en + Ki 兺 ei + Kr (PVn - PVn-1) + Mo
i=1
C
These two forms are equivalent unless the setpoint is changed. In the original equation, a
large step change in the setpoint will cause a correspondingly large change in the error D
resulting in a bump to the process due to derivative action. This bump is not present in the
second form of the equation.

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–9


Chapter 8: PID Loop Operation

The DL06 also combines the integral sum and the initial output into a single term called the
1 bias (Mx). This results in the following set of equations:
Mxo = Mo
2 Mx = Ki * en + Mxn-1
Mn = Kc * en - Kr(PVn-PVn-1) + Mxn
3 The DL06 by default will keep the normalized output M in the range of 0.0 to 1.0. This is
done by clamping M to the nearer of 0.0 or 1.0 whenever the calculated output falls outside
this range. The DL06 also allows you to specify the minimum and maximum output limit
4 values (within the range 0 to 4095 in BCD if using 12 bit unipolar).

5 NOTE: The equations and algorithms , or parts of, in this chapter are only for references. Analysis of these
equations can be found in most good text books about process control.

6 Reset Windup Protection


Reset windup can occur if reset action (integral term) is specified and the computation of the
7 bias term Mx is:
Mx = Ki * en + Mxn-1
8 For example, assume the output is controlling a valve and the PV remains at some value
greater than the setpoint. The negative error (en) will cause the bias term (Mx) to constantly
9 decrease until the output M goes to 0 closing the valve. However, since the error term is still
negative, the bias will continue to decrease becoming ever more negative. When the PV
finally does come back down below the SP, the valve will stay closed until the error is positive
10 for long enough to cause the bias to become positive again. This will cause the process
variable to undershoot.
11 One way to solve the problem is to simply clamp the normalized bias between 0.0 and 1.0.
The DL06 CPU does this. However, if this is the only thing that is done, then the output will
12 not move off 0.0 (thus opening the valve) until the PV has become less than the SP. This will
also cause the process variable to undershoot.
13 The DL06 CPU is programmed to solve the overshoot problem by either freezing the bias
term, or by adjusting the bias term.

14
A
B
C
D

8–10 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Freeze Bias
If the “Freeze Bias” option is selected when setting up the PID loop (discussed later) then the 1
CPU simply stops changing the bias (Mx) whenever the computed normalized output (M)
goes outside the interval 0.0 to 1.0.
Mx = Ki * en + Mxn-1
2
M = Kc * en - Kr(PVn - PVn-1) + Mx
3
Mn = 0 if M < 0
4
Mn = M if 0 ⭐ M ⭐ 1
Mn = 1 if M > 1 5
Mxn = Mx if 0 ⭐ M ⭐ 1 6
Mxn = Mxn-1 otherwise
Thus in this example, the bias will probably not go all the way to zero so that, when the PV
does begin to come down, the loop will begin to open the valve sooner than it would have if
7
the bias had been allowed to go all the way to zero. This action has the effect of reducing the
amount of overshoot. 8
Adjusting the Bias 9
The normal action of the CPU is to adjust the bias term when the output goes out of range as
shown below.
Mx = Ki * en + Mxn-1 10
M = Kc * en - Kr(PVn - PVn-1) + Mx
11
Mn = 0 if M < 0
Mn = M if 0 ⭐ M ⭐ 1 12
Mn = 1 if M > 1
13
Mxn = Mx if 0 ⭐ M ⭐ 1
Mxn = Mn - Kc * en - Kr(PVn - PVn-1) otherwise
By adjusting the bias, the valve will begin to open as soon as the PV begins to come down. If
14
the loop is properly tuned, overshoot can be eliminated entirely. If the output went out of
range due to a setpoint change, then the loop probably will oscillate because we must wait for A
the bias term to stabilize again.
The choice of whether to use the default loop action or to freeze the bias is dependent on the B
application. If large, step changes to the setpoint are anticipated, then it is probably better
to select the freeze bias option (see page 8-34). C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–11


Chapter 8: PID Loop Operation

Step Bias Proportional to Step Change in SP


1 This feature reduces oscillation caused by a step change in setpoint when the adjusting bias
feature is used.
2 Mx = Mx * SPn / SPn-1 if the loop is direct acting
Mx = Mx * SPn-1 / SPn if the loop is reverse acting
3
Mxn = 0 if Mx < 0
4 Mxn = Mx if 0 ⭐ Mx ⭐ 1
Mxn = 1 if M > 1

5 Eliminating Proportional, Integral or Derivative Action


It is not always necessary to run a full three mode PID control loop. Most loops require only
the PI terms or just the P term. Parts of the PID equation may be eliminated by choosing
6 appropriate values for the gain (Kc), reset (Ti) and rate (Td) yielding a P, PI, PD, I and even
an ID and a D loop.
7 Eliminating Integral Action The effect of integral action on the output may be
eliminated by setting Ti = 9999. When this is done, the
8 user may then manually control the bias term (Mx) to
eliminate any steady-state offset.
9 Eliminating Derivative Action The effect of derivative action on the output may be
eliminated by setting Td = 0 (most loops do not require a
D parameter; it may make the loop unstable).
10 Eliminating Proportional Action Although rarely done, the effect of proportional term on
the output may be eliminated by setting Kc = 0. Since Kc
11 is also normally a multiplier of the integral coefficient (Ki)
and the derivative coefficient (Kr), the CPU makes the
12 computation of these values conditional on the value of
Kc as follows:
Ki = Kc * (Ts / Ti) if Kc ⫽ 0
13 Ki = Ts / Ti if Kc = 0 (I or ID only)
14 Kr = Kc * (Td / Ts) if Kc ⫽ 0
Kr = Td / Ts if Kc = 0 (ID or D only)
A
Velocity Form of the PID Equation
B The standard position form of the PID equation computes the actual actuator position. An
alternative form of the PID equation computes the change in actuator position. This form of
C the equation is referred to as the velocity PID equation and is obtained by subtracting the
equation at time “n” from the equation at time “n-1”.
D The velocity equation is given by:
⌬Mn = M - Mn-1
⌬Mn = Kc * (en - en-1) + Ki * (PVn - 2 * PVn-1 + PVn-2)

8–12 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Bumpless Transfer
The DL06 loop controller provides for bumpless mode changes. A bumpless transfer from 1
manual mode to automatic mode is achieved by preventing the control output from changing
immediately after the mode change.
When a loop is switched from Manual mode to Automatic mode, the setpoint and Bias are
2
initialized as follows:
Position PID Algorithm Velocity PID Algorithm
3
SP = PV SP = PV
Mx = M
4
The bumpless transfer feature of the DL06 is available in two types: Bumpless I and Bumpless
II (see page 8-26). The transfer type is selected when the loop is set up.
5
Loop Alarms 6
The DL06 allows the user to specify alarm conditions that are to be monitored for each loop.
Alarm conditions are reported to the CPU by setting up the alarms in DirectSOFT 5 using
the PID setup alarm dialog when the loop is setup. The alarm features for each loop are: 7
• PV Limit – Specify up to four PV alarm points.
High-High PV rises above the programmed High-High Alarm Limit. 8
High PV rises above the programmed High Alarm Limit.
Low
Low-Low
PV fails below the Low Alarm Limit.
PV fails below the Low-Low Limit.
9
• PV Deviation Alarm – Specify an alarm for High and Low PV deviation from the
setpoint (Yellow Deviation). An alarm for High High and Low Low PV deviation 10
from the setpoint (Orange Deviation) may also be specified. When the PV is further
from the setpoint than the programmed Yellow or Orange Deviation Limit the
corresponding alarm bit is activated.
11
• Rate of Change – This alarm is set when the PV changes faster than a specified rate-of-
change limit. 12
• PV Alarm Hysteresis – The PV Limit Alarms and PV Deviation Alarms are programmed
using threshold values. When the absolute value or deviation exceeds the threshold,
the alarm status becomes true. Real-world PV signals have some noise on them, which
13
can cause some fluctuation in the PV value in the CPU. As the PV value crosses an
alarm threshold, its fluctuations will cause the alarm to be intermittent and annoy 14
process operators. The solution is to use the PV Alarm Hysteresis feature.
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–13


Chapter 8: PID Loop Operation

Loop Operating Modes


1 The DL06 loop controller operates in one of two modes, either Manual or Automatic.
Manual
2 In manual mode, the control output is determined by the operator, not the loop controller.
While in manual mode, the loop controller will still monitor all of the alarms including
3 High-High, High, Low, Low-Low, Yellow deviation, Orange deviation and Rate-of-Change.
Automatic
4 In automatic mode, the loop controller computes the control output based on the
programmed parameters stored in V-memory. All alarms are monitored while in automatic.
5 Cascade
Cascade mode is an option with the DL06 PLC and is used in special control applications. If
6 the cascade feature is used, the loop will operate as it would if in automatic mode except for
the fact that a cascaded loop has a setpoint which is the control output from another loop.
7 Special Loop Calculations
Reverse Acting Loop
8 Although the PID algorithm is used in a direct, or forward, acting loop controller, there are
times when a reverse acting control output is needed. The DL06 loop controller allows a loop
9 to operate as reverse acting. With a reverse acting loop, the output is driven in the opposite
direction of the error. For example, if SP > PV, then a reverse acting controller will decrease
the output to increase the PV.
10 Mx = -Ki * en + Mxn-1
M = -Kc * en + Kr(PVn-PVn-1) + Mxn
11 Square Root of the Process Variable
Square root is selected whenever the PV is from a device such as an orifice meter which
12 requires this calculation.
Error Squared Control
13 Whenever error squared control is selected, the error is calculated as:
en = (SP - PVn) * ABS(SP - PVn)
14 A loop using the error squared is less responsive than a loop using just the error, however, it
will respond faster with a large error. The smaller the error, the less responsive the loop. Error
A squared control would typically be used in a PH control application.

B
C
D

8–14 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Error Deadband Control


With error deadband control, no control action is taken if the PV is within the specified 1
deadband area around the setpoint. The error deadband is the same above and below the
setpoint.
Once the PV is outside of the error deadband around the setpoint, the entire error is used in
2
the loop calculation.
en = 0 SP - Deadband_Below_SP < PV < SP - Deadband_Above_SP
3
en = P - PVn otherwise
The error will be squared first if both Error Squared and Error Deadband is selected. 4
Derivative Gain Limiting
When the coefficient of the derivative term, Kr, is a large value, noise introduced into the PV
5
can result in erratic loop output. This problem is corrected by specifying a derivative gain
limiting coefficient, Kd. Derivative gain limiting is a first order filter applied to the derivative 6
term computation, Yn, as shown below.

Y n = Yn-1 +
Ts 7
* (PV n - Y n-1 )
Ts + ( Td )
Kd 8
Position Algorithm 9
Mx = Ki * en + Mxn-1
M = Kc * en - Kr * (Yn-Yn-1) + Mx 10
Velocity Algorithm
⌬M = Kc * (en - en-1) + Ki * en - Kr * (Yn - 2 * Yn-1 + Yn-2) 11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–15


Chapter 8: PID Loop Operation

1 Ten Steps to Successful Process Control


Controllers such as the DL06 PLC provide sophisticated process control features. Automated
control systems can be difficult to debug, because a given symptom can have many possible
2 causes. We recommend a careful, step-by-step approach to bringing new control loops online:
Step 1: Know the Recipe
3 The most important is – how to produce your product. This knowledge is the foundation for
designing an effective control system. A good process recipe will do the following:
4 • Identify all relevant Process Variables, such as temperature, pressure, or flow rates, etc.
which need precise control.
5 • Plot the desired Setpoint values for each process variables for the duration of one process
cycle.
6 Step 2: Plan Loop Control Strategy
This simply means choosing the method the machine will use to maintain control over the
7 Process Variables to follow their Setpoints. This involves many issues and trade-offs, such as
energy efficiency, equipment costs, ability to service the machine during production, and
more. You must also determine how to generate the Setpoint value during the process, and
8 whether a machine operator can change the SP.
Step 3: Size and Scale Loop Components
9 Assuming the control strategy is sound, it is still crucial to properly size the actuator and
properly scale the sensors.
10 • Choose an actuator (heater, pump. etc.) which matches the size of the load. An oversized
actuator will have an overwhelming effect on your process after a SP change. However, an
11 undersized actuator will allow the PV to lag or drift away from the SP after a SP change
or process disturbance.
• Choose a PV sensor which matches the range of interest (and control) for our process.
12 Decide the resolution of control you need for the PV (such as within 2C), and make sure
the sensor input value provides the loop with at least 5 times that resolution (at LSB
level). However, an over-sensitive sensor can cause control oscillations, etc. The DL06
13 provides 12–bit and 15–bit unipolar and bipolar data format options, and a 16–bit
unipolar option. This selection affects SP, PV, Control Output and Integrator sum.
14 Step 4: Select I/O Modules
After deciding the number of loops, PV variables to measure, and SP values, you can choose
A the appropriate I/O module. Refer to the figure on the next page. In many cases, you will be
able to share input or output modules, or use a analog I/O combination module, among
B several control loops. The example shown sends the PV and Control Output signals for two
loops through the same set of modules.
Automationdirect offers DL06 analog input modules with 4 channels per module that accept
C 0 – 20mA or 4 – 20mA signals. Also, analog input and output combination modules are now
available. Thermocouple and RTD modules can also be used to maintain temperatures to a
D 10th of a degree. Refer to the sales catalog for further information on these modules, or find
the modules on our website, www.automationdirect.com.

8–16 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

DL06 CPU
Input V-memory Digital
Module Output

Channel 1 PV
Loop 1 Data
SP
Loop 2 Data
OUT Channel 1 Process 1 1
Channel 2 PV SP OUT Channel 2 Process 2

Channel 3
2
Channel 4
3
Step 5: Wiring and Installation
After selection and procurement of all loop components and I/O module(s), you can
4
perform the wiring and installation. Refer to the wiring guidelines in Chapter 2 of this
manual, and to the D0–OPTIONS–M manual. The most common wiring errors when
installing PID loop controls are:
5
• Reversing the polarity of sensor or actuator wiring connections.
• Incorrect signal ground connections between loop components.
6
Step 6: Loop Parameters 7
After wiring and installation, choose the loop setup parameters. The easiest method for
programming the loop tables is using DirectSOFT 5 (5.0 or later). This software provides
PID Setup using dialog boxes to simplify the task. Note: It is important to understand the
8
meaning of all loop parameters mentioned in this chapter before choosing values to enter.
Step 7: Check Open Loop Performance
9
With the sensor and actuator wiring done, and loop parameters entered, we must manually
and carefully check out the new control system using the Manual mode). 10
• Verify that the PV value from the sensor is correct.
• If it is safe to do so, gradually increase the control output up above 0%, and see if the PV 11
responds (and moves in the correct direction!).
Step 8: Loop Tuning 12
If the Open Loop Test (page 8–40) shows the PV reading is correct and the control output
has the proper effect on the process; you can follow the closed loop tuning procedure (see 13
page 8–45). In this step, the loop is tuned so the PV automatically follows the SP.
Step 9: Run Process Cycle 14
If the closed loop test shows the PV will follow small changes in the SP, consider running an
actual process cycle. You will need to have completed the programming which will generate
the desired SP in real time. In this step, you may want to run a small test batch of product
A
through the machine, watching the SP change according to the recipe.
WARNING: Be sure the Emergency Stop and power-down provision is readily accessible, in case the
B
process goes out of control. Damage to equipment and/or serious injury to personnel can result from
loss of control of some processes. C
Step 10: Save Parameters D
When the loop tests and tuning sessions are complete, be sure to save all loop setup
parameters to disk.

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–17


Chapter 8: PID Loop Operation

1 PID Loop Setup


Some Things to Do and Know Before Starting
2 Have your analog module installed and operational before beginning the loop setup (refer to
the DL05/06 Option Modules User Manual, D0-OPTIONS-M). The DL06 PLC gets its
3 PID loop processing instructions from V-memory tables. There isn’t a PID instruction that
can be used in RLL, such as a block, to setup the PID loop control. Instead, the CPU reads
the setup parameters from system V-memory locations. These locations are shown in the table
4 below for reference only; they can be used in a RLL program if needed.
Address Setup Parameter Data type Ranges Read/Write
5 V7640 Loop Parameter Octal V1200 – V7340 write
Table Pointer V10000-V17740
6 V7641
V7642
Number of Loops
Loop Error Flags
BCD
BITS
1–8
0 or 1
write
read

7 PID Error Flags


The CPU reports any programming errors of the setup PID Error Flags, V7642
parameters in V7640 and V7641. It does this by setting the
8 appropriate bits in V7642 on program-to-run mode
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

transitions.
9 If you use the DirectSOFT 5 loop setup dialog box, its automatic range checking prohibits
possible setup errors. However, the setup parameters may be written using other methods
10 such as RLL, so the error flag register may be helpful in those cases. The following table lists
the errors reported in V7642.
11 Bit Error Description (0 = no error, 1 = error)
0 The starting address (in V7640) is out of the lower V-memory range.
12 1
2
The starting address (in V7640) is out of the upper V-memory range.
The number of loops selected (in V7641) is greater than 8.
3 The loop table extends past (straddles) the boundary at V7377. Use an address closer to V1200.
13 As a quick check, if the CPU is in Run mode and V7642=0000, there are no programming
errors.
14 Establishing the Loop Table Size and Location
A On a PROGRAM-to-RUN mode transition, the CPU reads the loop setup parameters as
pictured below. At that moment, the CPU learns the location of the loop table and the
number of loops it configures. Then during the ladder program scan, the PID Loop task uses
B the loop data to perform calculations, generate alarms, and so on. There are some loop table
parameters the CPU will read or write on every loop calculation.
C CPU Tasks

READ/
V–Memory Space

User Data

Ladder WRITE LOOP

D Program

PID Loop
Task
DATA
CONFIGURE/
MONITOR

Setup Parameters
READ V7640, V7641
(at powerup)
DirectSOFT32 Programming Software
DirectSOFT 5

8–18 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

NOTE: The DL06 CPU’s PID algorithm requires DirectSOFT 5 Version 5.0 (or later) and firmware
version 2.1 (or later). See our website for more information: www.automationdirect.com. 1
The Loop Table contains data for only the number of loops
that are selected. The address for the table is stored in V7641.
V–Memory User Data
2
Each loop configuration occupies 32 words (0 to 37 octal) in
V2000
the loop table.
V2037
LOOP #1
32 words
3
For example, consider an application with 4 loops, and V2000 V2040 LOOP #2
has been chosen as the starting location. The Loop Parameter
will occupy V2000 – V2037 for loop 1, V2040 – V2077 for
V2077 32 words
LOOP #3
4
32 words
loop 2 and so on. Loop 4 occupies V2140 - V2177.
Determine the block of V-memory to be used for each PID
LOOP #4
32 words
5
loop. Besides being the beginning of the PID parameter memory block, the first address will
be the start of loop 1 parameters. Remember, there are 32 words (0 to 37 octal) needed for 6
each loop. Once you have determined the beginning V-memory address to be used, you can
setup and store the PID parameters either directly in your RLL program or by the using PID
Setup in DirectSOFT 5.
7
NOTE: Whether one or more loops are being setup, this block of V-memory will only be used for the PID
loop parameters, do not use this block of memory for anything else in your program.
8
Using DirectSOFT 5 is the simplest way to setup the parameters. To setup the PID 9
parameters, the DL06 must be powered up and connected to the programming computer.
The parameters can only be entered in PID setup when the PLC is in the Program mode.
Once the parameters have been entered and saved for each loop, changes made through the
10
PID setup can be made, but only in Program Mode. You can type the beginning address in
the PID Table Address dialog found when the PID Setup is opened in DirectSOFT 5. This 11
can be seen in the diagram below. After the address has been entered, the memory range will
appear. Also, entering the number of PID loops (1 to 8) will set the total V-memory range for
the number of loops entered. After the V-memory address has been entered, the necessary
12
PID parameters for a basic loop operation for each loop can be setup with the dialogs made
available. 13
14
A
B
C
D
NOTE: Have an edited program open, then click on PLC > Setup > PID to access the Setup PID dialog.

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–19


Chapter 8: PID Loop Operation

Loop Table Word Definitions


1 These are the loop parameters associated with each of the four loops available in the DL06.
The parameters are listed in the following table. The address offset is in octal, to help you
2 locate specific parameters in the loop table. For example, if a table begins at V2000, then the
location fo the reset (integral) term is Addr+11, or V2011. Do not use the Word # (in the
first column) to calculate addresses.
3
Change
Word # Address+Offset Description Format on-the-fly1
4 1 Addr + 0 PID Loop Mode Setting 1 bits Yes
2 Addr + 1 PID Loop Mode Setting 2 bits Yes
5 3
4
Addr + 2
Addr + 3
Setpoint Value (SP)
Process Variable (PV)
word/binary
word/binary
Yes
Yes

6 5
6
Addr + 4
Addr + 5
Bias (Integrator) Value
Control Output Value
word/binary
word/binary
Yes
Yes
7 Addr + 6 Loop Mode and Alarm Status bits –
7 8
9
Addr + 7
Addr + 10
Sample Rate Setting
Gain (Proportional) Setting
word/BCD
word/BCD
Yes
Yes

8 10
11
Addr + 11
Addr + 12
Reset (Integral) Time Setting
Rate (Derivative) Time Setting
word/BCD
word/BCD
Yes
Yes
12 Addr + 13 PV Value, Low-low Alarm word/binary No2
9 13
14
Addr + 14
Addr + 15
PV Value, Low Alarm
PV Value, High Alarm
word/binary
word/binary
No2
No2

10 15
16
Addr + 16
Addr + 17
PV Value, High-high Alarm
PV Value, deviation alarm (YELLOW)
word/binary
word/binary
No2
No2
17 Addr + 20 PV Value, deviation alarm (RED) word/binary No2
11 18
19
Addr + 21
Addr + 22
PV Value, rate-of-change alarm
PV Value, alarm hysteresis setting
word/binary
word/binary
No2
No2

12 20
21
Addr + 23
Addr + 24
PV Value, error deadband setting
PV low-pass filter constant
word/binary
word/BCD
Yes
Yes
22 Addr + 25 Loop derivative gain limiting factor setting word/BCD No3
13 23
24
Addr + 26
Addr + 27
SP value lower limit setting
SP value upper limit setting
word/binary
word/binary
Yes
Yes

14 25
26
Addr + 30
Addr + 31
Control output value lower limit setting
Control output value upper limit setting
word/binary
word/binary
No3
No3
27 Addr + 32 Remote SP Value V-Memory Address Pointer word/hex Yes
A 28
29
Addr + 33
Addr + 34
Ramp/Soak Setting Flag
Ramp/Soak Programming Table Starting Address
bit
word/hex
Yes
No3

B 30
31
Addr + 35
Addr + 36
Ramp/Soak Programming Table Error Flags
PV auto transfer, channel number
bits
word/hex
No3
Yes
32 Addr + 37 Control output auto transfer, channel number word/hex Yes
C Notes:
1
D 2
“Yes” in the column indicates the PID loop will use an updated PID parameter value immediately.
Read data only when alarm enable bit transitions from 0 to 1.
3
Read data only on PLC Mode change.

8–20 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

PID Mode Setting 1 Bit Descriptions (Addr + 00)


The individual bit definitions of the PID Mode Setting 1 word (Addr+00) are listed in the 1
following table.
Bit PID Mode Setting 1 Description Read/Write Bit=0 Bit=1 2
0 Manual Mode Loop Operation request write – 01 request
1
2
Automatic Mode Loop Operation request
Cascade Mode Loop Operation request
write
write


01 request
01 request
3
3 Bumpless Transfer select write Mode I Mode II
4 Direct or Reverse-Acting Loop select write Direct Reverse 4
5 Position / Velocity Algorithm select write Position Velocity
6
7
PV Linear / Square Root Extract select
Error Term Linear / Squared select
write
write
Linear
Linear
Sq. root
Squared
5
8 Error Deadband enable write Disable Enable
9 Derivative Gain Limit select write Off On 6
10 Bias (Integrator) Freeze select write Off On
11
12
Ramp/Soak Operation select
PV Alarm Monitor select
write
write
Off
Off
On
On
7
13 PV Deviation alarm select write Off On
14 PV rate-of-change alarm select write Off On 8
15 Loop mode is independent from CPU mode when set write Loop with CPU Loop Independent
mode of CPU mode
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–21


Chapter 8: PID Loop Operation

PID Mode Setting 2 Bit Descriptions (Addr + 01)


1 The individual bit definitions of the PID Mode Setting 2 word (Addr+01) are listed in the
following table.
2 Bit PID Mode 2 Word Description Read/Write Bit=0 Bit=1
0 Input (PV) and Control Output Range Unipolar/Bipolar write unipolar bipolar
3 select (See Notes 1 and 2)
1 Input/Output Data Format select (See Notes 1 and 2) write 12 bit 15 bit
2 Analog Input filter write off on
4 3 SP Input limit enable write disable enable
4 Integral Gain (Reset) units select write seconds minutes
5 5 Select Auto tune PID algorithm
6 Auto tune selection
write
write
closed loop
PID
open loop
PI only (rate = 0)
7 Auto tune start read/write auto tune done force start
6 8 PID Scan Clock (internal use) read – –
9 Input/Output Data Format 16-bit select
(See Notes 1 and 2) write not 16 bit select 16 bit
7 10 Select separate data format for input and output write same format separate formats
(See Notes 2, and 3)

8 11 Control Output Range Unipolar/Bipolar select


See Notes 2, and 3) write unipolar bipolar
12 Output Data Format select (See Notes 2, and 3) write 12 bit 15 bit
9 13 Output data format 16-bit select (See Notes 2, and 3)
14–15 Reserved for future use
write

not 16 bit

select16 bit

10 NOTE 1: If the value in bit 9 is 0, then the values in bits 0 and 1 are read. If the value in bit 9 is 1, then
the values in bits 0 and 1 are not read, and bit 9 defines the data format (the range is automatically
11 unipolar).

NOTE 2: If the value in bit 10 is 0, then the values in bits 0, 1 and 9 define the input and output ranges
12 and data formats (the values in bits 11, 12, and 13 are not read). If the value in bit 10 is 1, then the values
in bits 0, 1, and 9 define only the input range and data format, and bits 11, 12, and 13 are read and
13 difine the output range and data format.

14 NOTE 3: If bit 10 has a value of 1 and bit 13 has a value of 0, then bits 11 and 12 are read and define
the output range and data format. If bit 10 and bit 13 each have a value of 1, then bits 11 and 12 are not
read, and bit 13 defines the data format, (the output range is automatically unipolar).
A
B
C
D

8–22 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Mode/Alarm Monitoring Word (Addr + 06)


The individual bit definitions of the Mode / Alarm monitoring (Addr+06) word is listed in 1
the following table.
Bit Mode/Alarm Bit Description
0 Manual Mode Indication
Read/Write
read
Bit=0

Bit=1
Manual
2
1 Automatic Mode Indication read – Auto
2 Cascade Mode Indication read – Cascade 3
3 PV Input LOW–LOW Alarm read Off On
4 PV Input LOW Alarm
5 PV Input HIGH Alarm
read
read
Off
Off
On
On
4
6 PV Input HIGH–HIGH Alarm read Off On
7 PV Input YELLOW Deviation Alarm read Off On 5
8 PV Input RED Deviation Alarm read Off On
9 PV Input Rate-of-Change Alarm
10 Alarm Value Programming Error
read
read
Off

On
Error
6
11 Loop Calculation Overflow/Underflow read – Error
12 Loop in Auto-Tune indication read Off On 7
13 Auto-Tune error indication read – Error
14–15 Reserved for Future Use – – – 8
Ramp/Soak Table Flags (Addr + 33) 9
The individual bit definitions of the Ramp/Soak Table Flag (Addr+33) word is listed in the
following table.
10
Bit Ramp/Soak Flag Bit Description Read/Write Bit=0 Bit=1
0
1
Start Ramp / Soak Profile
Hold Ramp / Soak Profile
write
write


01 Start
01 Hold
11
2 Resume Ramp / soak Profile write – 01 Resume
3 Jog Ramp / Soak Profile write – 01 Jog 12
4 Ramp / Soak Profile Complete read – Complete
5
6
PV Input Ramp / Soak Deviation
Ramp / Soak Profile in Hold
read
read
Off
Off
On
On
13
7 Reserved read – –
8–15 Current Step in R/S Profile read decode as byte (hex) 14
Bits 8–15 must be read as a byte to indicate the current segment number of the Ramp/Soak
generator in the profile. This byte will have the values 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E,
A
F, and 10, which represent segments 1 to 16 respectively. If the byte=0, then the Ramp/Soak
table is not active. B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–23


Chapter 8: PID Loop Operation

Ramp/Soak Table Location (Addr + 34)


1 Each loop that you configure has the option of using a built-in Ramp/Soak generator
dedicated to that loop. This feature generates SP values that follow a profile. To use the Ramp
2 Soak feature, you must program a separate table of 32 words with appropriate values. A
DirectSOFT 5 dialog box makes this easy to do.

3 In the loop table, the Ramp/Soak Table Pointer at Addr+34 must point to the start of the
ramp/soak data for that loop. This may be anywhere in user memory, and does not have to
adjoin to the Loop Parameter table, as shown to the left. Each R/S table requires 32 words,
4 regardless of the number of segments programmed.
The ramp/soak table parameters are defined in the table below. Further details are in the
5 section on Ramp/Soak Operation in chapter 8.

6 Addr
Offset
Step Description Addr
Offset
Step Description
+ 00 1 Ramp End SP Value + 20 9 Ramp End SP Value
7 V–Memory Space

User Data
+ 01 1 Ramp Slope + 21 9 Ramp Slope
+ 02 2 Soak Duration + 22 10 Soak Duration
8 V2000
V2037
LOOP #1
32 words
+ 03
+ 04
2
3
Soak PV Deviation
Ramp End SP Value
+ 23
+ 24
10
11
Soak PV Deviation
Ramp End SP Value
LOOP #2
32 words + 05 3 Ramp Slope + 25 11 Ramp Slope
9 + 06 4 Soak Duration + 26 12 Soak Duration
V3000 Ramp/Soak #1
+ 07 4 Soak PV Deviation + 27 12 Soak PV Deviation
10 32 words + 10
+ 11
5
5
Ramp End SP Value
Ramp Slope
+ 30
+ 31
13
13
Ramp End SP Value
Ramp Slope
+ 12 6 Soak Duration + 32 14 Soak Duration
11 V2034 = 3000 Octal + 13 6 Soak PV Deviation + 33 14 Soak PV Deviation
Pointer to R/S table + 14 7 Ramp End SP Value + 34 15 Ramp End SP Value
12 + 15
+ 16
7
8
Ramp Slope
Soak Duration
+ 35
+ 36
15
16
Ramp Slope
Soak Duration
+ 17 8 Soak PV Deviation + 37 16 Soak PV Deviation
13
Ramp/Soak Table Programming Error Flags (Addr + 35)
14 The individual bit definitions of the Ramp/Soak Table Programming Error Flags word
(Addr+35) is listed in the following table. Further details are given in the PID Loop Mode
A section and in the PV Alarm section later in chapter 8.

Bit R/S Error Flag Bit Description Read/Write Bit=0 Bit=1


B 0 Starting Addr out of lower V-memory range read – Error
1 Starting Addr out of upper V-memory range read – Error
C 2–3
4
Reserved for Future Use
Starting Addr in System Parameter V-memory Range

read



Error
5–15 Reserved for Future Use – – –
D

8–24 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Configure the PID Loop


Once the PID table is established in V-memory, configuring the PID loop continues with the 1
DirectSOFT 5 PID setup configuration dialog. You will need to check and fill in the data
required to control the PID loop. Select Configure and the following dialog will appear for
this process.
2
3
4
5
6
7
Select the Algorithm Type 8
Chose either Position or Velocity. The default algorithm is Position. This is the choice for most
applications which include heating and cooling loops as well as most position and level 9
control loops. A typical velocity control will consist of a process variable such as a flow
totalizer in a flow control loop.
Enter the Sample Rate
10
The main tasks of the CPU fall into categories as shown to the right.
The list represents the tasks done when the CPU is in Run Mode, on Read
11
Inputs
each PLC scan. Note that PID loop calculations occur after the ladder
logic task. Service
Peripherals
12
The sample rate of a control loop is simply the frequency of the PID
calculation. Each calculation generates a new control output value. With Ladder
13
the DL06 CPU, you can set the sample rate of a loop from 50 ms to PLC
Program

99.99 seconds. Most loops do not require a fresh PID calculation on


every PLC scan. Some loops may need to be calculated only once in
Scan
Calculate
PID Loops
14
1000 scans.
Enter 0.05 sec., or the sample rate of your choice, for each loop, and the Internal
Diagnostics
A
CPU automatically schedules and executes PID calculations on the
appropriate scans. Write
Outputs
B
NOTE: If more than 4 loops are programmed, enter a minimum of 0.1 second.
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–25


Chapter 8: PID Loop Operation

Select Forward/Reverse
It is important to know which direction the control output will respond to the error (SP-PV),
1 either forward or reverse. A forward (direct) acting control loop means that whenever the
control output increases, the process variable will also increase. The control output of most
2 PID loops are forward acting, such as a heating control loop. An increase in heat applied will
increase the PV (temperature).
3 A reverse acting control loop is one where an increase in the control output results in a
decrease in the PV. A common example of this would be a refrigeration system, where an
increase in the cooling input causes a decrease in the PV (temperature).
4 The Transfer Mode
Choose either Bumpless I or Bumpless II to provide a smooth transition of the control output
5 from Manual Mode to Auto Mode. Choosing Bumpless I will set the SP equal to the PV
when the control output is switched from Manual to Auto. If this is not desired, choose
6 BumplessII.
The characteristics of Bumpless I and II transfer types are listed in the chart below. Note that
7 their operation also depends on which PID algorithm you are using, the position or velocity
form of the PID equation. Note that you must use Bumpless Transfer type I when using the
8 Transfer
TransferType Select Bit 3 PID Algorithm Manual-to-Auto
Transfer Action
Auto-to-Cascade
Transfer Action
Forces Bias = Control Output Forces Major Loop Output =
9 Bumpless
Transfer I 0
Position Forces SP = PV
Forces
Minor Loop PV
Major Loop Output =
Velocity Forces SP = PV Minor Loop PV
10 Bumpless 1
Position Forces Bias = Control Output none
Transfer II Velocity none none
11 velocity form of the PID algorithm.
The transfer type can also be selected in a RLL program by setting bit 3 of PID Mode 1,
12 V+00 setting as shown.
PID Mode 1 Setting V+00
13 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Bumpless Transfer I/II Select

SP/PV & Output Format


14 This block allows you to select either Common format or Independent format. Common
format is the default and is most commonly used. With this format both SP/PV and Output
A will have the same data structure. Both will have the same number of bits and either bipolar
or unipolar. If Independent format is selected, the data structure selections will be grayed out.
B The reason for this is that they become independently selectable in the SP/PV and the Output
dialogs.
C Common Data Format
Select either Unipolar data format (which is positive data only) in 12 bit (0 to 4095), 15 bit (0
to 32767), or 16 bit (0 to 65535) format, or Bipolar data format, which ranges from negative
D to positive (-4095 to 4095 or -32767 to 32767) and requires a sign bit. Bipolar selection
displays input/output as magnitude plus sign, not two’s complement. The bipolar selection is
not available when 16-bit data format is selected.

8–26 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Setpoint V+02 Loop Control Output V+05


兺 Calculation
+ –

Process Variable V+03


1
PID Mode 2 Setting V+01
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
2
Data formats LSB
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
3
00 12 bit unipolar 0 to 0FFF (0 to 4095)
Select data
format using 01 12 bit bipolar 0 to 0FFF, 8FFF to 8001
(0 to 4095, *–4095 to 4095)
4
bits 0 and 1.
10 15 bit unipolar 0 to 32767

11 15 bit bipolar 0 to 7FFF, FFFF to 8001


5
(0 to 32767, *–32767 to 32767)
= sign bit
* Magnitude plus sign
6
The data format determines the numerical interface between the PID loop and the PV sensor,
and the control output device. This selects the data format for both the SP and the PV.
7
Loop Mode
Loop Mode is a special feature that allows the PID loop controller to perform closed-loop
8
control while the CPU is in the Program Mode. Careful thought must be taken before using
this feature called Independent of CPU mode in the dialog. Before continuing with the PID 9
setup, a knowledge of the three PID loop modes will be helpful.
The DL06 provides the three standard control modes: Manual, Automatic, and Cascade. The 10
sources of the three basic variables SP, PV and control output are different for each mode.
In Manual Mode, the loop is not executing PID calculations (however, loop alarms are still
active). With regard to the loop table, the CPU stops writing values to location V+05 (control
11
output) for that loop. It is expected that an operator or other intelligent source is manually
controlling the output by observing the PV and writing data to the control output as 12
necessary to keep the process under control. The drawing below shows the equivalent
schematic diagram of manual mode operation. 13
Input from Operator Manual
14
Control Output V+05
Loop
Calculation
A
Auto
In Automatic Mode, the loop operates normally and generates new control output values. It B
calculates the PID equation and writes the result in location V+05 every sample period of that
loop. The equivalent schematic diagram is shown below.
Manual
C
Input from Operator
Control Output V+05 D
Loop
Calculation
Auto

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–27


Chapter 8: PID Loop Operation

In Cascade Mode, the loop operates as it does in Automatic Mode, with one important
1 difference. The data source for the SP changes from its normal location at V+02 to using the
control output value, V+05, from another loop. So in Auto or Manual modes, the loop
calculation uses the data at V+02. In Cascade Mode, the loop calculation reads the control
2 output from another loop’s parameter table, V+05.

3 Another loop

Control Output V+05 Cascade


Cascaded loop

Loop
Calculation
4 Normal SP V+02
Setpoint
+ 

Loop
Calculation
Control Output

Auto/Manual
5 Process Variable

As pictured below, a loop can be changed from one mode to another, but cannot go from
6 Manual Mode directly to Cascade, or vice versa. This mode change is prohibited because a loop
would be changing two data sources at the same time, and could cause a loss of control.
7 Manual Automatic Cascade

8 Once the CPU is operating in the Run Mode, the normal operation of the PID loop
controller is to read the loop data and perform calculations on each scan of the RLL program.
9 When the CPU is placed in the Program Mode, the RLL program halts operation and all PID
loops are automatically put into the Manual Mode. The PID parameters can then be changed
if desired. Similarly, by placing the CPU in the Run mode, the PID loops are returned to the
10 operational mode which they were previously in, i.e., Manual, Automatic and Cascade. With
this selection you automatically affect the modes by changing the CPU mode.
11 CPU Modes:

12 Program
Mode change
Run

13 0 = loop follows PLC mode


Loop Mode Linking
PID Mode 1 Setting V+00
1 = loop is independent
14 of PLC mode
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Loop
Modes:
A Manual
Mode change
Automatic
Mode change
Cascade

B
If bit 15 is set to one, then the loops will run independent of the CPU mode. It is like having
C two independent processors in the CPU...one is running the RLL program and the other is
running the process loops.

8–28 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Having the ability to run loops independently of the RLL program makes it feasible to make
a ladder logic change while the process is still running. This is especially beneficial for large-
mass continuous processes that are difficult or costly to interrupt. The independent of CPU is
1
the feature used for this.
If you need to operate the PID loops while the RLL program is halted, in Program Mode,
2
either select the Independent of CPU mode in the dialog or edit your program to set and
reset bit 15 of PID Mode 1 word (V+00) in your RLL program. If the bit is set to a zero, the 3
loop will follow the CPU mode, then when the CPU is placed in the Program Mode, all
loops will be forced into the Manual Mode. 4
When Independent of CPU mode is used, you should also set the PV to be read directly from
an analog input module. This can easily be done in the PID setup dialog, SP/PV.
The SP/PV dialog has a block entitled Process
5
Variable. There is a block within this block called
Auto Transfer From (from analog input) with the 6
information grayed out. Checking the box to the left
of the Auto Transfer From will high-light the 7
information. Select I/O Module then enter the slot
number the input module resides in. Next, select the
analog input channel of your choice.
8
The second choice is V-Memory. When this is
selected, the V-memory address from where the PV 9
is transferred from must be specified.
Whichever method of auto transfer is used, it is 10
recommended to check the Enable Filter Factor (a
low pass filter) and specify the coefficient. 11
You should also select the analog output for the control output to 12
be transferred to. This is done in the PID setup Output dialog
shown here. The block of information in this dialog is “grayed-
out” until the box next to Auto transfer to I/O module is checked.
13
Once checked, enter the slot number where the output module is
residing and then enter the analog output channel number. 14
A
NOTE: To make changes to any loop table parameters, the PID loop must be in Manual mode and the PLC
must be stopped. If you have selected to operate the PID loop independent of the CPU mode, then you must B
take certain steps to make it possible to make loop parameter changes. You can temporarily make the loops
follow the CPU mode by changing bit 15 to 0. Then you will be able to place the loop into Manual Mode
using DirectSOFT 5. After you change the loop’s parameter setting/s, just restore bit 15 to a value of 1 to re-
C
establish PID operation independent of CPU.
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–29


Chapter 8: PID Loop Operation

You may optionally configure each loop to access its analog I/O (PV and control output) by
1 placing proper values in the associated loop table registers in your RLL program. The
following figure shows the loop table parameters at V+36 and V+37 and their auto transfer
role to access the analog values directly.
2
3 Setpoint V +02

Error Loop
Calculation
Control output V+05

4 Process variable V+03

Loop Table
5 V2036 0X XX Base/Slot /Channel number for PV
V2037 0X XX Base/Slot/Channel number for Output

6 XX 0X
Channel number 1 to 48
7 Slot number 1 to 4
Base 0

8 When these loop table parameters are programmed directly, a value of “0102” in register
V2036 directs the loop controller to read the PV data from channel 1 of the analog input. A
9 value of “0000” in either register tells the loop controller not to access the corresponding
analog value directly. In that case, ladder logic must be used to transfer the value between the
analog input and the loop table.
10 NOTE: When auto transfer to/from I/O is used, the analog data for all of the channels on the analog module
cannot be accessed by any other method, i.e., pointer or multiplex.
11
SP/PV Addresses
12 An SP/PV dialog will be made available to setup how the setpoint (SP) and the process
variable (PV) will be used in the loop. If this loop is the minor loop of a cascaded pair, enter
13 that control output address in the Remote SP from Cascaded Loop Output area. It is sometimes
desirable to limit the range of setpoint values allowed to be entered. To activate this feature,
check the box next to Enable Limiting. This will activate the Upper and Lower fields for the
14 values to be entered. Set the limits around the SP value to prevent an operator from entering a

A
B
C
D

8–30 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

setpoint value outside of a safe range. The Square root box is only checked for certain PID
loops, such as a flow control loop. If the Auto transfer from I/O module is selected, a first-order
low-pass filter can be used by checking the Enable Filter box. The filter coefficient is user
1
specified. The use of this filter is recommended during closed loop auto-tuning. If the
Independent format had been checked previously, make the Data format selections here. 2
NOTE: The SP/PV dialog can be left as it first appears for basic PID operation.
3
Set Control Output Limits
Another dialog that will be available in the PID setup will be the Output dialog. The control 4
output address, V+05, (determined by the PID loop table beginning address) will be in view.
Enter the output range limits, Upper Limit and Lower Limit, that will meet the requirement
of the process and which will agree with the data format that has been selected. For a basic
5
PID operation using a 12 bit output module, set the Upper Limit to 4095 and leave the
6
7
8
9
10
Lower Limit set to 0. Check the box next for Auto transfer to I/O module if there is a need to
11
send the control output to a certain analog output module, as in the case of using the Loop
Mode independent of CPU Mode; otherwise, the PID output signal cannot control the 12
analog output when the PLC is out of RUN Mode. If the Auto transfer to I/O module feature
is checked, all channels of the module must be used for PID control outputs. If Independent
format has been previously chosen, the Output Data Format will need to be setup here, that
13
is, select Unipolar or Bipolar format and the bit structure. This area is not available and is
grayed out if Common format has been chosen (see page 8-26). 14
A
WARNING: If the Upper Limit is set to zero, the output will never get above zero. In effect, there
will be no control output.
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–31


Chapter 8: PID Loop Operation

Enter PID Parameters


1 Another PID setup dialog, Tuning, is for entering the PID parameters shown as: Gain
(Proportional Gain), Reset (Integral Gain) and Rate (Derivative Gain).
2
3
4
5
6
7 Recall the position and velocity forms of the PID loop equations which were introduced
earlier. The equations basically show the three components of the PID calculation:
Proportional Gain (P), Integral Gain (I) and Derivative Gain (D). The following diagram
8 shows a form of the PID calculation in which the control output is the sum of the
proportional gain, integral gain and derivative gain. With each calculation of the loop, each
9 term receives the same error signal value.
Loop Calculation
10 Setpoint Error T erm
P
+ Control Output
+  I + 
11 –
Process Variable
D +

12 The P, I and D gains are 4-digit BCD numbers with values from 0000 to 9999. They contain
an implied decimal point in the middle, so the values are actually 00.00 to 99.99. Some gain
values have units – Proportional gain has no unit, Integral gain may be selected in seconds or
13 in minutes, and Derivative gain is in seconds.
Gain (Proportional Gain) – This is the most basic gain of the three. Values range from 0000
14 to 9999, but they are used internally as xx.xx. An entry of “0000” effectively removes the
proportional term from the PID equation. This accommodates applications which need
A integral-only loops.
Reset (Integral Gain) – Values range from 0001 to 9998, but they are used internally as
B xx.xx. An entry of “0000” or “9999”causes the integral gain to be “⬁”, effectively removing
the integrator term from the PID equation. This accommodates applications which need
proportional-only loops. The units of integral gain may be either seconds or minutes, as
C shown in the above dialog.
Rate (Derivative Gain) – Values which can be entered range from 0001 to 9999, but they are
D used internally as XX.XX. An entry of “0000” allows removal of the derivative term from the
PID equation (a common practice). This accommodates applications which require only
proportional and/or integral loops. Most control loops will operate as a PI loop.

8–32 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

NOTE: You may elect to leave the tuning dialog blank and enter the tuning parameters in the DirectSOFT
5 PID View. 1
Loop Calculation
P
Proportional
Control
2
Setpoint Error T erm + Output
 I
Integral

+

D
Derivative 0
+
+ 3
Process Variable
Derivative,
gain-limited
1 4
Loop Table
5
P ID Mode 1 Setting V+00
V+25 00XX Derivative Gain Limit
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
6
Derivative gain limit select

Derivative Gain Limiting 7


The derivative gain (rate) has an optional gain-limiting feature. This is provided because the
derivative gain reacts badly to PV signal noise or other causes of sudden PV fluctuations. The 8
function of the gain-limiting is shown in the diagram below.
The gain limit can be particularly useful during loop tuning. Most loops can tolerate only a
little derivative gain without going into uncontrolled oscillations.
9
If this option is checked, a Limit from 0 to 20 must also be entered. 10
NOTE: When first configuring a loop, it’s best to use the standard error term until after the loop is tuned.
Once the loop is tuned, you will be able to tell if these functions will enhance control. The Error Squared
and/or Enable Deadband can be selected later in the PID setup. Also, values are not required to be entered in
11
the Tuning dialog, but they can set later in the DirectSOFT 5 PID View.
12
Error Term Selection
The error term is internal to the CPUs PID loop controller, and is generated again in each 13
PID calculation. Although its data is not directly accessible, you can easily calculate it
by subtracting: Error = (SP–PV). If the PV square-root extract is enabled, then: Error = 公PV 14
In any case, the size of the error and algebraic sign determine the next change of the
control output for each PID calculation.
Error Squared – When selected, the squared error function simply squares the error term (but
A
preserves the original algebraic sign), which is used in the calculation. This affects the Control
Output by diminishing its response to smaller error values, but maintaining its response to B
larger errors. Some situations in which the error squared term might be useful:
• Noisy PV signal – using a squared error term can reduce the effect of low-frequency electrical noise
on the PV, which will make the control system jittery. A squared error maintains the response to
C
larger errors.
• Non-linear process – some processes (such as chemical pH control) require non-linear controllers D
for best results. Another application is surge tank control, where the Control Output signal must
be smooth.

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–33


Chapter 8: PID Loop Operation

Enable Deadband – When selected, the enable deadband function takes a range of small error
1 values near zero, and simply substitutes zero as the value of the error. If the error is larger than
the deadband range, then the error value is used normally.
2 Freeze Bias
The term reset windup refers to an undesirable characteristic of integrator behavior which
occurs naturally under certain conditions. Refer to the figure below. Suppose the PV signal
3 becomes disconnected, and the PV value goes to zero. While this is a serious loop fault, it is
made worse by reset windup. Notice the bias (reset) term keeps integrating normally during
4 the PV disconnect, until its upper limit is reached. When the PV signal returns, the bias value
is saturated (windup) and takes a long time to return to normal. The loop output
5 consequently has an extended recovery time. Until recovery, the output level is wrong and
causes further problems.

6 PV
PV loss PV loss
0
7 Reset windup Freeze bias enabled
Bias
8
9 Output

Recovery time Recovery time


10 In the second PV signal loss episode in the figure, the freeze bias feature is enabled. It causes
the bias value to freeze when the control output goes out of bounds. Much of the reset
11 windup is thus avoided, and the output recovery time is much less.
For most applications, the freeze bias feature will work with the loop as described above. It is
12 suggested to enable this feature by selecting it in the dialog. Bit 10 of PID Mode 1 Setting
(V+00) word can also be set in RLL.
13 NOTE: The freeze bias feature stops the bias term from changing when the control output reaches the end of
the data range. If you have set limits on the control output other than the range (i.e, 0–4095 for a
14 unipolar/12bit loop), the bias term still uses the end of range for the stopping point and bias freeze will not
work.

A
B
C
D

8–34 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Setup the PID Alarms


Although the setup of the PID alarms is optional, you surely would not want to operate a 1
process without monitoring it. The performance of a process control loop may generally be
measured by how closely the process variable matches the setpoint. Most process control
loops in industry operate continuously, and will eventually lose control of the PV due to an
2
error condition. Process alarms are vital in early discovery of a loop error condition and can
alert plant personnel to manually control a loop or take other measures until the error 3
condition has been repaired.
The alarm thresholds are fully programmable, and each type of alarm may be independently 4
enabled and monitored. The following diagram shows the Alarm dialog in the PID setup
which simplifies the alarm setup.
5
6
7
8
9
Monitor Limit Alarms 10
Checking this box will allow all of the PV limit alarms to be monitored once the limits are
entered.The PV absolute value alarms are organized as two upper and two lower alarms. The 11
alarm status is false as long as the PV value remains in the region between the upper and
lower alarms, as shown below. The alarms nearest the safe zone are named High Alarm and
Low Alarm. If the loop loses control, the PV will cross one of these thresholds first. Therefore,
12
you can program the appropriate alarm threshold values in the loop table locations shown
below to the right. The data format is the same as the PV and SP (12-bit or 15-bit). The 13
threshold values for these alarms should be set to give an operator an early warning if the
process loses control. 14
High–high Alarm
High Alarm V+16 XXXX
Loop Table
High-high Alarm
A
V+15 XXXX High Alarm
PV
Low Alarm
V+14 XXXX Low Alarm
B
V+13 XXXX Low-low Alarm
Low–low Alarm
C
NOTE: The Alarm dialog can be left as it first appears, without alarm entries. The alarms can then be setup
in the DirectSOFT 5 PID View.
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–35


Chapter 8: PID Loop Operation

If the process remains out of control for some time, the PV will eventually cross one of the
1 outer alarm thresholds, named High-high alarm and Low-low alarm. Their threshold values
are programmed using the loop table registers listed above. A High-high or Low-low alarm
indicates a serious condition exists, and needs the immediate attention of the operator.
2 The PV Absolute Value Alarms are reported in the four bits in PID Mode and Alarm Status V+06
the PID Mode and Alarm Status word in the loop table, as
3 shown to the right. We highly recommend using ladder logic Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
to monitor these bits. The bit-of-word instructions make this High-high Alarm
4 easy to do. Additionally, you can monitor PID alarms using
DirectSOFT 5.
High Alarm
Low Alarm
Low-low Alarm

5 PV Deviation Alarms
The PV Deviation Alarms monitor the PV deviation with respect to the SP value. The
deviation alarm has two programmable thresholds, and each threshold is applied equally
6 above and below the current SP value. In the figure below, the smaller deviation alarm is
called the “Yellow Deviation”, indicating a cautionary condition for the loop. The larger
7 deviation alarm is called the “Red Deviation”, indicating a strong error condition for the loop.
The threshold values use the loop parameter table locations V+17 and V+20 as shown.
8 Red Deviation Alarm
Yellow Deviation Alarm
Red
Yellow Loop Table

9 SP Green V+17
V+20
XXXX
XXXX
Yellow Deviation Alarm
Red Deviation Alarm
Yellow Deviation Alarm Yellow

10 Red Deviation Alarm


Red

The thresholds define zones, which fluctuate with the SP value. The green zone which
11 surrounds the SP value represents a safe (no alarm) condition. The yellow zones lie outside
the green zone, and the red zones are beyond those.
12 The PV Deviation Alarms are reported in the two bits in the
PID Mode and Alarm Status V+06
PID Mode and Alarm Status word in the loop table, as
13 shown to the right. We highly recommend using ladder logic Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

to monitor these bits. The bit-of-word instructions make this Red Deviation
easy to do. Additionally, you can monitor PID alarms using Yellow Deviation
14 DirectSOFT 5.
The PV Deviation Alarm can be independently enabled and disabled from the other PV
A alarms, using bit 13 of the PID Mode 1 Setting V+00 word.
Remember the alarm hysteresis feature works in conjunction with both the deviation and
B absolute value alarms, and is discussed at the end of this section.

C
D

8–36 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

PV Rate-of-Change Alarm
An excellent way to get an early warning of a process fault is to monitor the rate-of-change of 1
the PV. Most batch processes have large masses and slowly-changing PV values. A relatively
fast-changing PV will result from a broken signal wire for either the PV or control output, a
SP value error, or other causes. If the operator responds to a PV Rate-of-Change Alarm
2
quickly and effectively, the PV absolute value will not reach the point where the material in
process would be ruined. 3
The DL06 loop controller provides a programmable PV Rate-of-Change Alarm, as shown
below. The rate-of-change is specified in PV units change per loop sample time. This value is 4
programmed into the loop table location V+21.

Loop Table
5
PV slope OK PV slope excessive

PV
V+21 XXXX PV Rate-of-Change Alarm
6
rate-of-change alarm
PID Mode and Alarm Status V+06
7
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Sample time Sample time
PV Rate of
Change Alarm
8
As an example, suppose the PV is the temperature for your process, and you want an alarm 9
whenever the temperature changes faster than 15 degrees/minute. The PV counts per degree
and the loop sample rate must be known. Then, suppose the PV value (in V+03 location)
represents 10 counts per degree, and the loop sample rate is 2 seconds. Use the formula below
10
to convert our engineering units to counts/sample period:
15 degrees 10 counts / degree 150
11
Alarm Rate-of-Change = X = = 5 counts
1 minute 30 loop samples / min. 30
12
From the calculation result, you would program the value 5 in the loop table for the rate-of-
change. The PV Rate-of-Change Alarm can be independently enabled and disabled from the
other PV alarms, using bit 14 of the PID Mode 1 Setting V+00 word.
13
The alarm hysteresis feature (discussed next) does not affect the Rate-of-Change Alarm.
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–37


Chapter 8: PID Loop Operation

PV Alarm Hysteresis
1 The PV Absolute Value Alarm and PV Deviation Alarm are programmed using threshold
values. When the absolute value or deviation exceeds the threshold, the alarm status becomes
2 true. Real-world PV signals have some noise on them, which can cause some fluctuation in
the PV value in the CPU. As the PV value crosses an alarm threshold, its fluctuations cause
the alarm to be intermittent and annoy process operators. The solution is to use the PV
3 Alarm Hysteresis feature.
The PV Alarm Hysteresis amount is programmable from 1 to 200 (binary/decimal). When
4 using the PV Deviation Alarm, the programmed hysteresis amount must be less than the
programmed deviation amount. The figure below shows how the hysteresis is applied when
5 the PV value goes past a threshold and descends back through it.

6 Alarm threshold
Hysteresis

7 PV
V+22 XXXX
Loop Table
PV Alarm Hysteresis

Alarm 1
8 0

9 The hysteresis amount is applied after the threshold is crossed, and toward the safe zone. In
this way, the alarm activates immediately above the programmed threshold value. It delays
10 turning off until the PV value has returned through the threshold by the hysteresis amount.
Alarm Programming Error
11 The PV Alarm threshold values must have
certain mathematical relationships to be valid.
PID Mode and Alarm Status V+06
The requirements are listed below. If not met,
12 the Alarm Programming Error bit will be set, as Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
indicated to the right.
13 • PV Absolute Alarm value requirements:
Alarm Programming Error

Low-low < Low < High < High-high


14 • PV Deviation Alarm requirements:
Yellow < Red
Loop Calculation Overflow/Underflow Error
A This error occurs whenever the output reaches it’s PID Mode and Alarm Status V+06
upper or lower limit and the PV does not reach
B the setpoint. A typical example might be when a Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
valve is stuck, the output is at it’s limit, but the
C PV has not reached setpoint. Loop Calculation Overflow/Underflow Error

NOTE: Overflow/underflow can be alarmed in PID View. The optional C-more operator interface panel (see
D the automationdirect.com website) can also be setup to read these error bits using the PID Faceplate
templates.

8–38 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Ramp/Soak
R/S (Ramp/Soak) is the last dialog available in the PID setup. The basic PID does not require 1
any entries to be made in order to operate the PID loop. Ramp/Soak will be discussed in
another section.
2
3
4
5
6
7
Complete the PID Setup 8
Once you have filled in the necessary information for the basic PID setup, the configuration
should be saved. The icons on the Setup PID dialog will allow you to save the configuration 9
to the PLC and to disk. The save to icons have the arrow pointing to the PLC and disk. The
read from icons have the arrows pointing away from the PLC and disk.
An optional feature is available with the Doc tab in the Setup PID window. You enter a name
10
and description for the loop. This is useful if there are more than one PID loop in your
application. 11
12
13
Save to disk
14
Save to PLC A
B
NOTE: It is good practice to save your project after setting up the PID loop by selecting File from the menu C
toolbar, then Save project > to disk. In addition to saving your entire project, all the PID parameters are
also saved. D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–39


Chapter 8: PID Loop Operation

1 PID Loop Tuning


Once you have set up a PID loop, it must be tuned in order for it to work. The goal of loop
tuning is to adjust the loop gains so the loop has optimal performance in dynamic conditions.
2 The quality of a loop’s performance may generally be judged by how well the PV follows the
SP after a SP step change. It is important to keep in mind that understanding the process is
3 fundamental to getting a well designed control loop. Sensors must be in appropriate locations
and valves must be sized correctly with appropriate trim. PID control does not have typical
values. There isn’t one control process that is identical to another.
4 Manual Tuning vs. Auto Tuning
5 You may enter the PID gain values to tune your loops (manual tuning), or you can rely on
the PID processing “engine” in the CPU to automatically calculate the gain values (auto
tuning). Most experienced process engineers will have a favorite method; the DL06 will
6 accommodate either preference. The use of auto tuning can eliminate much of the trial-and-
error of the manual tuning approach, especially if you do not have a lot of loop tuning
7 experience. However, performing the auto tuning procedure will get the gains close to
optimal values, but additional manual tuning can get the gain values to their optimal values.
8 WARNING: Only authorized personnel fully familiar with all aspects of the process should make
changes that affect the loop tuning constants. Using the loop auto tune procedures will affect the
process, including inducing large changes in the control output value. Make sure you thoroughly
9 consider the impact of any changes to minimize the risk of injury to personnel or damage to
equipment. The auto tune in the DL06 is not intended to be used as a replacement for your process
10 knowledge.

Open-Loop Test
11 Whether you use manual or auto tuning, it is very important to verify basic characteristics of
a newly-installed process before attempting to tune it. With the loop in Manual Mode, verify
12 the following items for each new loop.
• Setpoint – verify that the SP source can generate a setpoint. Put the PLC in Run Mode and leave
13 the loop in Manual Mode, then monitor the loop table location V+02 to see the SP value(s). (If you
are using the ramp/soak generator, test it now).
• Process Variable – verify that the PV value is an accurate measurement, and the PV data arriving in
14 the loop table location V+03 is correct. If the PV signal is very noisy, consider filtering the input
either through hardware (RC low-pass filter), or using the filter in this chapter.
A • Control Output – if it is safe to do so, manually change the output a small amount (perhaps 10%)
and observe its affect on the process variable. Verify the process is direct-acting or reverse acting, and
check the setting for the control output (inverted or non-inverted). Make sure the control output
B upper and lower limits are not equal to each other.
• Sample Rate – while operating open-loop, this is a good time to find the ideal sample rate (see
C Configure the PID Loop earlier in this chapter). However, if you are going to use auto tuning, the
auto tuning procedure will automatically calculate the sample rate in addition to the PID gains.

8–40 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Manual Tuning Procedure


It is not necessary to try to obtain the best values for the P, I and D parameters in the PID 1
loop by trial and error. Following is a typical procedure for tuning a temperature control loop
which you may use to tune your loop.
Monitor the values of SP, PV and CV with a loop trending instrument or use the PID View
2
feature in DirectSOFT 5 (see page 8-49).
3
NOTE: We recommend using the PID View Tuning and Trending window to select manual for the vertical
scale feature, for both SP/PV area and Bias/Control Output areas. The auto scaling feature would otherwise
change the vertical scale on the process parameters and add confusion to the loop tuning process.
4
• Adjust the gains so the Proportional Gain = 0.5 or 1.0 (1.0 is a good value based on experience),
Integral Gain = 9999 (this basically eliminates reset) and Derivative Gain =0000. This disables the
5
integrator and derivative terms, and provides some proportional gain.
• Check the bias value in the PID View and set it to zero. 6
• Set the SP to a value equal to 50% of the full range.
• Now, select Auto Mode. If the loop will not stay in Auto Mode, check the 7
troubleshooting tips at the end of this chapter. Allow the PV to stabilize around the 50%
point of the range. 8
• Change the SP to the 60% point of the range.

60% here error 9


10% of Over-damped PV response
10
SP range

SP 50% here 11
PV
12
The response may take awhile, but you will see that there isn’t any oscillation. This response is
not desirable since it takes a long time to correct the error; also, there is a difference between 13
the SP and the PV.
• Increase the Proportional gain, for example to 2.0. The control output will be greater and the
response time will be quicker. The trend should resemble the figure below.
14
60% here
A
10% of B
SP range

SP 50% here
PV response
C
PV

D
• Increase the Proportional gain in small increments, such as 4, 6, 7, etc. until the control output
response begins to oscillate. This is the Proportional gain that should be recorded.

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–41


Chapter 8: PID Loop Operation

Error
60% here
1
2 50% here
SP
3 PV

4 • Now, return the Proportional gain to the stable response, for example, 9.7. The error, SP-PV, should
be small, but not at zero.
• Next, add a small amount of Integral gain (reset) in order for the error to reach zero. Begin by using
5 80 seconds (adjust in minutes if necessary). The error should get smaller.
• Set the Integral gain to a lower value, such as 50 for a different response. If there is no response,
6 continue to decrease the reset value until the response becomes unstable. See the figure below.

7 60% here

10% of
8 SP range

SP 50% here
9 PV Under-damped PV response

10 • For discussion, let us say that a reset value of 35 made the control output unstable. Return the reset
value to the stable value, such as 38. Be careful with this adjustment since the oscillation can
11 destroy the process.
• The control output response should be optimal now, without a Derivative gain. The example
12 recorded values are: Proportional gain = 9.7 and Integral gain = 38 seconds. Note that the error has
been minimized.

13 Minimum Oscillations

14
A Shortest response time

B The foregone method is the most common method used to tune a PID loop. Derivative
gain is almost never used in a temperature control loop. This method can also be used for
C other control loops, but other parameters may need to be added for a stable control output.
Test your loop for a high PV of 80% and again for a low PV of 20%, and correct the values if
D necessary. Small adjustments of the parameters can make the control output more precise or
more unstable. It is sometimes acceptable to have a small overshoot to make the control
output react quicker.

8–42 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

The derivative gain can be helpful for those control loops which are not controlling
temperature. For these loops, try adding a value of 0.5 for the derivative gain and see if this
improves the control output. If there is little or no response, increase the derivative by
1
increments of 0.5 until there is an improvement to the output trend. Recall that the derivative
gain reacts with a rate of change of the error. 2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–43


Chapter 8: PID Loop Operation

Alternative Manual Tuning Procedures by Others


1 The following tuning procedures have been extracted from various publications about PID
process control. These procedures are for comparison to the procedure in this manual.
2 Tuning PID Controllers
Two-Mode Simple Method - – for P-I controllers
3 1. Turn off reset and set the gain to a small value (0.5 - 1.0).
2. Increase gain until cycling starts, then decrease gain slightly.
4 3. Make setpoint changes to observe offset (error).
4. Increase reset to eliminate offset (error).
5 5. Repeat steps 2 through 4 until you obtain the largest gain and reset consistent with the
criteria of the control desired, i.e., offset, overshoot, stability.
6 Zeigler-Nichols Method– “Quarter amplitude decay”
1. Turn off reset and rate; set the proportional gain to a fairly large value.
7 2. Make a small setpoint change and observe how the controlled variable cycles.
3. Adjust the gain until the cycle is self-sustaining, and of constant amplitude; this value is
the ultimate gain (Gu).
8 4. Measure the period of cycling in minutes. This is the ultimate period (Pu).
9 5. Calculate the controller adjustments as follows:
P only: G = Gu/2
10 P & I : G = Gu/2.2
Ti = 1.2/Pu (repeats/minute)
P-I-D: G = Gu/1.6
11 Ti = 2.0/Pu (repeats/minute)
Td = Pu/8.0 (minutes)
12 Pessen Method
1. Follow the procedure described above (Zeigler-Nichols) to determine the ultimate gain
and ultimate period.
13 2. Apply the formulas below.
14 For no overshoot during startup:
G = Gu/5.0
Ti = 3/Pu (repeats/minute)
A Td = Pu/2 (minutes)
For some overshoot, but better response to disturbances:
B G = Gu/3
Ti = 3/Pu (repeats/minute)
C Td = Pu/3 (minutes)

8–44 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Auto Tuning Procedure


The auto tuning feature for the DL06 loop controller will only run once each time it is 1
enabled in the PID table. Therefore, auto tuning does not run continuously during operation
(this would be adaptive control). Whenever there is a substantial change in loop dynamics,
such as mass of process, size of actuator, etc., the tuning process will need to be repeated in
2
order to derive new gains required for optimal control.
WARNING: Only authorized personnel fully familiar with all aspects of the process should make 3
changes that affect the loop tuning constants. Using the loop auto tuning procedures will affect the
process, including inducing large changes in the control output value. Make sure you thoroughly
consider the impact of any changes to minimize the risk of injury to personnel or damage to
4
equipment. The auto tune in the DL06 is not intended to be used as a replacement for your process
knowledge. 5
Once the physical loop components are connected to the PLC, auto tuning can be initiated
within DirectSOFT 5 (see the DirectSOFT 5 Programming Software Manual), and it can be
6
used to establish initial PID parameter values. Auto tuning is the best “guess” the CPU can do
after some trial tests. 7
The loop controller offers both closed-loop and open-loop methods. The following sections
describe how to use the auto tuning feature, and what occurs in open and closed-loop auto 8
tuning.
The controls for the auto tuning function use three bits in the PID Mode 2 word V+01, as 9
shown below. DirectSOFT 5 will manipulate these bits automatically when you use the auto
tune feature within DirectSOFT 5. Or, you may have your ladder logic access these bits
directly for allowing control from another source such as a dedicated operator interface. The
10
individual control bits allow you to start the auto tune procedure, select PID or PI tuning and
select closed-loop or open-loop tuning. If you select PI tuning, the auto tune procedure leaves 11
the derivative gain at 0. The Loop Mode and Alarm Status word V+06 reports the auto tune
status as shown. Bit 12 will be on (1) during the auto tune cycle, automatically returning to
off (0) when done.
12
Auto T une Function
13
Start Auto T une Auto Tune
(0 to 1 transition)
0=PID tuning,
Active
Auto Tune
14
Auto T uning 1=open PI tuning Error Auto T uning
Controls 0=closed loop,
1=open loop
Status A
PID Mode 2 Setting V+01 Loop Mode and Alarm Status V+06

Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–45


Chapter 8: PID Loop Operation

Open-Loop Auto Tuning


1 During an open-loop auto tuning cycle, the loop controller operates as shown in the diagram
below. Before starting this procedure, place the loop in Manual Mode and ensure the PV and
2 control output values are in the middle of their ranges (away from the end points).
PLC System
Process Variable
3 Response Step Function
Open Loop

4 Auto Tuning

Control
Setpoint Value Error Term Loop Output Manufacturing
5 + 

Calculation Process

Process Variable
6
NOTE: In theory, the SP value does not matter in this case, because the loop is not closed. However, the
7 requirement of the firmware is that the SP value must be more than 5% of the PV range from the actual PV
before starting the auto tune cycle (for the DL06, 12 bit PV should be 205 counts or more below the SP for
forward-acting loops, or 205 counts or more above the SP for reverse-acting loops).
8
When auto tuning, the loop controller induces a step change on the output and simply
9 observes the response of the PV. From the PV response, the auto tune function calculates the
gains and the sample time. It automatically places the results in the corresponding registers in
the loop table.
10 The following timing diagram shows the events which occur in the open-loop auto tuning
cycle. The auto tune function takes control of the control output and induces a 10%-of-span
11 step change. If the PV change which the loop controller observes is less than 2%, then the
step change on the output is increased to 20%-of-span.
12 * When Auto Tune starts, step change output m=10%
* During Auto Tune, the controller output reached the full scale positive limit. Auto Tune stopped
13 and the Auto Tune Error bit in the Alarm word bit turned on.
* When PV change is under 2%, output is changed at 20%. Open Loop Auto Tune Cycle Wave: Step
Response Method
14 PV
Rr = Slope
(%) Tangent
SP
A Process Wave
Base Line
LrRr

B (%)
Lr
(sec.)
Time (sec)

C Output Value
Step Change m=10%

(%)
D PID Cycle
Auto Tune Cycle
PID Cycle

Auto Tune Start Auto Tune End

8–46 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

When the loop tuning observations are complete, the loop controller computes Rr
(maximum slope in %/sec.) and Lr (dead time in sec). The auto tune function computes the
gains according to the Zeigler-Nichols equations, shown below:
1
PID Tuning
P=1.2*m/LrRr
PI Tuning
P=0.9*m/LrRr
2
I=2.0* Lr I=3.33* Lr
D=0.5* Lr D=0 3
Sample Rate = 0.056* Lr Sample Rate = 0.12*Lr
m = Output step change (10% = 0.1, 20% = 0.2) 4
We highly recommend using DirectSOFT 5 for the auto tuning interface. The duration of
each auto tuning cycle will depend on the mass of the process. A slowly-changing PV will 5
result in a longer auto tune cycle time. When the auto tuning is complete, the proportional,
integral, and derivative gain values are automatically updated in loop table locations V+10,
V+11, and V+12 respectively. The sample time in V+07 is also updated automatically. You
6
can test the validity of the values the auto tuning procedure yields by measuring the closed-
loop response of the PV to a step change in the output. The instructions on how to do this 7
are in the section on the manual tuning procedure (located prior to this auto tuning section).
Closed-Loop Auto Tuning 8
During a closed-loop auto tuning cycle the loop controller operates as shown in the diagram
below. 9
PLC System
Process V ariable
10
Response Limit cycle wave
Closed Loop
Auto T uning 11
Setpoint V alue
+ 
Error T erm Loop
Calculation
Control
Output Manufacturing
Process
12

Process Variable 13
When auto tuning, the loop controller imposes a square wave on the output. Each transition 14
of the output occurs when the PV value crosses over/under the SP value. Therefore, the
frequency of the limit cycle is roughly proportional to the mass of the process. From the PV
response, the auto tune function calculates the gains and the sample time. It automatically
A
places the results in the corresponding registers in the loop table.
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–47


Chapter 8: PID Loop Operation

The following timing diagram shows the events which occur in the closed-loop auto tuning
1 cycle. The auto tune function examines the direction of the offset of the PV from the SP. The
auto tune function then takes control of the control output and induces a full-span step
2 change in the opposite direction. Each time the sign of the error (SP – PV) changes, the
output changes full-span in the opposite direction. This proceeds through three full cycles.

3 Process Wave
SP
Xo

PV

4 Output Value

5 M

6 To
PID Cycle PID Cycle

7 Auto Tune Cycle

Auto Tune Start Auto Tune End


Calculation of
PID parameter

8 Mmax = Output Value upper limit setting. Mmin = Output Value lower limit setting.
This example is direct–acting.
9
When set to reverse–acting, the output will be inverted. When the loop tuning observations
10 are complete, the loop controller computes To (bump period) and Xo (amplitude of the PV).
Then it uses these values to compute Kpc (sensitive limit) and Tpc (period limit). From these
11 values, the loop controller auto tune function computes the PID gains and the sample rate
according to the Zeigler-Nichols equations shown below:
12 Kpc = 4M / ( *Xo) Tpc = 0
M = Amplitude of output

13 P = 0.45*Kpc
PID Tuning
P = 0.30*Kpc
PI Tuning

I = 0.60*Tpc I = 1.00*Tpc
14 D = 0.10*Tpc D=0
Sample Rate = 0.014*Tpc Sample Rate = 0.03*Tpc
A Auto tuning error
In open-loop tuning, if the auto tune error bit (bit 13 of loop Mode/Alarm status word
B V+06) is on, please verify the PV and SP values are within 5% of full scale difference, as
required by the auto tune function.
C NOTE: If your PV fluctuates rapidly, you probably need to use the built-in analog filter (see page 8–55) or
create a filter in ladder logic (see example on page 8–56).
D

8–48 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Use Direct SOFT 5 Data View with PID View


The Data View window is a very useful tool which can be used to help tune your PID loop. 1
You can compare the variables in the PID View with the actual values in the V-memory
location with Data View.
2
Open a New Data View Window
A new Data View window can be opened in any one of three ways; the menu bar Debug >
Data View > New, the keyboard shortcut Ctrl + Shift + F3 or the Data button on the Status
3
toolbar. By default, the Data View window is assigned Data1 as the default name. This name
can be changed for the current view using the Options dialog. The following diagram is an 4
example of a newly opened Data View. The window will open next to the Ladder View by
default. 5
6
7
8
9
10
11
12
The Data View window can be used just as it is shown above for troubleshooting your PID
logic, and it can be most useful when tuning the PID loop.
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–49


Chapter 8: PID Loop Operation

Open PID View


1 The PID View can only be opened after a loop has been setup in your ladder program. PID
View is opened by selecting it from the View submenu on the Menu bar, View > PID View.
2 The PID View can also be opened by clicking on the PID View button from the PLC Setup
toolbar if it is in view.

3
4
5
6
7
8
9
10 The PID View will open and appear over the Ladder View which can be brought into view by
clicking on it’s tab. When using the Data View and the PID View together, each view can be
11 sized for better use as shown on the facing page.

12
13
14
A
B
C
D

8–50 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

The two views are now ready to be used to tune your loop. You will be able to see where the
PID values have been set and see the process that it is controlling. 1
2
3
4
5
6
7
8
The diagram below illustrates how the to use the views to see the current SP, PV and Output
values, along with the other PID addresses. Refer to the Loop Table Definitions page 8-20 for
details of each word in the table. This is also a good data type reference for each word in the
9
table.
10
Scale the time axis of the viewing The trend can be cleared and
window by using this input box. restarted from the left at anytime. 11
Process Variable and
12
Setpoint trends are
color coded. 13
The loop name area 14
turns red whenever there
is an overflow error.
A
P
B
I C
D
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–51


Chapter 8: PID Loop Operation

With both windows positioned in this manner, you are able to see where the PID values have
1 been set and see the process that it is controlling. In the diagram below, you can see the
current SP, PV and Output values, along with the other PID addresses. Refer to the Loop
Table Word Definitions (page 8-20) for details for each word in the table. This is also a good
2 data type reference for each word in the table.

3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D

8–52 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Using the Special PID Features


It’s a good idea to understand the special features of the DL06 and how to use them. You may
1
want to incorporate some of these features for your PID.
How to Change Loop Modes
2
The first three bits of the PID Mode 1 word (V+00) request
the operating mode of the corresponding loop. Note: these
PID Mode 1 Setting V+00

Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
3
bits are mode change requests, not commands (certain
conditions can prohibit a particular mode change – see next
page).
Cascade Manual 4
Automatic
The normal state of these mode request bits is “000”. To request a mode change, you must
SET the corresponding bit to a “1”, using a one-shot. The PID loop controller automatically
5
resets the bits back to “000” after it reads the mode change request. Methods of requesting
mode changes are: 6
• DirectSOFT 5’s PID View – this is the easiest method. Use the pull-down menu, or click on one of
the radio buttons if using older DirectSOFT versions, and the appropriate bit will get set. 7
• Ladder program– ladder logic can request any loop mode when the PLC is in Run Mode. This will
be necessary after application startup if mode changes are part of the application.
Use the program shown to the right to SET the mode bit (do not
8
use an OUT coil). On a 0–1 transition of X0, the rung sets the Go to Auto Mode
Auto bit equal to 1. The loop controller resets it.
X0 B2000.1
SET
9
• Operator panel – interface the operator’s panel to ladder logic
using standard methods, then use the logic to the right to set the
mode bit.
10
Since mode changes can only be requested, the PID loop controller will decide when to permit
mode changes and provide the loop mode status. It reports the current mode on bits 0, 1, and
11
2 of the Loop Mode/Alarm Status word, location V+06 in the loop table. The parallel
request/monitoring functions are shown in the figure below. The figure also shows the two 12
possible mode-dependent SP sources, and the two possible Control Output sources.

Input from Operator


Manual
13
Control Output
Cascade
from another loop
Setpoint
+  Error T erm Loop
Calculation
Control Output
14
Normal Source – Auto/Cascade
Auto/Manual Process Variable
Mode Select
A
PID Mode
Control B
PID Mode 1 Setting V+00 Loop Mode and Alarm Status V+06

Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
C
Mode Request Mode Monitoring
Cascade Manual
Automatic
Cascade Manual
Automatic D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–53


Chapter 8: PID Loop Operation

Operator Panel Control of PID Modes


1 Since the modes Manual, Auto and Cascade are the most fundamental and important PID
loop controls, you may want to “hard-wire” mode control switches to an operator’s panel.
2 Most applications will need only Manual and Auto selections (Cascade is used in special
applications). Remember that mode controls are really mode request bits, and the actual loop
mode is indicated elsewhere.
3 The following figure shows an operator’s panel using momentary push-buttons to request
PID mode changes. The panel’s mode indicators do not connect to the switches, but interface
4 to the corresponding data locations.
Operator’s Panel
5 Manual

Auto
6 Mode Request
Cascade
Mode Monitoring

7 PID Mode 1 Setting V+00

Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Loop Mode and Alarm Status V+06

Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

8 PLC Modes Effect on Loop Modes


If you have selected the option for the loops to follow the PLC mode, the PLC modes
(Program, Run) interact with the loops as a group. The following summarizes this interaction:
9 • When the PLC is in Program Mode, all loops are placed in Manual Mode and no loop calculations
occur. However, note that output modules (including analog outputs) turn off in PLC Program
10 Mode. So, actual manual control is not possible when the PLC is in Program Mode.
• The only time the CPU will allow a loop mode change is during PLC Run Mode operation. As
11 such, the CPU records the modes of all 4 loops as the desired mode of operation. If power failure
and restoration occurs during PLC Run Mode, the CPU returns all loops to their prior mode
(which could be Manual, Auto, or Cascade).
12 • On a Program-to-Run mode transition, the CPU forces each loop to return to its prior mode
recorded during the last PLC Run Mode.
13 • You can add and configure new loops only when the PLC is in Program Mode. New loops
automatically begin in Manual Mode.
14 Loop Mode Override
In normal conditions the mode of a loop is determined by the request to V+00, bits 0,
A 1, and 2. However, some conditions exist which will prevent a requested mode change
from occurring:
B • A loop that is not set independent of PLC mode cannot change modes when the PLC is in Program
mode.
• A major loop of a cascaded pair of loops cannot go from Manual to Auto until its minor loop is in
C Cascade mode.
In other situations, the PID loop controller will automatically change the mode of the loop to
D ensure safe operation:
• A loop which develops an error condition automatically goes to Manual.
• If the minor loop of a cascaded pair of loops leaves Cascade Mode for any reason, its major loop
automatically goes to Manual Mode.

8–54 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

PV Analog Filter
A noisy PV signal can make tuning difficult and can cause the control output to be more 1
extreme than necessary, as the output tries to respond to the peaks and valleys of the PV.
There are two equivalent methods of filtering the PV input to make the loop more stable.
The first method is accomplished using the DL06’s built-in filter. The second method
2
achieves a similar result using ladder logic.
The DL06 Built-in Analog Filter 3
The DL06 provides a selectable first-order low-pass PV input filter. We only recommend the
use of a filter during auto tuning or PID control if there is noise on the input signal. You 4
may disable the filter after auto tuning is complete, or continue to use it if the PV input
signal is noisy. 5
+ 
Loop
Calculation
Control Output 6
– Unfiltered
0
PV
7
Process V ariable
1 Filtered
PV
8
P ID Mode 2 Setting V+01
Loop Table
9
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

PV filter
enable/disable
V+24 XXXX FIlter constant
10
Bit 2 of PID Mode Setting 2 provides the enable/disable control for the low-pass PV filter 11
(0=disable, 1=enable). The roll-off frequency of the single-pole low-pass filter is controlled by
using register V+24 in the loop parameter table, the filter constant. The data format of the
filter constant value is BCD, with an implied decimal point 00X.X, as follows:
12
• The filter constant has a valid range of 000.1 to 001.0. The smaller the filter value, the greater the
filtering performed (for example, the value 001.0 provides no filtering.)
13
• DirectSOFT 5 converts values above the valid range to 001.0 and values below this range to 000.1
• Values close to 001.0 result in higher roll-off frequencies, while values closer to 000.1 result in lower
14
roll-off frequencies.
We highly recommend using DirectSOFT 5 for the auto tuning interface. The duration of A
each auto tuning cycle will depend on the mass of your process. A slowly-changing PV will
result in a longer auto tune cycle time. B
When the auto tuning is complete, the proportional and integral gain values are automatically
updated in loop table locations V+10 and V+11 respectively. The derivative is calculated if
you autotune for PID and updated in loop table location V+12. The sample time in V+07 is
C
also updated automatically. You can test the validity of the values the auto tuning procedure
yields by measuring the closed-loop response of the PV to a step change in the output. The D
instructions on how to do this are in the section on the manual tuning procedure.

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–55


Chapter 8: PID Loop Operation

The algorithm which the built-in filter follows is:


1 yi = k (xi – yi–1) + yi–1
yi is the current output of the filter
2 xi is the current input to the filter
yi–1 is the previous output of the filter
k is the PV Analog Input Filter Factor
3 Creating an Analog Filter in Ladder Logic
A similar algorithm can be built in your ladder program. Your analog inputs can be filtered
4 effectively using either method. The following programming example describes the ladder
logic you will need. Be sure to change the example memory locations to those that fit your
5 application.
Filtering can induce a 1 part in 1000 error in your output because of “rounding.” If your
6 process cannot tolerate a 1 part in 1000 error, do not use filtering. Because of the rounding
error, you should not use zero or full scale as alarm points. Additionally, the smaller the filter
constant the greater the smoothing effect, but the slower the response time. Be sure a slower
7 response is acceptable in controlling your process.

8 SP1
LD
Loads the analog signal, which is a BCD value
and has been loaded from V-memory location
V2000 V2000, into the accumulator. Contact SP1 is

9 BIN
always on.
Converts the BCD value in the accumulator
to binary. This instruction is not needed if the
analog value is originally brought in as a

10 BTOR
binary number.

Converts the binary value in the accumulator


to a real number.

11 SUBR
Subtracts the real number stored in location
V1400 from the real number in the
V1400 accumulator, and stores the result in the

12 MULR
accumulator. V1400 is the designated
workspace in this example.
Multiplies the real number in the
accumulator by 0.2 (the filter factor),
R0.2 and stores the result in the
13 ADDR
accumulator. This is the filtered value.
Adds the real number stored in
location V1400 to the real number
V1400 filtered value in the accumulator, and

14 stores the result in the accumulator.

Copies the value in the accumulator


OUTD to location V1400.
V1400
A
Maintenance

Converts the real number in the


RTOB accumulator to a binary value, and
stores the result in the accumulator.

B Converts the binary value in the accumulator


BCD to a BCD number. Note: the BCD instruction
is not needed for PID loop PV (loop PV is a

C binary number).

Loads the BCD number filtered value from


OUT the accumulator into location V1402 to use
V1402
D in your application or PID loop.

8–56 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Use the DirectSOFT 5 Filter Intelligent Box Instruction


For those who are using DirectSOFT 5, you have the opportunity to use Intelligent Box 1
(IBox) instruction IB-402, Filter Over Time in Binary (decimal). This IBox will perform a
first-order filter on the Raw Data on a defined time interval. The equation is,
New = Old + [(Raw - Old) / FDC] where
2
New =New Filtered Value
Old = Old Filtered Value
3
FDC = Filter Divisor Constant
Raw = Raw Data
4
The Filter Divisor Constant is an integer in
the range K1 to K100, such that if it equaled
5
K1, then no filtering is performed.
The rate at which the calculation is performed is specified by time in hundreths of a second
6
(0.01 seconds) as the Filter Freq Time parameter. Note that this Timer instruction is
embedded in the IBox and must NOT be used any other place in your program. Power flow 7
controls whether the calculation is enabled. If it is disabled, the Filter Value is not updated.
On the first scan from Program to Run mode, the Filter Value is initialized to 0 to give the
calculation a consistent starting point.
8
Since the following binary filter example does not write directly to the PID PV location, the
BCD filter could be used with BCD values and then converted to BIN.
9
FilterB Example 10
Following is an example of how the FilterB IBox is used in a ladder program. The instruction
is used to filter a binary value that is in V2000. Timer (T1) is set to 0.5 seconds, the rate at
which the filter calculation will be performed. The filter constant is set to 3.0. A larger value 11
will increase the smoothing effect of the filter. A value of 1 results with no filtering. The
filtered value will be placed in V2100. 12
13
14
A
See Chapter 5, page 242, for more detailed information. B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–57


Chapter 8: PID Loop Operation

1 Ramp/Soak Generator
Introduction
2 Our discussion of basic loop operation noted the setpoint for a loop will be generated in
various ways, depending on the loop operating mode and programming preferences. In the
3 figure below, the ramp/soak generator is one of the ways the SP may be generated. It is the
responsibility of your ladder program to ensure only one source attempts to write the SP value
at V+02 at any particular time.
4 Setpoint Sources:
Operator Input
5 Ramp/soak generator
Ladder Program
Setpoint V+02
 +

Loop
Calculation
Control Output

Another loop’s output (cascade)


6 Process Variable

If the SP for your process rarely changes or can tolerate step changes, you probably will not
7 need to use the ramp/soak generator. However, some processes require precisely-controlled SP
value changes. The ramp/soak generator can greatly reduce the amount of programming required
8 for these applications.
The terms “ramp” and “soak” have special meanings in the SP
9 process control industry, and refer to desired setpoint (SP)
values in temperature control applications. In the figure to Soak
Ramp
the right, the setpoint increases during the ramp segment.
10 It remains steady at one value during the soak segment. slope
Complex SP profiles can be generated by specifying a series
11 of ramp/soak segments. The ramp segments are specified in
Time

SP units per second time. The soak time is also programmable in minutes.
12 It is instructive to view the ramp/soak generator as a dedicated function to generate SP values,
as shown below. It has two categories of inputs which determine the SP values generated. The
13 ramp/soak table must be programmed in advance, containing the values that will define the
ramp/soak profile. The loop reads from the table during each PID calculation as necessary.
The ramp/soak controls are bits in a special loop table word that control the real-time
14 start/stop functionality of the ramp/soak generator. The ladder program can monitor the
status of the ramp soak profile (current ramp/segment number).
A Ramp/soak table
Ramp/soak Setpoint Loop Control Output

B Ramp/soak controls Generator +

Calculation

Process Variable
C
D

8–58 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Now that we have described the general ramp/soak generator operation, we list its specific
features:
• Each loop has its own ramp/soak generator (use is optional).
1
• You may specify up to eight ramp/soak steps (16 segments). 2
• The ramp soak generator can run anytime the PLC is in Run mode. Its operation is independent of
the loop mode (Manual or Auto).
• Ramp/soak real-time controls include Start, Hold, Resume, and Jog.
3
• Ramp/soak monitoring includes Profile Complete, Soak Deviation (SP minus PV), and current
ramp/soak step number. 4
The following figure shows a SP profile consisting of ramp/soak segment pairs. The segments
are individually numbered as steps from 1 to 16. The slope of each of the ramp may be either 5
increasing or decreasing. The ramp/soak generator automatically knows whether to increase
or decrease the SP based on the relative values of a ramp’s end points. These values come from
the ramp/soak table.
6
15 16 7
13 14 Soak

5 6
Ramp
Soak
Ramp
8
3 4 Soak
Step 1 2
Ramp
Soak
Ramp
9
Soak
Ramp
SP 10
Ramp/Soak Table V–Memory Space
11
The parameters which define the ramp/soak
profile for a loop are in a ramp/soak table. Each User Data 12
loop may have its own ramp/soak table, but it is
V2000
optional. Recall the Loop Parameter table consists
a 32-word block of memory for each loop, and
V2037
V2040
LOOP #1
32 words
V2034 =
3000 octal 13
LOOP #2
together they occupy one contiguous memory V2074 =
area. However, the ramp/soak table for a loop is
V2077 32 words
3600 octal 14
individually located, because it is optional for each
loop. An address pointer in location V+34 in the
loop table specifies the starting location of the
V3000 Ramp/Soak #1
32 words
A
ramp/soak table.
In the example to the right, the loop parameter
B
tables for Loop #1 and #2 occupy contiguous 32-
word blocks as shown. Each has a pointer to its V3600 Ramp/Soak #2
32 words
C
ramp/soak table, independently located elsewhere
in user V-memory. Of course, you may locate all
the tables in one group, as long as they do not
D
overlap.

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–59


Chapter 8: PID Loop Operation

The parameters in the ramp/soak table must be user-defined. the most convenient way is to
1 use DirectSOFT 5, which features a special editor for this table. Four parameters are required
to define a ramp and soak segment pair, as pictured below.
2 • Ramp End Value – specifies the destination SP value for the end of the ramp. Use the same data
format for this number as you use for the SP. It may be above or below the beginning SP value, so
the slope could be up or down (we don’t have to know the starting SP value for ramp #1).
3 • Ramp Slope – specifies the SP increase in counts (units) per second. It is a BCD number from
00.00 to 99.99 (uses implied decimal point).
4 • Soak Duration – specifies the time for the soak segment in minutes, ranging from 000.1 to 999.9
minutes in BCD (implied decimal point).

5 • Soak PV Deviation – (optional) specifies an allowable PV deviation above and below the SP value
during the soak period. A PV deviation alarm status bit is generated by the ramp/soak generator.

6 Ramp End
SP Value Ramp/Soak Table
Soak PV
deviation
7 V+00
V+01
XXXX
XXXX
Ramp End SP Value
Ramp Slope
Slope Soak
SP V+02 XXXX Soak Duration
8 duration
segment becomes active
V+03 XXXX Soak PV Deviation

9 The ramp segment becomes active when the previous soak segment ends. If the ramp is the
first segment, it becomes active when the ramp/soak generator is started, and automatically
10 assumes the present SP as the starting SP.

Offset Step Description Offset Step Description


11 + 00 1 Ramp End SP Value + 20 9 Ramp End SP Value
+ 01 1 Ramp Slope + 21 9 Ramp Slope
12 + 02
+ 03
2
2
Soak Duration
Soak PV Deviation
+ 22
+ 23
10
10
Soak Duration
Soak PV Deviation
+ 04 3 Ramp End SP Value + 24 11 Ramp End SP Value
13 + 05 3 Ramp Slope + 25 11 Ramp Slope
+ 06 4 Soak Duration + 26 12 Soak Duration
14 + 07
+ 10
4
5
Soak PV Deviation
Ramp End SP Value
+ 27
+ 30
12
13
Soak PV Deviation
Ramp End SP Value
+ 11 5 Ramp Slope + 31 13 Ramp Slope
A + 12 6 Soak Duration + 32 14 Soak Duration
+ 13 6 Soak PV Deviation + 33 14 Soak PV Deviation
B + 14
+ 15
7
7
Ramp End SP Value
Ramp Slope
+ 34
+ 35
15
15
Ramp End SP Value
Ramp Slope
+ 16 8 Soak Duration + 36 16 Soak Duration
C + 17 8 Soak PV Deviation + 37 16 Soak PV Deviation

8–60 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Many applications do not require all 16 R/S steps. Use all zeros in the table for unused steps.
The R/S generator ends the profile when it finds ramp slope = 0. 1
Ramp/Soak Table Flags
The individual bit definitions of the Ramp/Soak Table Flag (Addr+33) word is listed in the
following table.
2
Bit Ramp/Soak Flag Bit Description Read/Write Bit=0 Bit=1 3
0 Start Ramp / Soak Profile write – 01 Start
1
2
Hold Ramp / Soak Profile
Resume Ramp / soak Profile
write
write


01 Hold
01 Resume
4
3 Jog Ramp / Soak Profile write – 01 Jog
4
5
Ramp / Soak Profile Complete
PV Input Ramp / Soak Deviation
read
read

Off
Complete
On
5
6 Ramp / Soak Profile in Hold read Off On
7 Reserved read Off On 6
8–15 Current Step in R/S Profile read decode as byte (hex)

Ramp/Soak Generator Enable


7
The main enable control to permit ramp/soak
generation of the SP value is accomplished with bit
PID Mode 1 Setting V+00
8
11 in the PID Mode 1 Setting V+00 word, as shown Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

to the right. The other ramp/soak controls in V+33


shown in the table above will not operate unless this
Ramp/Soak
Generator Enable
9
bit=1 during the entire ramp/soak process.
10
Ramp/Soak Controls
The four main controls for the ramp/soak generator are in bits Ramp/Soak Settings V+33
0 to 3 of the ramp/soak settings word in the loop parameter Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
11
table. DirectSOFT 5 controls these bits directly from the
ramp/soak settings dialog. However, you must use ladder logic
Jog
Resume 12
to control these bits during program execution. We Hold
recommend using the bit-of-word instructions. Start
13
Ladder logic must set a control bit to a “1” to command the corresponding function. When
the loop controller reads the ramp/soak value, it automatically turns off the bit for you.
Therefore, a reset of the bit is not required, when the CPU is in Run Mode.
14
The example program rung to the right shows how an
external switch X0 can turn on, and the PD contact uses X0
Start R/S Generator
B2033.0
A
the leading edge to set the proper control bit to start the SET
ramp soak profile. This uses the Set Bit-of-word B
instruction.
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–61


Chapter 8: PID Loop Operation

The normal state for the ramp/soak control bits is all zeros. Ladder logic must set only one
1 control bit at a time.
• Start – a 0 to 1 transition will start the ramp soak profile. The CPU must be in Run Mode, and the
2 loop can be in Manual or Auto Mode. If the profile is not interrupted by a Hold or Jog command,
it finishes normally.
• Hold – a 0 to 1 transition will stop the ramp/soak profile in its current state, and the SP value will
3 be frozen.
• Resume – a 0 to 1 transition cause the ramp/soak generator to resume operation if it is in the hold
4 state. The SP values will resume from their previous value.
• Jog – a 0 to 1 transition will cause the ramp/soak generator to truncate the current segment (step),
5 and go to the next segment.
Ramp/Soak Profile Monitoring
6 You can monitor the Ramp/Soak profile status using other bits
in the Ramp/Soak Settings V+33 word, shown to the right.
Ramp/Soak Settings V+33

Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

7 • R/S Profile Complete – =1 when the last programmed step is


done.
R/S Profile in Hold
Soak PV Deviation
R/S Profile Complete
• Soak PV Deviation – =1 when the error (SP–PV) exceeds the
8 specified deviation in the R/S table.
• R/S Profile in Hold – =1 when the profile was active but is now
9 in hold. Ramp/Soak Settings V+33
The number of the current step is available in the upper 8 bits Ramp/Soak Settings V+33

10 of the Ramp/Soak Settings V+33 word. The bits represent a 2-


digit hex number, ranging from 1 to 10. Ladder logic can
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

monitor these to synchronize other parts of the program with Current Profile Step, 2–digit hex
11 the ramp/soak profile. Load this word to the accumulator and Value = 01 to 10 hex,
or 1 to 16 decimal
shift right 8 bits, and you have the step number.
12 Ramp/Soak Programming Errors
The starting address for the ramp/soak table must be a valid Ramp/Soak Table Error V+35

13 location. If the address points outside the range of user V- Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0


memory, one of the bits to the right will turn on when the
Starting Address set in
ramp/soak generator is started. We recommend using
14 DirectSOFT 5 to configure the ramp/soak table. It
reserved system V-memory
Starting Address set out of
V-memory upper range
automatically range checks the addresses for you.
A Testing Your Ramp/Soak Profile
Starting Address set out
of V-memory lower range

It’s a good idea to test your ramp/soak profile before using it to control the process. This is
B easy to do, because the ramp/soak generator will run even when the loop is in Manual Mode.
Using DirectSOFT 5’s PID View will be a real time-saver, because it will draw the profile on-
C screen for you. Be sure to set the trending timebase slow enough to display completed ramp-
soak segment pairs in the waveform window.
D

8–62 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

DirectSOFT 5 Ramp/Soak Example


The following following example will step you through the Ramp/Soak setup.
1
Setup the Profile in PID Setup
The first step is to use Setup PID in DirectSOFT 5 to set the profile of your process. Open
2
the Setup PID window and select the R/S tab, and then enter the Ramp and Soak data.
3
4
5
6
7
8
Program the Ramp/Soak Control in Relay Ladder 9
Refer to the Ramp/Soak Flag Bit Description table on page 8-60 when adding the control
rungs to your program similar to the ladder rungs below. 10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–63


Chapter 8: PID Loop Operation

Test the Profile


1 Test your profile using PID View.

2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D

8–64 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Cascade Control
1
Introduction
Cascaded loops are an advanced control technique that is superior to individual loop control 2
in certain situations. As the name implies, cascade means that one loop is connected to
another loop. In addition to Manual (open loop) and Auto (closed loop) Modes, the DL06
also provides Cascaded Mode.
3
NOTE: Cascaded loops are an advanced process control technique. Therefore we recommend their use only
for experienced process control engineers.
4
When a manufacturing process is complex and contains a lag time from control input to 5
process variable output, even the most perfectly tuned single loop around the process may
yield slow and inaccurate control. It may be the actuator operates on one physical property,
which eventually affects the process variable, measured by a different physical property.
6
Identifying the intermediate variable allows us to divide the process into two parts as shown
in the following figure. 7
PROCESS

Control input Process A


Intermediate
Variable Process B
Process
Variable (PV) 8
The principle of cascaded loops is simply that we add another process loop to more precisely control
9
the intermediate variable! This separates the source of the control lag into two parts, as well.
The diagram below shows a cascade control system, showing that it is simply one loop nested
10
inside another. The inside loop is called the minor loop, and the outside loop is called the
major loop. For overall stability, the minor loop must be the fastest responding loop of the 11
two (try a factor of 10 for a better response time). We do have to add the additional sensor to
measure the intermediate variable (PV for process A). Notice the setpoint for the minor loop
is automatically generated for us, by using the output of the major loop. Once the cascaded
12
control is programmed and debugged, we only need to deal with the original setpoint and
process variable at the system level. The cascaded loops behave as one loop, but with 13
improved performance over the previous single-loop solution.
External
Disturbances
External
Disturbances
14
Output B/
Setpoint
+ 
Loop B
Calculation
Setpoint A
+ 
Loop A
Calculation
Output A Process A
(secondary)
Process B
(primary)
A
– –

Major
Minor
Loop
B
Loop PV, Process A

One of the benefits to cascade control can be seen by examining its response to external
PV, Process B
C
disturbances. Remember the minor loop is faster acting than the major loop. Therefore, if a
disturbance affects process A in the minor loop, the Loop A PID calculation can correct the D
resulting error before the major loop sees the effect.

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–65


Chapter 8: PID Loop Operation

Cascaded Loops in the DL06 CPU


1 In the use of the term “cascaded loops”, we must make an important distinction. Only the
minor loop will actually be in the Cascade Mode. In normal operation, the major loop must
2 be in Auto Mode. If you have more than two loops cascaded together, the outer-most (major)
loop must be in Auto Mode during normal operation, and all inner loops in Cascade Mode.

3 NOTE: Technically, both major and minor loops are “cascaded” in strict process control terminology.
Unfortunately, we are unable to retain this convention when controlling loop modes. Remember that all
minor loops will be in Cascade Mode, and only the outer-most (major) loop will be in Auto Mode.
4
You can cascade together as many loops as necessary on the DL06, and you may have
5 multiple groups of cascaded loops. For proper operation on cascaded loops you must use the
same data range (12/15 bit) and unipolar/bipolar settings on the major and minor loop.
6 To prepare a loop for Cascade Mode operation as a minor loop, you must program its remote
Setpoint Pointer in its loop parameter table location V+32, as shown below. The pointer must
be the address of the V+05 location (control output) of the major loop. In Cascade Mode, the
7 minor loop will ignore the its local SP register (V+02), and read the major loop’s control
output as its SP instead.
8 Major Loop (Auto mode) Minor Loop (Cascade Mode)
Loop Table Loop Table

9 V+02 XXXX SP V+02 XXXX SP

V+03 XXXX PV V+03 XXXX PV

10 V+05 XXXX Control Output V+05 XXXX Control Output

11 V+32 XXXX Remote SP Pointer

When using DirectSOFT 5’s PID View to watch the SP value of the minor loop,
12 DirectSOFT 5 automatically reads the major loop’s control output and displays it for the
minor loop’s SP. The minor loop’s normal SP location, V+02, remains unchanged.
13 Now, we use the loop parameter arrangement above and draw its equivalent loop schematic,
shown below.
14
Major loop Minor Cascaded loop
A Loop Control Output V+05 Cascade
Control
Calculation
Remote Setpoint Loop Output
B SP +  Calculation
Local SP

V+02 Auto/Manual Process Variable
C
D Remember that a major loop goes to Manual Mode automatically if its minor loop is taken
out of Cascade Mode.

8–66 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Tuning Cascaded Loops


In tuning cascaded loops, you will need to de-couple the cascade relationship and tune the 1
loops individually, using one of the loop tuning procedures previously covered.
1. If you are not using auto tuning, then find the loop sample rate for the minor loop, using the
method discussed earlier in this chapter. Then set the sample rate of the major loop slower than the
2
minor loop by a factor of 10. Use this as a starting point.
2. Tune the minor loop first. Leave the major loop in Manual Mode, and you will need to generate 3
SP changes for the minor loop manually as described in the loop tuning procedure.
3. Verify the minor loop gives a critically-damped response to a 10% SP change while in Auto Mode.
Then we are finished tuning the minor loop.
4
4. In this step, you will need to get the minor loop in Cascade Mode, and then the Major loop in
Auto Mode. We will be tuning the major loop with the minor loop treated as a series component its
5
overall process. Therefore, do not go back and tune the minor loop again while tuning the major
loop. 6
5. Tune the major loop, following the standard loop tuning procedure in this section. The response of
the major loop PV is actually the overall response of the cascaded loops together. 7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–67


Chapter 8: PID Loop Operation

1 Time-Proportioning Control
The PID loop controller in the DL06 CPU generates a smooth control output signal across a
numerical range. The control output value is suitable to drive an analog output module,
2 which connects to the process. In the process control field, this is called continuous control,
because the output is on (at some level) continuously.
3 While continuous control can be smooth and robust, the cost of the loop components (such
as actuator, heater amplifiers) can be expensive. A simpler form of control is called time-
4 proportioning control. This method uses actuator which are either on or off (no in-between).
Loop components for on/off-based control systems are lower cost than their continuous
control counterparts.
5 In this section, we will show you how to convert the control output of a loop to time-
proportioning control for the applications that need it. Let’s take a moment to review how
6
7
8
9
10
11 alternately turning a load on and off can control a process. The diagram below shows a hot-air
balloon following a path across some mountains. The desired path is the setpoint. The balloon
pilot turns the burner on and off alternately, which is his control output. The large mass of air
12 in the balloon effectively averages the effect of the burner, converting the bursts of heat into a
continuous effect: slowly changing balloon temperature and ultimately the altitude, which is
13 the process variable.
Time-proportioning control approximates continuous control by virtue of its duty-cycle – the
14 ratio of ON time to OFF time. The following figure shows an example of how duty-cycle
approximates a continuous level when it is averaged by a large process mass.
A period

Desired

B Effect

On/Off On
Control Off
C If we were to plot the on/off times of the burner in the hot-air balloon, we would probably
see a very similar relationship to its effect on balloon temperature and altitude.
D

8–68 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

On/Off Control Program Example


The following ladder segment provides a time proportioned on/off control output. It converts 1
the continuous output in V2005 to on/off control using the output coil, Y0.

SP Loop V2005 Time Y0 P


2
+  Calculation Proportioning
Process
V

continuous on/off
3
PV

The example program uses two timers to generate On/Off control. It makes the following
4
assumptions, which you can alter to fit your application:
• The loop table starts at V2000, so the control output is at V2005.
5
• The data format of the control output is 12-bit, unipolar (0 – FFF).
• The time base (one full cycle) for the On/Off waveform is 10 seconds. We use a fast timer (0.01
6
sec/tick), counting to 1000 ticks (10 seconds).
• The On/Off control output is Y0. 7
The time proportioning program must match the resolution of the output (1 part in 1000) to
the resolution of the time base of T0 (also 1 part in 1000). 8
NOTE: Some processes change too fast for time proportioning control. Consider the speed of your process
when you choose this control method. Use continuous control for processes that change too fast for time
9
proportioning control. Also, consider using a solid state switch for a longer switch life instead of a relay.
T0 A fast timer (0.01 sec. timebase) establishes the primary
10
TMRF T0 time interval. The constant, K1000, sets the preset at 10
K1000 seconds (1,000 ticks). The N.C. enabling contact, T0,
makes the timer self-resetting. T0 is on for one scan
each 10 seconds, when it resets itself and T1.
11
T0 At the end of the 10 second period, T0 turns on, and
LD
V2005 loads the control output value (binary) from the loop table
V+05 location (V2005).
The BTOR instruction changes the number in the
12
BTOR
accumulator to a real number.

DIVR
Dividing the control output by 4.095, converts the
0 – 4095 range to 0 – 1000, which “matchs” the
13
R4.095 number of ticks in the 10 second timer range.

RTOB This instruction converts the real number back to


binary. This step prepares the number for conversion
to BCD. There is no real-to-BCD instruction.
14
BCD Convert the number in the accumulator to BCD format.
This satisfies the timer preset format requirement. A
Output the result to V1400. In our example, this is the
OUT location of the timer preset for the second timer.

T0
V1400
The second fast timer also counts in increments of .01
B
TMRF T1 seconds, so its range is variable from 0 to a maximum
V1400 of 1000 ticks, or 10 seconds. This timer’s output, T1,
turns off the output coil, Y0, when the preset is reached.

The N.C. T1 contact, inverts the T1 timer output. The


C
T1 TA1 K0 Y0
control output is on at the beginning of the 10-second time
OUT interval. Y0 turns off when T1 times out. The STRNE
contact prevents Y0 from energizing during the one scan
when T0 resets T1. Y0 is the actual control output.
D
END END coil marks the end of the main program.

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–69


Chapter 8: PID Loop Operation

1 Feedforward Control
Feedforward control is an enhancement to standard closed-loop control. It is most useful for
diminishing the effects of a quantifiable and predictable loop disturbance or sudden change in
2 setpoint. Use of this feature is an option available to you on the DL06. However, it’s best to
implement and tune a loop without feedforward, and adding it only if better loop
3 performance is still needed. The term “feed-forward” refers to the control technique involved,
shown in the diagram below. The incoming setpoint value is fed forward around the PID
equation, and summed with the output.
4 Feedforward path
kf
5
+
Setpoint Loop Control Output
6  Calculation
+  +

7 Process Variable
In the previous section on the bias term, we said that “the bias term value establishes a
8 “working region” or operating point for the control output. When the error fluctuates around
its zero point, the output fluctuates around the bias value.” Now, when there is a change in
setpoint, an error is generated and the output must change to a new operating point. This
9 also happens if a disturbance introduces a new offset in the loop. The loop does not really
“know its way” to the new operating point... the integrator (bias) must increment/decrement
10 until the error disappears, and then the bias has found the new operating point.
Suppose that we are able to know a sudden setpoint change is about to occur (common in
11 some applications). We can avoid much of the resulting error in the first place, if we can
quickly change the output to the new operating point. If we know (from previous testing)
what the operating point (bias value) will be after the setpoint change, we can artificially
12 change the output directly (which is feedforward). The benefits from using feedforward are:
• The SP–PV error is reduced during predictable setpoint changes or loop
13 offset disturbances.
• Proper use of feedforward will allow us to reduce the integrator gain. Reducing integrator gain gives
14 us an even more stable control system.
Feedforward is very easy to use in the DL06 loop controller, as shown below. The bias term
A has been made available to the user in a special read/write location, at PID Parameter Table
location V+04.
B Parameter Table location V+04.

Loop Calculation

C kp P

V+04
Setpoint Error T erm + Control Output
 ki I XXXX 
Bias T erm
D +

+
+

Process Variable kd D

8–70 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

To change the bias (operating point), ladder logic only has to write the desired value to V+04.
The PID loop calculation first reads the bias value from V+04 and modifies the value based
on the current integrator calculation. Then it writes the result back to location V+04. This
1
arrangement creates a sort of “transparent” bias term. All you have to do to implement feed
forward control is write the correct value to the bias term at the right time (see the following 2
example).
NOTE: When writing the bias term, one must be careful to design ladder logic to write the value only once,
3
at the moment when the new bias operating point is to occur. If ladder logic writes the bias value on every
scan, the loop’s integrator is effectively disabled. 4
Feedforward Example
How do we know when to write to the bias term, and what value to write? Suppose we have
5
an oven temperature control loop, and we have already tuned the loop for optimal
performance. Refer to the figure below. We notice that when the operator opens the oven 6
door, the temperature sags a bit while the loop bias adjusts to the heat loss. Then when the
door closes, the temperature rises above the SP until the loop adjusts again. Feedforward 7
Oven Closed
door Open Closed 8
PV PV sags
PV excess
9
10
Bias

11
control can help diminish this effect.
First, we record the amount of bias change the loop controller generates when the door opens 12
or closes. Then, we write a ladder program to monitor the position of an oven door limit
switch. When the door opens, our ladder program reads the current bias value from V+04,
adds the desired change amount, and writes it back to V+04. When the door closes, we
13
duplicate the procedure, but subtracting desired change amount instead. The following figure
Oven Closed
14
Open Closed
door
A
PV

Feed-forward Feed-forward B
Bias
C
shows the results.
The step changes in the bias are the result of our two feed-forward writes to the bias term. We
D
can see the PV variations are greatly reduced. The same technique may be applied for changes
in setpoint.

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–71


Chapter 8: PID Loop Operation

1 PID Example Program


Program Setup for the PID Loop
2 After the PID loop, or loops, have been setup with DirectSOFT 5, you will need to edit your
RLL program to include the rungs needed to setup the analog I/O module to be used by the
3 PID loop(s).
The following example program shows how an RTD module, F0-04RTD, and an analog
4 combination module, F0-2AD2DA-2, are used and setup for a PID loop. This example
assumes that the PID table for loop 1 has a beginning address of V2100.
5 All of the analog I/O modules used with the DL06 are setup in a similar manner. Refer to the
DL05/DL06 Options Manual for the setup information for the particular module that you
will be using.
6 DirectSOFT 5

7
8
Note: The inputs will be read in binary format 0-4095 only if the temperature does not
9 go above 409.5 degrees. Full range is 65535, which equates to 6,553.5 degrees, since the
RTD card reads directly in tenths of a degree. The input resolution of the PID loop needs
to be set based on the max. temperature of the application since the RTD card is always
10 16 bit resolution.

11
12
13
14 Set to read degrees F and select up scale burnout.

A
B
C
D
Program continued on next page

8–72 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Example program continued


1
2
3
4
5
6
7
8
9
10
11
12
Note: The value stored in V1400 must be in the same scale as
the PV value, or tenths of a degree in this example. 13
14
Manual Mode Request
B2100.0 A
Auto Mode Request
B2100.1
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–73


Chapter 8: PID Loop Operation

Note that the modules used in the PID loop example program were set up for binary format.
1 They could have been set up for BCD format. In the later case, the BCD data would have to
be converted to binary format before being stored to the setpoint and process variable, and
the control output would have to be converted from BCD to binary before being stored to
2 the analog output.
By following the steps outlined in this chapter, you should be able to setup workable PID
3 control loops. The DirectSOFT 5 Programming Software Manual provides more information
for the use of PID View.
4 For a step-by-step tutorial, go to the Technical Support section located on our website,
www.automationdirect.com. Once you are at the website, click on Technical Support Home.
5 After this page opens, find and select Guided Tutorials located under the Using Your
Products column. An Animated Tutorial page will open. Under Available Tutorials, find
PID Trainer and select View the Powerpoint slide show and begin viewing the tutorial. The
6 Powerpoint Viewer can be downloaded if your computer does not have Powerpoint installed.

7
8
9
10
11
12
13
14
A
B
C
D

8–74 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Troubleshooting Tips
1
Q. The loop will not go into Automatic Mode.
A. Check the following for possible causes: 2
• A PV alarm exists, or a PV alarm programming error exists.
• The loop is the major loop of a cascaded pair, and the minor loop is not in Cascade Mode. 3
Q. The Control Output stays at zero constantly when the loop is in Automatic
Mode. 4
A. Check the following for possible causes:
• The Control Output upper limit in loop table location V+31 is zero. 5
• The loop is driven into saturation, because the error never goes to zero value and changes (algebraic)
sign. 6
Q. The Control Output value is not zero, but it is incorrect.
A. Check the following for possible causes: 7
• The gain values are entered improperly. Remember, gains are entered in the loop table in BCD,
while the SP and PV are in binary. If you are using DirectSOFT 5, it displays the SP, PV, Bias and
Control output in decimal (BCD), converting it to binary before updating the loop table.
8
Q. The Ramp/Soak Generator does not operate when I activate the Start bit. 9
A. Check the following for possible causes:
• The Ramp/Soak enable bit is off. Check the status of bit 11 of loop parameter table location V+00.
It must be set =1.
10
• The hold bit or other bits in the Ramp/Soak control are on.
• The beginning SP value and the first ramp ending SP value are the same, so first ramp segment has
11
no slope and consequently has no duration. The ramp/soak generator moves quickly to the soak
segment, giving the illusion the first ramp is not working. 12
• The loop is in Cascade Mode, and is trying to get the SP remotely.
• The SP upper limit value in the loop table location V+27 is too low. 13
• Check your ladder program to verify it is not writing to the SP location (V+02 in the loop table). A
quick way to do this is to temporarily place an end coil at the beginning of your program, then go
to PLC Run Mode, and manually start the ramp/soak generator.
14
Q. The PV value in the table is constant, even though the analog module receives A
the PV signal.
A. Your ladder program must read the analog value from the module successfully and write it
into the loop table V+03 location. Verify the analog module is generating the value, and
B
the ladder is working.
Q. The Derivative gain doesn’t seem to have any affect on the output.
C
A. The derivative limit is probably enabled (see section on derivative gain limiting). D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–75


Chapter 8: PID Loop Operation

Q. The loop Setpoint appears to be changing by itself.


1 A. Check the following for possible causes:
• The Ramp/Soak generator is enabled, and is generating setpoints.
2 • If this symptom occurs on loop Manual-to-Auto Mode changes, the loop is in Bumpless Transfer 1.
• Check your ladder program to verify it is not writing to the SP location (V+02 in the loop table). A
3 quick way to do this is to temporarily place an end coil at the beginning of your program, then go
to PLC Run Mode.

4 Q. The SP and PV values I enter with DirectSOFT 5 work okay, but these values
do not work properly when the ladder program writes the data.
A. The PID View in DirectSOFT 5 lets you enter SP, PV, and Bias values in decimal, and
5 displays them in decimal for your convenience. For example, when the data format is 12
bit unipolar, the values range from 0 to 4095. However, the loop table actually requires
6 these in hex, so DirectSOFT 5 converts them for you. The values in the table range from 0
to FFF, for 12-bit unipolar format.
7 Q. The loop seems unstable and impossible to tune, no matter what gains I use.
A. Check the following for possible causes:
8 • The loop sample time is set too long. Refer to the section near the front of this chapter on selecting
the loop update time.
9 • The gains are too high. Start out by reducing the derivative gain to zero. Then reduce the integral
gain, and the proportional gain if necessary.
• There is too much transfer lag in your process. This means the PV reacts sluggishly to control
10 output changes. There may be too much “distance” between actuator and PV sensor, or the actuator
may be weak in its ability to transfer energy into the process.
11 • There may be a process disturbance that is over-powering the loop. Make sure the PV is relatively
steady when the SP is not changing.
12
13
14
A
B
C
D

8–76 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Glossary of PID Loop Terminology


Automatic Mode An operational mode of a loop, in which it makes PID calculations and updates the
1
loop’s control output.
Bias Freeze A method of preserving the bias value (operating point) for a control output, by inhibiting
2
the integrator when the output goes out-of-range. The benefit is a faster loop recovery.
Bias Term In the position form of the PID equation, it is the sum of the integrator and the initial 3
control output value.
Bumpless Transfer A method of changing the operation mode of a loop while avoiding the usual 4
sudden change in control output level. This consequence is avoided by artificially making the SP and
PV equal, or the bias term and control output equal at the moment of mode change. 5
Cascaded Loops A cascaded loop receives its setpoint from the output of another loop. Cascaded loops
have a major/minor relationship, and work together to ultimately control one PV.
6
Cascade Mode An operational mode of a loop, in which it receives its SP from another loop’s output.
Continuous Control Control of a process done by delivering a smooth (analog) signal as the control
output.
7
Control Output The numerical result of a PID equation which is sent by the loop with the intention of
nulling out the current error.
8
Derivative Gain A constant that determines the magnitude of the PID derivative term in response to
the current error.
9
Direct-Acting Loop A loop in which the PV increases in response to a control output increase. In other
words, the process has a positive gain. 10
Error The difference in value between the SP and PV, Error = SP – PV
Error Deadband An optional feature which makes the loop insensitive to errors when they are small.
11
You can specify the size of the deadband.
Error Squared An optional feature which multiplies the error by itself, but retains the original algebraic
12
sign. It reduces the effect of small errors, while magnifying the effect of large errors.
Feedforward A method of optimizing the control response of a loop when a change in setpoint or 13
disturbance offset is known and has a quantifiable effect on the bias term.
Integral Gain A constant that determines the magnitude of the PID integral term in response to the 14
current error.
Major Loop In cascade control, it is the loop that generates a setpoint for the cascaded loop. A
Manual Mode An operational mode of a loop, it which the PID calculations are stopped. The operator
must manually control the loop by writing to the control output value directly. B
Minor Loop In cascade control, the minor loop is the subordinate loop that receives its SP from the
major loop. C
On/Off Control A simple method of controlling a process, through on/off application of energy into
the system. The mass of the process averages the on/off effect for a relatively smooth PV. A simple ladder
program can convert the DL06’s continuous loop output to on/off control.
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–77


Chapter 8: PID Loop Operation

PID Loop A mathematical method of closed-loop control involving the sum of three terms based on
1 proportional, integral, and derivative error values. The three terms have independent gain constants,
allowing one to optimize (tune) the loop for a particular physical system.

2 Position Algorithm The control output is calculated so it responds to the displacement (position) of the
PV from the SP (error term)

3 Process A manufacturing procedure which adds value to raw materials. Process control particularly
refers to inducing chemical changes to the material in process.
Process Variable (PV) A quantitative measurement of a physical property of the material in process,
4 which affects final product quality and is important to monitor and control.
Proportional Gain A constant that determines the magnitude of the PID proportional term in response
5 to the current error.
PV Absolute Alarm A programmable alarm that compares the PV value to alarm threshold values.
6 PV Deviation Alarm A programmable alarm that compares the difference between the SP and PV
values to a deviation threshold value.
7 Ramp/Soak Profile A set of SP values called a profile, which is generated in real time upon each loop
calculation. The profile consists of a series of ramp and soak segment pairs, greatly simplifying the task
8 of programming the PLC to generate such SP sequences.
Rate Also called differentiator, the rate term responds to the changes in the error term.
9 Remote Setpoint The location where a loop reads its setpoint when it is configured as the minor loop in
a cascaded loop topology.
10 Reset Also called integrator, the reset term adds each sampled error to the previous, maintaining a
running total called the bias.
11 Reset Windup A condition created when the loop is unable to find equilibrium, and the persistent error
causes the integrator (reset) sum to grow excessively (windup). Reset windup causes an extra recovery
delay when the original loop fault is remedied.
12 Reverse-Acting Loop A loop in which the PV increases in response to a control output decrease. In
other words, the process has a negative gain.
13 Sampling time The time between PID calculations. The CPU method of process control is called a
sampling controller, because it samples the SP and PV only periodically.
14 Setpoint (SP) The desired value for the process variable. The setpoint (SP) is the input command to the
loop controller during closed loop operation.
A Soak Deviation The soak deviation is a measure of the difference between the SP and PV during a soak
segment of the Ramp/Soak profile, when the Ramp/Soak generator is active.
B Step Response The behavior of the process variable in response to a step change in the SP (in closed
loop operation), or a step change in the control output (in open loop operation)
C Transfer To change from one loop operational mode to another (between Manual, Auto, or Cascade).
The word “transfer” probably refers to the transfer of control of the control output or the SP,
D depending on the particular mode change.
Velocity Algorithm The control output is calculated to represent the rate of change (velocity) for the PV
to become equal to the SP.

8–78 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 8: PID Loop Operation

Bibliography
1
Fundamentals of Process Control Theory, Second Edition Application Concepts of Process Control
Author: Paul W. Murrill
Publisher: Instrument Society of America
Author: Paul W. Murrill
Publisher: Instrument Society of America 2
ISBN 1–55617–297–4 ISBN 1–55617–080–7
PID Controllers: Theory, Design, and Tuning, 2nd Edition Author:
K. Astrom and T Hagglund
Fundamentals of Temperature, Pressure, and Flow Measurements,
Third edition 3
Publisher: Instrument Society of America Author: Robert P. Benedict
ISBN 1–55617–516–7 Publisher: John Wiley and Sons

Process / Industrial Instruments & Controls Handbook, Fourth


ISBN 0–471–89383–8
pH Measurement and Control, Second Edition
4
Edition Author: Gregory K. McMillan
Author (Editor-in-Chief): Douglas M. Considine
Publisher: McGraw-Hill, Inc ISBN 0-07-012445-0
Publisher: Instrument Society of America
ISBN 1–55617–483–7
5
Programmable Controllers Concepts and Applications, First Fundamentals of Programmable Logic Controllers, Sensors, and
Edition
Authors: C.T. Jones and L.A. Bryan
Communications
Author: Jon Stenerson
6
Publisher: International Programmable Controls Publisher: Prentice Hall ISBN 0-13-726860-2
ISBN 0-915425-00-9
Process Control, Third Edition Instrument Engineer’s Handbook Process Measurement and Analysis, Third Edition Instrument
7
Author (Editor-in-Chief): Bela G. Liptak Engineer’s Handbook
Publisher: Chilton. . . . . . . ISBN 0–8019–8242–1 Author (Editor-in-Chief): Bela G. Liptak
Publisher: Chilton. . . . . . . ISBN 0–8019–8197–2 8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 8–79


MAINTENANCE AND CHAPTER
TROUBLESHOOTING
9
In This Chapter...
Hardware System Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–2
Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–2
CPU Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–6
Communications Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–7
I/O Point Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–8
Noise Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–10
Machine Startup and Program Troubleshooting . . . . . . . . . . . . . . .9–11
Chapter 9: Maintenance and Troubleshooting

Hardware System Maintenance


1 Standard Maintenance
2 No regular or preventative maintenance is required for this product (there are no internal batteries);
however, a routine maintenance check (about every one or two months) of your PLC and control
system is good practice, and should include the following items:
3 • Air Temperature – Monitor the air temperature in the control cabinet, so the operating temperature
range of any component is not exceeded.
4 • Air Filter – If the control cabinet has an air filter, clean or replace it periodically as required.
• Fuses or breakers – Verify that all fuses and breakers are intact.
5 • Cleaning the Unit – Check that all air vents are clear. If the exterior case needs cleaning, disconnect
the input power, and carefully wipe the case using a damp cloth. Do not let water enter the case
through the air vents and do not use strong detergents because this may discolor the case.
6
Diagnostics
7
Diagnostics
8 Your DL06 Micro PLC performs many pre-defined diagnostic routines with every CPU scan. The
diagnostics can detect various errors or failures in the PLC. The two primary error classes are fatal and
9 non-fatal.
Fatal Errors
10 Fatal errors are errors which may cause the system to function improperly, perhaps introducing a safety
problem. The CPU will automatically switch to Program Mode if it is in Run Mode. (Remember, in
Program Mode all outputs are turned off.) If the fatal error is detected while the CPU is in Program
11 Mode, the CPU will not allow you to transition to Run Mode until the error has been corrected.
Some examples of fatal errors are:
12 • Power supply failure
• Parity error or CPU malfunction
13 • Particular programming errors
Non-fatal Errors
14 Non-fatal errors are errors that need your attention, but should not cause improper operation. They do
not cause or prevent any mode transitions of the CPU. The application program can use special relay
A contacts to detect non-fatal errors, and even take the system to an orderly shutdown or switch the CPU
to Program Mode if desired. An example of a non-fatal error is:
B • Particular programming errors - The programming devices will notify you of an error if one occurs
while online.

C • DirectSOFT 5 provides the error number and an error message.


• The handheld programmer displays error numbers and short descriptions of the error.

D Appendix B has a complete list of error messages in order by error number. Many error messages point
to supplemental V-memory locations which contain related information. Special relays (SP contacts)
also provide error indications (refer to Appendix D).

9–2 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 9: Maintenance and Troubleshooting

V-memory Error Code Locations


The following table names the specific memory locations that correspond to certain types of
error messages. 1
Diagnostic
Error Class Error Category V-memory 2
User-Defined Error code used with FAULT instruction V7751
Fatal Error code V7755 3
System Error Major Error code V7756
Minor Error code
Address where syntax error occurs
V7757
V7763
4
Grammatical
Error Code found during syntax check V7764
Number of scans since last Program to Run Mode transition V7765 5
Current scan time (ms) V7775
CPU Scan
Minimum scan time (ms)
Maximum scan time (ms)
V7776
V7777
6
Special Relays (SP) Corresponding to Error Codes 7
The special relay table also includes status indicators which can indicate errors. For a more
detailed description of each of these special relays refer to Appendix D. 8
CPU Status Relays Accumulator Status Relays 9
SP11 Forced Run mode SP60 Acc. is less than value
SP12
SP13
Terminal Run mode
Test Run mode
SP61
SP62
Acc. is equal to value
Acc. is greater than value
10
SP15 Test stop mode SP63 Acc. result is zero
SP16 Terminal Program mode SP64 Half borrow occurred 11
SP17 Forced stop SP65 Borrow occurred
SP20
SP22
STOP instruction was executed
Interrupt enabled
SP66
SP67
Half carry occurred
Carry occurred
12
System Monitoring Relays SP70 Result is negative (sign)
SP36 Override setup SP71 Pointer reference error 13
SP37 Scan control error SP73 Overflow
SP40
SP41
Critical error
Non-critical error
SP75
SP76
Data is not in BCD
Load zero
14
SP42 Diagnostics error
SP44 Program memory error A
SP45 I/O error
SP46
SP50
Communications error
Fault instruction was executed
B
SP51 Watchdog timeout
SP52 Syntax error C
SP53 Cannot solve the logic
SP54
SP56
Communication error
Table instruction overrun
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 9–3


Chapter 9: Maintenance and Troubleshooting

DL06 Micro PLC Error Codes


These errors can be generated by the CPU or by the Handheld Programmer, depending on
1 the actual error. Appendix B provides a more complete description of the error codes.
The errors can be detected at various times. However, most of them are detected at power-up,
2 on entry to Run Mode, or when a Handheld Programmer key sequence results in an error or
an illegal request.
3
Error Code Description Error Code Description
4 E003
E004
Software time-out
Invalid instruction(RAM parity error in the CPU)
E526
E527
Unit is offline
Unit is online
E104 Write failed E528 CPU mode
5 E151 Invalid command E540 CPU locked
E311 Communications error 1 E541 Wrong password
6 E312
E313
Communications error 2
Communications error 3
E542
E601
Password reset
Memory full
E316 Communications error 6 E602 Instruction missing
7 E320 Time out E604 Reference missing
E321 Communications error E620 Out of memory
8 E360
E501
HP Peripheral port time-out
Bad entry
E621
E622
EEPROM Memory not blank
No Handheld Programmer EEPROM
E502 Bad address E624 V memory only
9 E503 Bad command E625 Program only
E504 Bad reference / value E627 Bad write operation
10 E505
E506
Invalid instruction
Invalid operation
E628
E640
Memory type error (should be EEPROM)
Mis-compare
E520 Bad operation – CPU in Run E650 Handheld Programmer system error
11 E521 Bad operation – CPU in Test Run E651 Handheld Programmer ROM error
E523 Bad operation – CPU in Test Program E652 Handheld Programmer RAM error
12 E524
E525
Bad operation – CPU in Program
Mode Switch not in Term position

13
14
A
B
C
D

9–4 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 9: Maintenance and Troubleshooting

Program Error Codes


The following table lists program syntax and runtime error codes. Error detection occurs
during a Program-to-Run mode transition, or when you use AUX 21 – Check Program. The 1
CPU will also turn on SP52 and store the error code in V7755. Appendix B provides a more
complete description of the error codes. 2
Error Code Description Error Code Description
3
E4** No Program in CPU E438 Invalid IRT address
E401 Missing END statement E440 Invalid Data Address 4
E402 Missing LBL E441 ACON/NCON
E403
E404
Missing RET
Missing FOR
E451
E453
Bad MLS/MLR
Missing T/C
5
E405 Missing NEXT E454 Bad TMRA
E406 Missing IRT E455 Bad CNT 6
E412 SBR / LBL >64 E456 Bad SR
E421
E422
Duplicate stage reference
Duplicate SBR/LBL reference
E461
E462
Stack Overflow
Stack Underflow
7
E423 Nested loop E463 Logic Error
E431 Invalid ISG/SG address E464 Missing Circuit 8
E433 Invalid ISG / SG address E471 Duplicate coil reference
E434
E435
Invalid RTC
Invalid RT
E472
E473
Duplicate TMR reference
Duplicate CNT reference
9
E436 Invalid INT address E499 Print instruction
E437 Invalid IRTC 10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 9–5


Chapter 9: Maintenance and Troubleshooting

CPU Indicators
1 The DL06 Micro PLCs have indicators on the front to help you determine potential
problems with the system. In normal runtime operation only, the RUN and PWR indicators
2 are on. The table below is a quick reference to potential problems.

Indicator Status Potential Problems


3 PWR (Green LED off)
System voltage incorrect
PLC power supply faulty

4 RUN (Green LED off)


CPU programming error
(CPU in program mode)
Electrical noise interference
5 CPU (Red LED on)
Internal CPU defective
CPU (Blinking Red LED) Low backup battery (refer to page 4-8)

6
PWR Indicator
7 In general there are three reasons for the CPU power status LED (PWR) to be OFF:
1. Power to the unit is incorrect or is not applied.
8 2. PLC power supply is faulty.
3. Other component(s) have the power supply shut down.
9 If the voltage to the power supply is not correct, the PLC may not operate properly or may
not operate at all. Use the following guidelines to correct the problem.
10 WARNING: To minimize the risk of electrical shock, always disconnect the system power before
inspecting the physical wiring.
11 1. First, disconnect the external power.
2. Verify that all external circuit breakers or fuses are still intact.
12 3. Check all incoming wiring for loose connections. If you’re using a separate termination block,
check those connections for accuracy and integrity.
13 4. If the connections are acceptable, reconnect the system power and verify the voltage at the DL06
power input is within specification. If the voltage is not correct, shut down the system and correct
the problem.
14 5. If all wiring is connected correctly and the incoming power is within the specifications, the PLC
internal supply may be faulty.
A The best way to check for a faulty PLC is to substitute a known good one to see if this
corrects the problem. The removable connectors on the DL06 make this relatively easy. If
B there has been a major power surge, it is possible the PLC internal power supply has been
damaged. If you suspect this is the cause of the power supply damage, consider installing an
AC line conditioner to attenuate damaging voltage spikes in the future.
C
D

9–6 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 9: Maintenance and Troubleshooting

RUN Indicator
If the CPU will not enter the Run mode (the RUN indicator is off ), the problem is usually in
the application program, unless the CPU has a fatal error. If a fatal error has occurred, the 1
CPU LED should be on. (You can use a programming device to determine the cause of the
error.) 2
Both of the programming devices, Handheld Programmer and DirectSOFT 5, will return an
error message describing the problem. Depending on the error, there may also be an AUX
function you can use to help diagnose the problem. The most common programming error is
3
“Missing END Statement”. All application programs require an END statement for proper
termination. A complete list of error codes can be found in Appendix B. 4
CPU Indicator
If the CPU indicator is on, a fatal error has occurred in the CPU. Generally, this is not a
5
programming problem but an actual hardware failure. You can power cycle the system to clear
the error. If the error clears, you should monitor the system and determine what caused the 6
problem. You will find this problem is sometimes caused by high frequency electrical noise
introduced into the CPU from an outside source. Check your system grounding and install
electrical noise filters if the grounding is suspected. If power cycling the system does not reset
7
the error, or if the problem returns, you should replace the CPU.
If the CPU indicator is blinking, the backup battery is low (refer to page 3-8).
8
Communications Problems 9
If you cannot establish communications with the CPU, check these items.
• The cable is disconnected. 10
• The cable has a broken wire or has been wired incorrectly.
• The cable is improperly terminated or grounded. 11
• The device connected is not operating at the correct baud rate (9600 baud).
• The device connected to the port is sending data incorrectly, or another application is running on 12
the device.
• A grounding difference exists between the two devices. 13
• Electrical noise is causing intermittent errors.
• The PLC has a bad communication port and should be replaced. 14
For problems in communicating with DirectSOFT 5 on a personal computer, refer to the
DirectSOFT 5 programming user manual. It includes a troubleshooting section that can help A
you diagnose PC problems in communications port setup, address or interrupt conflicts, etc.
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 9–7


Chapter 9: Maintenance and Troubleshooting

I/O Point Troubleshooting


1 Possible Causes
2 If you suspect an I/O error, there are several things that could be causing the problem.
• High-Speed I/O configuration error

3 • A blown fuse in your machine or panel (the DL06 does not have internal I/O fuses)
• A loose terminal block

4 • The auxiliary 24 VDC supply has failed


• The Input or Output Circuit has failed

5 Some Quick Steps


When troubleshooting the DL06 Micro PLCs, please be aware of the following facts which
6 may assist you in quickly correcting an I/O problem.
• HSIO configuration errors are commonly mistaken for I/O point failure during program
development. If the I/O point in question is in X0–X2, or Y0–Y1, check all parameter locations
7 listed in Chapter 3 that apply to the HSIO mode you have selected.
• The output circuits cannot detect shorted or open output points. If you suspect one or more faulty
8 points, measure the voltage drop from the common to the suspect point. Remember when using a
Digital Volt Meter, leakage current from an output device such as a triac or a transistor must be
considered. A point which is off may appear to be on if no load is connected the point.
9 • The I/O point status indicators are logic-side indicators. This means the LED which indicates the
on or off status reflects the status of the point with respect to the CPU. On an output point the
10 status indicators could be operating normally while the actual output device (transistor, triac etc.)
could be damaged. With an input point, if the indicator LED is on, the input circuitry is probably
operating properly. Verify the LED goes off when the input signal is removed.
11 • Leakage current can be a problem when connecting field devices to an I/O point. False input signals
can be generated when the leakage current of an output device is great enough to turn on the
12 connected input device. To correct this install a resistor in parallel with the input or output of the
circuit. The value of this resistor will depend on the amount of leakage current and the voltage
applied but usually a 10K to 20K resistor will work. Verify the wattage rating of the resistor is
13 correct for your application.
• Because of the removable terminal blocks on the DL06, the easiest method to determine if an I/O
14 circuit has failed is to replace the unit if you have a spare. However, if you suspect a field device is
defective, that device may cause the same failure in the replacement PLC as well. As a point of
caution, you may want to check devices or power supplies connected to the failed I/O circuit before
A replacing the unit with a spare.

B
C
D

9–8 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 9: Maintenance and Troubleshooting

Output points can be set on or off in the DL06 series CPUs. If you want to do an I/O check-
out independent of the application program, follow the procedure below:
1
Step Action
1
2
Use a handheld programmer or DirectSOFT 5 to communicate online to the PLC.
Change to Program Mode.
2
3 Go to address 0.

4 Insert an “END” statement at address 0. (This will cause program execution to occur only at address 0 and
prevent the application program from turning the I/O points on or off).
3
5
6
Change to Run Mode.
Use the programming device to set (turn) on or off the points you wish to test.
4
7 When you finish testing I/O points delete the “END” statement at address 0.
5
WARNING: Depending on your application, forcing I/O points may cause unpredictable machine
operation that can result in a risk of personal injury or equipment damage. Make sure you have
taken all appropriate safety precautions prior to testing any I/O points.
6
Handheld Programmer Keystrokes Used to Test an Output Point
7
END
8
X0 X2 X5 X7 Y2 Insert an END statement
at the beginning of the
9
X1 X3 X4 program. This disables
the remainder of the
program.
10
END

From a clear display, use the following keystrokes


11
ST AT ENT
16P STATUS 12
BIT REF X

Use the PREV or NEXT keys to select the Y data type


13
NEXT A
0
ENT
Y 10 Y0 14
A
Use arrow keys to select point, then use Y2 is now on
ON and OFF to change the status
ON Y 10 Y0
B
SHFT
INS

C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 9–9


Chapter 9: Maintenance and Troubleshooting

Noise Troubleshooting
1 Electrical Noise Problems
2 Noise is one of the most difficult problems to diagnose. Electrical noise can enter a system in
many different ways and they fall into one of two categories, conducted or radiated. It may be
difficult to determine how the noise is entering the system but the corrective actions for either
3 of the types of noise problems are similar.
• Conducted noise is when the electrical interference is introduced into the system by way of an
4 attached wire, panel connection ,etc. It may enter through an I/O circuit, a power supply connection,
the communication ground connection, or the chassis ground connection.
• Radiated noise is when the electrical interference is introduced into the system without a direct
5 electrical connection, much in the same manner as radio waves.
Reducing Electrical Noise
6 While electrical noise cannot be eliminated it can be reduced to a level that will not affect the
system.
7 • Most noise problems result from improper grounding of the system. A good earth ground can be
the single most effective way to correct noise problems. If a ground is not available, install a ground
8 rod as close to the system as possible. Ensure all ground wires are single point grounds and are not
daisy chained from one device to another. Ground metal enclosures around the system. A loose wire
can act as a large antenna, introducing noise into the system. Therefore, tighten all connections in
9 your system. Loose ground wires are more susceptible to noise than the other wires in your system.
Review Chapter 2 Installation, Wiring, and Specifications if you have questions regarding how to
ground your system.
10 • Electrical noise can enter the system through the power source for the PLC and I/O circuits.
Installing an isolation transformer for all AC sources can correct this problem. DC sources should be
11 well-grounded good quality supplies.
• Separate input wiring from output wiring. Never run low-voltage I/O wiring close to high voltage
12 wiring.

13
14
A
B
C
D

9–10 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 9: Maintenance and Troubleshooting

Machine Startup and Program Troubleshooting


The DL06 Micro PLCs provide several features that can help you debug your program before 1
and during machine startup. This section discusses the following topics which can be very
helpful.
• Program Syntax Check
2
• Duplicate Reference Check
• Special Instructions
3
• Run Time Edits
• Forcing I/O Points
4
Syntax Check 5
Even though the Handheld Programmer and Direct SOFT 5 provide error checking during
program entry, you may want to check a program that has been modified. Both programming
devices offer a way to check the program syntax. For example, you can use AUX 21, CHECK
6
PROGRAM to check the program syntax from a Handheld Programmer, or you can use the
PLC Diagnostics menu option within Direct SOFT 5. This check will find a wide variety of 7
programming errors. The following example shows how to use the syntax check with a
Handheld Programmer.
Use AUX 21 to perform syntax check
8
CLR C
2
B
1
AUX ENT
AUX 21 CHECK PRO 9
1:SYN 2:DUP REF
10
Select syntax check (default selection)

ENT
(You may not get the busy display BUSY
11
if the program is not very long.)
12
One of two displays will appear
Error Display (example)
13
$00050 E401
MISSING END 14
(shows location in question)

Syntax OK display
A
NO SYNTAX ERROR
? B
See the Error Codes Section for a complete listing of programming error codes. If you get an
error, just press CLR and the Handheld will display the instruction where the error occurred.
C
Correct the problem and continue running the Syntax check until the NO SYNTAX ERROR
message appears. D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 9–11


Chapter 9: Maintenance and Troubleshooting

Special Instructions
There are several instructions that can be used to help you debug your program during
1 machine startup operations.
• END
2 • PAUSE
• STOP
3 END Instruction: If you need a way to quickly disable part of the program, just insert an
END statement prior to the portion that should be disabled. When the CPU encounters the
4 END statement, it assumes that is the end of the program. The following diagram shows an
example.
5 Normal Program New END disables X10 and Y1

X0 X2 Y0 X0 X2 Y0
6 X1 X3 X4 X1 X3 X4

7 X10 Y1
END

8 END
X10 Y1

9 END

10 PAUSE Instruction: This instruction provides a quick way to allow the inputs (or other logic)
to operate while disabling selected outputs. The output image register is still updated, but the
output circuits are not. For example, you could make this conditional by adding an input
11 contact or CR to control the instruction with a switch or a programming device. Or, you
could just add the instruction without any conditions so the selected outputs would be
12 disabled at all times.
PAUSE disables Y0 and Y1
Normal Program

13 X0 X2 Y0 Y0 – Y1
PAUSE

X1 X3 X4
14 X0 X2 Y0

X10 Y1 X1 X3 X4
A X10 Y1
END

B END

C STOP Instruction: Sometimes during machine startup you need a way to quickly turn off all
the outputs and return to Program Mode. You can use the STOP instruction. When this
instruction is executed the CPU automatically exits Run Mode and enters Program Mode.
D Remember, all outputs are turned off during Program Mode. The following diagram shows an
example of a condition that returns the CPU to Program Mode.

9–12 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 9: Maintenance and Troubleshooting

Normal Program STOP puts CPU in Program Mode

X0 X2 Y0

X1 X3 X4
X7
ST OP 1
X0 X2 Y0

X5 Y1 X1 X3 X4 2
END
X5 Y1
3
END
4
In the example shown above, you could trigger X7 which would execute the STOP
instruction. The CPU would enter Program Mode and all outputs would be turned off. 5
Duplicate Reference Check
You can also check for multiple uses of the same output coil. Both programming devices offer 6
a way to check for this condition.. For example, you can AUX 21, CHECK PROGRAM to
check for duplicate references from a Handheld Programmer, or you can use the PLC
Diagnostics menu option within DirectSOFT 5. The following example shows how to
7
perform the duplicate reference check with a Handheld Programmer.
Use AUX 21 to perform syntax check
8
CLR C
2
B
1
AUX ENT AUX 21 CHECK PRO
1:SYN 2:DUP REF
9
Select duplicate reference check 10
(You may not get the busy BUSY
ENT
display if the program is not
very long.)
11
One of two displays will appear 12
$00024 E471
Error Display (example)
(shows location in question)
DUP COIL REF 13
NO DUP REFS
14
Syntax OK display
?
A
If you get an error, just press CLR and the Handheld will display the instruction where the
error occurred. Correct the problem and continue running the Duplicate Reference check
B
until no duplicate references are found.
C
NOTE: You can use the same coil in more than one location, especially in programs containing Stage
instructions and / or OROUT instructions. The Duplicate Reference check will find occurrences, even though
they are acceptable.
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 9–13


Chapter 9: Maintenance and Troubleshooting

Run Time Edits


The DL06 Micro PLC allows you to make changes to the application program during Run
1 Mode. These edits are not “bumpless.” Instead, CPU scan is momentarily interrupted (and
the outputs are maintained in their current state) until the program change is complete. This
2 means if the output is off, it will remain off until the program change is complete. If the
output is on, it will remain on.
3 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
4 damage to equipment. There are some important operational changes during Run Time Edits.
1. If there is a syntax error in the new instruction, the CPU will not enter the Run Mode.
5 2. If you delete an output coil reference and the output was on at the time, the output will remain
on until it is forced off with a programming device.
3. Input point changes are not acknowledged during Run Time Edits, so, if you’re using a high-
6 speed operation and a critical input comes on, the CPU may not see the change.

7 Not all instructions can be edited during a Run Time Edit session. The following list shows
the instructions that can be edited.

8 Mnemonic
TMR Timer
Description Mnemonic Description
Or greater than or equal or less than
OR, ORN (Comparative Boolean)
TMRF Fast timer
9 TMRA Accumulating timer
LD
LDD
Load data (constant)
Load data double (constant)
TMRAF Accumulating fast timer
10 CNT
UDC
Counter
Up / Down counter
ADDD
SUBD
Add data double (constant)
Subtract data double (constant)
MUL Multiply (constant)
SGCNT Stage counter
11 STR, STRN Store, Store not (Boolean)
DIV
CMPD
Divide (constant)
Compare accumulator (constant)
AND, ANDN And, And not (Boolean)
ANDD And accumulator (constant)
12 OR, ORN
STRE, STRNE
Or, Or not (Boolean)
Store equal, Store not equal
ORD Or accumulator (constant)
XORD Exclusive or accumulator (constant)
ANDE, ANDNE And equal, And not equal
13 ORE, ORNE Or equal, Or not equal
LDF
OUTF
Load discrete points to accumulator
Output accumulator to discrete points
STR, STRN Store greater than or equal
14 Store less than (Comparative Boolean)
And greater than or equal
SHFR
SHFL
Shift accumulator right
Shift accumulator left
AND, ANDN And less than (Comparative Boolean) NCON Numeric constant
A
B
C
D

9–14 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 9: Maintenance and Troubleshooting

Run Time Edit Example


X0 X1 Y0
We’ll use the program logic shown to describe
how this process works. In the example, we’ll
OUT
1
C0
change X0 to C10. Note, the example assumes
you have already placed the CPU in Run Mode. 2
Use the MODE key to select Run Time Edits

*MODE CHANGE*
3
MODE NEXT NEXT ENT
RUN TIME EDIT?
4
Press ENT to confirm the Run Time Edits
5
(Note, the RUN LED on the D2–HPP *MODE CHANGE*
ENT
Handheld starts flashing to indicate RUNTIME EDITS
6
Run T ime Edits are enabled.)
Find the instruction you want to change (X0) 7
SHFT X A SHFT FD REF
8
SET 0 FIND
$00000 STR X0
9
Press the arrow key to move to the X. Then enter the new contact (C10).
10
SHFT C B A ENT
RUNTIME EDIT?
2 1 0
STR C10 11
Press ENT to confirm the change. 12
ENT (Note, once you press ENT , the next
address is displayed. OR C0
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 9–15


Chapter 9: Maintenance and Troubleshooting

Forcing I/O Points


1 There are many times, especially during machine startup and troubleshooting, that you need
the capability to force an I/O point to be either on or off. Before you use a programming
device to force any data type, it is important to understand how the DL06 CPUs process the
2 forcing requests.
WARNING: Only authorized personnel fully familiar with all aspects of the application should
3 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.
4 There are two types of forcing available with the DL06 CPUs. (Chapter 3 provides a detailed
description of how the CPU processes each type of forcing request).
5 • 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.
6 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
7 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
8 the Handheld Programmer or by a menu option in DirectSOFT 5. You can
use Bit Override with X, Y, C, T, CT, and S data types. Bit override basically
9 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, the CPU will not change
the state of X1. This means that even if X1 comes on, the CPU will not
10 acknowledge the change. Therefore, if you used X1 in the program, it would
always be evaluated as “off ” in this case. If X1 was on when the bit override
11 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
12 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, the CPU would not change the state of Y0.
However, you can still use a programming device to change the status. If you use the
13 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
14 the point with the results from the application program or from the I/O update until the Bit
Override is removed from the point.
A
B
C
D

9–16 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 9: Maintenance and Troubleshooting

The following diagrams show how the bit override works for both input and output points.
The example uses a simple rung, but the concepts are similar for any type of bit memory.
Program Rung Override holds
1
X0 Y0 previous state and disables
OUT

X0
image register update by CPU
2
override enabled

X0 at input
module
3
X0 in
image register
4
Y0 in
image register 5
The following diagram shows how the bit override works for an output point. Notice the bit
override maintains the output in the current state. If the output is on when the bit override is 6
enabled, then the output stays on. If it is off, then the output stays off.
Program Rung Override holds
7
X0 Y0 previous state and disables
OUT image register update by CPU
8
Y0
override enabled

X0 at
9
input mdoule

Y0 in
image register
10
Y0 at
output module
11
The following diagram shows how you can use a programming device in combination with
the bit override to change the status of the point. Remember, bit override only disables CPU
12
changes. You can still use a programming device to force the status of the point. Plus, since
bit override maintains the current status, this enables true forcing. The example shown is for 13
an output point, but you can also use the other bit data types.
Program Rung The force operation from the
14
X0 Y0 programming device can still
OUT

Y0
change the point status.
A
override enabled
X0 at
input mdoule
B
Y0 force
from programmer C
Y0 in
image register
D
Y0 at
output module

DL06 Micro PLC User Manual, 3rd Edition Rev. A 9–17


Chapter 9: Maintenance and Troubleshooting

The following diagrams show a brief example of how you


could use the DL06 Handheld Programmer to force an
1 I/O point. Remember, if you are using the Bit Override
feature, the CPU will retain the forced value until you
2 disable the Bit Override or until you remove the force. The
image register will not be updated with the status from the
X0 Y0
OUT

input module. Also, the solution from the application


3 program will not be used to update the output image
C0

register. The example assumes you have already placed the


4 CPU into Run Mode.
From a clear display, use the following keystrokes
5
STAT ENT
16P STATUS
6 BIT REF X

7 Use the PREV or NEXT keys to select the Y data type. (Once the Y appears, press 0 to start
at Y0.)
8 NEXT A ENT
Y 10 Y 0
0

9
Use arrow keys to select point, then use ON and OFF to change the status
10 Y2 is now on

11 SHFT ON
INS
Y 10 Y 0

12 Regular Forcing with Direct Access


13 From a clear display, use the following keystrokes to force Y10 ON Solid fill indicates point is
on.

14 Solid fill indicates point is on.


SHFT Y B A SHFT ON

A MLS 1 0 INS
BIT FORCE
Y10

B From a clear display, use the following keystrokes to force Y10 OFF No fill indicates point is
off.
C No fill indicates point is off.

D SHFT Y
MLS
B
1
A
0
SHFT OFF
DEL
BIT FORCE
Y10

9–18 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 9: Maintenance and Troubleshooting

Bit Override Forcing


From a clear display, use the following keystrokes to turn on the override bit for Y10.
1
Solid fill indicates point is on.
X
SET
B
1
A
0
SHFT ON
INS
BIT FORCE 2
SET Y 10
Small box indicates override bit is on. 3
Note, at this point you can use the PREV and NEXT keys to move to adjacent memory
locations and use the SHFT ON keys to set the override bit on. 4
From a clear display, use the following keystrokes to turn off the override bit for Y10. Solid
fill indicates point is on. 5
Solid fill indicates point is on.
for Y10.
S B A SHFT ON
6
RST 1 0 INS
BIT FORCE
RST Y 10
Small box is not present when override bit is off.
7
Like the example above, you can use the PREV and NEXT keys to move to adjacent memory 8
locations and use the SHFT OFF keys to set the override bit off.
Bit Override Indicators 9
Override bit indicators are also shown on the handheld programmer status display. Below are
the keystrokes to call the status display for Y10 – Y20. 10
From a clear display, use the following keystrokes to display the status of Y10 – Y20.

B A
11
STAT ENT NEXT
1 0
ENT Y 20 Y 10
12
Point is on
Override bit is on
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 9–19


CHAPTER
LCD DISPLAY PANEL
10
In This Chapter...
Introduction to the DL06 LCD Display Panel . . . . . . . . . . . . . . . . .10–2
Keypad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–2
Snap-in installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–3
Display Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–4
Menu Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–5
Confirm PLC Type, Firmware Revision Level, Memory Usage, Etc. .10–6
Examining Option Slot Contents . . . . . . . . . . . . . . . . . . . . . . . . . .10–8
Monitoring and Changing Data Values . . . . . . . . . . . . . . . . . . . .10–10
Bit Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–13
Changing Date and Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–14
Setting Password and Locking . . . . . . . . . . . . . . . . . . . . . . . . . . .10–17
Reviewing Error History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–20
Toggle Light and Beeper, Test Keys . . . . . . . . . . . . . . . . . . . . . . .10–21
PLC Memory Information for the Display . . . . . . . . . . . . . . . . . . .10–22
Changing the Default Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . .10–25
DL06 LCD Display Panel Instruction (LCD) . . . . . . . . . . . . . . . . . .10–26
Chapter 10: LCD Display Panel

Introduction to the DL06 LCD Display Panel


1 The DL06 LCD Display Panel is a 16 character, two row display that mounts directly on the
face of the DL06 PLC. The LCD is backlit for easy readability in most lighting situations.
2 There are multiple ways of interacting with the LCD Display Panel:
• Built-in keypad

3 • LCD ladder instruction


• Using ladder instructions to write bit status changes to specified memory locations

4 The seven function keys on the face of the LCD Display Panel give the user access to clock
and calendar setup, V-memory data values or I/O status, etc. Individuals with password
authorization can:
5 • Change clock or calendar
settings or formats
6 • Monitor or change V-memory
values (including DWord values)
7 • Force individual bits on or off
(up to 16 per screen)
06LOGIC
K oyo
ESC MENU ENT

8 • Review error code history


• Set or change the password

9 • Turn the back light or buzzer on or off


The potential uses for the DL06’s LCD display vary widely. An operator can change values
for setting up batch processes or machine timing for manufacturing different products.
10 Maintenance personnel can interface in the control cabinet to identify machine problems.
LCD messages can be preprogrammed for process events or alarms. The LCD can satisfy
11 these and many other needs.

12 Keypad
The LCD Display Panel keypad has seven keys you can use to navigate through the menu
13 hierarchy. Each screen displayed has a specific set of active keys associated with it. All other
keys (those not associated with the current screen) are inactive.

14 Function Keys
Name Label Function
Left Up Right
A Up arrow
Down arrow
none
none
Move to selection above or increase value
Move to selection below or decrease value
Left arrow none Move to next digit to the left
B Down
Right arrow none Move to next digit to the right
Escape ESC Return to previous screen or next level up in
the menu hierarchy
C Escape
Menu
Enter
Menu MENU Scroll down through main menu or
sub-menu selections
Enter the domain of the menu screen selected
D Enter ENT or save new value

10–2 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 10: LCD Display Panel

Snap-in installation
The LCD Display Panel installs easily 1
into any model DL06 PLC.
Remove the plastic cover (located
between the input and output
OUTPUT: 6-240V
Y
0 1
G

2
LG 0V
AC(L) AC(N) 24V C0

3
Y0
Y1
Y2
Y3
50 - 60Hz

4
C1
Y4
Y5
Y6

5
Y7 Y10 Y12
C2

6
C3 Y15 Y17
Y11 Y13 Y14 Y16 N.C.
2.0A, 6 - 27V

7 10 11
2.0A

12 13
PWR: 100-240V

14 15 16 17
50-60Hz 40VA

20
D0-06DR
21 22 23
2
X
terminals). Press the locking tab of the
cover to release it from its catch, and
INPUT: 12 - 24V 3 - 15mA

press tab
3
slide the cover to the left about 3/8ths
inch. LOGIC 06
K oyo 4
plastic C0 X1 X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23 N.C.
X0 X2 C1 X5 X7 X10 X12 C3 X15 X17 X20 X22 N.C.
cover
PORT
5
The cover should now lift straight out OUTPUT: 6-240V
Y
50 - 60Hz 2.0A, 6 - 27V 2.0A PWR: 100-240V 50-60Hz 40VA
D0-06DR
6
from the slot on the face of the DL06. X
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23

slide
INPUT: 12 - 24V 3 - 15mA

7
and lift cover
LOGIC 06
K oyo
8
WARNING: Remove power to the PLC C0 X1 X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23 N.C.

before installing or removing the LCD


X0 X2 C1 X5 X7 X10 X12 C3 X15 X17 X20 X22 N.C.

POR
9
display.

Place the LCD Display Panel over the AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 N.C.
10
opening but offset approximately 3/8ths OUTPUT: 6-240V 50 - 60Hz 2.0A, 6 - 27V 2.0A PWR: 100-240V 50-60Hz 40VA
D0-06DR
inch to the left. The Display Panel
Y
X
0

INPUT: 12 - 24V
1 2 3

3 - 15mA
4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23
11
should fit easily into the opening.

place
12
LOGIC 06
LCD Display Panel over K oyo

opening C0
X0
X1
X2
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. 13
POR
Slide the Display Panel to the right until 14
the left side of the Display Panel is flush
with the left side of the PLC. The
Display Panel connector will click into
OUTPUT: 6-240V
Y
X
0

INPUT: 12 - 24V
1 2 3
50 - 60Hz

3 - 15mA
4 5
2.0A, 6 - 27V

6 7 10 11
2.0A

12 13
PWR: 100-240V

14 15 16
50-60Hz 40VA

17 20
D0-06DR
21 22 23 A
place.
slide
B
LCD until it clicks 06
into place
LOGIC

C0
K oyo

X0
X1
X2
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.
C
PORT
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 10–3


Chapter 10: LCD Display Panel

Display Priority
1 The LCD Display Panel will show one of the following (unless power is removed from the
PLC):
2 • Default screen (user defined or factory default)
• Menu selection
3 • Message from ladder program
• Error message
4 The built-in keypad allows you to navigate through these message displays.

5
On power-up the default message is
6 normally displayed. The default message D L 0 6 P L C M a y 0 8
is set at the factory but can be 1 3 : 5 7 : 0 1
customized by the user. Loading a
7 custom default message is described later
in this chapter.
8 If a system error occurs, the error
message supercedes the default message D i a g n o s t i c E r r o r
9 (or other current display screen), and the
appropriate error code is displayed for
E 4 * * N O P R O G R A M

diagnostic purposes.
10
11
12
13
14
A
B
C
D

10–4 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 10: LCD Display Panel

Menu Navigation
Beginning at the default screen, each time you press the MENU key the display will scroll to 1
the next menu option. The up arrow and down arrow keys also scroll through the list of
menus (in the direction indicated by the arrow), but you must initially press the MENU key
(at the default screen) to activate the up and down arrow keys.
2
There are seven built-in menus selections. Some of the menu items have sub-menus. The
menus and sub-menus are described in this chapter. Each menu selection requires that you 3
press the ENT key to view or change settings or values within the domain of that main menu
selection. 4
Seven Menu Choices
Pressing and holding the MENU key will cause the display to scroll through the following 5
menu options:
M E N U S C R E E N
> M 1 : P L C I N F O .
6
• M1 : PLC information
• M2 : System configuration > M 2 : S Y S T E M C F G 7
• M3 : Monitor > M 3 : MO N I T O R
• M4 : Calendar read/write
> M 4 : C A L E N D A R R / W
8
• M5 : Password read/write > M 5 : P A S SWO R D R / W
• M6 : Error history read
> M 6 : E R R H I S T O R Y
9
• M7 : LCD test and set
> M 7 : L C D T E S T & S E T
10
In this section we use illustrations of the LCD Display Panel keypad and display area to show
how to navigate through the menu hierarchy. The example below shows the factory default
screen as Screen 1 and the main menu entry screen as Screen 2.
11
The illustration of the keypad between the display screens indicates that pressing the MENU
key causes a transition from Screen 1 to Screen 2. This type of representation is used
12
throughout this section. When inside the menu hierarchy, the ESC key returns the display to
the previous screen. 13
Screen 1 - factory default
D L 0 6 P L C M a y 0 8
14
1 4 : 1 2 : 0 1
A
Press
the MENU key to
transition from screen 1 to B
screen 2.

Screen 2 ESC MENU ENT C


M E N U S C R E E N
> M 1 : P L C I N F O . D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 10–5


Chapter 10: LCD Display Panel

Confirm PLC Type, Firmware Revision Level, Memory Usage, Etc.


1 Menu 1, M1:PLC INFO.
From the default screen, press the Default screen
2 MENU key one time to arrive at the
D L 0 6 P L C M a y 0 8
PLC INFO menu option.
1 4 : 1 2 : 0 1
3
4
5 Step 1.1 ESC MENU ENT

Press ENT to enter this menu selection. M E N U S C R E E N


6 The first screen inside the PLC INFO
selection is M1:PLC TYPE. This
> M 1 : P L C I N F O .

selection displays the model number of


7 the PLC.

8 Step 1.2 ESC MENU ENT

9 M 1 : P L C T Y P E
D 0 - 0 6 D D 1
10
11
12 Step 1.3
ESC MENU ENT

Press MENU again to sequence to PLC


13 MODE. The PLC mode is either RUN,
M 1 : P L C MO D E
R U N
STOP (for Stop or Program Mode),
14 TEST-STOP (for Test Stop Mode), or
TEST-RUN (for Test Run Mode). You
can put the DL06 in the Test Run Mode
A from the Test Stop Mode.
ESC MENU ENT

B
C NOTE: The menu screen examples shown in this section assume the password/lock feature is not turned on.
If the password/lock feature is turned on, the user will be prompted by a message on the Display Panel to
enter the password at the appropriate time. Users without password authorization will have access to a
D limited number of screens.

10–6 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 10: LCD Display Panel

Step 1.4
Press MENU again to sequence to 1
FIRMWARE REV. M 1 : F I R MWA R E R E V .
V 1 . 0 0 0
2
3
Step 1.5 ESC MENU ENT 4
Press MENU again to sequence to
LADDER MEMORY USED. The
number of words used and the total
M 1 : L A D D E R
U S E D 2 1
M E MO R Y
/ 7 6 8 0
5
number available in the PLC are
displayed. 6
7
Step 1.6 ESC MENU ENT

Press MENU again to sequence to M 1 : L A D D E R P A S SWD 8


LADDER PASSWORD, ACTIVATED N O T A C T I V A T E D
OR NOT ACTIVATED. This is the last
screen of the PLC INFO menu and is
9
self-explanatory.
10
Return to Step 1.1 ESC MENU ENT
11
Press ESC to exit the M1 menu and M E N U S C R E E N
return to the main menu. > M 1 : P L C I N F O . 12
13
Default screen ESC MENU ENT
14
Press ESC once more to return to the D L 0 6 P L C M a y 0 8 A
default screen. 1 4 : 2 2 : 1 1
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 10–7


Chapter 10: LCD Display Panel

Examining Option Slot Contents


1 Menu 2, M2:SYSTEM CFG. Step 2.1
2 From the default screen, press MENU
twice to arrive at the M2:SYSTEM CFG. > M 1 : P L C I N F O .
(System Configuration) menu option. > M 2 : S Y S T E M C F G .
3
4
Step 2.2
5 ESC MENU ENT

Press ENT to enter the SYSTEM CFG. M 2 : O P T I O N S L O T 1


6 menu selection. D 0 - D E V N E T S

7 NOTE: This is an example only and may not represent the contents of this or any option slot on your system.

8
9
10 Pressing the MENU key four times will
Step 2.3 ESC MENU ENT

cycle through the four option slots. The M 2 : O P T I O N S L O T 2


11 model number of the option card in each E M P T Y I / O S L O T
slot is shown on line 2 or there is an
12 indication that the slot is empty.

13 Step 2.4 ESC MENU ENT

M 2 : O P T I O N S L O T 3
14 F 0 - 0 4 A D - 1

A
B ESC MENU ENT

C
D

10–8 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 10: LCD Display Panel

Step 2.5
Press the ESC key twice to return to the
default screen.
M 2 : O P T I O N S L O T 4 1
E M P T Y I / O S L O T
2
3
Return to Step 2.1
ESC MENU ENT
4
> M 1 : P L C I N F O .
> M 2 : S Y S T E M C F G . 5
6
Return to default screen ESC MENU ENT
7
D L 0 6 P L C M a y 0 8
1 4 : 5 7 : 2 1
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 10–9


Chapter 10: LCD Display Panel

Monitoring and Changing Data Values


1 Menu 3, M3:MONITOR
From the default screen, press MENU
2 three times to arrive at the Step 3.1
M3:MONITOR menu option.
> M 2 : S Y S T E M C F G .
3 > M 3 : MO N I T O R
The M3:MONITOR sub-menu contains
4 the data monitor and the bit monitor.
The data monitor allows you to examine
the contents of memory registers or
5 pointers to determine their contents. The Step 3.2 ESC MENU ENT

default format is BCD/HEX, but the


M 3 : > D A T A MO N I T O R
6 format can be changed to decimal by
setting bit 8 of V7742. Please refer to the > B I T MO N I T O R
DL06 Memory Map for ranges.
7
8 ESC MENU ENT

Data Monitor
9 Data type = V for V-memory or P for pointer. Step 3.3
Press MENU to change data type, or press
10 ENT to designate the register whose data you
M 3 : D A T A T Y P E V
A D D R E S S 0 0 0 0 0
want to view or change.
11
12
V-memory values Step 3.4 ESC MENU ENT

13 Use the right or left arrow key to move


the cursor to the digit you want to M 3 : D A T A T Y P E V
change. Use the up or down arrow key to A D D R E S S 0 0 0 0 0
14 change the digit. The V-memory address
is expressed as an octal number so you
A will not see 8’s or 9’s.

Step 3.5
B This screen allows you to view two
adjacent V-memory locations in BCD
ESC MENU ENT

M 3 : V 1 V 0
format. The lower word is to the right.
C Pressing ENT makes it possible to change
V A L 0 0 0 0 0 0 0 0

the value in the lower word. At this level The data values on this screen will be four digits
D of the menu hierarchy, you can also use in length for BCD/HEX unless bit 8 of V7742
is set. Bit 8 of V7742 changes the data format to
the up and down arrow keys to scroll to
other memory locations. decimal (five digits).

10–10 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 10: LCD Display Panel

1
Step 3.6 ESC MENU ENT
2
Use the right or left arrow key to move
the cursor to the digit you want to
M 3 : D A T A
C H G = 0 0 0 0
V 0
0 0 0 0
3
change. Use the up or down arrow key to
move to another digit. The V-memory
value is expressed as a BCD number so
4
you will see values (in the range: 0 - F)
available for each digit. The data format 5
can be changed to decimal by setting bit Step 3.7 ESC MENU ENT

8 of V7742.
M 3 : D A T A V 0
6
C H G = A F 0 6 0 0 0 0
7
8
Step 3.8 ESC MENU ENT
9
M 3 : V 1 V 0
V A L 0 0 0 0 A F 0 6 10
11
Returns to
Step 1.1 ESC MENU ENT
12
M 3 : D A T A T Y P E V 13
A D D R E S S 0 0 0 0 0
14
Returns to
A
default screen ESC MENU ENT
B
Push the ESC key five (5) times to return D L 0 6 P L C M a y 0 8
to the default screen. 1 5 : 0 2 : 1 3 C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 10–11


Chapter 10: LCD Display Panel

Pointer values Return to


Step 3.3
Press ESC twice to return to the Step 3.3
1 screen with the cursor on the V, as M 3 : D A T A T Y P E V
shown. Use the up or down arrow key to A D D R E S S 0 0 0 0 0
2 change the V to P. Now, the pointer
information is displayed.

3
Step 3.4a
4 ESC

M 3 : D A T A
MENU ENT

T Y P E P
A D D R E S S 0 0 0 0 0
5
6
Use the up or down arrow keys to change
7 the value of the current digit. Use the left Step 3.5a ESC MENU ENT

or right arrow keys to move from one M 3 : D A T A T Y P E P


8 digit to the next. A D D R E S S 0 0 0 0 0

9
10 Step 3.6a ESC MENU ENT

M 3 : D A T A T Y P E P
11 A D D R E S S 1 0 0 0 0

12
13
14 At Step 3.7a, the up and down arrow
keys can be used to cycle through data
Step 3.7a ESC MENU ENT

M 3 : D A T A P 1 0 0 0 0
words. Each time you press the up or
A down arrow key, the address increments
( V 0 0 0 0 0 ) 2 0 0 0
or decrements by one 16-bit word
B (addresses are expressed in octal).

Return to
C To change from the data monitor to the Step 3.3 ESC MENU ENT

bit monitor, press ESC three times to


D return to Step 3.2 (five times to return to
the default screen).
M 3 : > D A T A
> B I T
MO N I T O R
MO N I T O R

10–12 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 10: LCD Display Panel

Bit Monitor Return to


Bit status Step 3.3
From Step 3.3, press the up or down M 3 : D A T A T Y P E P 1
arrow key, then the ENT key. You will A D D R E S S 0 0 0 0 0
see one of eleven bit data types displayed.
The data type that appears on the display
2
is the last data type accessed. The address
shown is also the last address accessed for Return to 3
that particular data type. Step 3.3 ESC MENU ENT ESC MENU ENT

Press ENT to change the address. M 3 : B I T T Y P E V


4
A D D R E S S 0 0 0 0 0
5
6
Use the arrow keys to change the address
M 3 : B I T
ESC MENU ENT

T Y P E C
7
as necessary.
A D D R E S S 0 0 0 0 0
8
9
ESC MENU ENT 10
Press ENT to view the selected bits. M 3 : B I T T Y P E V
A D D R E S S 0 2 5 0 0 11
12
ESC MENU ENT
13
Use the left and right arrow keys to select
a bit whose status you want to change.
Press ENT once to see the change status
M 3 : B I T - 0 0 V 2 5 0 0
o o o o o o o o o o o o o o o o
14
screen. Press ENT again to change the
status from OFF to ON or ON to OFF. A
ESC MENU ENT
B
M 3 : B I T - 0 2
C H G = O N
V 2 5 0 0
S T A T : O F F
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 10–13


Chapter 10: LCD Display Panel

Changing Date and Time


1 Menu 4, M4 : CALENDAR R/W Step 4.1
2 From the default screen, press the
MENU key four times to arrive at Step > M 3 : D A T A T Y P E
4.1. > M 4 : C A L E N D A R R / W
3
4
Step 4.2
5 ESC MENU ENT

M 4 : D A T E 0 5 - 0 8 - 0 2
6 T I M E 0 1 : 2 1 : 2 8

7
8 Step 4.3 ESC MENU ENT

M 4 : > C H A N G E D A T E
9 > C H A N G E T I M E

10
11 Step 4.4 ESC MENU ENT

At Step 4.4, use the up and down arrows


12 to change the value for month, day, or M 4 : D A T E MM - D D - Y Y
year. Use the left and right arrow keys to C H G = 0 5 - 0 8 - 0 2
13 move between the different digits in the
date. After making the necessary changes
using the arrow keys, press the ENT key
14 to register the changes.
Step 4.5
A ESC

M 4 : D A T E
MENU ENT

MM - D D - Y Y
You will be asked if you want to set the
S E T ? 0 5 - 0 8 - 0 2
B date to the chosen value. Press ENT
again if the date is correct. You will
automatically return to Step 4.2, and the
C new date will be displayed.

D ESC MENU ENT

10–14 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 10: LCD Display Panel

Returns to 1
Step 4.2
In order to change the time or date/time M 4 : D A T E 0 5 - 0 8 - 0 2
2
format, press ENT again at Step 4.2. T I M E 0 1 : 2 1 P M
3
4
Use the up or down arrow keys or the
ESC MENU ENT
5
MENU key to scroll through the sub- M 4 : > C H A N G E D A T E
menu choices. At this point in our > C H A N G E T I M E 6
example, we will change the time setting.
7
ESC MENU ENT
8
M 4 : > C H A N G E
> C H A N G E
T I M E
F O R MT
9
10
11
At Step 4.4, use the up and down arrows ESC MENU ENT

to change the value for hour, minute, or


second. Use the left and right arrow keys M 4 : T I M E H H : MM : S S 12
C H G = 1 3 : 5 3 : 3 2
to move between the different digits in
the time. After making the necessary 13
changes using the arrow keys, press the
ENT key to register the changes. 14
You will be asked if you want to set the
ESC MENU ENT
A
date to the chosen value. Press ENT M 4 : T I M E H H : MM : S S
again if the date is correct. You will S E T ? 1 3 : 5 3 : 3 2 B
automatically return to Step 4.2, and the
new date will be displayed. C
ESC MENU ENT
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 10–15


Chapter 10: LCD Display Panel

Returns to
If you want to change the format for the Step 4.2
1 date or time, return to Step 4.2 and press
M 4 : D A T E 0 5 - 0 8 - 0 2
ENT.
T I M E 0 1 : 2 1 P M
2
3
4 Press ENT, MENU, MENU to arrive at ESC MENU ENT

the menu selection for changing the date


M 4 : > C H A N G E F O R MT
5 or time formats. Press ENT again to
enter the format changing location. > C H A N G E D A T E

6
7 Press ENT again to enter the date format ESC MENU ENT

changing location, or press MENU,


8 ENT to change the time format. M 4 : > D A T E F O R M A T
> T I M E F O R M A T
9
10
At Step 4.4, use the up and down arrow
11 keys to scroll through the date formats.
The choices are as follows:
ESC MENU ENT

M 4 : D A T E F O R M A T
MM-DD-YY (US format)
12 DD-MM-YY (European format)
C H G = MM - D D - Y Y

YY-MM-DD (Asian format)


13 Press the ENT key to save the format
M 4 : T I M E F O R M A T
C H G = H H : MM : S S
changes.
14 If you have chosen to make a time format change, your choices are:
HH:MM US (12 hour 12:00 - 11:59AM/PM US format )
A HH:MM AS (12 hour 00:00 - 11:59AM/PM Asian format )
HH:MM:SS (24 hour format)
B Press the ENT key to save the format changes. Press ESC until the default screen reappears.
C Date and Time Variables and Formats
_date:us US format MM/DD/YY
_date:e European format DD/MM/YY
D _date:a Asian format YY/MM/DD
_time:12 12 hour format HH:MMAM/PM
_time:24 24 hour format HH:MM:SS

10–16 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 10: LCD Display Panel

Setting Password and Locking


1
Menu 5, M5 : PASSWORD R/W
The LCD Display Panel has its own password protection separate from the “ladder password”
protection of the PLC. An LCD Display password can be used to prevent unauthorized
2
changes to clock and calendar setup and V-memory data values. Individuals with password
authorization can change clock, calendar, V-memory values, force bits on or off, etc. 3
The LCD password inhibits unauthorized personnel from modifying the data in the DL06
with the LCD keypad. Even though the LCD password is locked, the user can still modify the 4
data in the DL06 with DirectSOFT 5 or the D2-HPP. The LCD Display Panel does not
support the multi-level password. 5
Only menu 5 on the LCD Display can modify the LCD password.
WARNING: The password protection available in DirectSOFT 5 or the HPP does not prevent 6
changes from the LCD Display Panel. To prevent changes from the LCD Display Panel, it is
necessary to use the LCD password locking feature.
7
WARNING: The LCD password is apparently entered into the PLC, with no possibility to clear it.
If you forget your LCD password, a new PLC must be purchased. 8
Use the MENU key to navigate to the Step 5.1 9
M5 menu option. Press ENT to arrive
> M 4 : C A L E N D A R R / W
at the display shown as Step 5.2.
Assigning a password without locking
> M 5 : P A S SWO R D R / W 10
the display allows access to all features
and capabilities of the LCD. 11
Use the up arrow or down arrow keys
to toggle between PASSWD CHG? Step 5.2 ESC MENU ENT
12
and LOCK/UNLOCK? Eight zeroes
removes the password. If the password
is eight zeroes, the display will not
M 5 : > P A S SWD C H G ?
> L O C K / U N L O C K ?
13
LOCK.
14
A
ESC MENU ENT

M 5 : > P A S SWD C H G ?
B
> L O C K / U N L O C K ?
C
D
ESC MENU ENT

DL06 Micro PLC User Manual, 3rd Edition Rev. A 10–17


Chapter 10: LCD Display Panel

Use the up arrow or down arrow keys to


scroll through number choices, and use the M 5 : P SWD * * * * * * * *
1 right arrow and left arrow keys to move C H G = 0 0 0 0 0 0 0 0
from one digit position to another.
2 NOTE: It is important to record the password where it will not be forgotten and to issue the password only to
qualified personnel. Full access to the LCD Display Panel gives access to change data values within the PLC.
3
4
5 M 5 : P SWD * * * * * * * *
C H G = 2 1 7 0 8 3 0 3
6
7
8 ESC MENU ENT

M 5 : P SWD * * * * * * * *
9 S E T ? 2 1 7 0 8 3 0 3

10
11 Return to
ESC MENU ENT
Step 5.2
12 M 5 : > P A S SWD C H G ?
> L O C K / U N L O C K ?
13
14
It is not possible to lock the display ESC MENU ENT

A without assigning a password. It is


possible to assign a password without M 5 : S T A T : U N L O C K E D
locking the display, but doing so will not E N T T O L O C K
B protect sensitive data.
Press the ENT key at Step 5.2, and the
C display is now locked. If you do not wish
to lock the display at this point, press
D ESC. ESC MENU ENT

10–18 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 10: LCD Display Panel

Return to

Before assigning a password, you can


Step 5.2 1
select “Lock/Unlock” by pressing ENT at M 5 : > P A S SWD C H G ?
Step 5.2. > L O C K / U N L O C K ? 2
3
ESC MENU ENT
4
M 5 : S T A T : U N L O C K E D
E N T T O L O C K
5
6
7
ESC MENU ENT

Here, the display prompts you to enter a M 5 : P SWD * * * * * * * *


8
password. L O C K 0 0 0 0 0 0 0 0
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 10–19


Chapter 10: LCD Display Panel

1 Reviewing Error History Default screen


Step 6.1
Menu 6, M6 : ERR HISTORY
2 From the default screen, press the MENU key > M 5 : P A S SWO R D R / W
> M 6 : E R R H I S T O R Y
six times to arrive at Step 6.1.
3
4
5 The Error History screen will display M 6 : E R R O R
ESC MENU ENT

H I S T O R Y
“NO ERROR” if there is no record of N O E R R O R
6 errors. If errors have occurred, they can
be identified by their Error Code. The
7 Error Code table (see appendix B) will
explain the source of the error message.
The last 16 messages are displayed.Error
8 messages are displaced when a new error D i a g n o s t i c E r r o r
message arrives E 4 * * N O P R O G R A M
9
10
11 To review past error messages use the
ESC MENU ENT

down arrow key to scroll through the M 6 : E r r . 0 5 - 2 2 - 0 2


12 historical record of error messages. E 4 0 1 1 0 : 4 3 A M

13
14
A
B
C
D

10–20 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 10: LCD Display Panel

Toggle Light and Beeper, Test Keys


Menu 7, M7 : LCD TEST&SET
1
This menu selection gives you an opportunity to:
• Test each LCD key to assure that the PLC is receiving its input appropriately
2
• Turn the beep sound off or on 3
• Turn the LCD back light off or on

Make a menu selection by pressing the > M 6 : E R R H I S T O R Y


4
ENT key. > M 7 : L C D T E S T & S E T
5
6
Press ENT to enter the LCD KEY
ESC MENU ENT
7
TEST. All keys can be tested for proper M 7 : L C D T E S T & S E T
function in this menu. > L C D K E Y T E S T 8
To return to the menu, press the ESC
key twice or hold the ESC key down
until the menu layer reappears.
9
ESC MENU ENT
10
Press ENT to enter the Back light test
menu.
M 7 : L C D T E S T & S E T 11
> B A C K L I G H T
12
13
The piezo electric buzzer can be
ESC MENU ENT
14
M 7 : L C D T E S T & S E T
configured to provide pushbutton
feedback.
> B E E P
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 10–21


Chapter 10: LCD Display Panel

PLC Memory Information for the LCD Display Panel


1 The valid memory ranges for storing text messages in the DL06 are:
V400 - V677 V1200 - V7577 V10000 - V17777
2 Data Format Suffixes for Embedded V-memory Data
Several data formats are available for displaying V-memory data on the LCD. The choices are
3 shown in the table below. A colon is used to separate the embedded V-memory location from
the data format suffix and modifier.
4 Data Format Modifier Example Character Position/Content of the Output
V2000 = 0012 1 2 3 4
5 none
(16 bit binary S [:S]
V2000
V2000:S
s s 1 8
1 8
in HEX format) C0 [:C0] V2000:C0 0 0 1 8
6 0 [:0] V2000:0 s s 1 8
V2000 = 0012 1 2 3 4
7 :B S
[:B]
[:BS]
V2000:B
V2000:BS
0 0 1 2
1 2
(4 digit BCD)
C0 [:BC0] V2000:BC0 0 0 1 2
8 0 [:B0] V2000:B0 s s 1 2
V2000 = 0000

9 :D [:D]
V2001 = 0001
V2000:D
1 2 3 4 5 6 7
s s s s s s 6
8
5
9 10 11
5 3 6
(32 bit binary) S [:DS] V2000:DS 6 5 5 3 6
10 C0 [:DC0] V2000:DC0 0 0 0 0 0 0 6 5 5 3 6
0 [:D0] V2000:D0 s s s s s s 6 5 5 3 6

11 V2000 = 0000
V2001 = 0001 1 2 3 4 5 6 7 8
:DB [:DB] V2000:DB 0 0 0 1 0 0 0 0
12 (8 digit BCD) S [:DBS] V2000:DBS 1 0 0 0 0
C0 [:DBC0] V2000:DBC0 0 0 0 1 0 0 0 0

13 0 [:DB0] V2000:DB0
Value = 222.11111
s s s 1 0 0 0 0

V2000 = 1C72
14 :R V2001 = 435E 1 2 3 4 5 6 7 8 9 10 11 12 13
(Floating point [:R] V2000:R s s s f 2 2 2 . 1 1 1 1 1
number)
A S
C0
[:RS] V2000:RS
[:RC0] V2000:RC0
f 2 2 2 . 1 1
f 0 0 0 2 2 2
1
.
1
1
1
1 1 1 1
0 [:R0] V2000:R0 s s s f 2 2 2 . 1 1 1 1 1
B Value = 222.1
V2000 = 199A
:E
C (Floating point [:E]
V2001 = 435E
V2000:E
1 2 3 4 5 6 7
s f 2 . 2 2 1
8
0
9 10 11 12 13
0 E + 0 2
number with
exponent) S [:ES] V2000:ES f 2 . 2 2 1 0 0 E + 0 2
D C0 [:EC0] V2000:EC0 f 2 . 2 2 1 0 0 E + 0 2
0 [:E0] V2000:E0 f 2 . 2 2 1 0 0 E + 0 2
s = space f = plus/minus flag (plus = no symbol, minus = - )

10–22 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 10: LCD Display Panel

The S, C0 and 0 modifiers alter the presentation of leading zeros and spaces. S removes
leading spaces and left justifies the result. C0 replaces leading spaces with leading zeros.
0 is a modification of C0. 0 eleminates any leading zeros in the C0 format version and
1
converts them to spaces.
2
Reserved memory registers for the LCD Display Panel
Two V-memory registers are reserved for making changes to LCD functions via ladder logic.
3
V7742 allows for bit flags to be set in the ladder program. The bit flags control such things as
data formats, the back light, and the beeper. All V7742 bit flags are defined in the table on 4
the next page.
The other reserved register is V7743. This register is used to write a customized default screen 5
message to the LCD. A sample program for this purpose is illustrated later in this chapter.
6
V-memory address Contents
Various LCD flags
7
• Calendar date and time format
V7742
• Default operation menu
• Data format of data monitor
8
• LCD password status flag
• Key press acknowledgement buzzer on/off setting
• Back light on/off setting
9
Default message location (writing 0 to this address returns the
V7743 default message to the factory setting) 10
The following program segment uses the SET and RST coils to turn on and off bit 12 of
V7742. When C0 is on, bit 12 is turned on. Bit 12 turns on the beeper in the LCD Display
11
Panel. The C1 contact resets bit 12 to the off state.
12
C0 B7742.12
SET 13
B7742.12
C1
RST 14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 10–23


Chapter 10: LCD Display Panel

V7742 bit definitions


1 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
2 V7742 * 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Date display format (default = 00)


3 Bit 1, 0
00, 11 = Month/Day/Year (US format)
01 = Day/Month/Year (EU format)
4 10 = Year/Month/Day (Asian format)
Time display format (default = 00)
00, 11 = HH:MM:SS (24 hour format)
5 Bit 3, 2
01 = HH:MM PM/AM (12 hour US format - 12:00 - 11:59)
10 = HH:MM PM/AM (12 hour Asian format - 00:00 - 11:59)
6 Default menu setting (default = 000)
000 = Default menu sequence, begins menu sequence with Menu 1
7 001
010
=
=
Begin menu sequence with Menu 1
Begin menu sequence with Menu 2
Bit 6 - 4 011 = Begin menu sequence with Menu 3
8 100 = Begin menu sequence with Menu 4
101 = Begin menu sequence with Menu 5
9 110
111
=
=
Begin menu sequence with Menu 6
Begin menu sequence with Menu 7
Data monitor format (default = 0)
10 Bit 8 0 = BCD/HEX format (0000 - FFFF)
1 = Decimal format (00000 - 65535)
11 Bit 9
New message overwrite (default = 0)
0 = New LCD message clears both lines of previous message

12 1 = New LCD message leaves previous message, overwrites specified char. only
LCD password status flag (Read only)
Bit 11 0 = Password unlock
13 1 = Password lock
Status flag beep on/off control (default = 0)
14 Bit 12 0
1
= Beep OFF
= Beep ON (LCD beeps continuously during ON status of this flag)

A Bit 13 0 = Beep OFF


Keypad beep on/off control (default = 0)

1 = Beep ON (LCD beeps when keys are pressed)


B LCD back light setting flag (default = 1)
Bit 14 0 = Light OFF
C 1 = Light ON
LCD installed status flag (Read only)
Bit 15
D 0
1
= LCD is not installed
= LCD is installed

10–24 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 10: LCD Display Panel

Changing the Default Screen


Factory default message
At power-up the default screen is 1
displayed. The default screen message is D L 0 6 P L C M a y 0 8
set at the factory but can be customized
by the user. One method of customizing
1 4 : 2 0 : 4 9
2
the default message uses the VPRINT
instruction. The VPRINT instruction is 3
described in Chapter 5.
Example program for setting the default screen message 4
The following program can be used to set up the default screen message. This program uses
the VPRINT instruction to load ASCII text to a designated V-memory location and to
embed a pointer to the current date.
5
The LDA and OUT instructions are used to point to the V-memory location (+1) where the
text is located. The memory location V7743 is reserved for the pointer to the default message.
6
NOTE: The VPRINT instruction adds a one word (2 bytes) non-printing header to the text. For this reason, 7
the LDA instruction points to the V-memory location V10001 rather than V10000.

V10000 00h 16h 8


V10001 u A
SP0
VPRINT
Byte Swap: None
V10002 o t 9
"Print to" Address: V10000 V10003 a m
"AutomationDirect"
V10004 i t 10
V10005 n o
SP0
LDA
O10001
V10006
V10007
i
e
D
r
11
V10010 t c
OUT
V7743 V10011
12
V10012
END V10013 13
V10014
V10015 14
V10016
V10017 A
V10020

After running this program, press MENU, then ESC or cycle power. The new default
B
message should look as indicated. See Menu A u t o m a t i o n D i r e c t
4 instructions for changing date and time C
information.
NOTE: It is possible to return to the factory default screen by writing 0 to V7743 and cycling power.
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 10–25


Chapter 10: LCD Display Panel

DL06 LCD Display Panel


1 Instruction (LCD)
figure A
2 From the DirectSOFT 5 project folder, use the
Instruction Browser to locate the LCD
instruction. When you select the LCD
3 instruction and click OK, the LCD dialog will
appear.
4 The LCD Display Panel instruction is inserted
into the ladder program via the set-up dialog box
5 shown to the right. The dialog is used to specify
a message to be displayed on line 1 or line 2
LCD Display Panel.
6
S l u d g e P i t A l a r m
7 E f f l u e n t O v e r f l o LCD
Line Number: K1
"Sludge Pit Alarm"

8 Source of message figure B


The text of the message can originate from one
9 of two places. It can be input directly from the
instruction as a literal text string (see figure A),
10 or it can originate as ASCII text stored in a V-
memory location (figure B). In the latter case, it
is necessary to specify its beginning V-memory
11 location and length within the dialog box.
Display text strings can include embedded data.
12 Any V-memory value or date and time settings
can be embedded in the displayed text.
13
14 LCD
Line Number: Kn
Starting V Memory Address: A aaa
A Number of Characters:

B NOTE: The LCD Display Panel instruction is supported by DirectSOFT 5, Ver. 5 or later. It is not
supported by the D2-HPP handheld programmer.
C
D

10–26 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 10: LCD Display Panel

ASCII Character Codes


ASCII characters can be written directly to V-
memory locations and then displayed using
ASCII 1
Character Codes
the LCD instruction. The table to the right
shows the two-digit BCD/HEX code for each
(BCD/HEX)
2
character available for display. First Digit

2 3 4 5 6 7 3
0
1
4
2 5
3
4 6
5
7

Second Digit
Example:
6
To display an upper case A, write 41
HEX to the memory location identified
7 8
by the LCD instruction. 8
9 9
A
B
10
C 11
D
E 12
F
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A


10–27
Chapter 10: LCD Display Panel

Example program: alarm with embedded date/time stamp


1 The following program will display the message “Alarm 1”and the time on line K1 of the
display screen with the date on line K2.
2 The one-shot, or positive differential (PDd), is used so that the message displays but does not
block other messages or menu options. Pressing MENU or ESC will cause the alarm message
text to disappear.
3
4 C0 C1
PD

5 C1
LCD
Line Number: K1

6 "Alarm 1 "

LCD

7 Line Number:
_date:us " " _time:12
K2

8 END

9
A l a r m 1
10 0 5 / 0 8 / 0 4 5 : 2 3 P M

11
12
13
14
A
B
C
D

10–28 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Chapter 10: LCD Display Panel

Example program: alarm with embedded V-memory data


In this program example, the alarm notification text is displayed along with the contents of 1
V2500. The suffix “B” is added to the memory location (V2500:B) to cause the data to be
displayed as a BCD number. 2
In the first example, the alarm text is loaded directly via the LCD instruction. In the second
example, the alarm text is loaded into V-memory and the LCD instruction is used to point to
that text.
3
NOTE: When using the LCD instruction to display V2000:R, there is a limit of three characters of text
because V2000:R uses 13 characters.
4
Alarm 1 Active
Alarm 1 LCD Msg
One-shot
5
C0 C1
PD 6
Alarm 1 LCD Msg
One-shot
C1
LCD
7
Line Number:
"Alarm 1"
K1
8
LCD
Line Number: K2 9
"Parts= " V2500:B

END
10
A l a r m 1
11
P a r t s = 2 4 3 7
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A 10–29


Chapter 10: LCD Display Panel

Example program: alarm text from V-memory with embedded V-memory data
This program example uses the VPRINT instruction to write ASCII text (in the appropriate
1 character sequence) to V10000 and V10010. The LCD instruction is used as a pointer to the
V-memory location where the text for each line of the display resides.
2 Alarm 2 LCD Msg
Alarm 2 Active One-shot

3 C0 C1
PD

4 Alarm 2 LCD Msg


One-shot

5 C1
VPRINT
Byte Swap: None
"Print to" Address: V10000
"Alarm 2 "
6 VPRINT
Byte Swap: None

7 Alarm 2 LCD Msg


One-shot
"Print to" Address: V10010
"Parts = " V2500:B " "

8 C1 LCD
Line Number: K1
Starting V Memory Address: V10000
9 Number of Characters: K16

10 LCD
Line Number: K2
Starting V Memory Address: V10010
11 Number of Characters: K16

12 END

13
A l a r m 2
14 P a r t s = 3 5 8 9

A
B
C
D

10–30 DL06 Micro PLC User Manual, 3rd Edition Rev. A


APPENDIX
P P ENDIX
AUXILIARY FUNCTIONS
A
In This Appendix...
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–2
AUX 2* — RLL Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–4
AUX 3* — V-memory Operations . . . . . . . . . . . . . . . . . . . . . . . . . . .A–4
AUX 4* — I/O Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–5
AUX 5* — CPU Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–5
AUX 6* — Handheld Programmer Configuration . . . . . . . . . . . . . . .A–8
AUX 7* — EEPROM Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . .A–8
AUX 8* — Password Operations . . . . . . . . . . . . . . . . . . . . . . . . . . .A–9
Appendix A: Auxiliary Functions

Introduction
A Purpose of Auxiliary Functions
Many CPU setup tasks involve the use of Auxiliary (AUX) Functions. The AUX Functions
perform many different operations, including clearing ladder memory, displaying the scan
2 time, and copying programs to EEPROM in the handheld programmer. They are divided
into categories that affect different system resources. You can access the AUX Functions from
3 DirectSOFT 5 or from the D2–HPP 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
4 needed (or available) with the DirectSOFT 5 package. Even though this Appendix provides
many examples of how the AUX functions operate, you should supplement this information
5 with the documentation for your choice of programming device.
NOTE: the Handheld Programmer may have additional AUX functions that are not supported with the
6 DL06 PLCs.

7 AUX Function and Description DL06 AUX Function and Description DL06
AUX 2* — RLL Operations AUX 6* — Handheld Programmer Configuration
8 21 Check Program * 61 Show Revision Numbers *
22 Change Reference * 62 Beeper On / Off HP

9 23 Clear Ladder Range * 65 Run Self Diagnostics HP


24 Clear All Ladders * AUX 7* — EEPROM Operations
AUX 3* — V-Memory Operations Copy CPU memory to HPP
71 HP
10 31 Clear V Memory * EEPROM
AUX 4* — I/O Configuration 72 Write HPP EEPROM to CPU HP
11 41 Show I/O Configuration
AUX 5* — CPU Configuration
*
73
Compare CPU to HPP
EEPROM
HP
51 Modify Program Name *
12 53 Display Scan Time *
74 Blank Check (HPP EEPROM) HP
54 Initialize Scratchpad * 75 Erase HPP EEPROM HP
13 55
56
Set Watchdog Timer
Set Communication Port 2
*
* 76
Show EEPROM Type (CPU and
HP
HPP)
57 Set Retentive Ranges *
14 58 Test Operations *
AUX 8* — Password Operations
59 Override Setup * 81 Modify Password *
A 5B HSIO Interface Configuration * 82 Unlock CPU *
5D Scan Control Setup * 83 Lock CPU *
B NOTE: * - Supported
HP - Handheld Programmer function
C
D

A–2 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix A: Auxiliary Functions

Accessing AUX Functions via DirectSOFT 5


DirectSOFT 5 provides various menu options during both online and offline programming.
Some of the AUX functions are only available during online programming, some only during A
offline programming, and some during both online and offline programming. The following
diagram shows and example of the PLC operations menu available within DirectSOFT 5. 2
3
4
Menu
Options
5
6
Accessing AUX Functions via the Handheld Programmer 7
You can also access the AUX functions by using a Handheld Programmer. Plus, remember
some of the AUX functions are only available from the Handheld. Sometimes the AUX name
or description cannot fit on one display. If you want to see the complete description, just 8
press the arrow keys to scroll left and right. Also, depending on the current display, you may
have to press CLR more than once. 9
CLR AUX
AUX FUNCTION SELECTION 10
AUX 2* RLL OPERATIONS

Use NXT or PREV to cycle through the menus


11
AUX FUNCTION SELECTION
12
NEXT
AUX 3* V OPERATIONS
13
Press ENT to select sub-menus
14
AUX 3* V OPERATIONS
ENT

AUX 31 CLR V MEMORY A


You can also enter the exact AUX number to go straight to the sub-menu. B
Enter the AUX number directly
C
AUX 3* V OPERATIONS
CLR D
3
B
1
AUX
AUX 31 CLR V MEMORY
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A A–3


Appendix A: Auxiliary Functions

AUX 2* — RLL Operations


A RLL Operations auxiliary functions allow you to perform various operations on the ladder
program.
2 AUX 21 Check Program
Both the Handheld and DirectSOFT 5 automatically check for errors during program entry.
3 However, there may be occasions when you want to check a program that has already been in
the CPU. Two types of checks are available:
4 • Syntax
• Duplicate References

5 The Syntax check will find a wide variety of programming errors, such as missing END
statements. If you perform this check and get an error, see Appendix B for a complete listing
of programming error codes. Correct the problem and then continue running the Syntax
6 check until the message
“NO SYNTAX ERROR” appears.
7 Use the Duplicate Reference check to verify you have not used the same output coil reference
more than once. Note, this AUX function will also find the same outputs even if they have
8 been used with the OROUT instruction, which is perfectly acceptable.
This AUX function is available from the PLC Diagnostics sub-menu in DirectSOFT 5.
9 AUX 22 Change Reference
There will probably be times when you need to change an I/O address reference or control
10 relay reference. AUX 22 allows you to quickly and easily change all occurrences, (within an
address range), of a specific instruction. For example, you can replace every instance of X5
with X10.
11 AUX 23 Clear Ladder Range
There have been many times when we’ve taken existing programs and added or removed
12 certain portions to solve new application problems. By using AUX 23 you can select and
delete a portion of the program. DirectSOFT 5 does not have a menu option for this AUX
13 function, but you can just select the appropriate portion of the program and cut it with the
editing tools.
14 AUX 24 Clear Ladders
AUX 24 clears the entire program from CPU memory. Before you enter a new program, you
A should always clear ladder memory. This AUX function is available on the PLC/Clear PLC
sub-menu within DirectSOFT 5.
B AUX 3* — V-memory Operations
C AUX 31 Clear V-memory
AUX 31 clears all the information from the V-memory locations available for general use.
D This AUX function is available on the PLC/Clear PLC sub-menu within DirectSOFT 5.

A–4 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix A: Auxiliary Functions

AUX 4* — I/O Configuration


AUX 41 Show I/O Configuration
A
This AUX function allows you to display the current I/O configuration on the DL06. Both
the Handheld Programmer and DirectSOFT 5. will show the I/O configuration.
2
AUX 5* — CPU Configuration 3
The following auxiliary AUX functions allow you to setup, view, or change the CPU
configuration. 4
AUX 51 Modify Program Name
DL06 PLCs can use a program name for the CPU program or a program stored on 5
EEPROM in the Handheld Programmer. (Note, you cannot have multiple programs stored
on the EEPROM.) The program name can be up to eight characters in length and can use
any of the available characters (A–Z, 0–9). AUX 51 allows you to enter a program name. You
6
can also perform this operation from within DirectSOFT 5. by using the PLC/Setup sub-
menu. Once you’ve entered a program name, you can only clear the name by using AUX 54 7
to reset the system memory. Make sure you understand the possible effects of AUX 54 before
you use it! 8
AUX 53 Display Scan Time
AUX 53 displays the current, minimum, and maximum scan times. The minimum and 9
maximum times are the ones that have occurred since the last Program Mode to Run Mode
transition. You can also perform this operation from within DirectSOFT 5 by using the
PLC/Diagnostics sub-menu.
10
AUX 54 Initialize Scratchpad
The CPU maintains system parameters in a memory area often referred to as the
11
“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, 12
these changes are stored.
NOTE: You may never have to use this feature unless you have made changes that affect system memory.
13
Usually, you’ll only need to initialize the system memory if you are changing programs and the old program
required a special system setup. You can usually change from program to program without ever initializing 14
system memory.

AUX 54 resets the system memory to the default values. You can also perform this operation
A
from within DirectSOFT 5 by using the PLC/Setup sub-menu.
AUX 55 Set Watchdog Timer
B
DL06 PLCs have a “watchdog” timer that is used to monitor the scan time. The default value
set from the factory is 200 ms. If the scan time exceeds the watchdog time limit, the CPU C
automatically leaves RUN mode and enters PGM mode. The Handheld displays the
following message E003 S/W TIMEOUT when the scan overrun occurs. D
Use AUX 55 to increase or decrease the watchdog timer value. You can also perform this

DL06 Micro PLC User Manual, 3rd Edition Rev. A A–5


Appendix A: Auxiliary Functions

AUX 56 CPU Network Address


Since the DL06 CPU has an additional communication port, you can use the Handheld to
A set the network address for port 2 and the port communication parameters. The default
settings are:
2 • Station address 1
• HEX mode
3 • Odd parity
You can use this port with either the Handheld Programmer, DirectSOFT 5, or, as a
4 communication port for DirectNET and MODBUS. Refer to DirectNET and MODBUS
manuals for additional information about communication settings required for network
5 operation.
NOTE: You will only need to use this procedure if you have port 2 connected to a network. Otherwise, the
6 default settings will work fine.

Use AUX 56 to set the network address and communication parameters. You can also
7 perform this operation from within DirectSOFT 5 by using the PLC/Setup sub-menu.
AUX 57 Set Retentive Ranges
8 DL06 CPUs provide certain ranges of retentive memory by default. Some of the retentive
memory locations are backed up by a super-capacitor, and others are in non-volatile FLASH
9 memory. The FLASH memory locations are V7400 to V7577 (may be non-volatile if MOV instruction
is used). 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
10 settings are:

11 Memory Area
Default Range
DL06
Available Range
Control Relays
12 V-memory
C1000 – C1777
V400 – V37777
C0 – C1777
V0 – V37777
Timers None by default T0 – T377
13 Counters CT0 – CT177 CT0 – CT177
Stages None by default S0 – S1777
14 Use AUX 57 to change the retentive ranges. You can also perform this operation from within
DirectSOFT 5 by using the PLC/Setup sub-menu.
A WARNING: The DL06 CPUs have optional battery-backed RAM which is set as retentive. The
super-capacitor will retain the values in the event of a power loss, but only up to 3 weeks. (The
B retention time may be as short as 4 1/2 days in 60° C operating temperature.

C AUX 58 Test Operations


AUX 58 is used to override the output disable function of the Pause instruction. Use AUX 58
D to program a single output or a range of outputs which will operate normally even when
those points are within the scope of the pause instruction.

A–6 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix A: Auxiliary Functions

AUX 59 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 DirectSOFT 5. Bit override basically disables A
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
2
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”. 3
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 4
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
5
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 6
override is removed from the point. 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 7
enabled.
Bit Override OFF Bit Override ON 8
Input Update
X128 ... X2 X1 X0
Input Update
9
OFF ... ON ON OFF
Force from Y128 ... Y2 Y1 Y0 Force from
Programmer OFF
C377
...
...
ON
C2
ON
C1
OFF
C0
Programmer 10
OFF ... ON OFF OFF
Result of Program
Solution
Image Register (example)
Result of Program
Solution 11
AUX 5B Counter Interface Configuration
12
AUX 5B is used with the High-Speed I/O (HSIO) function to select the configuration. You
can choose the type of counter, set the counter parameters, etc. See Chapter 3 for a complete 13
description of how to select the various counter features.
AUX 5D Select PLC Scan Mode 14
The DL06 CPU has two program scan modes: fixed and variable. In fixed mode, the scan
time is lengthened to the time you specify (in milliseconds). If the actual scan time is longer A
than the fixed scan time, then the error code ’E504 BAD REF/VAL’ is displayed. In variable
scan mode, the CPU begins each scan as soon as the previous scan’s activities complete. B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A A–7


Appendix A: Auxiliary Functions

AUX 6* — Handheld Programmer Configuration


A The following auxiliary functions allow you to setup, view, or change the Handheld
Programmer configuration.
2 AUX 61 Show Revision Numbers
As with most industrial control products, there are cases when additional features and
3 enhancements are made. Sometimes these new features only work with certain releases of
firmware. By using AUX 61 you can quickly view the CPU and Handheld Programmer
firmware revision numbers. This information (for the CPU) is also available from within
4 DirectSOFT 5 from the PLC/Diagnostics sub-menu.
AUX 62 Beeper On/Off
5 The Handheld has a beeper that provides confirmation of keystrokes. You can use Auxiliary
(AUX) Function 62 to turn off the beeper.
6 AUX 65 Run Self Diagnostics
If you think the Handheld Programmer is not operating correctly, you can use AUX 65 to
7 run a self diagnostics program. You can check the following items.
• Keypad
8 • Display
• LEDs and Backlight
9 • Handheld Programmer EEPROM check

10 AUX 7* — EEPROM Operations


The following auxiliary functions allow you to move the ladder program from one area to
11 another and perform other program maintenance tasks.
Transferrable Memory Areas
12 Many of these AUX functions allow you to copy different areas of memory to and from the
CPU and handheld programmer. The following table shows the areas that may be mentioned.
13 Option and Memory Type DL06 Default Range
1:PGM — Program $00000 – $02047
14 2:V — V-memory
3:SYS — System
$00000 – $07777
Non-selectable copies system parameters
4:etc (All)— Program, System and non-volatile V-
A V-memory only
Non-selectable

AUX 71 CPU to HPP EEPROM


B AUX 71 copies information from the CPU memory to an EEPROM installed in the
Handheld Programmer.You can copy different portions of EEPROM (HP) memory to the
C CPU memory as shown in the previous table.

A–8 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix A: Auxiliary Functions

AUX 72 HPP EEPROM to CPU


AUX 72 copies information from the EEPROM installed in the Handheld Programmer to
CPU memory in the DL06. You can copy different portions of EEPROM (HP) memory to A
the CPU memory as shown in the previous table.
AUX 73 Compare HPP EEPROM to CPU 2
AUX 73 compares the program in the Handheld programmer (EEPROM) with the CPU
program. You can compare different types of information as shown previously. 3
AUX 74 HPP EEPROM Blank Check
AUX 74 allows you to check the EEPROM in the handheld programmer to make sure it is 4
blank. It’s a good idea to use this function anytime you start to copy an entire program to an
EEPROM in the handheld programmer. 5
AUX 75 Erase HPP EEPROM
AUX 75 allows you to clear all data in the EEPROM in the handheld programmer. You 6
should use this AUX function before you copy a program from the CPU.
AUX 76 Show EEPROM Type 7
You can use AUX 76 to quickly determine what size EEPROM is installed in the Handheld
Programmer. 8
AUX 8* — Password Operations 9
There are several AUX functions available that you can use to modify or enable the CPU
password. You can use these features during on-line communications with the CPU, or, you
can also use them with an EEPROM installed in the Handheld Programmer during off-line 10
operation. This will allow you to develop a program in the Handheld Programmer and
include password protection. 11
• AUX 81 — Modify Password
• AUX 82 — Unlock CPU 12
• AUX 83 — Lock CPU
AUX 81 Modify Password 13
You can use AUX 81 to provide an extra measure of protection by entering a password that
prevents unauthorized machine operations. The password must be an eight-character numeric 14
(0–9) code. Once you’ve entered a password, you can remove it by entering all zeros
(00000000). (This is the default from the factory.)
Once you’ve entered a password, you can lock the CPU against access. There are two ways to
A
lock the CPU with the Handheld Programmer.
• The CPU is always locked after a power cycle (if a password is present).
B
• You can use AUX 82 and AUX 83 to lock and unlock the CPU.
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A A–9


Appendix A: Auxiliary Functions

You can also enter or modify a password from within DirectSOFT 5 by using the
PLC/Password sub-menu. This feature works slightly differently in DirectSOFT 5. Once
A you’ve entered a password, the CPU is automatically locked when you exit the software
package. It will also be locked if the CPU is power cycled.
2 WARNING: Make sure you remember the password before you lock the CPU. Once the CPU is
locked you cannot view, change, or erase the password. If you do not remember the password, you
3 have to return the CPU to the factory for password removal. It is the policy of Automationdirect to
clear the PLC memory along with the password.

4 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 multi-level
5 password can be invoked by creating a password with an upper case “A” followed by seven numeric characters
(e.g. A1234567).

6 AUX 82 Unlock CPU


AUX 82 can be used to unlock a CPU that has been password protected. DirectSOFT 5 will
7 automatically ask you to enter the password if you attempt to communicate with a CPU that
contains a password.
8 AUX 83 Lock CPU
AUX 83 can be used to lock a CPU that contains a password. Once the CPU is locked, you
9 will have to enter a password to gain access. Remember, this is not necessary with
DirectSOFT 5 since the CPU is automatically locked whenever you exit the software package.
10
11
12
13
14
A
B
C
D

A–10 DL06 Micro PLC User Manual, 3rd Edition Rev. A


A PPPENDIX
P ENDIX
DL06 ERROR CODES
B
In This Appendix...
DL06 Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .B–2
Appendix B: DL06 Error Codes

DL06 Error Codes


1 DL06 Error Code Description
B E001
CPU FATAL ERROR
You may possibly clear the error by power cycling the CPU. If the error returns, replace the
DL06.
E003 If the program scan time exceeds the time allotted to the watchdog timer, this error will
3 SOFTWARE
TIME-OUT
occur. SP51 will be on and the error code will be stored in V7755. To correct this problem
use AUX 55 to extend the time allotted to the watchdog timer.
E041 The DL06 battery is low and should be replaced. SP43 will be on and the error code will be
4 CPU BATTERY LOW stored in V7757.
E104 A write to the DL06 was not successful. Power cycle the DL06. If the error returns, replace
WRITE FAILED the DL06.
5 A parity error has occurred in the application program. SP44 will be on and the error code
E151 will be stored in V7755 .This problem may possibly be due to electrical noise. Clear the
6 BAD COMMAND memory and download the program again. Correct any grounding problems. If the error
returns replace the Micro DL06.
A checksum error has occurred in the system RAM. SP44 will be on and the error code will
7 E155
RAM FAILURE
be stored in V7755. This problem may possibly be due to a low battery, electrical noise or a
CPU RAM failure. Clear the memory and download the program again. Correct any
grounding problems. If the error returns replace the DL06.

8 E2**
I/O MODULE FAILURE An I/O module has failed. Run AUX42 to determine the actual error.

E202 An I/O module has failed to communicate with the DL06 or is missing from the slot. SP45
9 MISSING I/O MODULE will be on and the error code will be stored in V7756. Run AUX42 to determine the slot and
base location of the module reporting the error.
E210 A short duration power drop-out occurred on the main power line supplying power to the
10 POWER FAULT DL06.
This error occurs when the auto configuration check is turned on in the DL06 and the actual
E252 I/O configuration has changed either by moving modules in a base or changing types of
11 NEW I/O CFG modules in a base. You can return the modules to the original position/types or run AUX45
to accept the new configuration. SP47 will be on and the error code will be stored in V7755.
E262 An out of range I/O address has been encountered in the application program. Correct the
12 I/O OUT OF RANGE invalid address in the program. SP45 will be on and the error code will be stored in V7755.
E263 Out of range addresses have been assigned while manually configuring the I/O.
13 CONFIGURED I/O ADDRESS
OUT OF RANGE Correct the address assignments using AUX46.

E311 A request from the handheld programmer could not be processed by the DL06. Clear the
14 HP COMM
ERROR 1
error and retry the request. If the error continues replace the DL06 SP46 will be on and the
error code will be stored in V7756.
E312 A data error was encountered during communications with the DL06. Clear between the two
A HP COMM
ERROR 2
devices, replace the handheld programmer, then if necessary replace the DL06. The error
code will be stored in V7756.
An address error was encountered during communications with the DL06. Clear the error
B E313
HP COMM and retry the request. If the error continues check the cabling between the two devices,
replace the handheld programmer, then if necessary replace the DL06 The error code will be
ERROR 3 stored in V7756.
C E316
HP COMM
A mode error was encountered during communications with the DL06. Clear the error and
retry the request. If the error continues replace the handheld programmer, then if necessary
ERROR 6 replace the DL06. The error code will be stored in V7756.
D E320
HP COMM
The DL06 did not respond to the handheld programmer communication request. Check to
insure cabling is correct and not defective. Power cycle the system. If the error continues,
TIME-OUT replace the DL06 first and then the handheld programmer if necessary.

B–2 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix B: DL06 Error Codes

DL06 Error Code Description


1
E321
COMM ERROR
A data error was encountered during communication with the DL06. Check to insure cabling
is correct and not defective. Power cycle the system and if the error continues replace the
DL06 first and then the handheld programmer if necessary.
B
E4**
NO PROGRAM
A syntax error exists in the application program. The most common is a missing END
statement. Run AUX21 to determine which one of the E4** series of errors is being flagged. 3
SP52 will be on and the error code will be stored in V7755.

E401
MISSING END STATEMENT
All application programs must terminate with an END statement. Enter the END statement in
appropriate location in your program. SP52 will be on and the error code will be stored in
4
V7755.
E402
MISSING LBL
A MOVMC or LDLBL instruction was used without the appropriate label. Refer to Chapter 5
for details on these instructions. SP52 will be on and the error code will be stored in V7755.
5
E403 A subroutine in the program does not end with the RET instruction. SP52 will be on and the
MISSING RET error code will be stored in V7755. 6
E404 A NEXT instruction does not have the corresponding FOR instruction. SP52 will be on and
MISSING FOR
E405
the error code will be stored in V7755.
A FOR instruction does not have the corresponding NEXT instruction. SP52 will be on and
7
MISSING NEXT the error code will be stored in V7755.
E406 An interrupt routine in the program does not end with the IRT instruction. SP52 will be on 8
MISSING IRT and the error code will be stored in V7755.

E412
SBR/LBL>256
There is greater than 256 SBR or DLBL instructions in the program. This error is also
returned if there is greater than 4 INT instructions used in the program. SP52 will be on and
9
the error code will be stored in V7755.
E421
DUPLICATE STAGE REFERENCE
Two or more SG or ISG labels exist in the application program with the same number. A
unique number must be allowed for each Stage and Initial Stage. SP52 will be on and the
10
error code will be stored in V7755.
E422
DUPLICATE LBL
Two or more LBL instructions exist in the application program with the same number. A
unique number must be allowed for each and label. SP52 will be on and the error code will
11
REFERENCE be stored in V7755.
E423
NESTED LOOPS
Nested loops (programming one FOR/NEXT loop inside of another) are not allowed. SP52
will be on and the error code will be stored in V7755.
12
E431
INVALID ISG/SG An ISG or SG instruction must not be placed after the end statement (such as inside a
subroutine). SP52 will be on and the error code will be stored in V7755.
13
ADDRESS

E432
INVALID JUMP (GOTO) ADDRESS
A LBL that corresponds to a GOTO instruction must not be programmed after the end
statement such as in a subroutine. SP52 will be on and the error code will be stored in
14
V7755.
E433
INVALID SBR A SBR must be programmed after the end statement, not in the main body of the program A
ADDRESS or in an interrupt routine. SP52 will be on and the error code will be stored in V7755.

E434
INVALID RTC A RTC must be programmed after the end statement, not in the main body of the program
B
ADDRESS or in an interrupt routine. SP52 will be on and the error code will be stored in V7755.

E435 A RT must be programmed after the end statement, not in the main body of the program or
C
INVALID RT in an interrupt routine. SP52 will be on and the error code will be stored in V7755.
ADDRESS
E436 An INT must be programmed after the end statement, not in the main body of the program.
D
INVALID INT SP52 will be on and the error code will be stored in V7755.
ADDRESS

DL06 Micro PLC User Manual, 3rd Edition Rev. A B–3


Appendix B: DL06 Error Codes

DL06 Error Code Description


E437 An IRTC must be programmed after the end statement, not in the main body of the program.
1 INVALID IRTC
ADDRESS SP52 will be on and the error code will be stored in V7755.
E438 An IRT must be programmed after the end statement, not in the main body of the program.
B INVALID IRT
ADDRESS SP52 will be on and the error code will be stored in V7755.
E440 Either the DLBL instruction has been programmed in the main program area (not after the
INVALID DATA
3 ADDRESS END statement), or the DLBL instruction is on a rung containing input contact(s).

E441 An ACON or NCON must be programmed after the end statement, not in the main body of
4 ACON/NCON
E451
the program. SP52 will be on and the error code will be stored in V7755.
MLS instructions must be numbered in ascending order from top to bottom.
BAD MLS/MLR
5 E452
X AS COIL An X data type is being used as a coil output.
E453 A timer or counter contact is being used where the associated timer or counter does not
6 MISSING T/C
E454
exist.
One of the contacts is missing from a TMRA instruction.
BAD TMRA
E455
7 BAD CNT/UDC One of the contacts is missing from a CNT or UDC instruction.
E456 One of the contacts is missing from the SR instruction.
BAD SR
8 E461 More than nine levels of logic have been stored on the stack. Check the use of OR STR and
STACK AND STR instructions.
OVERFLOW
9 E462 An unmatched number of logic levels have been stored on the stack. Insure the number of
STACK AND STR and OR STR instructions match the number of STR instructions.
UNDERFLOW
10 E463
LOGIC ERROR An STR/STRN instruction was not used to begin a rung of ladder logic.

11 E464
MISSING CKT A rung of ladder logic is not terminated properly.

12 E471
DUPLICATE COIL Two or more OUT instructions reference the same I/O point.
REFERENCE

13 E472
DUPLICATE TMR Two or more TMR instructions reference the same number.
REFERENCE
14 E473
DUPLICATE CNT Two or more CNT instructions reference the same number.
REFERENCE
A E480
INVALID CV ADDRESS
The CV instruction is used in a subroutine or program interrupt routine. The CV instruction
may only be used in the main program area (before the END statement).

B E481
CONFLICTING INSTRUCTION An instruction exists between convergence stages.

E482
C MAX. CV INSTRUCTIONS EXCEEDED Number of CV instructions exceeds 17.

E483 CVJMP has been used in a subroutine or a program interrupt routine.


INVALID CV JUMP ADDRESS
D E484 CVJMP is not preceded by the CV instruction. A CVJMP must immediately follow the CV
MISSING CV INSTRUCTION instruction.

B–4 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix B: DL06 Error Codes

DL06 Error Code Description


E485 A CV JMP instruction is not placed between the CV and the [SG, ISG, ST BLK, END BLK,
MISSING REQUIRED INSTRUCTION END] instruction. 1
E486 CALL BLK is used in a subroutine or a program interrupt routine. The CALL BLK instruction
INVALID CALL BLK ADDRESS may only be used in the main program area (before the END statement).
E487 The CALL BLK instruction is not followed by a ST BLK instruction.
B
MISSING ST BLK INSTRUCTION
E488
INVALID ST BLK ADDRESS
The ST BLK instruction is used in a subroutine or a program interrupt. Another ST BLK
instruction is used between the CALL BLK and the END BLK instructions.
3
E489
DUPLICATE CR REFERENCE The control relay used for the BLK instruction is being used as an output elsewhere. 4
E490 The BLK instruction is not immediately followed by the SG instruction.
MISSING SG INSTRUCTION
E491
5
INVALID ISG INSTRUCTION There is an ISG instruction between the ST BLK and END BLK instructions.
ADDRESS 6
E492 The END BLK instruction is used in a subroutine or a program interrupt routine. The END
INVALID END BLK ADDRESS BLK instruction is not followed by a ST BLK instruction.
E493
7
MISSING END REQUIRED A [CV, SG, ISG, ST BLK, END] instruction must immediately follow the END BLK instruction.
INSTRUCTION
E494
8
MISSING END BLK INSTRUCTION The ST BLK instruction is not followed by a END BLK instruction.

E499 Invalid PRINT instruction usage. Quotations and/or spaces were not entered or entered
9
PRINT incorrectly.
INSTRUCTION
E501 An invalid keystroke or series of keystrokes was entered into the handheld programmer.
10
BAD ENTRY
E502
BAD ADDRESS An invalid or out of range address was entered into the handheld programmer. 11
E503
BAD COMMAND An invalid command was entered into the handheld programmer. 12
E504 An invalid value or reference number was entered with an instruction.
BAD REF/VAL 13
E505 An invalid instruction was entered into the handheld programmer.
INVALID INSTRUCTION
E506 An invalid operation was attempted by the handheld programmer.
14
INVALID OPERATION
E520
BAD OP–RUN An operation which is invalid in the RUN mode was attempted by the handheld programmer. A
E521
BAD OP–TRUN
An operation which is invalid in the TEST RUN mode was attempted by the handheld
programmer. B
E523 An operation which is invalid in the TEST PROGRAM mode was attempted by the handheld
BAD OP–TPGM programmer. C
E524 An operation which is invalid in the PROGRAM mode was attempted by the handheld
BAD OP–PGM programmer.
E525 An operation was attempted by the handheld programmer while the DL06 mode switch was
D
MODE SWITCH in a position other than the TERM position.

DL06 Micro PLC User Manual, 3rd Edition Rev. A B–5


Appendix B: DL06 Error Codes

DL06 Error Code Description


1 E526
OFF LINE
The handheld programmer is in the OFFLINE mode. To change to the ONLINE mode use the
MODE key.
E527 The handheld programmer is in the ON LINE mode. To change to the OFF LINE mode use
B ON LINE
E528
the MODE key.

CPU MODE The operation attempted is not allowed during a Run Time Edit.
3 E540
CPU LOCKED The DL06 has been password locked. To unlock the DL06 use AUX82 with the password.

4 E541
WRONG PASSWORD The password used to unlock the DL06 with AUX82 was incorrect.

E542 The DL06 powered up with an invalid password and reset the password to 00000000. A
5 PASSWORD RESET
E601
password may be re-entered using AUX81.
Attempted to enter an instruction which required more memory than is available in the
MEMORY FULL DL06.
6 E602
INSTRUCTION MISSING A search function was performed and the instruction was not found.

7 E603
DATA MISSING A search function was performed and the data was not found.

E604 A search function was performed and the reference was not found.
8 REFERENCE MISSING
E610
BAD I/O TYPE The application program has referenced an I/O module as the incorrect type of module.
9 E620
OUT OF MEMORY
An attempt to transfer more data between the DL06 and handheld programmer than the
receiving device can hold.

10 E621
EEPROM NOT BLANK
An attempt to write to a non-blank EEPROM in the handheld programmer was made. Erase
the EEPROM and then retry the write.
E622 A data transfer was attempted with no EEPROM (or possibly a faulty EEPROM) installed in
11 NO HPP EEPROM
E623
the handheld programmer.
A function was requested with an EEPROM in the handheld programmer which contains
SYSTEM EEPROM system information only.
12 E624
V-MEMORY ONLY
A function was requested with an EEPROM in the handheld programmer which contains
V-memory data only.

13 E625
PROGRAM ONLY
A function was requested with an EEPROM in the handheld programmer which contains
program data only.
E627 An attempt to write to a faulty EEPROM in the handheld programmer was made. Replace
14 BAD WRITE
E628
the EEPROM if necessary.

EEPROM TYPE ERROR The wrong size EEPROM is being used.


A E640
COMPARE ERROR
A compare between the EEPROM handheld programmer and the DL06 was found to be in
error.

B E642
CHECKSUM ERROR
An error was detected while data was being transferred to the handheld programmer’s
EEPROM. Check cabling and retry the operation.
E650 A system error has occurred in the handheld programmer. Power cycle the handheld
C HPP SYSTEM ERROR
E651
programmer. If the error returns replace the handheld programmer.
A ROM error has occurred in the handheld programmer. Power cycle the handheld
HPP ROM ERROR programmer. If the error returns replace the handheld programmer.
D E652
HPP RAM ERROR
A RAM error has occurred in the handheld programmer. Power cycle the handheld
programmer. If the error returns replace the handheld programmer.

B–6 DL06 Micro PLC User Manual, 3rd Edition Rev. A


A PPPENDIX
P ENDIX
INSTRUCTION EXECUTION
TIMES
In This Appendix...
C
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–2
Instruction Execution Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C–3
Appendix C: Instruction Execution Times

Introduction
1 This appendix contains several tables that provide the instruction execution times for DL06
Micro PLCs. Many of the execution times depend on the type of data used with the
2 instruction. Registers may be classified into the following types:
• Data (word) Registers

C • Bit Registers
V-Memory Data Registers
4 Some V-memory locations are considered data registers, such as timer or counter current
values standard user V-memory is classified as a V-memory data register. Note that you can
load a bit pattern into these types of registers, even though their primary use is for data
5 registers. The following locations are data registers:

6 Data Registers
Timer Current Values V0 - V377
DL06

Counter Current Values V1000 - V1177


7 User Data Words
V400 - V677
V1200 - V7377
V10000 - V17777
8
V-Memory Bit Registers
9 You may recall that some of the discrete points such as X, Y, C, etc. are automatically mapped
into V-memory. The following bit registers contain this data:
10 Bit Registers DL06
Input Points (X) V40400 - V40437
11 Output Points (Y)
Control Relays (C)
V40500 - V40537
V40600 - V40677
Stages (S) V41000 - V41077
12 Timer status Bits V41100 - V41177
Counter status Bits V41140 - V41147
13 Special Relays (SP) V41200 - V41237

How to Read the Tables


14 Some instructions can have more than one parameter. For Two Data Locations Available
example, the SET instruction shown in the ladder program
A to the right can set a single point or a range of points. X0 X1 Y0 – Y7
SET
In these cases, execution times depend on the amount and C0

B type of parameters. The execution time tables list execution


times for both situations, as shown below:
C SET
1st #: X, Y, C, 9.2 µs
Execution depends on
2nd #: X, Y, C, S (N pt) 9.6 µs + 0.9 V x N
numbers of locations and
D RST
1st #:
2nd #:
X, Y, C,
X, Y, C, S (N pt)
9.2 µs
9.6 µs + 0.9 V x N
types of data used

C–2 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix C: Instruction Execution Times

Instruction Execution Times


Boolean Instructions
1
Boolean Instructions DL06
2
Instruction Legal Data Types Execute Not Execute
STR X, Y, C, T, CT, S,SP, GX, GY 0.67 µs 0.00 µs C
STRN X, Y, C, T, CT, S,SP, GX, GY 0.67 µs 0.0 µs
OR
ORN
X, Y, C, T, CT, S,SP, GX, GY
X, Y, C, T, CT, S,SP, GX, GY
0.51 µs
0.55 µs
0.51 µs
0.55 µs
4
AND X, Y, C, T, CT, S,SP, GX, GY 0.42 µs 0.42 µs
ANDN X, Y, C, T, CT, S,SP, GX, GY 0.51 µs 0.51 µs 5
ANDSTR None 0.37 µs 0.37 µs
ORSTR
OUT
None
X, Y, C, GX, GY
0.37 µs
1.82 µs
0.37 µs
1.82 µs
6
OROUT X, Y, C, GX, GY 2.09 µs 2.09 µs
NOT None 1.04 µs 1.04 µs 7
SET 1st #: X, Y, C, S, 9.2 µs 1.0 µs
2nd #: X, Y, C, S (N pt)
1st #: X, Y, C,S, GX, GY
9.6 µs+0.9 µs x N
9.2 µs
1.1 µs
1.0 µs
8
2nd #: X, Y, C,S (N pt), GX, GY 9.6 µs+0.9 µs x N 1.1 µs
RST
1st #: T, CT, GX, GY
2nd #: T, CT (N pt), GX, GY
25.7 µs
16.8 µs + 2.7 µs x N
1.1 µs
1.4 µs
9
1wd: Y 5.6 µs 5.4 µs
PAUSE 2wd: Y (N points) 9.2 µs + 0.3 µs x N 4.8 µs 10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A C–3


Appendix C: Instruction Execution Times

Comparative Boolean Instructions


1 Comparative Boolean Instructions DL06
Instruction Legal Data Types Execute Not Execute
2 1st
V Data Reg.
2nd
V:Data Reg. 7.6 µs 7.6 µs
V:Bit Reg 7.6 µs 7.6 µs
C K:Constant
P:Indir. (Data)
4.8 µs
30.2 µs
4.8 µs
30.2 µs
P:Indir. (Bit) 30.2 µs 30.2 µs
4 V: Bit Reg. V:Data Reg. 7.6 µs 7.6 µs
V:Bit Reg 7.6 µs 7.6 µs
K:Constant 4.8 µs 4.8 µs
5 P:Indir. (Data)
P:Indir. (Bit)
30.2 µs
30.2 µs
30.2 µs
30.2 µs
STRE
6 P:Indir. (Data) V:Data Reg
V:Bit Reg
29.9 µs
29.9 µs
29.9 µs
29.9 µs
K:Constant 27.7 µs 27.7 µs
7 P:Indir. (Data)
P:Indir. (Bit)
51.0 µs
51.0 µs
51.0 µs
51.0 µs

P:Indir. (Bit) V:Data Reg 29.9 µs 29.9 µs


8 V:Bit Reg
K:Constant
29.9 µs
27.7 µs
29.9 µs
27.7 µs
P:Indir. (Data) 51.0 µs 51.0 µs
9 P:Indir. (Bit) 51.0 µs 51.0 µs
1st 2nd

10 V: Data Reg. V:Data Reg.


V:Bit Reg.
K:Constant
7.6 µs
7.6 µs
4.8 µs
7.6 µs
7.6 µs
4.8 µs
P:Indir. (Data) 30.2 µs 30.2 µs
11 P:Indir. (Bit) 30.2 µs 30.2 µs

V: Bit Reg. V:Data Reg. 7.6 µs 7.6 µs


12 V:Bit Reg.
K:Constant
7.6 µs
4.8 µs
7.6 µs
4.8 µs
P:Indir. (Data) 30.2 µs 30.2 µs
P:Indir. (Bit) 30.2 µs 30.2 µs
13 STRNE
P:Indir. (Data) V:Data Reg. 30.3 µs 30.3 µs
V:Bit Reg. 30.3 µs 30.3 µs
14 K:Constant
P:Indir. (Data)
27.4 µs
51.0 µs
27.4 µs
51.0 µs
P:Indir. (Bit) 51.0 µs 51.0 µs
A P:Indir. (Bit) V:Data Reg. 30.3 µs 30.3 µs
V:Bit Reg. 30.3 µs 30.3 µs
K:Constant 27.4 µs 27.4 µs
B P:Indir. (Data)
P:Indir. (Bit)
51.0 µs
51.0 µs
51.0 µs
51.0 µs

C
D

C–4 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix C: Instruction Execution Times

Comparative Boolean Instructions (cont’d)


Comparative Boolean Instructions DL06 1
Instruction Legal Data Types Execute Not Execute
1st
V Data Reg
2nd
V:Data Reg 7.6 µs 7.6 µs
2
V:Bit Reg 7.6 µs 7.6 µs
K:Constant
P:Indir. (Data)
4.8 µs
30.2 µs
4.8 µs
30.2 µs C
P:Indir. (Bit) 30.2 µs 30.2 µs

V: Bit Reg. V:Data Reg.


V:Bit Reg
7.6 µs
7.6 µs
7.6 µs
7.6 µs
4
K:Constant 4.8 µs 4.8 µs
P:Indir. (Data)
P:Indir. (Bit)
30.2 µs
30.2 µs
30.2 µs
30.2 µs
5
ORE
P:Indir. (Data) V:Data Reg
V:Bit Reg
30.3 µs
30.3 µs
30.3 µs
30.3 µs
6
K:Constant 27.4 µs 27.4 µs
P:Indir. (Data) 50.4 µs 50.4 µs
P:Indir. (Bit) 50.4 µs 50.4 µs 7
P:Indir. (Bit) V:Data Reg 30.3 µs 30.3 µs
V:Bit Reg
K:Constant
30.3 µs
27.4 µs
30.3 µs
27.4 µs
8
P:Indir. (Data) 50.4 µs 50.4 µs
P:Indir. (Bit) 50.4 µs 50.4 µs
9
1st 2nd
Data Reg. V:Data Reg. 7.6 µs 7.6 µs
V:Bit Reg.
K:Constant
7.6 µs
4.8 µs
7.6 µs
4.8 µs
10
P:Indir. (Data) 30.2 µs 30.2 µs
P:Indir. (Bit) 30.2 µs 30.2 µs 11
V: Bit Reg. V:Data Reg 7.6 µs 7.6 µs
V:Bit Reg.
K:Constant
7.6 µs
4.8 µs
7.6 µs
4.8 µs 12
P:Indir. (Data) 30.2 µs 30.2 µs
P:Indir. (Bit) 30.2 µs 30.2 µs
ORNE
P:Indir. (Data) V:Data Reg. 29.9 µs 29.9 µs
13
V:Bit Reg. 29.9 µs 29.9 µs
K:Constant
P:Indir. (Data)
27.4 µs
51.0 µs
27.4 µs
51.0 µs
14
P:Indir. (Bit) 51.0 µs 51.0 µs

P:Indir. (Bit) V:Data Reg. 29.9 µs 29.9 µs A


V:Bit Reg. 29.9 µs 29.9 µs
K:Constant 27.4 µs 27.4 µs
P:Indir. (Data)
P:Indir. (Bit)
51.0 µs
51.0 µs
51.0 µs
51.0 µs
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A C–5


Appendix C: Instruction Execution Times

Comparative Boolean Instructions (cont’d)


1
Comparative Boolean Instructions DL06
2 Instruction
1st
Legal Data Types
2nd
Execute Not Execute

V Data Reg. V:Data Reg 7.6 µs 7.6 µs


C V:Bit Reg
K:Constant
7.6 µs
4.8 µs
7.6 µs
4.8 µs
P:Indir. (Data) 30.2 µs 30.2 µs
4 P:Indir. (Bit) 30.2 µs 30.2 µs

V: Bit Reg. V:Data Reg 7.6 µs 7.6 µs


V:Bit Reg 7.6 µs 7.6 µs
5 K:Constant
P:Indir. (Data)
4.8 µs
30.2 µs
4.8 µs
30.2 µs
P:Indir. (Bit) 30.2 µs 30.2 µs
6 ANDE
P:Indir. (Data) V:Data Reg 29.9 µs 29.9 µs
V:Bit Reg 29.9 µs 29.9 µs
7 K:Constant
P:Indir. (Data)
27.4 µs
51.0 µs
27.4 µs
51.0 µs
P:Indir. (Bit) 51.0 µs 51.0 µs

8 P:Indir. (Bit) V:Data Reg


V:Bit Reg
29.9 µs
29.9 µs
29.9 µs
29.9 µs
K:Constant 27.4 µs 27.4 µs
9 P:Indir. (Data)
P:Indir. (Bit)
51.0 µs
51.0 µs
51.0 µs
51.0 µs

10 1st 2nd
V: Data Reg. V:Data Reg. 7.6 µs 7.6 µs
V:Bit Reg. 7.6 µs 7.6 µs
11 K:Constant
P:Indir. (Data)
4.8 µs
30.2 µs
4.8 µs
30.2 µs
P:Indir. (Bit) 30.2 µs 30.2 µs
12 V: Bit Reg. V:Data Reg. 7.6 µs 7.6 µs
V:Bit Reg 7.6 µs 7.6 µs
13 K:Constant
P:Indir. (Data)
P:Indir. (Bit)
4.8 µs
30.2 µs
30.2 µs
4.8 µs
30.2 µs
30.2 µs

14 ANDNE
P:Indir. (Data) V:Data Reg.
V:Bit Reg.
29.9 µs
29.9 µs
29.9 µs
29.9 µs
K:Constant 27.4 µs 27.4 µs
A P:Indir. (Data)
P:Indir. (Bit)
51.0 µs
51.0 µs
51.0 µs
51.0 µs

B P:Indir. (Bit) V:Data Reg.


V:Bit Reg.
K:Constant
29.9 µs
29.9 µs
27.4 µs
29.9 µs
29.9 µs
27.4 µs
P:Indir. (Data) 51.0 µs 51.0 µs
C P:Indir. (Bit) 51.0 µs 51.0 µs

C–6 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix C: Instruction Execution Times

Comparative Boolean Instructions (cont’d)


1
Comparative Boolean Instructions DL06
Instruction
1st
Legal Data Types
2nd
Execute Not Execute 2
T, CT V:Data Reg. 7.6 µs 7.6 µs
V:Bit Reg
K:Constant
7.6 µs
4.8 µs
7.6 µs
4.8 µs
C
P:Indir. (Data) 30.2 µs 30.2 µs
P:Indir. (Bit) 30.2 µs 30.2 µs
4
V Data Reg V:Data Reg. 7.6 µs 7.6 µs
V:Bit Reg 7.6 µs 7.6 µs
K:Constant
P:Indir. (Data)
4.8 µs
30.2 µs
4.8 µs
30.2 µs
5
P:Indir. (Bit) 30.2 µs 30.2 µs
STR
V: Bit Reg. V:Data Reg. 7.6 µs 7.6 µs
6
V:Bit Reg 7.6 µs 7.6 µs
K:Constant
P:Indir. (Data)
4.8 µs
30.2 µs
4.8 µs
30.2 µs 7
P:Indir. (Bit) 30.2 µs 30.2 µs

P:Indir. (Data) V:Data Reg.


V:Bit Reg
29.9 µs
29.9 µs
29.9 µs
29.9 µs
8
K:Constant 27.4 µs 27.4 µs
P:Indir. (Data)
P:Indir. (Bit)
51.0 µs
51.0 µs
51.0 µs
51.0 µs
9
P:Indir. (Bit)
V:Data Reg
V:Bit Reg
29.9 µs
29.9 µs
29.9 µs
29.9 µs 10
K:Constant 27.4 µs 27.4 µs
P:Indir. (Data) 51.0 µs 51.0 µs
P:Indir. (Bit) 51.0 µs 51.0 µs 11
1st 2nd
T, CT V:Data Reg.
V:Bit Reg.
7.6 µs
7.6 µs
7.6 µs
7.6 µs
12
K:Constant 4.8 µs 4.8 µs
P:Indir. (Data)
P:Indir. (Bit)
30.2 µs
30.2 µs
30.2 µs
30.2 µs 13
STRN
V: Data Reg. V:Data Reg.
V:Bit Reg
K:Constant
7.6 µs
7.6 µs
4.8 µs
7.6 µs
7.6 µs
4.8 µs
14
P:Indir. (Data) 30.2 µs 30.2 µs
P:Indir. (Bit 30.2 µs 30.2 µs A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A C–7


Appendix C: Instruction Execution Times

Comparative Boolean Instructions (cont’d)


1
Comparative Boolean Instructions DL06
2 Instruction
1st
Legal Data Types
2nd
Execute Not Execute

V: Bit Reg V:Data Reg. 7.6 µs 7.6 µs


C V:Bit Reg.
K:Constant
7.6 µs
4.8 µs
7.6 µs
4.8 µs
P:Indir. (Data) 30.2 µs 30.2 µs
4 STRN (cont.)
P:Indir. (Bit) 30.2 µs 30.2 µs

P:Indir. (Data) V:Data Reg. 29.9 µs 29.9 µs


V:Bit Reg. 29.9 µs 29.9 µs
5 K:Constant
P:Indir. (Data)
27.4 µs
51.0 µs
27.4 µs
51.0 µs
P:Indir. (Bit) 51.0 µs 51.0 µs
6 P:Indir. (Bit) V:Data Reg. 29.9 µs 29.9 µs
V:Bit Reg. 29.9 µs 29.9 µs
7 K:Constant
P:Indir. (Data)
27.4 µs
51.0 µs
27.4 µs
51.0 µs
P:Indir. (Bit) 51.0 µs 51.0 µs

8 1st
T, CT
2nd
V Data Reg 7.6 µs 7.6 µs
V:Bit Reg 7.6 µs 7.6 µs
9 K:Constant
P:Indir. (Data)
4.8 µs
30.2 µs
4.8 µs
30.2 µs
P:Indir. (Bit) 30.2 µs 30.2 µs
10 V Data Reg. V:Data Reg. 7.6 µs 7.6 µs
V:Bit Reg 7.6 µs 7.6 µs
K:Constant 4.8 µs 4.8 µs
11 P:Indir. (Data)
P:Indir. (Bit)
30.2 µs
30.2 µs
30.2 µs
30.2 µs

12 V: Bit Reg. V:Data Reg.


V:Bit Reg
7.6 µs
7.6 µs
7.6 µs
7.6 µs
OR K:Constant 4.8 µs 4.8 µs
13 P:Indir. (Data)
P:Indir. (Bit)
30.2 µs
30.2 µs
30.2 µs
30.2 µs

14 P:Indir. (Data) V:Data Reg


V:Bit Reg
K:Constant
29.9 µs
29.9 µs
27.4 µs
29.9 µs
29.9 µs
27.4 µs
P:Indir. (Data) 51.0 µs 51.0 µs
A P:Indir. (Bit) 51.0 µs 51.0 µs

P:Indir. (Bit) V:Data Reg 29.9 µs 29.9 µs


B V:Bit Reg
K:Constant
29.9 µs
27.4 µs
29.9 µs
27.4 µs
P:Indir. (Data 51.0 µs 51.0 µs
P:Indir. (Bit) 51.0 µs 51.0 µs
C
D

C–8 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix C: Instruction Execution Times

Comparative Boolean Instructions (cont’d)


1
Comparative Boolean Instructions DL06
Instruction
1st
Legal Data Types
2nd
Execute Not Execute 2
T, CT V:Data Reg. 7.6 µs 7.6 µs
V:Bit Reg
K:Constant
7.6 µs
4.8 µs
7.6 µs
4.8 µs
C
P:Indir. (Data 30.2 µs 30.2 µs
P:Indir. (Bit) 30.2 µs 30.2 µs
4
V: Data Reg V:Data Reg 7.6 µs 7.6 µs
V:Bit Reg 7.6 µs 7.6 µs
K:Constant
P:Indir. (Data)
4.8 µs
30.2 µs
4.8 µs
30.2 µs
5
P:Indir. (Bit) 30.2 µs 30.2 µs
ORN
V: Bit Reg. V:Data Reg. 7.6 µs 7.6 µs
6
V:Bit Reg. 7.6 µs 7.6 µs
K:Constant
P:Indir. (Data)
4.8 µs
30.2 µs
4.8 µs
30.2 µs 7
P:Indir. (Bit) 30.2 µs 30.2 µs

P:Indir. (Data) V:Data Reg.


V:Bit Reg.
29.9 µs
29.9 µs
29.9 µs
29.9 µs
8
K:Constant 27.4 µs 27.4 µs
P:Indir. (Data)
P:Indir. (Bit)
51.0 µs
51.0 µs
51.0 µs
51.0 µs
9
P:Indir. (Bit) V:Data Reg.
V:Bit Reg.
29.9 µs
29.9 µs
29.9 µs
29.9 µs 10
K:Constant 27.4 µs 27.4 µs
P:Indir. (Data) 51.0 µs 51.0 µs
P:Indir. (Bit) 51.0 µs 51.0 µs 11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A C–9


Appendix C: Instruction Execution Times

Comparative Boolean Instructions (cont’d)


1
Comparative Boolean Instructions DL06
2 Instruction
1st
Legal Data Types
2nd
Execute Not Execute

T, CT V Data Reg. 7.6 µs 7.6 µs


C V:Bit Reg
K:Constant
7.6 µs
4.8 µs
7.6 µs
4.8 µs
P:Indir. (Data) 30.2 µs 30.2 µs
4 P:Indir. (Bit) 30.2 µs 30.2 µs

V: Data Reg. V:Data Reg 7.6 µs 7.6 µs


V:Bit Reg 7.6 µs 7.6 µs
5 K:Constant
P:Indir. (Data)
4.8 µs
30.2 µs
4.8 µs
30.2 µs
P:Indir. (Bit) 30.2 µs 30.2 µs
6 AND
V: Bit Reg. V:Data Reg. 7.6 µs 7.6 µs
V:Bit Reg 7.6 µs 7.6 µs
7 K:Constant
P:Indir. (Data)
4.8 µs
30.2 µs
4.8 µs
30.2 µs
P:Indir. (Bit) 30.2 µs 30.2 µs

8 P:Indir. (Data) V:Data Reg


V:Bit Reg
29.9 µs
29.9 µs
29.9 µs
29.9 µs
K:Constant 27.4 µs 27.4 µs
9 P:Indir. (Data)
P:Indir. (Bit)
51.0 µs
51.0 µs
51.0 µs
51.0 µs

10 P:Indir. (Bit) V:Data Reg


V:Bit Reg
29.9 µs
29.9 µs
29.9 µs
29.9 µs
K:Constant 27.4 µs 27.4 µs
P:Indir. (Data) 51.0 µs 51.0 µs
11 P:Indir. (Bit) 51.0 µs 51.0 µs

12
13
14
A
B
C
D

C–10 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix C: Instruction Execution Times

Comparative Boolean Instructions (cont’d)


1
Comparative Boolean Instructions DL06
Instruction
1st
Legal Data Types
2nd
Execute Not Execute 2
T, CT V:Data Reg. 7.6 µs 7.6 µs
V:Bit Reg.
K:Constant
7.6 µs
4.8 µs
7.6 µs
4.8 µs
C
P:Indir. (Data) 30.2 µs 30.2 µs
P:Indir. (Bit) 30.2 µs 30.2 µs
4
V: Data Reg. V:Data Reg 7.6 µs 7.6 µs
V:Bit Reg. 7.6 µs 7.6 µs
K:Constant
P:Indir. (Data)
4.8 µs
30.2 µs
4.8 µs
30.2 µs
5
P:Indir. (Bit) 30.2 µs 30.2 µs
ANDN
V: Bit Reg. V:Data Reg. 7.6 µs 7.6 µs
6
V:Bit Reg. 7.6 µs 7.6 µs
K:Constant
P:Indir. (Data)
4.8 µs
30.2 µs
4.8 µs
30.2 µs 7
P:Indir. (Bit) 30.2 µs 30.2 µs

P:Indir. (Data) V:Data Reg.


V:Bit Reg.
29.9 µs
29.9 µs
29.9 µs
29.9 µs
8
K:Constant 27.4 µs 27.4 µs
P:Indir. (Data)
P:Indir. (Bit)
51.0 µs
51.0 µs
51.0 µs
51.0 µs
9
P:Indir. (Bit) V:Data Reg.
V:Bit Reg.
29.9 µs
29.9 µs
29.9 µs
29.9 µs 10
K:Constant 27.4 µs 27.4 µs
P:Indir. (Data) 51.0 µs 51.0 µs
P:Indir. (Bit) 51.0 µs 51.0 µs 11
Immediate Instructions 12
Immediate Instructions DL06 13
Instruction Legal Data Types Execute Not Execute
LDI
LDIF
V
1st #: Y 2nd #: K Constant
20.6 µs
26.6 µs+0.9µs x N
1.1 µs
1.4 µs
14
STRI X 19.3 µs 19.3 µs
STRNI X 19.4 µs 19.4 µs A
ORI X 19.1 µs 18.7 µs
ORNI
ANDI
X
X
19.2 µs
18.7 µs
18.9 µs
18.7 µs
B
ANDNI X 18.8 µs 18.8 µs
OUTI Y 25.5 µs 25.5 µs C
OROUTI Y 25.7 µs 25.7 µs
OUTIF
SETI
1st #: Y 2nd #: Y (N pt)
1st #: Y 2nd #: K Constant
66.1 µs+0.9µs x N
23.1 µs, 22.8 µs+1.4µsxN
1.4 µs
0.9 µs, 0.9 µs
D
RSTI 1st #: Y 2nd #: Y (N pt) 23.2 µs, 22.8 µs+1.4µsxN 0.9 µs, 0.9 µs

DL06 Micro PLC User Manual, 3rd Edition Rev. A C–11


Appendix C: Instruction Execution Times

Bit of Word Boolean Instructions


1
Bit of Word Boolean Instructions DL06
2 Instruction Legal Data Types
V:Data Reg.
Execute
3.1 µs
Not Execute
3.1 µs
V:Bit Reg. 3.1 µs 3.1 µs
C STRB P:Indir. (Data)
P:Indir. (Bit)
30.0 µs
30.0 µs
30.0 µs
30.0 µs
V:Data Reg. 3.0 µs 3.0 µs
4 STRNB
V:Bit Reg.
P:Indir. (Data)
3.0 µs
29.8 µs
3.0 µs
29.8 µs
P:Indir. (Bit) 29.8 µs 29.8 µs
5 V:Data Reg.
V:Bit Reg.
2.9 µs
2.9 µs
2.9 µs
2.9 µs
ORB P:Indir. (Data) 29.9 µs 29.9 µs
6 P:Indir. (Bit)
V:Data Reg.
29.9 µs
2.8 µs
29.9 µs
2.8 µs
V:Bit Reg. 2.8 µs 2.8 µs
7 ORNB P:Indir. (Data)
P:Indir. (Bit)
29.6 µs
29.6 µs
29.6 µs
29.6 µs
V:Data Reg 2.8 µs 2.8 µs
8 ANDB
V:Bit Reg.
P:Indir. (Data)
2.8 µs
29.6 µs
2.8 µs
29.6 µs
P:Indir. (Bit) 29.6 µs 29.6 µs
9 V:Data Reg.
V:Bit Reg.
2.7 µs
2.7 µs
2.7 µs
2.7 µs
ANDNB P:Indir. (Data) 29.6 µs 29.6 µs
10 P:Indir. (Bit)
V:Data Reg.
29.6 µs
3.1 µs
29.6 µs
3.4 µs
V:Bit Reg. 3.1 µs 3.4 µs
11 OUTB P:Indir. (Data)
P:Indir. (Bit)
30.3 µs
30.3 µs
30.7 µs
30.7 µs
V:Data Reg. 13.4 µs 3.4 µs
12 SETB
V:Bit Reg.
P:Indir. (Data)
13.4 µs
41.1 µs
3.4 µs
29.1 µs
P:Indir. (Bit) 41.1 µs 29.1 µs
13 V:Data Reg. 13.5 µs 1.4 µs
V:Bit Reg. 13.5 µs 1.4 µs
RSTB P:Indir. (Data) 41.3 µs 29.1 µs
14 P:Indir. (Bit) 41.3 µs 29.1 µs

A
B
C
D

C–12 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix C: Instruction Execution Times

Timer, Counter and Shift Register


1
Timer, Counter and Shift Register DL06
Instruction Legal Data Types Execute Not Execute 2
1st 2nd
TMR T V Data Reg. 26.8 µs 7.3 µs
V:Bit Reg
K:Constant
26.8 µs
20.0 µs
7.3 µs
4.8 µs
C
P:Indir. (Data) 45.6 µs 30.2 µs
P:Indir. (Bit) 45.6 µs 30.2 µs 4
TMRF T V:Data Reg. 51.4 µs 7.3 µs
V:Bit Reg
K:Constant
P:Indir. (Data)
51.4 µs
48.4 µs
7.3 µs
4.6 µs 5
75.9 µs 30.2 µs
P:Indir. (Bit) 75.9 µs 30.2 µs
TMRA T V:Data Reg. 48.9 µs 7.3 µs
6
V:Bit Reg 48.9 µs 7.3 µs
K:Constant
P:Indir. (Data)
45.0 µs
75.9 µs
4.6 µs
30.2 µs
7
P:Indir. (Bit) 75.9 µs 30.2 µs

1st 2nd 8
TMRAF T V Data Reg. 54.2 µs 7.3 µs
V:Bit Reg 7.3 µs
K:Constant
P:Indir. (Data)
54.2 µs
50.3 µs
81.2 µs
4.6 µs
30.2 µs
9
P:Indir. (Bit) 81.2 µs 30.2 µs
CNT CT V:Data Reg. 25.8 µs 7.3 µs
10
V:Bit Reg 25.8 µs 7.3 µs
K:Constant
P:Indir. (Data)
22.2 µs
53.5 µs
4.6 µs
30.2 µs 11
P:Indir. (Bit) 53.5 µs 30.2 µs
SGCNT CT V:Data Reg.
V:Bit Reg
27.3 µs 7.3 µs
7.3 µs
12
27.3 µs
K:Constant 23.5 µs 4.6 µs
P:Indir. (Data)
P:Indir. (Bit)
54.9 µs
54.9 µs
30.2 µs
30.2 µs
13
UDC CT V:Data Reg
V:Bit Reg
39.8 µs
39.8 µs
7.3 µs
7.3 µs 14
K:Constant 35.4 µs 4.6 µs
P:Indir. (Data) 30.2 µs
P:Indir. (Bit)
67.8 µs
67.8 µs 30.2 µs A
SR C (N points to shift) 17.8 µs + 9.8 µs
0.9 µs x N B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A C–13


Appendix C: Instruction Execution Times

Accumulator Data Instructions


1
Accumulator / Stack Load and Output Data Instructions DL06
2 Instruction Legal Data Types Execute Not Execute
V:Data Reg. 11.8 µs 1.0 µs
C LD
V:Bit Reg.
K:Constant
11.8µs
9.0 µs
1.0 µs
1.0 µs
P:Indir. (Data) 33.9 µs 0.9 µs
P:Indir. (Bit) 33.9 µs 0.9 µs
4
V:Data Reg. 12.2 µs 1.0 µs
V:Bit Reg. 12.2 µs 1.0 µs
5 LDD K:Constant
P:Indir. (Data)
9.0 µs
37.8 µs
1.0 µs
0.9 µs
P:Indir. (Bit) 37.8 µs 0.9 µs
6 1st 2nd
LDF X, Y, C, S 20.5 µs+0.9 µsxN 0.9 µs
K:Constant
7 LDA
T, CT, SP
O: (Octal constant for address) 10.4 µs 1.0 µs
V:Data Reg. 29.5 µs 1.0 µs
8 LDR
V:Bit Reg.
K:Constant
29.5 µs
25.5 µs
1.0 µs
1.0 µs
P:Indir. (Data) 54.9 µs 1.0 µs
9 LDSX
P:Indir. (Bit)
K: Constant
54.9 µs
14.6 µs
1.0 µs
1.0 µs

10 LDX
V:Data Reg.
V:Bit Reg.
10.8 µs
10.8 µs
1.0 µs
1.0 µs
P:Indir. (Data) 45.2 µs 1.0 µs
P:Indir. (Bit) 45.2 µs 1.0 µs
11 V:Data Reg. 9.3 µs 1.0 µs
V:Bit Reg. 9.3 µs 1.0 µs
12 OUT P:Indir. (Data)
P:Indir. (Bit)
35.2 µs
35.2 µs
0.9 µs
0.9 µs

13 OUTD
V:Data Reg.
V:Bit Reg.
10.2 µs
10.2 µs
1.0 µs
1.0 µs
P:Indir. (Data) 35.8 µs 0.9 µs
P:Indir. (Bit) 35.8 µs 0.9 µs
14 1st 2nd
OUTF K:Constant 54 µs+1.0 µsxN 0.9 µs
X, Y, C
A OUTL V:Data Reg.
V:Bit Reg.
13.5 µs
13.5 µs
1.0 µs
1.0 µs

B OUTM V:Data Reg.


V:Bit Reg.
13.7 µs
13.7 µs
1.0 µs
1.0 µs
V:Data Reg. 17.2 µs 1.0 µs
C OUTX V:Bit Reg.
P:Indir. (Data)
17.2 µs
43.4 µs
1.0 µs
1.0 µs
P:Indir. (Bit) 43.4 µs 1.0 µs
D POP NONE 8.4 µs 1.0 µs

C–14 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix C: Instruction Execution Times

Logical Instructions
1
Logical (Accumulator) nstructions DL06
Instruction Legal Data Types
V:Data Reg.
Execute
7.9 µs
Not Execute
1.0 µs
2
AND V:Bit Reg. 7.9 µs 1.0 µs
P:Indir. (Data)
P:Indir. (Bit)
33.4 µs
33.4 µs
0.9 µs
0.9 µs
C
V:Data Reg. 8.9 µs 1.0 µs
ANDD V:Bit Reg.
K:Constant
8.9 µs
5.7 µs
1.0 µs
1.0 µs
4
P:Indir. (Data) 34.4 µs 0.9 µs
P:Indir. (Bit) 34.4 µs 0.9 µs
1st: X, Y, C, S 5
ANDF T, CT, SP, GX, GY 21.6 µs + 0.9 µs x N 1.0 µs
2nd: K:Constant
ANDS None 10.0 µs 1.0 µs 6
V:Data Reg 8.1 µs 1.0 µs
OR V:Bit Reg.
P:Indir. (Data)
P:Indir. (Bit)
8.1 µs
33.8 µs
33.8 µs
1.0 µs
0.9 µs
0.9 µs
7
V:Data Reg. 9.0 µs 1.0 µs
ORD V:Bit Reg.
K:Constant
9.0 µs
5.8 µs
1.0 µs
1.0 µs
8
P:Indir. (Data) 34.5 µs 0.9 µs
P:Indir. (Bit)
1st: X, Y, C, S
34.5 µs 0.9 µs
9
ORF T, CT, SP, GX, GY 20.9 µs + 1.0 µs
0.9 µs x N
ORS
2nd: K:Constant
None 10.2 µs 1.0 µs
10
V:Data Reg. 8.0 µs 1.0 µs
XOR V:Bit Reg.
P:Indir. (Data)
8.0 µs
33.6 µs
1.0 µs
0.9 µs
11
P:Indir. (Bit) 33.6 µs 0.9 µs
V:Data Reg.
V:Bit Reg.
9.0 µs
9.0 µs
1.0 µs
1.0 µs
12
XORD K:Constant 5.4 µs 1.0 µs
P:Indir. (Data)
P:Indir. (Bit)
34.4 µs
34.4 µs
0.9 µs
0.9 µs 13
1st: X, Y, C, S 20.9 µs +
XORF T, CT, SP, GX, GY
2nd: K:Constant 0.9 µs x N 1.0 µs
14
XORS None 10.1 µs 1.0 µs
V:Data Reg.
V:Bit Reg.
9.4 µs
9.4 µs
1.0 µs
1.0 µs
A
CMP P:Indir. (Data) 34.9 µs 0.9 µs
P:Indir. (Bit)
V:Data Reg.
34.9 µs
9.9 µs
0.9 µs
1.0 µs
B
V:Bit Reg. 9.9 µs 1.0 µs
CMPD K:Constant
P:Indir. (Data)
6.7 µs
35.4 µs
1.0 µs
1.0 µs C
P:Indir. (Bit) 35.4 µs 1.0 µs

DL06 Micro PLC User Manual, 3rd Edition Rev. A C–15


Appendix C: Instruction Execution Times

Logical Instructions (cont’d)


1
Logical (Accumulator) Instructions DL06
2 Instruction Legal Data Types
1st: X, Y, C, S
Execute Not Execute

CMPF T, CT, SP, GX, GY 20.9 µs + 1.0 µs


C 2nd: K:Constant
V:Data Reg.
1.0 µs x N
42.8 µs 1.0 µs
V:Bit Reg. 42.8 µs 1.0 µs
4 CMPR K:Constant
P:Indir. (Data)
38.4 µs
69.0 µs
1.0 µs
1.0 µs
P:Indir. (Bit) 69.0 µs 1.0 µs
5 CMPS None 11.2 µs 1.0 µs

Math Instructions
6
Math Instructions (Accumulator) DL06
7 Instruction Legal Data Types Execute Not Execute
V:Data Reg. 78.4 µs 0.9 µs
8 ADD V:Bit Reg.
P:Indir. (Data)
78.4 µs
101.2 µs
0.9 µs
0.9 µs
P:Indir. (Bit) 101.2 µs 0.9 µs
9 V:Data Reg.
V:Bit Reg.
83.3 µs
83.3 µs
0.9 µs
0.9 µs
ADDD K:Constant 67.7 µs 0.9 µs
P:Indir. (Daa) 101.2 µs 0.9 µs
10 P:Indir. (Bit) 101.2 µs 0.9 µs
V:Data Reg. 77.4 µs 0.9 µs
11 SUB V:Bit Reg
P:Indir. (Data)
P:Indir. (Bit)
77.4 µs
95.1 µs
95.1 µs
0.9 µs
0.9 µs
0.9 µs

12 V:Data Reg.
V:Bit Reg.
82.5 µs
82.5 µs
0.9 µs
0.9 µs
SUBD K:Constant 66.0 µs 0.9 µs
P:Indir. (Data) 99.7 µs 0.9 µs
13 P:Indir. (Bit) 99.7 µs 0.9 µs
V:Data Reg. 266.1 µs 0.9 µs
V:Bit Reg. 266.1 µs 0.9 µs
14 MUL K:Constant
P:Indir. (Data)
286.9 µs
290.0 µs
0.9 µs
0.9 µs
P:Indir. (Bit) 290.0 µs 0.9 µs
A V:Data Reg.
V:Bit Reg.
839.1 µs
839.1 µs
0.9 µs
0.9 µs
MULD P:Indir. (Data) 863.1 µs 0.9 µs
B P:Indir. (Bit)
V:Data Reg.
863.1 µs
363.9 µs
0.9 µs
0.9 µs
V:Bit Reg 363.9 µs 0.9 µs
C DIV K:Constant
P:Indir. (Data)
384.4 µs
419.8 µs
0.9 µs
0.9 µs
P:Indir. (Bit) 419.8 µs 0.9 µs
D DIVD
V:Data Reg.
V:Bit Reg.
398.3 µs
398.3 µs
0.9 µs
0.9 µs
P:Indir. (Data) 390.9 µs 0.9 µs
P:Indir. (Bit) 390.9 µs 0.9 µs

C–16 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix C: Instruction Execution Times

Math Instructions (cont’d)

Math Instructions (Accumulator) DL06


1
Instruction Legal Data Types Execute Not Execute
V:Data Reg 48.5 µs 1.0 µs 2
INC V:Bit Reg 48.5 µs 1.0 µs
P:Indir. (Data) 74.7 µs 1.0 µs
P:Indir. (Bit) 74.7 µs 1.0 µs C
V:Data Reg. 47.5 µs 1.0 µs
DEC V:Bit Reg.
P:Indir. (Data )
47.5 µs
71.5 µs
1.0 µs
1.0 µs
4
P:Indir. (Bit) 71.5 µs 1.0 µs

V:Data Reg.
V:Bit Reg.
13.2 µs
13.2 µs
1.0 µs
1.0 µs
5
INCB P:Indir. (Data) 38.6 µs 0.9 µs
P:Indir. (Bit) 38.6 µs 0.9 µs 6
V:Data Reg. 13.2 µs 1.0 µs
DECB V:Bit Reg.
P:Indir. (Data)
13.2 µs
38.0 µs
1.0 µs
0.9 µs 7
P:Indir. (Bit) 38.0 µs 0.9 µs
V:Data Reg.
V:Bit Reg.
24.9 µs
24.9 µs
1.0 µs
1.0 µs
8
ADDB K:Constant 23.5 µs 1.0 µs
P:Indir. (Data)
P:Indir. (Bit)
51.1 µs
51.1 µs
1.0 µs
1.0 µs 9
V:Data Reg. 24.4 µs 1.0 µs
ADDBD
V:Bit Reg.
K:Constant
P:Indir. (Data)
24.4 µs
20.7 µs
50.7 µs
1.0 µs
1.0 µs
1.0 µs
10
P:Indir. (Bit) 50.7 µs 1.0 µs
V:Data Reg.
V:Bit Reg.
24.7 µs
24.7 µs
1.0 µs
1.0 µs
11
SUBB K:Constant 23.3 µs 1.0 µs
P:Indir. (Data)
P:Indir. (Bit)
50.6 µs
50.6 µs
1.0 µs
1.0 µs
12
V:Data Reg. 24.2 µs 1.0 µs
SUBBD
V:Bit Reg.
K:Constant
24.2 µs
20.2 µs
1.0 µs
1.0 µs
13
P:Indir. (Data) 50.2 µs 1.0 µs
P:Indir. (Bit) 50.2 µs 1.0 µs
V:Data Reg. 10.8 µs 1.0 µs 14
V:Bit Reg. 10.8 µs 1.0 µs
MULB K:Constant 8.2 µs 1.0 µs
P:Indir. (Data)
P:Indir. (Bit)
37.1 µs
37.1 µs
1.0 µs
1.0 µs
A
V:Data Reg. 28.7 µs 1.0 µs
DIVB
V:Bit Reg.
K:Constant
28.7 µs
26.1 µs
1.0 µs
1.0 µs
B
P:Indir. (Data) 54.9 µs 1.0 µs
P:Indir. (Bit)
V:Data Reg.
54.9 µs
48.1 µs
1.0 µs
1.0 µs
C
V:Bit Reg. 48.1 µs 1.0 µs
ADDR K:Constant
P:Indir. (Data)
41.7 µs
74.3 µs
1.0 µs
1.0 µs D
P:Indir. (Bit) 74.3 µs 1.0 µs

DL06 Micro PLC User Manual, 3rd Edition Rev. A C–17


Appendix C: Instruction Execution Times

Math Instructions (cont’d)


1
Math Instructions (Accumulator) DL06
2 Instruction Legal Data Types Execute Not Execute
V:Data Reg. 50.1 µs 1.0 µs
V:Bit Reg. 50.1 µs 1.0 µs
C SUBR K:Constant
P:Indir. (Data)
58.7 µs
76.3 µs
1.0 µs
1.0 µs
P:Indir. (Bit) 76.3 µs 1.0 µs
4 V:Data Reg.
V:Bit Reg.
54.2 µs
54.2 µs
1.0 µs
1.0 µs
MULR K:Constant 42.7 µs 1.0 µs
5 P:Indir. (Data)
P:Indir. (Bit)
80.4 µs
80.4 µs
1.0 µs
1.0 µs
V:Data Reg. 50.1 µs 1.0 µs
6 DIVR
V:Bit Reg.
K:Constant
50.1 µs
58.7 µs
1.0 µs
1.0 µs
P:Indir. (Data) 76.3 µs 1.0 µs
P:Indir. (Bit) 76.3 µs 1.0 µs
7 1st: X, Y, C, S 109.3 µs +
ADDF T, CT, SP, GX, GY 0.9 µs x N 1.0 µs
2nd: K:Constant
8 SUBF
1st: X, Y, C, S
T, CT, SP, GX, GY 107.3 µs + 1.0 µs
2nd: K:Constant 0.9 µs x N
9 MULF
1st: X, Y, C, S
T, CT, SP, GX, GY 352.5 µs + 1.0 µs
2nd: K:Constant 0.9 µs x N
10 DIVF
1st: X, Y, C, S
T, CT, SP, GX, GY 477.3 µs +
0.8 µs x N 1.0 µs
2nd: K:Constant
11 ADDS
SUBS
None
None
99.5 µs
97.5 µs
1.0 µs
1.0 µs
MULS None 342.5 µs 1.0 µs
12 DIVS None 467.3 µs 1.0 µs
ADDBS None 24.3 µs 1.0 µs
13 SUBBS
MULBS
None
None
23.7 µs
11.7 µs
1.0 µs
1.0 µs
DIVBS None 29.7 µs 1.0 µs
14 SQRTR None 87.9 µs 1.0 µs
SINR None 226.8 µs 1.0 µs
A COSR
TANR
None
None
213.1 µs
285.5 µs
1.0 µs
1.0 µs
ASINR None 489.8 µs 1.0 µs
B ACOSR None 508.3 µs 1.0 µs
ATANR None 317.1 µs 1.0 µs
C
D

C–18 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix C: Instruction Execution Times

Differential Instructions
1
Differential Instructions DL06
Instruction Legal Data Types Execute Not Execute 2
PD X, Y, C 14.4 µs 14.4 µs
STRPD
STRND
X, Y, C, S, T, CT
X, Y, C, S, T, CT
5.4 µs
7.3 µs
5.4 µs
7.3 µs
C
ORPD X, Y, C, S, T, CT 6.8 µs 5.2 µs
ORND X, Y, C, S, T, CT 7.1 µs 4.9 µs 4
ANDPD X, Y, C, S, T, CT 6.8 µs 5.2 µs
ANDND X, Y, C, S, T, CT 7.1 µs 4.9 µs
5
Bit Instructions
6
Bit Instructions (Accumulator) DL06 7
Instruction Legal Data Types Execute Not Execute
SUM None 6.7 µs 1.0 µs 8
12.1 µs +
V:Data Reg. (N bits) 0.1 x N
SHFR V:Bit Reg. (N bits)
K:Constant (N bits) 8.4 µs +
0.9 µs 9
0.1 x N

V:Data Reg. (N bits)


12.1 µs +
0.1 x N
10
SHFL V:Bit Reg. (N bits) 0.9 µs
K:Constant (N bits) 8.4 µs +
0.1 x N
11
V:Data Reg. (N bits) 16.4 µs 1.0 µs
ROTR V:Bit Reg. (N bits)
K:Constant (N bits)
16.4 µs
12.9 µs
1.0 µs
1.0 µs
12
V:Data Reg. (N bits) 16.4 µs 1.0 µs
ROTL V:Bit Reg. (N bits)
K:Constant (N bits)
16.4 µs
12.7 µs
1.0 µs
1.0 µs 13
ENCO None 33.9 µs 0.9 µs
DECO None 5.7 µs 1.0 µs 14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A C–19


Appendix C: Instruction Execution Times

Number Conversion Instructions


1
Number Conversion Instructions (Accumulator) DL06
2 Instruction
BIN None
Legal Data Types Execute
100.2 µs
Not Execute
0.9 µs
BCD None 95.2 µs 0.9 µs
C INV None 2.5 µs 1.0 µs
BCDPL None 75.6 µs 1.0 µs
4 ATH
HTA
V
V
25.4 µs
25.4 µs
1.0 µs
1.0 µs
GRAY None 110.8 µs 1.0 µs
5 SFLDGT None 23.1 µs 1.0 µs
BTOR None 18.6 µs 1.0 µs
6 RTOB
RADR
None
None
8.6 µs
51.4 µs
1.0 µs
1.0 µs
DEGR None 81.5 µs 1.0 µs
7
8 Table Instructions
Table Instructions DL06
9 Instruction Legal Data Types Execute Not Execute
Move V:data reg. to V:data reg
10 MOV
Move V:bit reg. to V:data reg
Move V:data reg. to V:bit reg 60.2 µs+9.5 x N 0.9 µs
Move V:bit reg. to V:bit reg.
11 N=#of words
Move V:data Reg to EEPROM

12 MOVMC
Move V:Bit Reg to EEPROM
35 µs + 10.4 µs x N 0.9 µs
Move from Date Label to V: Data Reg
13 Move from Data Label to V: Bit Reg
N= #of words
LDLBL K 6.4 µs 1.3 µs
14 V: Data Reg
V:Bit Reg 29.4 µs + 8.0 µs x N 1.0 µs
A FILL K:Constant 26.2 µs + 8.0 µs x N
1.0 µs
P:Indir. (Data) 55.1 µs + 8.0 µs x N
1.0 µs
B P:Indir. (bit)
V: Data Reg (N bits) 66.8 µs 1.0 µs
C FIND V:Bit Reg. (N bits)
K:Constant(N bits)
66.8 µs
64.0 µs
1.0 µs
1.0 µs

C–20 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix C: Instruction Execution Times

Table Instructions (cont’d)


1
Table Instructions DL06
Instruction Legal Data Types
V: Data Reg (N bits)
Execute
66.1 µs
Not Execute
1.0 µs
2
FDGT V:Bit Reg. (N bits) 66.1 µs 1.0 µs
K:Constant(N bits)
V: Data Reg (N bits)
55.2 µs
210.8 µs
1.0 µs
1.0 µs
C
FINDB V:Bit Reg. (N bits) 210.8 µs 1.0 µs
P:Indir. (Data)
P:Indir. (Bit)
237.0 µs
237.0 µs
1.0 µs
1.0 µs 4
TTD V: Data Reg 66.9 µs 1.0 µs

RFB
V:Bit Reg
V: Data Reg
66.9 µs
66.8 µs
1.0 µs
1.0 µs
5
V:Bit Reg 66.8 µs 1.0 µs

STT
V: Data Reg
V:Bit Reg
67.8 µs
67.8 µs
1.0 µs
1.0 µs 6
K:Constant 65.0 µs 1.0 µs
V: Data Reg 51.1 µs 1.0 µs
RFT V:Bit Reg 51.1 µs 1.0 µs 7
V: Data Reg 53.5 µs 1.0 µs
ATT V:Bit Reg 53.5 µs 1.0 µs
K:Constant
V: Data Reg
50.8 µs
134.0 µs
1.0 µs
1.0 µs
8
TSHFL V:Bit Reg 134.0 µs 1.0 µs
TSHFR V: Data Reg
V:Bit Reg
133.9 µs
133.9 µs
1.0 µs
1.0 µs
9
ANDMOV V: Data Reg 80.2 µs 1.0 µs
V:Bit Reg
V: Data Reg
80.2 µs
80.4 µs
1.0 µs
1.0 µs
10
ORMOV V:Bit Reg 80.4 µs 1.0 µs
XORMOV V: Data Reg
V:Bit Reg
80.4 µs
80.4 µs
1.0 µs
1.0 µs
11
SWAP V: Data Reg 84.1 µs 1.0 µs

SETBIT
V:Bit Reg
V: Data Reg (N bits)
84.1 µs
59.5 µs
1.0 µs
1.0 µs
12
V:Bit Reg. (N bits) 59.5 µs 1.0 µs
RSTBIT V: Data Reg (N bits)
V:Bit Reg. (N bits)
59.5 µs
59.5 µs
1.0 µs
1.0 µs 13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A C–21


Appendix C: Instruction Execution Times

CPU Control Instructions


1 CPU Control Instructions DL06
Instruction Legal Data Types Execute Not Execute
2 NOP
END
None
None
1.1 µs
24.0 µs
1.1 µs
24.0 µs
STOP None 10.0 µs 1.1 µs
C RSTWT None 5.9 µs 2.2 µs

4 Program Control Instructions


5 Program Control Instructions
Instruction Legal Data Types Execute
DL06
Not Execute
6 GOTO
LBL
K
K
5.1 µs
5.7 µs
4.8 µs
0.0 µs
FOR V, K 125.9 µs 14.5 µs
7 NEXT
GTS
None
K
64.4 µs
27.5 µs
64.4 µs
14.8 µs

8 SBR
RTC
K
None
1.5 µs
25.7 µs
1.5 µs
12.1 µs
RT None 21.2 µs 21.2 µs
9 MLS
MLR
K
K
(1–7) 35.2 µs
(0–7) 30.9 µs
35.2 µs
30.9 µs

10 Interrupt Instructions
11 Interrupt Instructions DL06
Instruction Legal Data Types Execute Not Execute
12 ENI
DISI
None
None
24.2 µs
9.4 µs
2.7 µs
2.3 µs
INT O(0,1) 7.5 µs –
13 IRTC None 0.9 µs 1.3 µs
IRT None 6.6 µs –
14
Network Instructions
A
Network Instructions DL06
B Instruction Legal Data Types
X, Y, C, T, CT, SP, S, $
Execute
852.0 µs
Not Execute
4.4 µs
V:Data Reg. 852.0 µs 4.4 µs
C RX V:Bit Reg.
P:Indir. (Data)
852.0 µs
868.2 µs
4.4 µs
4.2 µs
P:Indir. (Bit) 868.2 µs 4.2 µs

D X, Y, C, T, CT, SP, S, $
V:Data Reg.
1614.0 µs
1614.0 µs
4.4 µs
4.4 µs
WX V:Bit Reg. 1614.0 µs 4.4 µs
P:Indir. (Data) 1630.0 µs 4.4 µs
P:Indir. (Bit) 1630.0 µs 4.4 µs

C–22 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix C: Instruction Execution Times

Intelligent I/O Instructions


Network Instructions DL06 1
Instruction Legal Data Types Execute Not Execute
RD V:Data Reg.
V:Bit Reg.
385.7 µs
385.7 µs
1.2 µs
1.2 µs
2
WT V:Data Reg. 385.6 µs 1.2 µs
V:Bit Reg. 385.6 µs 1.2 µs C
Message Instructions 4
Message Instructions DL06 5
Instruction Legal Data Types Execute Not Execute

FAULT
V:Data Reg.
V:Bit Reg.
65.0 µs
65.0 µs
4.4 µs
4.4 µs 6
K:Constant 204.7 µs 4.4 µs
DLBL
NCON
K
K

– –

7
ACON A – –
PRINT ASCII 631.0 µs 3.6 µs 8
RLLPLUS Instructions
9
RLLplus Instructions DL06 10
Instruction Legal Data Types Execute Not Execute
ISG
SG
S
S
44.0 µs
44.0 µs
41.1 µs
41.1 µs
11
JMP
NJMP
S
S
76.0 µs
77.4 µs
9.3 µs
9.3 µs
12
CV S 42.1 µs 27.5 µs
CVJMP
BCALL
S
C
89.5 µs
22.1 µs
17.6 µs
22.6 µs
13
BLK
BEND
C
None
17.1 µs
8.7 µs
14.6 µs
0.0 µs
14
Drum Instructions A
Drum Instructions DL06 B
Instruction Legal Data Types Execute Not Execute
DRUM CT 840.0 µs 339.6 µs C
EDRUM CT 753.2 µs 357.0 µs
MDRMD
MDRMW
CT
CT
411.3 µs
378.6 µs
216.4 µs
147.0 µs
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A C–23


Appendix C: Instruction Execution Times

Clock / Calender Instructions


1 Clock / Calender Instructions DL06
Instruction Execute Not Execute
2 DATE V:Data Reg. 24.0 µs 1.2 µs
V:Bit Reg.
V:Data Reg.
C TIME V:Bit Reg. 50.8 µs 1.2 µs

4 MODBUS Instructions
5 Clock / Calender Instructions DL06
Instruction Execute Not Execute
6 MRX Input, Input Register
Coil, Holding Register 120.2 µs 1.3 µs

MWX Input, Input Register 21.3 µs 1.3 µs


Coil, Holding Register
7
ASCII Instructions
8 ASCII Instructions DL06
9 AIN
Instruction
V
Legal Data Types Execute
13.9 µs
Not Execute
12.0 µs
AFIND V 111.5 µs 1.3 µs
10 AEX V 111.7 µs 1.3 µs
CMPV V 12.2 µs 1.3 µs
11 SWAPB
VPRINT
V
Text Data
109.8 µs
161.6 µs
1.3 µs
1.3 µs
PRINTV V 163.3 µs 1.3 µs
12 ACRB V 3.9 µs 1.1 µs

13
14
A
B
C
D

C–24 DL06 Micro PLC User Manual, 3rd Edition Rev. A


A PPPENDIX
P ENDIX
SPECIAL RELAYS
D
In This Appendix...
DL06 PLC Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D–2
Appendix D: Special Relays

DL06 PLC Special Relays


1 “Special Relays” are just contacts that are set by the CPU operating system to indicate a
particular system event has occurred. These contacts are available for use in your ladder
2 program. Knowing just the right special relay contact to use for a particular situation can save
a lot of programming time. Since the CPU operating system sets and clears special relay
contacts, the ladder program only has to use them as inputs in ladder logic.
3 Startup and Real-Time Relays
D SP0 First scan
On for the first scan after a power cycle or program to run transition only. The relay is
reset to off on the second scan. It is useful where a function needs to be performed
only on program startup.
5 SP1 Always ON Provides a contact to insure an instruction is executed every scan.
SP2 Always OFF Provides a contact that is always off
6 SP3 1 minute clock On for 30 seconds and off for 30 seconds.
SP4 1 second clock On for 0.5 second and off for 0.5 second.
7 SP5 100 ms clock On for 50 ms. and off for 50 ms.
SP6 50 ms clock On for 25 ms. and off for 25 ms.

8 SP7 Alternate scan On every other scan.

9 CPU Status Relays


SP11 Forced run mode On when the mode switch is in the run position and the CPU is running.
10 SP12 Terminal run mode On when the mode switch is in the TERM position and the CPU is in the run mode.
SP13 Test run mode On when the CPU is in the test run mode.
11 SP15 Test stop mode On when the CPU is in the test stop mode.
SP16 Terminal PGM mode On when the mode switch is in the TERM position and the CPU is in program mode.
12 SP17 Forced stop On when the mode switch is in the STOP position.
SP20 Forced stop mode On when the STOP instruction is executed.
13 SP22 Interrupt enabled On when interrupts have been enabled using the ENI instruction.

14
A
B
C
D

D–2 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix D: Special Relays

System Monitoring
SP36 Override setup relay On when the override function is used. 1
SP37 Scan controller On when the actual scan time runs over the prescribed scan time.
SP40 Critical error On when a critical error such as I/O communication loss has occurred.
2
SP41 Warning On when a non critical error has occurred.
SP42 Diagnostics error On when a diagnostics error or a system error occurs.
3
SP43
SP44
Low battery error
Program memory error
On when the CPU battery voltage is low.
On when a memory error such as a memory parity error has occurred.
D
SP45 I/O error On when an I/O error such as a blown fuse occurs. 5
SP46 Communications error On when a communication error occurs on any of the CPU ports.
SP50 Fault instruction On when a Fault Instruction is executed. 6
SP51 Watch Dog timeout On if the CPU Watch Dog timer times out.

SP52 Grammatical error On if a grammatical error has occurred either while the CPU is running or if the
syntax check is run. V7755 will hold the exact error code.
7
SP53 Solve logic error On if CPU cannot solve the logic.
SP54 Communication error On when RX, WX, instructions are executed with the wrong parameters.
8
SP56 Table instruction overrun On if a table instruction with a pointer is executed and the pointer value is outside the
table boundary. 9
Accumulator Status 10
SP60 Value less than On when the accumulator value is less than the instruction value. 11
SP61 Value equal to On when the accumulator value is equal to the instruction value.
SP62 Greater than On when the accumulator value is greater than the instruction value. 12
SP63 Zero On when the result of the instruction is zero (in the accumulator).
SP64 Half borrow On when the 16 bit subtraction instruction results in a borrow. 13
SP65 Borrow On when the 32 bit subtraction instruction results in a borrow.
SP66 Half carry On when the 16 bit addition instruction results in a carry.
14
SP67 Carry On when the 32 bit addition instruction results in a carry.
SP70 Sign On anytime the value in the accumulator is negative.
A
SP71
SP72
Pointer reference error
Floating point number
On when the V-memory specified by a pointer (P) is not valid.
On anytime the value in the accumulator is a valid floating point number.
B
SP73 Overflow On if overflow occurs in the accumulator when a signed addition or subtraction
results in an incorrect sign bit. C
SP74 Underflow On anytime a floating point math operation results in an underflow error.
SP75 Data error On if a BCD number is expected and a non–BCD number is encountered. D
SP76 Load zero On when any instruction loads a value of zero into the accumulator.

DL06 Micro PLC User Manual, 3rd Edition Rev. A D–3


Appendix D: Special Relays

HSIO Input Status


1 SP100 X0 status On when X0 is on
SP101 X1 status On when X1 is on
2
HSIO Pulse Output Relay
3 SP104 Profile Complete On when the pulse output profile is completed. (Mode 30)

D
Communication Monitoring Relay
5 SP116 CPU port busy Port 2 On when port 2 is the master and sending data.
Communications error
SP117 On when port 2 is the master and has a communication error.
6 Port 2

Option Slot Communication Monitoring Relay


7
SP120 Slot 1 busy H0-ECOM/D0-DCM Port2

8 SP121 Slot 1 error H0-ECOM/D0-DCM Port2


SP122 Slot 2 busy H0-ECOM/D0-DCM Port2
9 SP123 Slot 2 error H0-ECOM/D0-DCM Port2
SP124 Slot 3 busy H0-ECOM/D0-DCM Port2
10 SP125 Slot 3 error H0-ECOM/D0-DCM Port2
SP126 Slot 4 busy H0-ECOM/D0-DCM Port2
11 SP127 Slot 4 error H0-ECOM/D0-DCM Port2

12 Option Slot Special Relay

13 SP140-237 Slot 1 SP relay for option card


SP240-337 Slot 2 SP relay for option card

14 SP340-437 Slot 3 SP relay for option card


SP430-537 Slot 4 SP relay for option card
A
B
C
D

D–4 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix D: Special Relays

Counter 1 Mode 10 Equal Relays


SP540 Current = target value On when the counter current value equals the value in V3631/3630
1
SP541
SP542
Current = target value
Current = target value
On when the counter current value equals the value in V3633/3632
On when the counter current value equals the value in V3635/3634
2
SP543 Current = target value On when the counter current value equals the value in V3637/3636
3
SP544 Current = target value On when the counter current value equals the value in V3641/3640
SP545 Current = target value On when the counter current value equals the value in V3643/3642 D
SP546 Current = target value On when the counter current value equals the value in V3645/3644
SP547 Current = target value On when the counter current value equals the value in V3647/3646 5
SP550 Current = target value On when the counter current value equals the value in V3651/3650
SP551 Current = target value On when the counter current value equals the value in V3653/3652 6
SP552 Current = target value On when the counter current value equals the value in V3655/3654
SP553 Current = target value On when the counter current value equals the value in V3657/3656 7
SP554 Current = target value On when the counter current value equals the value in V3661/3660
SP555 Current = target value On when the counter current value equals the value in V3663/3662
8
SP556 Current = target value On when the counter current value equals the value in V3665/3664
SP557 Current = target value On when the counter current value equals the value in V3667/3666
9
SP560
SP561
Current = target value
Current = target value
On when the counter current value equals the value in V3671/3670
On when the counter current value equals the value in V3673/3672
10
SP562 Current = target value On when the counter current value equals the value in V3675/3674
11
SP563 Current = target value On when the counter current value equals the value in V3677/3676
SP564 Current = target value On when the counter current value equals the value in V3771/3770 12
SP565 Current = target value On when the counter current value equals the value in V3703/3702
SP566 Current = target value On when the counter current value equals the value in V3705/3704 13
SP567 Current = target value On when the counter current value equals the value in V3707/3706
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A D–5


Appendix D: Special Relays

Counter 2 Mode 10 Equal Relays


1
SP570 Current = target value On when the counter current value equals the value in V3711/3710

2 SP571 Current = target value On when the counter current value equals the value in V3713/3712
SP572 Current = target value On when the counter current value equals the value in V3715/3714
3 SP573 Current = target value On when the counter current value equals the value in V3717/3716
SP574 Current = target value On when the counter current value equals the value in V3721/3720
D SP575 Current = target value On when the counter current value equals the value in V3723/3722
SP576 Current = target value On when the counter current value equals the value in V3725/3724
5 SP577 Current = target value On when the counter current value equals the value in V3727/3726
SP600 Current = target value On when the counter current value equals the value in V3731/3730
6 SP601 Current = target value On when the counter current value equals the value in V3733/3732
SP602 Current = target value On when the counter current value equals the value in V3735/3734
7 SP603 Current = target value On when the counter current value equals the value in V3737/3736
SP604 Current = target value On when the counter current value equals the value in V3741/3740
8 SP605 Current = target value On when the counter current value equals the value in V3743/3742

9 SP606 Current = target value On when the counter current value equals the value in V3745/3744
SP607 Current = target value On when the counter current value equals the value in V3747/3746

10 SP610 Current = target value On when the counter current value equals the value in V3751/3750
SP611 Current = target value On when the counter current value equals the value in V3753/3752
11 SP612 Current = target value On when the counter current value equals the value in V3755/3754
SP613 Current = target value On when the counter current value equals the value in V3757/3756
12 SP614 Current = target value On when the counter current value equals the value in V3761/3760
SP615 Current = target value On when the counter current value equals the value in V3763/3762
13 SP616 Current = target value On when the counter current value equals the value in V3765/3764
SP617 Current = target value On when the counter current value equals the value in V3767/3766
14
A
B
C
D

D–6 DL06 Micro PLC User Manual, 3rd Edition Rev. A


A PPENDIX
HIGH-SPEED INPUT AND
PULSE OUTPUT FEATURES
E
In This Appendix
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–2
Choosing the HSIO Operating Mode . . . . . . . . . . . . . . . . . . . . . . .E–4
Mode 10: High-Speed Counter . . . . . . . . . . . . . . . . . . . . . . . . . . .E–7
Mode 20: Up/Down Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–24
Presets and Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–27
Mode 30: Pulse Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–38
Mode 40: High-Speed Interrupts . . . . . . . . . . . . . . . . . . . . . . . . .E–64
Mode 50: Pulse Catch Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–69
Mode 60: Discrete Inputs with Filter . . . . . . . . . . . . . . . . . . . . . . .E–73
Appendix E: High-speed Input and Pulse Output Features

Introduction
1 Built-in Motion Control Solution
2 Many machine control applications require various
types of simple high-speed monitoring and control.
These applications usually involve some type of motion
3 control, or high-speed interrupts for time-critical
events. The DL06 Micro PLC solves this traditionally
4 expensive problem with built-in CPU enhancements.
Let’s take a closer look at the available high-speed I/O
features.
E The available high-speed input features are:
• High Speed Counter (7 kHz max.) with up to 24 counter presets and built-in interrupt subroutine,
6 counts up only, with reset
• Quadrature encoder inputs to measure counts and clockwise or counter clockwise direction (7 kHz
7 max.), counts up or down, with reset
• High-speed interrupt inputs for immediate response to critical or time-sensitive tasks
8 • Pulse catch feature to monitor one input point, having a pulse width as small as 100µs (0.1ms)
• Programmable discrete filtering (both on and off delay up to 99ms) to ensure input signal integrity
9 (this is the default mode for inputs X0–X3)
The available pulse output features are:
10 • Single-axis programmable pulse output (10 kHz max.) with three profile types, including
trapezoidal moves, registration, and velocity control

11 Availability of HSIO Features


IMPORTANT: Please note the following restrictions on availability of features:
12 • High-speed input options are available only on DL06s with DC inputs.
• Pulse output options are available only on DL06s with DC outputs.

13 • Only one HSIO feature may be in use at one time. You cannot use a high–speed input feature and
the pulse output at the same time.

14 Specifications
DL06 Part Number Discrete Input Type Discrete Output Type High-Speed Input Pulse Output
A D0–06AA AC AC No No
D0–06AR AC Relay No No
D0–06DA
B D0–06DD1
DC
DC
AC
DC
Yes
Yes
No
Yes
D0–06DD2 DC DC Yes Yes
C D0–06DR DC Relay Yes No
D0–06DD1–D DC DC Yes Yes
D0–06DD2–D
D D0–06DR–D
DC
DC
DC
Relay
Yes
Yes
Yes
No

E–2 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: High-speed Input and Pulse Output Features

Dedicated High- Speed I/O Circuit


The internal CPU’s 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 1
circuit which is dedicated to a portion of the I/O points. Refer to the DL06 block diagram in
the figure below. 2
16 Discrete Outputs

DL06
3
PLC Output Circuit

Y0, Y1 Y2 - Y17 4
High-Speed
I/O Circuit
CPU
E
X0 - X3 X4 - X23

Input Circuit
6
20 Discrete Inputs
7
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
8
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. 9
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
10
high-speed I/O activity while the CPU is busy with ladder program execution.
Wiring Diagrams for Each HSIO Mode
11
After choosing the appropriate HSIO mode for your application, you’ll need to refer to the
section in this appendix for that specific mode. Each section includes wiring diagrams to help 12
you connect the High-Speed I/O points correctly to field devices. An example of a High
Speed Counter mode diagram is shown below. 13
C0 X1 X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23 N.C.
X0 X2 C1 X5 X7 X10 X12 C3 X15 X17 X20 X22 N.C.
TERM
14
PORT1 PORT2 RUN STOP

A
Counter Input Wiring B
Signal

– + Signal Common C
12-24 VDC Supply
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–3


Appendix E: High-speed Input and Pulse Output Features

Choosing the HSIO Operating Mode


1 Understanding the Six Modes
The High-Speed I/O circuit operates in one of 6 basic modes as listed in the table below. The
2 number in the left column is the mode number (later, we’ll use these numbers to configure
the PLC). Choose one of the following modes according to the primary function you want
3 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.

4 Mode
High Speed I/O Basic Modes
Mode Features
Two 7 kHz counters with 24 presets and reset input, counts up only, cause
E 10 High-Speed Counter interrupt on preset
7 kHz up/down counter with 24 presets and reset, causes interrupt on
preset
6 20 Up/Down Counter
Channel A / Channel B 7 kHz quadrature input, counts up and down
Stepper control – pulse and direction signals, programmable motion
30
7 40
Pulse Output
High-Speed Interrupt
profile (10kHz max.)
Generates an interrupt based on input transition or time
50 Pulse Catch Captures narrow pulses on a selected input
8 60 Filtered 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
9 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
10 operate normally unless Pulse Output mode is selected.

11
12
13
14
A
B
C
D

E–4 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: High-speed Input and Pulse Output Features

Physical I/O Point Usage


Mode
DC Input Points DC Output Points 1
X0 X1 X2 X3 Y0 Y1
Counter #2, Reset #1, Reset #2,
2
Interrupt, Interrupt, Interrupt, Regular Regular
10 High-Speed Counter Counter #1 Pulse Input or Pulse Input or Pulse Input or Output Output
Filtered Input Filtered Input Filtered Input 3
Up/Down counter Down
20
(Standard counting) Up Counting Counting Reset,
Pulse Input or Pulse Input or Regular
Filtered Input Output
Regular
Output
4
Up/Down counter Phase A Phase B Input Filtered Input
(Quadrature counting) Input
Pulse Input Pulse Input or Pulse Input or Pulse Input or Pulse or
E
Direction or
30 Pulse Output or Filtered Filtered Input Filtered Input Filtered Input CW Pulse CCW Pulse
Input
Interrupt, Interrupt, Interrupt,
6
40 High-Speed Interrupt Interrupt Pulse Input or Pulse Input or Pulse Input or Regular Regular
Filtered Input Filtered Input Filtered Input Output Output
7
Pulse Input, Pulse Input, Pulse Input,
50 Pulse Catch Pulse Input Interrupt or Interrupt or Interrupt or Regular Regular
Filtered Input Filtered Input Filtered Input Output Output
8
60 Filtered Input Filtered Input Filtered Input Filtered Input Filtered Input Regular
Output
Regular
Output
9
Default Mode
Mode 60 (Filtered Inputs) is the default mode. The DL06 is initialized to this mode at the 10
factory, and any time you initialize the scratchpad memory. In the default condition, X0–X3
are filtered inputs (10 ms delay) and Y0–Y1 are standard outputs. 11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–5


Appendix E: 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, we’re ready
1 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
2 functional mode of the high-speed I/O circuit. This is the most important V-memory
configuration value for HSIO functions!
3
DL06 Output Circuit

4 PLC
Y0 - Y1 Y2 - Y17

CPU
E High-Speed
I/O Circuit
I/O Data

Mode Select
V-Memory
V7633 xxxx

6 X0 - X3 X4 - X23

Input Circuit
7
The contents of V7633 is a 16-bit word, to be entered in binary–coded decimal. The figure
8 below defines what each 4-bit BCD digit of the word represents.

9 Memory Location V7633


Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

10 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0

0 0 5 0
11
Miscellaneous Setup (BCD) HSIO Mode Setup (BCD)
12 00 = Not Used (default)
10 = Battery Enabled
00 = Not Used
10 = High-Speed Counter
20 = Power-up in RUN 20 = Up/Down Counter
13 30 = Battery Enabled and
Power-up in RUN
30 = Pulse Output
40 = High-Speed Interrupts
50 = Pulse Catch
14 60 = Filtered Inputs (default)

Bits 0 – 7 define the mode number 00, 10.. 60 previously referenced in this appendix. The
A example data “0050” shown selects Mode 50 – Pulse Catch (BCD = 50).
Configuring Inputs X0 – X3
B In addition to configuring V7633 for the HSIO mode, you’ll
need to program the next four locations in certain modes
V-Memory
Mode V7633 xxxx
according to the desired function of input points X0 – X3.
C Other memory locations may require configuring, depending on
X0
X1
V7634
V7635
xxxx
xxxx
the HSIO mode (see the corresponding section for particular X2 V7636 xxxx
D HSIO modes).
X3 V7637 xxxx

E–6 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: High-speed Input and Pulse Output Features

Mode 10: High-Speed Counter


Purpose
1
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,
2
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 3
specific counts, making it ideal for such applications as cut-to-length. It uses counter registers
CT174 to CT177 in the CPU. 4
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
E
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 6
configuration for Mode 10.
7
DL06 Output Circuit
PLC
Y0 - Y1 Y2 - Y17
8
HSIO CPU

Counter 1 Counter 2
I/O data
V-memory
9
Filter Mode Select
CLK Reset CLK Reset V7633 0010

X0 X2 X1 X3 X4 - X23
10
Input Circuit 11
Instead of using X2 and X3 as dedicated reset inputs, you can configure X2 and X3 as normal
12
filtered inputs. In this way, the counter reset must be generated in ladder logic.
13
DL06
PLC
Output Circuit 14
Y0 - Y1 Y2 - Y17

HSIO
I/O data
CPU A
Counter 1 Counter 2 V-memory
CLK Reset CLK Reset Filter Mode Select
V7633 0010 B
X0 X1 X2 - X3

Input Circuit
X4 - X23
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–7


Appendix E: 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
1 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
2 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
3 DL06 inputs.
C0
X0
X1
X2
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

4 PORT1 PORT2 RUN STOP

E
Counter Input Wiring

6 Signal

– + Signal Common

7 12-24 VDC Supply

Interfacing to Counter Inputs


8 The DL06’s DC inputs are flexible in that they detect current flow in either direction, so they
can be wired to a sensor with either sourcing or sinking outputs. In the following circuit, a
9 sensor has an open-collector NPN transistor output. It sinks current from the PLC input
point, which sources current. The power supply can be the FA–24PS or another supply
10 (+12VDC or +24VDC), as long as the input specifications are met.
Sensor Output X0 - X3 Input
11 Output
(sinking)
Input
(sourcing)

12 Ground
12-24 VDC Supply
– + Common

13
In the circuit diagram below, an encoder has open-emitter PNP transistor outputs. It sources
14 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
A output must be 12 to 24 volts (5V encoder outputs will not work).
Encoder Output

B +12 to 24 VDC
Input
X0 - X3 Input

(sinking)
C Output (sourcing)

Ground Common
D

E–8 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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. 1
Memory Location V7633
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 2
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0

0 0 1 0
3
For the function of bits 8 - 15,
refer to page 3-6.
HSIO Mode Setup (BCD) 4
10 = High-Speed Counter

Choose the most convenient method of programming V7633 from the following: E
• Include load and out instructions in your ladder program
• DirectSOFT 5’s memory editor or Data View 6
• Use the Handheld Programmer D2–HPP
We recommend using the first method above so that the HSIO setup becomes an integral part of 7
your application program. An example program later in this section shows how to do this.
Presets and Special Relays 8
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
9
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 10
interrupt routine.
We recommend using the special relay(s) in the interrupt service routine to cause any immediate action you 11
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. 12
X0, up counter clock
Current CPU Scan
X2, external reset
Counter 1
Reset 1 Value
Does =
Input
Update
13
X1, up counter clock Count 1 =
Current
X3, external reset
Counter 2
Reset 2 Value
Preset?
Ladder
Program
INT 14
Counter 2: Preset Data Execution
HSIO
V3710 0000
V3712 0000
1500
2500 Does
= Current
Interrupt
Routine
A
V3632
Counter 0000 Data2000
1: Preset Count 2 =
Instruction Program
V3630
V3634 0000
V3632 0000
V3636
V3634 0000
0000 1000
0000
2500
2000
3175
2500
Preset?
Output
SPxxx B
V3636 0000 3175 Update IRT

V3706 0921 0000


C
V3706 0921
High 0000
Low
Word
High
Word
Word
Low
Word
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–9


Appendix E: High-speed Input and Pulse Output Features

Absolute and Incremental Presets


Two preset modes are available, absolute and incremental. Presets are entered into a
1 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
2 represent the number of counts between events.

3 Absolute Presets (default) Incremental Presets

4 Event C
Preset = 150
Event C
Preset = 150
(A + B + C)

E Event B Event B (A + B)
Preset = 100 Preset = 100
6
Event A Event A
7 Preset = 50 Preset = 50

100 200 300 100 200 300


8 = trigger point

9 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,
10 50, 100, and 150. Incremental presets trigger events at the cumulative totals: 50, 150, and
300.

11
12
13
14
A
B
C
D

E–10 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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 1
V7630. Use the LDA and OUT instructions as shown:
Load the octal address, Preset Table Pointer
2
LDA convert to hex, leave
O2000 V7630 2000

OUT
result in accumulator.
Output this address to Preset Table
3
V7630, the location of the
V7630 V2001 V2000 0000 1000

Using Fewer than 24 Presets


pointer to the Preset data.
V2003 V2002 0000 2000 4
V2005 V2004 0000 2500
When all 24 available presets are used, the CPU
knows automatically when it reaches the end of the
V2007 V2006 0000 3175 E
preset table. When using fewer than 24 presets,
however, it is necessary to signal the CPU that it has
V2077 V2076 0000 0000
6
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:
7
Table-end Code
0000 FFFF
Applicable Mode
Absolute and Incremental Signals end of presets
Meaning 8
Signals end of presets and restarts presets. Does not
0000 00FF Incremental reset accumulated pulse counts of CT174 or CT176.
Signals end of presets, restarts presets and resets
9
0000 FF00 Incremental 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
10
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 11
the previous preset was the last preset.

LDD
Load 0000 FFFF
Default Preset Table Example
V3631 V3630 0000 1000
12
into accumulator.
Kffff V3633 V3632 0000 2000

OUTD
Output this value to V3635 V3634 0000 2500 13
V3640/V3641, the registers V3637 V3636 0000 3175
V3640 beyond the Preset Table.
V3641 V3640 0000 FFFF 14
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
A
V3640 since the last preset was in V3636, and we are using fewer than 24 presets.
NOTE: In absolute mode each successive preset must be greater than the previous preset value. If a preset
B
value is less than a lower-numbered preset value, the CPU cannot compare to that value, since the counter
can only count upwards. C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–11


Appendix E: 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.
1 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
2 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.
3 Preset Register Table
Counter 1 Preset V-memory Special Relay Counter 2 Preset V-memory Special Relay
4 Preset
1
Register
V3631 / V3630
Number
SP540
Preset
1
Register
V3711/V3710
Number
SP570
2 V3633 / V3632 SP541
E 3 V3635 / V3634 SP542
2
3
V3713/V3712
V3715/V3714
SP571
SP572
4 V3637 / V3636 SP543 4 V3717/V3716 SP573
6 5
6
V3641 / V3640
V3643 / V3642
SP544
SP545
5
6
V3721/V3720
V3723/V3722
SP574
SP575
7 V3645 / V3644 SP546
7 8 V3647 / V3646 SP547
7
8
V3725/V3724
V3727/V3726
SP576
SP577
9 V3651 / V3650 SP550 9 V3731/V3730 SP600
8 10
11
V3653 / V3652
V3655 / V3654
SP551
SP552
10
11
V3733/V3732
V3735/V3734
SP601
SP602
12 V3657 / V3656 SP553
9 13 V3661 / V3660 SP554
12
13
V3737/V3736
V3741/V3740
SP603
SP604
14 V3663 / V3662 SP555 14 V3743/V3742 SP605
10 15
16
V3665 / V3664
V3667 / V3666
SP556
SP557
15
16
V3745/V3744
V3747/V3746
SP606
SP607

11 17
18
V3671 / V3670
V3673 / V3672
SP560
SP561
17
18
V3751/V3750
V3753/V3752
SP610
SP611
19 V3675 / V3674 SP562 19 V3755/V3754 SP612
12 20
21
V3677 / V3676
V3701 / V3700
SP563
SP564
20
21
V3757/V3756
V3761/V3760
SP613
SP614

13 22
23
V3703 / V3702
V3705 / V3704
SP565
SP566
22
23
V3763/V3762
V3765/V3764
SP615
SP616
24 V3707 / V3706 SP567 24 V3767/V3766 SP617
14 The consecutive addresses shown above for each relay are those assigned by the CPU as
default addresses. The Pointer for the start of Counter 1 addresses is stored by the CPU at
A V7630. V7631 is the pointer for the start of Counter 2 addresses. If you have a conflict of
addresses because of pre-existing code written to these addresses, you can change the default
B block of addresses merely by having your ladder logic place a different pointer value in V7630
for Counter 1 or V7631 for Counter 2. To change the table location, use the LDA and OUT
instructions as shown on the previous page.
C
D

E–12 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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 1
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 2
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.
3
PLC 4
OUTPUT: 6-240V
Y
X
0 1 2

INPUT: 12 - 24V
G

3
LG 0V
AC(L) AC(N) 24V C0

3 - 15mA
Y0

50 - 60Hz
Y1

5
Y2
Y3
C1

6
Y4
Y5
Y6

7
Y7 Y10 Y12

2.0A, 6 - 27V
C2

10 11
C3 Y15 Y17
Y11 Y13 Y14 Y16 N.C.
2.0A

12
PWR: 100-240V

13 14 15 16
50-60Hz 40VA

17 20
D0-06DR
21 22 23
PWR
RUN
CPU
TX1
RX1
TX2
RX2
E
LOGIC

C0 X1
06
K oyo

X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23 N.C.


Industrial Lathe 6
X0 X2 C1 X5 X7 X10 X12 C3 X15 X17 X20 X22 N.C.
TERM
A B C
PORT1 PORT2 RUN STOP

7
to X0 and X1 Encoder Motor
quadrature pulses
Start lead screw cutter head
8
The timing diagram below shows the duration of each equal relay contact closure. Each 9
contact remains on until the next one closes. All go off when the counter resets.
10
Equal Relays A B C
11
SP540
SP541
12
SP542
13
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.
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–13


Appendix E: 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
1 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
2 appendix 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
3 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.
4 Input Options
Input Configuration Register Function Hex Code Required
E X0 V7634 Counter #1 Clock
0001 (absolute) (default)
0101 (incremental)
6 Counter #2 Clock
0001 (absolute) (default)
0101 (incremental)
X1 V7635 Interrupt 0004
7 Pulse Input 0005
xx06, xx = filter time
Filtered Input 0 - 99 ms (BCD)
8 Counter #1 Reset (no interrupt) 0007* (default)
0207*
0107*
9 X2 V7636
Counter #1 Reset (with interrupt)
Interrupt
0307*
0004
Pulse Input 0005
10 Filtered Input xx06, xx= filter time
0 - 99 ms (BCD)
0007* (default)
11 Counter #2 Reset (no interrupt) 0207*
0107*
Counter #2 Reset (with interrupt) 0307*
12 X3 V7637 Interrupt
Pulse Input
0004
0005
xx06, xx= filter time
13 Filtered Input 0 - 99 ms (BCD)

14 *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,
A 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
B has a faster reset time.

C
D

E–14 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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 1
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
2
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. 3
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 4
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.
E
Standard Counter Function HSIO Counter Function
6
UP Count UDC CTxx Enable Input UDC CT174
(or CT176)
7
DOWN Count Preload Input
Reset Input
Kxxxxxxxx
Reset Input
Kxxxxxxxx
8
Counts UP and DOWN
Preload counter by write to value
Counts UP only
Can use Preload Input to change count
9
Reset input is internal only Reset may be internal or external
10
Direct SOFT 5
SP1
ENI Required
11
XX 12
Enable Input UDC CT174

XX
Preload Input
(or CT176)
Kxxxxxxxx
13
XX
Reset Input Preset Range: 14
1-99999999

A
When the enable input is energized, the up/down counter CT174 will respond to pulses on
X0 and increment. The up/down counter CT176 will respond to pulses on X1 and B
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,
C
OR the external reset X2 or X3, if you have configured X2 or X3 as an external reset.
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–15


Appendix E: 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
1 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
2 counter, and X1 is the counter clock input for the second counter. It uses the Compare-
double (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
3 counter.

4 Direct SOFT 5
First Scan Only
E SP0
LD
K10
Load constant K10 into the accumulator. This
selects Mode 10 as the HSIO mode.

6 Mode 10 OUT
V7633
Output the constant K10 to V7633, the
location of HSIO Mode select register.

Load the constant required to configure X0 as


7 LD
K1 the counter 1 clock.

Output the constant K1 to V7634, the location of


OUT
8 V7634
the setup parameter for X0.

Load the constant required to configure X1 as


Configure LD the counter 2 clock.
9 Inputs K1

Output the constant K1 to V7635, the location


OUT of setup parameter for X1.
10 V7635

Load the constant required to configure X2 as


LD an external reset without interrupt.
K7
11 OUT
Output the constant K7 to V7636, the location of
the setup parameter for X2.
V7636
12 LD Load the constant required to configure X3 as
K7 an external reset without interrupt.

13 OUT
V7637
Output the constant K7 to V7637, the location of
the setup parameter for X3.

14 SP1
UDC CT174 CT174 is the HSIO counter. The first rung’s SP1
always enables the counter. The Preload Input in
SP1 the middle is always off. The third rung’s Reset
A K99999999 input is always off, because we will use the
external reset.
SP1

B
continued on next page
C
D

E–16 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: High-speed Input and Pulse Output Features

Program Example: (cont’d)


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 1
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. 2
continued from previous page

SP1
3
CT176
SP1
UDC

K99999999
CT176
always enables the counter. The Preload Input in
the middle is always of f. The third rung’s Reset
4
input is always off, because we will use the
external reset.
SP1 E
SP1
LDD
V1174
Load the current count of the HSIO counter in
V1174 and V1175 into the accumulator
6
CMPD
K123456
Use the Compare-double instruction to compare
the double word in the accumulator to the constant
7
K123456.

SP62 Y0
OUT The execution of the above CMPD instruction turns
8
on special relay contact SP62 if the current count

SP1
is greater than the comparison number (K123456).

Load the current count of the HSIO counter in


9
LDD V1176 and V1177 into the accumulator
V1176

CMPD
Use the Compare-double instruction to compare
10
K345678 the double word in the accumulator to the constant

SP62 Y1
K345678
11
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). 12
END END coil marks the end of the main program.
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–17


Appendix E: High-speed Input and Pulse Output Features

Program Example 2: Counter With Presets


1 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 appendix. This
example program shows how to control the lathe cutter head to make three grooves in the
2 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
3 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.
4 Preset Data
A V3630 0000
B V3632 0000
1500
3780
Industrial Lathe

C V3634 0000 4850 A B C

E V3636 0000 FFFF

I/O Counter
X3 - Cutter head extended
Device
6 Assignments X4 - Cutter head retracted
Y0 - Lead screw motor
Y1 - Cutter head solenoid
Start
Cutter head Lead screw

7 SP0
Direct SOFT 5
Enable Interrupts before reaching a preset
ENI generates an interrupt. Special Relay SP0 is on

8 SP0
during the first CPU scan.

Load constant K10 into the accumulator. This


LD
K10 selects Mode 10 as the HSIO mode.

9 OUT Output the constant to V7633, the location of


V7633 HSIO Mode select register.

10 LD
K1
Load the constant required to configure X0 as
the counter clock.

11 OUT
V7634
Output the constant K1 to V7634, the location of
the setup parameter for X0.

LD Load the constant required to configure X1 as


12 Select Mode 10 K1006 a filtered input.

OUT Output the constant to V7635, the location of the

13 V7635

LD
setup parameter for X1.

Load the constant required to configure X2 as an


external reset with interrupt.
K107
14 OUT Output the constant to V7636, the location of the
V7636 setup parameter for X2.

A LD
K1006
Load the constant required to configure X3 as
a filtered input.

B OUT
V7637
Output the constant to V7637, the location of the
setup parameter for X3.

Load the octal address O3630 into the

C LDA
O3630
accumulator. This instruction automatically
converts the address into hex.

OUT Output this address to V7630, the location of

D V7630 the pointer to the Preset Table.

continued on next page

E–18 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: High-speed Input and Pulse Output Features

continued from previous page

1
SP0 Load the preset A value into the accumulator .
LDD

Load Presets
K1500

OUTD Output the accumulator contents to the memory


2
V3630 location for preset 1.

LDD
Load the preset B value into the accumulator . 3
K3780

OUTD
V3632
Output the accumulator contents to the memory
location for preset 2.
4
Load the preset C value into the accumulator .
LDD
K4850 E
OUTD Output the accumulator contents to the memory
V3634 location for preset 3.

Load the constant Kffff into the accumulator. This


6
LDD value represents the end of the preset list.
Kffff

OUTD Output the accumulator contents to the memory


location for preset 4 (end of preset marker).
7
V3636

SP1 8
UDC CT174 CT174 is the HSIO counter. The first rung’ s SP1
SP1
K99999999
always enables the counter. The preload input in
the middle is off (unused in this example). 9
SP1

The third rung’s Reset input is normally of f,


10
SP0 because we will use the external reset. You can
optionally reset the counter value on each powerup
using the SP0 contact. 11
X3 Y1

X4
RST

Y0
Input X3 energizes when the groove has finished
cutting. So, we retract the cutter head. 12
SET Turn lead screw on again, after cutter head has
retracted. 13
END END coil marks the end of the main program.

INT O0 The INT label marks the beginning of the interrupt


service routine program.
14
SP540 Preset 1 Y0
RSTI Inside the interrupt service routine, we turn OFF the
A
lead screw motor immediately .
SP541
Preset 2 Y1
SETI
These special “equal” relays turn on individually as
the corresponding preset is reached. In this
B
application, each results in the cutting of a groove
SP542 (Y1), so they are logically ORed together .
Preset 3 C
X2 C10
SETI Input X2 will be energized inside the interrupt
routine if X2 external interrupt was the source. D
IRT Return from the interrupt service routine.

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–19


Appendix E: High-speed Input and Pulse Output Features

Some applications will require a different type of action at each preset. It is possible for the
1 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
2 (inside the interrupt routine only) if the interrupt was caused by the external reset, X2 input.

3
4
E
6
7
8
9
10
11
12
13
14
A
B
C
D

E–20 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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 1
from counting with C0. Then we write the value K3000 to the count register (V1076-
V1077). 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
2
K3000. In this example, only one high-speed counter is used. The second counter could be
used in the same manner. 3
SP0
DirectSOFT 5 4
Load constant K10 into the accumulator. This
LD selects Mode 10 as the HSIO mode.

Select Mode 10
K10

OUT Output this address to V7633, the location of


E
V7633 HSIO Mode select register.

LD
Load the constant required to configure X0 as
the counter clock.
6
K1

OUT
V7634
Output the constant K1 to V7634, the location of
the setup parameter for X0.
7
LD
K1006
Load the constant required to configure X1 as
a filtered input. 8
OUT Output the constant to V7635, the location of the
V7635 setup parameter for X1.

Load the constant required to configure X2 as


9
LD a filtered input.
K1006

OUT Output the constant to V7636, the location of the


10
V7636 setup parameter for X2.

LD
Load the constant required to configure X3 as
a filtered input.
11
K1006

OUT
V7637
Output the constant to V7637, the location of the
setup parameter for X3.
12
C0
SET Set C0 on at powerup to enable counting. 13
C0

C1
UDC CT174 CT174 is the HSIO counter. The first rung’s C0
contact enables the counter. The dummy input is in
14
the middle.
K99999999

C2
A
The third rung’s Reset input is normally off,

SP0
because we will use the external reset. You can
optionally reset the counter value on each powerup
using the SP0 contact.
B
C
continued on next page
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–21


Appendix E: High-speed Input and Pulse Output Features

continued from last page


1
2 X4 C0
RST
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


3 LDD
K3000 accumulator.

OUTD Output the constant to V1174/V1175, the location

4 V1174
C1
of the accumulated count for CT76.

Generate a preload counter input pulse, which


PD
E C0 C1 C0
causes the counter to preload from V1174-V1175.

Enable the counter by setting C0, when the


SET preolad pulse on C1 has occurred (C1 is off).

6 END END coil marks the end of the main program.

7
8
9
10
11
12
13
14
A
B
C
D

E–22 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: High-speed Input and Pulse Output Features

Troubleshooting Guide for Mode 10


If you’re having trouble with Mode 10 operation, please study the following symptoms and
possible causes. The most common problems are listed below. 1
Symptom: The counter does not count.
Possible causes:
2
1. Field sensor and wiring – Verify that the encoder, proximity switch, or sensor actually turns on
and illuminates the status LED for X0 (counter 1) and X1 (counter 2). The problem could be due 3
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
4
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. E
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. 6
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
7
counting.
Symptom: The counter counts but the presets do not function. 8
Possible causes:
1. Configuration – Ensure the preset values are correct. The presets are 32-bit BCD values having a 9
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 even–numbered addresses, from V3630 to V3767. If
using less than 24 presets, be sure to place “0000FFFF,” “0000FF00,” or “000000FF” in the
10
location after the last preset used.
2. Interrupt routine – Only use Interrupt #0. Make sure the interrupt has been enabled by executing 11
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. 12
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 13
turns on.
Symptom: The counter counts up but will not reset. 14
Possible causes:
1. Check the LED status indicator for X2 (counter 1) and X3 (counter 2) to make sure it is active A
when you want a reset. Or, if you are using an internal reset, use the status mode of DirectSOFT 5 to
monitor the reset input to the counter.
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–23


Appendix E: High-speed Input and Pulse Output Features

Mode 20: Up/Down Counter


1 Purpose
2 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
3 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.
4 Functional Block Diagram
The diagram below shows HSIO functionality in Mode 20. When the lower byte of HSIO
E 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
6 energized.

7
DL06 Output Circuit
PLC
8 HSIO
Y0 - Y1 Y2 - Y17

CPU
I/O data

9 Phase A
Counter
Phase B Reset Filter Mode Select
V-memory
V7633 0020

X0 X1 X2 X3 X4 - X23
10 Input Circuit

11 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
12 energized.

13 DL06
PLC
Y0 - Y1
Output Circuit

Y2 - Y17

CPU
14 Counter
HSIO

Filter
I/O data

Mode Select
V-memory
Up Down Reset V7633 0020

A X0 X1 X2 X3 X4 - X23

Input Circuit

B
C
D

E–24 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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, 1
thus the quadrature name. When the rising edge of Phase A precedes Phase B’s leading edge
(indicates clockwise motion by convention), the HSIO counter counts UP. If Phase B’s rising
edge precedes Phase A’s rising edge (indicates counter-clockwise motion), the counter counts
2
DOWN.
3
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
4
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. E
Leading Edge Signal 90˚ phase shift 6
Clockwise sequence
Phase A
7
Phase B

Counterclockwise sequence
Phase A
8
Phase B 9
Leading Edge Signal one cycle

K oyo
10
C0
X0
X1
X2
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. 11
12
B
A
Quadrature Encoder Input
13
14
LOGIC 06
C0
K oyo

X1 X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23 N.C.


A
X0 X2 C1 X5 X7 X10 X12 C3 X15 X17 X20 X22 N.C.

B
Reset

Prox Sensor Input


C
D
Up Down

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–25


Appendix E: High-speed Input and Pulse Output Features

Interfacing to Encoder Outputs


The DL06’s DC inputs are flexible in that they detect current flow in either direction, so they
1 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
2 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.
3 Encoder Output,
(one phase) Phase A or B Input
Output Input
4 (sinking) (sourcing)
12-24 VDC Supply
E Ground – + Common

6
In the next circuit, an encoder has open-emitter PNP transistor outputs. It sources current to
7 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).
8 Encoder Output,
(one phase)
9 +12 to 24VDC Phase A or B Input
Input
10 Output (sourcing)
(sinking)

11 Ground Common

12
13
14
A
B
C
D

E–26 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: High-speed Input and Pulse Output Features

Setup for Mode 20


Remember 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. 1
Memory Location V7633
Bits 15
0
14
0
13
0
12 11
0 0
10
0 0
9 8
0
7
0
6
0
5
1
4
0
3
0
2
0
1
0 0
0
2
0 0 2 0 3
Miscellaneous Setup (BCD)
00 = Not Used (default)
HSIO Mode Setup (BCD)
20 = Up/Down Counter
4
10 = Battery Enabled
20 = Power-up in RUN
30 = Battery Enabled and
E
Power-up in RUN

Choose the most convenient method of programming V7633 from the following:
6
• Include load and out instructions in your ladder program
• DirectSOFT 5’s memory editor
7
• Use the Handheld Programmer D2–HPP
We recommend using the first method above so that the HSIO setup becomes an integral part
8
of your application program. An example program later in this section shows how to do this.
Presets and Special Relays 9
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 10
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.
11
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
12
to the ladder program, resuming program execution from the point of interruption. The
compare function is ready for the next preset event. 13
CPU Scan
X0, up counter clock
Counter 1
Current
Input
Update
14
X1, down counter clock
Value
Counter 2
Reset 1 Ladder
Program
INT
A
X2, external reset Does = Execution
count HSIO
V-memory Preset Data
V3630 0000 1000
= Preset?
Current
Interrupt
Routine
B
V3632 0000 2000 Instruction Program
V3634 0000
V3636 0000
2500
3175
Output
Update
SPxxx
IRT
C
V3706 0921 0000
D
High Low

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–27


Appendix E: 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
1 below. The section on Mode 60 operation at the end of this appendix describes programming
the filter time constants.
2 Mode 20 Up/Down Counter

3 Input
Configuration
Register Function Hex Code Required
0202 (standard, absolute)
4 Up counting
0302 (standard, incremental)
0002 (quadrature, absolute) (default)
X0 V7634
E Phase A
0102 (quadrature, incremental)
1002 (quadrature, absolute) 4x counting*
1102 (quadrature, incremental) 4x counting*
6 X1 V7635 Down counting or Phase B 0000
Counter Reset (no interrupt) 0007** (default)
7 X2 V7636
0207**
Counter Reset (with interrupt) 0107**
0307**
8 Pulse input
Filtered input
0005
xx06 (xx = filter time, 0 - 99ms (BCD)
Pulse input 0005
9 X3 V7637
Filtered input xx06 (xx = filter time, 0 - 99ms (BCD) (default)

10 * With this feature, you can count 4 times more with the same encoder.

11 4x counting 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Normal counting 1 2 3 4

12
Phase A
13
Phase B
14 ** 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’
A 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
B does not check for changed preset values, so the DL06 has a faster reset time.

C
D

E–28 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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 1
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
2
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 3
will count. The enable input must be off during a preload.
4
Standard Counter Function HSIO Counter Function

UP Count UDC CTxx Enable Input UDC CT174


E
DOWN Count
Kxxxxxxxx
Preload Input
Kxxxxxxxx
6
Reset Input Reset Input

7
Counts UP and DOWN Counts UP and DOWN (from X0, X1)
Preload counter by write to value Can use Preload Input to change count
Reset input is internal only Reset may be internal or external 8
The next figure shows the how the HSIO quadrature counter will appear in a ladder program. 9
10
Enable Input UDC CT174
Preload Input
11
Kxxxxxxxx
Reset Input
-8388608
PresettoRange:
8388607
12
1-99999999

When the enable input is energized, the counter will respond to quadrature pulses on X0 and
13
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 14
counter can receive a reset from either the contact(s) on the reset rung in the ladder, OR the
external reset X2. A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–29


Appendix E: 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.
1
2 DirctSOFT
DirectSOFT
ENI

3 SP0
LD
Load constant K20 into the accumulator. This selects
Mode 20 as the HSIO mode.
K20

4 OUT
V7633
Output this value to V7633, the location of the HSIO
Mode select register.

Load the constant required to configure X0 and X1 as a


E LD
K2 quadrature absolute input.

Output the constant to V7634, the location of the setup


OUT
V7634 register for X0.

6 LD
K107
Load the constant required to configure X2 as an external
reset with interrupt.

7 OUT
V7636
Output the constant to V7636, the location of the setup
register for X2.

LD Load the constant required to configure X3 as a filtered

8 K2006

OUT
input.

Output the constant to V7637, the location of the setup


V7637 register for X3.

9 LDD
K5000
Load the preset 1 value into the accumulator.

10 OUTD
V3630
Output the accumulator contents to the memory
location for preset 1.

LDD Load the preset 2 value into the accumulator.

11 K10000

OUTD Output the accumulator contents to the memory


V3632 location for preset 2.

12 LDD
K15000
Load the preset 3 value into the accumulator.

Output the accumulator contents to the memory


OUTD
13 V3634 location for preset 3.

Load the constant FFFF into the accumulator. This


LDD
KFFFF value represents the end of the preset list.

14 OUTD
V3636
Output the accumulator contents to the memory
location for preset 4 (end of preset marker).

A SP1
UDC CT174 CT174 is the HSIO quadrature counter
. The first rung’s SP1
always enables the counter. The dummy input is used by
SP1 the built-in compiler.

B SP1
K18724

C END END coil marks the end of the main program..

D
continued on next page

E–30 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: High-speed Input and Pulse Output Features

continued from last page

INT O0
1
SP540 Y0
OUT
Set Y0 to ON when the counter reaches or exceeds
our comparison value while COUNTING UP.
2
SP541 Y1
OUT
Set Y1 to ON when the counter reaches or goes below
our comparison value while COUNTING DOWN. 3
IRT
4
The Load Accumulator instructions have set up the V-memory as required, i.e. 20 in V7633 E
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
6
stored in memory locations V3630 through V3635. The next even numbered location
following this has FFFF to indicate we have no more presets. 7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–31


Appendix E: 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
1 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
2 removed to the finished product line.
When we have reached 500 bottles in the process, an “over 500” light turns on and a
3 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.
4 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
E DL06.
DirectSOFT 5
6 SP0
LD
K20
7 OUT
V7633
Mode 20 Up/Down counter

8 LD
K202 Standard counting
Absolute preset mode at X0 and X1

9 OUT
V7634

LD

10 K0

OUT
Must be zero with mode 20

V7635
11 LD
K7
External reset without interrupt (X2)
12 OUT
V7636

13 LD
K1006
Discrete filtered input at (X3) 10 ms.
OUT
14 V7637

SP1
A SP1
UDC CT174 Up/Down counter
Only one counter is used with mode 20. The actual
K500 count (32-bit) is stored in V1175/V1174. When pulses

B SP1
are received at point X1, the value in V1175/V1174
will decrement.

C Actual counts
V1174 K450
Y20
When the pulse count reaches and exceeds 450,
OUT
D the "over 450" light (Y20) will turn on.

Continued on next page.

E–32 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: High-speed Input and Pulse Output Features

continued from previous page

Counter output Over 500 light


1
CT174 Y21 When the pulse count reaches or exceeds

OUT
the preset value of 500, the output of the
counter (CT174) goes high and turns on
Over 500 latch the "over 500" light (Y21) and latches C5.
2
C5
SET 3
Over 500 latch
When the count is 500 or greater, the
C5 Y22
OUT
rerouting gate (Y22) turns on and will stay
on for 30 seconds after the count falls
4
below 500.

Counter output
CT174 TMR
E
TIMER 0 OUTPUT
TO
K300
Over 500 latch
6
T0 C5
RST 7
END END coil marks the end of the main program.
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–33


Appendix E: 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
1 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.
2 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
3 direction and injects glue into the same holes.
DirectSOFT 5

4 SP0
ENI Enable interrupts

LD
K20
E OUT
V7633
Mode 20

6 LD
K2
Quadrature counting
absolute mode at X0 and X1
OUT

7 V7634

LD
K0
Must be zero
8 OUT
V7635

LD
9 K107

OUT
External reset w/interrupt (X2)

V7636

10 LD
K1006 Discrete filtered input at (X3)
10 ms.
11 OUT
V7637
SP0
LDD Presets for up counting.
12 K5000

OUTD
This rung loads the counter's presets.
In this case, the absolute preset
mode has been selected.
V3630

13 LDD
K6000

14 OUTD
V3632

LDD
K7500
A OUTD
V3634

B LDD
K8000

OUTD

C V3636

LDD
KFFFF Tell CPU that there are

D OUTD
V3640
no more presets.

Continued on next page.

E–34 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: High-speed Input and Pulse Output Features

Continued from previous page.

Manual start of drilling


Forwarding
positioning
1
process momentary PB. table.
X20 Y30
SET
2
C1 C1

Drilling sequence
RST
Drilling sequence
3
completed completed
(one hole only).

1st preset
(one hole only).

Reversing
4
actual counts. Position Table. Glue injection.

V1174 V3630 V1174 K5100


Y31 Y32
OUT
E
V1174
2nd preset
actual counts.
V3632 V1174 K6100
6
3rd preset
actual counts.
7
V1174 V3634 V1174 K7600

SP1
8
SP1
UDC CT174

K8388607
9
SP1
10
Drilling sequence initiation.
C5
One-shot bit.
C6
11
One-shot bit.
PD

Drill press down.


12
C6 Y20
SET 13
Drill turning.

Drill fully extended.


Y21
SET 14
Limit switch 1. Drill press down.
X10 Y20
RST
A
Drill press up.

Drill fully retracted.


Y22
SET
B
(home position)
Limit switch 2.
X3
One-shot bit.
C7 C
PD

Continued on next page.


D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–35


Appendix E: High-speed Input and Pulse Output Features

Continued from previous page.

1 One-shot bit. First scan bit.


C7 SP1
Drill press down.
Y22
RST

2 Drill turning.
Y21
RST

3 Drilling sequence completed


(one hole only).
C1

4 SET

Drilling sequence initiation.


C5
E RST

END

6 INT O0

7 SP540
Forwarding
Positioning Table. Y30
OUT

8 Drilling sequence initiation.


C5
SET

9 SP541
Forwarding
Positioning Table. Y30
OUT

10 Drilling sequence initiation.


C5
SET

11 SP542 Forwarding
Positioning Table. Y30
OUT

12 Drilling sequence initiation.


C5
SET

13 SP543
Forwarding
Positioning Table. Y30
OUT

14 Reversing
Positioning
Table.

A Y31
SET

Drilling sequence initiation.

B Position Table
home limit switch
C5
SET
(resets counter to zero). Reversing

C X2
Positioning
Table.
Y31
RSTI

D IRT

E–36 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: High-speed Input and Pulse Output Features

Troubleshooting Guide for Mode 20


If you’re having trouble with Mode 20 operation, please study the following symptoms and
possible causes. The most common problems are listed below. 1
Symptom: The counter does not count.
Possible causes:
2
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 3
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
4
specifications.
2. Configuration – make sure all of the configuration parameters are correct. V7633 must be set to E
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
6
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
7
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.
8
Symptom: The counter counts in the wrong direction 9
(up instead of down, and visa-versa).
Possible causes: 10
1. Channel A and B assignment – It’s 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.
11
Symptom: The counter counts up and down but will not reset. 12
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 13
status mode of DirectSOFT 5 to monitor the reset input to the counter.
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–37


Appendix E: High-speed Input and Pulse Output Features

Mode 30: Pulse Output


1 Purpose
2 The HSIO circuit in Mode 30 generates output pulse
trains suitable for open-loop control of a single-axis Velocity
Trapezoidal Profile

motion positioning system. It generates pulse (stepper


3 increment) and direction signals which you can connect
Accel Decel
to motor drive systems and perform various types of
4 motion control. Using Mode 30 Pulse Output, you can
select from three profile types detailed later in this Time
appendix:
E • Automatic Trapezoidal – Accel Slope to Target Velocity to Decel Slope
• Step Trapezoidal – User defined step acceleration/deceleration and target velocity
6 • Velocity Control – Speed and Direction only
The HSIO circuit becomes a high-speed pulse generator (up to 10 kHz) in Mode 30. By
7 programming acceleration and deceleration values, position and velocity target values, the
HSIO function automatically calculates the entire motion profile. The figure below shows the
8 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.
9 Pulse
DL06 Micro PLC

10 Direction
Stepper
Motor

11 Y
0 1 2
G

3
LG 0V
AC(L) AC(N) 24V C0
OUTPUT: 6-240V

4
Y0

50 - 60Hz
Y1

5
Y2
Y3
C1

6
Y4
Y5
Y6

7
Y7 Y10 Y12

2.0A, 6 - 27V
C2

10 11
C3 Y15 Y17
Y11 Y13 Y14 Y16 N.C.
2.0A

12
PWR: 100-240V

13 14 15 16
50-60Hz 40VA

17 20
D0-06DR
21 22 23
PWR
RUN
CPU
TX1
RX1
Drive
Amplifier
TX2
X RX2
INPUT: 12 - 24V 3 - 15mA

12 LOGIC

C0 X1
06
K oyo

X3 X4 X6 C2 X11 X13 X14 X16 C4 X21 X23 N.C.


X0 X2 C1 X5 X7 X10 X12 C3 X15 X17 X20 X22 N.C.
TERM

13 PORT1 PORT2 RUN STOP

In the figure above, the DL06 generates pulse and


14 direction signals. Each pulse represents the smallest
CCW Pulse

increment of motion to the positioning system (such as


A one step or micro-step to a stepper system). CW Pulse
Alternatively, the HSIO Pulse Output Mode may be
B configured to deliver counter clock-wise (CCW) and
clock-wise (CW) pulse signals as shown to the right.
Drive
Amplifier

C 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.

E–38 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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 1
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. 2
DL06 Output Circuit
3
PLC
Y0
(Pulse / CW)
Y1
(Direction / CCW) Y2 - Y17 4
HSIO
SP 104 Profile Complete
E
CPU
Y0 Start Profile
PULSE GEN
Y1 Preload Position Value
6
X1 Filtered Input
Interrupt FILTER
Mode select
V-memory 7
V7633 xx30
X1 during
Automatic/Step
8
Trapezoidal Profile X0, X1, X2, X3 X4 - X23

Input Circuit
9
10
IMPORTANT NOTE: In Pulse Output Mode, Y0 and Y1 references are redefined or are used differently in 11
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.
12
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 13
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
14
configuration shown above).
• References “Y0” and “Y1” are used in two different ways. At the discrete output connector, Y0 and
A
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. B
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.
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–39


Appendix E: 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.
1 Motor
Amplifier

2
3 Power Input
Signal Common
+24 VDC
- +
Pulse
Direction
4
E 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
OUTPUT: Sinking Output 6 - 27V 1.0A PWR: 100-240V 50-60Hz 40VA

6
Interfacing to Drive Inputs
7 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
8 following diagram shows how to interface to a sourcing drive input circuit.
Y0, Y1 Pulse Output Drive Input
9 +DC Power
Power

Output Input
10 (sinking) + (sourcing)

Common – Ground
11
12
The following circuit shows how to interface to a sinking drive input using a pullup resistor.
13 Please refer to Appendix 2 to learn how to calculate and install R pullup.
Y0, Y1 Pulse Output
14 +DC power
Power

R pullup Drive Input


A (sourcing)
(sinking) Output Input R Input
B + (sinking)
Supply
C Common – Ground

E–40 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: High-speed Input and Pulse Output Features

Motion Profile Specifications


The motion control profiles generated in Pulse Output Mode have the following
specifications: 1
Motion Control Profile Specifications
Parameter Specification
Automatic Trapezoidal – Accel Slope / Target Velocity / Decel Slope
2
Profiles Step Trapezoidal - Step Acceleration / Deceleration
Velocity Control – Speed and Direction only 3
Position Range –8388608 to 8388607
Positioning
Velocity Range
Absolute / relative command
40 Hz to 10 kHz
4
V-memory registers V3630 to V3652 (Profile Parameter Table)
Current Position CT174 and CT175 (V1174 and V1175) E
Physical I/O Configuration
The configurable discrete I/O options for Pulse Output Mode are listed in the table below. 6
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.
7
Input Configuration Register
Physical I/O Configuration
Function Hex Code Required
8
Y0 = Pulse
– V7632
Y1 = Direction
Y0 = CW Pulse
0103
9
Y1 = CCW Pulse 0003 (default)

X0 V7634
pulse input
filtered input
0005
xx06, xx = filter time, 0-9 (BCD) (default)
10
pulse input 0005
X1 V7635
filtered input xx06, xx = filter time, 0-99 (BCD) (default) 11
pulse input 0005
X2 V7636
filtered input
pulse input
xx06, xx = filter time, 0-99 (BCD) (default)
0005
12
X3 V7637
filtered input xx06, xx = filter time, 0-99 (BCD) (default)
Logical I/O Functions 13
The following logical I/O references define functions that allow the HSIO to communicate
with the ladder program. 14
Logical I/O/ Functions
Logical I/O Function A
SP104 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 B
X1 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
position C
Start Profile – the ladder program turns on Y0 to start motion. If turned off before
Y0 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
D
Y1 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, 3rd Edition Rev. A E–41


Appendix E: High-speed Input and Pulse Output Features

Setup for Mode 30


1 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.

2 Memory Location V7633


Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
3 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0

0 0 3 0
4
Miscellaneous Setup (BCD) HSIO Mode Setup (BCD)
E 00 = Not Used (default)
10 = Battery Enabled
30 = Pulse Output
20 = Power-up in RUN
6 30 = Battery Enabled and
Power-up in RUN

7
8 Choose the most convenient method of programming V7633 from the following:
• Include load and out instructions in your ladder program
9 • DirectSOFT 5’s memory editor
• Use the Handheld Programmer D2–HPP
10 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.
11
Memory Location V3630 (default)
12 Bits 15
0
14
0
13
0
12
0
11 10
0 1
9
1
8
1
7
0
6
0
5
0
4
0
3
0
2
0
1
0
0
0

13 0 7 0 0

14 Profile Select (BCD)


4 to 7, C to F = Automatic Trapezoidal Profile
Target Velocity Value
Range = 0, 4 to 999, representing
0, 1, 8, 9 = Step Trapezoidal Profile 40 Hz to 10 kHz pulse rate
A 2 = Velocity Profile

B
C
D

E–42 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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 (12–15) select the type of profile required. The lower 12 bits (0-11) select the
1
Target Velocity.
The ladder program must program this location before initiating any of the three profiles. 2
The LD and OUT instruction will write all 16 bits, so be sure to fully specify the full four-
digit BCD value for the Profile / Velocity Select Register each time. 3
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
4
whichever reference method is most convenient for your application.
E
Profile Parameter Table Profile Table Pointer
V7630 is a pointer location which points to
the beginning of the Profile Parameter Table.
V7630 3630 6
The default starting location for the profile Profile Parameter Table
parameter table is V3630. However, you may V3630 xxxx 7
change this by programming a different value V3631 xxxx xxxx
in V7630. Remember to use the LDA (load
address) instruction, converting octal into hex.
V3633 xxxx 8
V3634 xxxx
The HSIO uses the next V-memory register
past the bottom of the profile parameter table
V3635 xxxx 9
to indicate profile errors. See the error table at Pulse Output Error Code
the end of this section for error code V3636 00xx 10
definitions.
Automatic Trapezoidal Profile 11
V-Memory Function Range Units
Automatic Trapezoidal Profile 4=absolute
5=absolute
w/o interrupt
with interrupt*
12
without Ending Velocity –
(Ending Velocity is fixed to 0.) C=relative w/o interrupt
V3630, bits 12–15
D=relative with interrupt* 13
Automatic Trapezoidal Profile 6=absolute w/o interrupt
with Ending Velocity 7=absolute with interrupt*
(Use V3637 to set up
Ending Velocity.)
E=relative w/o interrupt
F=relative with interrupt*

14
V3630, bits 0–11 Target Velocity 4 to 999 or 0 to 1000 x 10 pps
V3631 / V3632 Target Position** –8388608 to 8388607 Pulses A
V3633 Starting Velocity 4 to 100 x 10 pps
V3634
V3635
Acceleration Time
Deceleration Time
1 to 100
1 to 100
x 100 mS
x 100 mS
B
V3636 Error Code (see end of section) –
V3637 Ending Velocity 4 to 100 x 10 pps C
* If you select to use interrupt, the DL06 will not start looking for your target count
until the interrupt X1 is on. D
**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, 3rd Edition Rev. A E–43


Appendix E: High-speed Input and Pulse Output Features

Step Trapezoidal Profile


1 V-Memory Function Range Units
0=absolute w/o interrupt
2 V3630, bits 12–15 Step Trapezoidal Profile 7=absolute with interrupt*
8=relative w/o interrupt
9=relative with interrupt*

3 V3630, bits 0–11 Target Velocity 4 to 999


or 0 for 1000 x 10 pps
V3631 / V3632 Target Position** –8388608 to 8388607 Pulses
4 V3633
V3634
Step 1 Acceleration
Step 1 Distance
4 to 1000
1 to 9999
x 10 pps
Pulses
V3635 Step 2 Acceleration 4 to 1000 x 10 pps
E V3636 Step 2 Distance 1 to 9999 Pulses
V3637 Step 3 Acceleration 4 to 1000 x 10 pps
6 V3640
V3641
Step 3 Distance
Step 4 Acceleration
1 to 9999
4 to 1000
Pulses
x 10 pps
V3642 Step 4 Distance 1 to 9999 Pulses
7 V3643 Step 5 Deceleration 4 to 1000 x 10 pps
V3644 Step 5 Distance 1 to 9999 Pulses
8 V3645
V3646
Step 6 Deceleration
Step 6 Distance
4 to 1000
1 to 9999
x 10 pps
Pulses
V3647 Step 7 Deceleration 4 to 1000 x 10 pps
9 V3650 Step 7 Distance 1 to 9999 Pulses
V3651 Step 8 Deceleration 4 to 1000 x 10 pps
10 V3652 Step 8 Distance 1 to 9999 Pulses

* If you select to use interrupt, the DL06 will not start looking for your target count
11 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.
12
13 Velocity Control
V-Memory Function Range Units
14 V3630 Velocity Profile 2000 only –
V3631 / 3632 Direction Select 0=CW, 80000000=CCW, Pulses
A V3633 Velocity 4 to 1000 x 10 pps
V3636 Error Code (see end of section) –

B
C
D

E–44 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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. 1
• Automatic Trapezoidal – Accel Slope to Target Velocity to Decel Slope
• Step Trapezoidal – Velocity to Position Control on Interrupt
2
• Velocity Control – Speed and Direction only
Automatic Trapezoidal Profile Defined
3
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 4
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. E
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
6
right, registration marks on the scrap area of the work-
piece allow a machine tool to register its position relative to
Finished part area Scrap
Area 7
the rectangle, to drill properly.
Home search moves allow open-loop motion systems to re- 8
calibrate (preload) the current position value at powerup. direction of motion
Registration marks 9
10
Velocity (Hz) Automatic Trapezoidal Profile

800 11
600 Target = 7000 pulses
positioning velocity = 800 Hz
400
Ending velocity =
12
200 Starting velocity =
0 Hz or 40 to 1000 Hz
40 to 1000 Hz
100 ms to 10 secs 100 ms to 10 secs
Time 13
0 pulses 7000 pulses
Acceleration Deceleration 14
The user determines the starting velocity, the acceleration/deceleration times, and the total
number of pulses. The CPU computes the profile from these inputs. A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–45


Appendix E: High-speed Input and Pulse Output Features

Step Trapezoidal Profiles Defined


The step trapezoidal profile is a combination of velocity and position control modes. The
1 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
2 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
3 deceleration ramp is applied in advance of the target position.
Velocity (Hz) Step Trapezoidal Profile
4 1000
4 Target = 7000 pulses 5
800 positioning velocity = 1000 Hz

E 600
2
3 6

7
400

6 200
1

100 200 300 400 5000 400 300 200


8

100
Time

7 0 pulses
Acceleration
1000 pulses
Deceleration
6000 pulses 7000 pulses

Define steps 1 through 4 for gradual acceleration to the target velocity and define steps 5
8 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
9 used to provide gradual ramping in applications involving smaller motors and loads.
Velocity Control Defined
10 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
11 to be defined. The remaining velocity values can be created while motion is in progress.
Arrows in the profile shown indicate velocity changes.
12 Velocity Control Profile
Velocity (Hz)
13 800

600
14 400

A 200

Time

B
C
D

E–46 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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. 1
Automatic Trapezoidal Profile 2
Velocity
Target Velocity 3
Accel Decel
Starting
4
Velocity Ending velocity (optional)
E
Time
Start position Target position 6
Start
External Interrupt
(Optional)
Y0
X1
7
SP104
Profile Complete 8
The time line of signal traces below the profile indicates the order of events. The HSIO uses 9
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
10
initiate the next profile move.
You can also use the external interrupt (X1). Once the external interrupt feature is selected for 11
the profile, the DL06 keeps outputting the pulses until X1 turns on. Then, the DL06 outputs
the pulses defined as the target position. 12
If you are familiar with motion control, you’ll 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.
13
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
14
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 A
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. B
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
C
must occur before the profile begins, because the HSIO ignores Y1 during motion.
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–47


Appendix E: 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
1 figure. It consists of a non-zero starting velocity, and moderate target velocity.
Trapezoidal Profile
2 Velocity
Target V elocity = 1 kHz
3
Accel = 2 sec Decel = 4 sec

4 Starting In this example the


ending velocity is not
Velocity = 40Hz
selected.

E Time
Start position Target position = 5000
6
The following program will realize the profile drawn above, when executed. The beginning of
7 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.
8 Direct SOFT 5

SP0 Load constant K30 into the accumulator. This selects


LD
9 K30
Mode 30 as the HSIO mode.

Mode 30 Output the constant to V7633, the location of the HSIO


OUT
10 V7633 Mode select register.

Load the octal address of the beginning of the Profile


Locate Parameter LDA Parameter Table. The LDA instruction converts this to a
11 Table (optional) O3630 hex number in the accumulator.
Output this address to V7630, the location of the pointer
OUT to the Profile Parameter Table.
12 V7630
Load the constant K103 which is required to select
Select Pulse / LD pulse and direction for physical Y0 and Y1 functions,
K103
13 Direction respectively (use K3 if your application needs CW
and CCW).
OUT Output this constant to V7632, configuring the pulse
V7632
14 output type.

Load the constant K1006 which is required to select


Filtered Inputs LD
K1006 filtered inputs with a 10 mS filter time constant.
A OUT Output this constant to V7634, configuring X0.
V7634
B OUT Output this constant to V7635, configuring X1.
V7635
C OUT Output this constant to V7636, configuring X2.
V7636
D OUT Output this constant to V7637, configuring X3.
V7637
Continued on next page.

E–48 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: High-speed Input and Pulse Output Features

Continued from previous page.

1
SP0 Load the constant K4100 which is required to select
LD Automatic Trapzoidal Profile, absolute positioning,
K4100
without interrupt and a target velocity of 1 kHz.
Output this constant to V3630, the location of the Profile
2
Profile / Target OUT
Velocity Select / Starting Velocity setup register .

Target Position
V3630
Load the constant K5000 which selects a target
3
LDD position of 5000 pulses. Don’t forget to use double
K5000

OUTD
word size (8-digit BCD position value).
Output this constant to V3631 and V3632, the location of
4
the Target Position double-word register .
V3631

Starting Velocity LD
Load the constant K4 which is required to select a
starting velocity of 40 Hz (4 x 10 pps).
E
K4

OUT
Output this constant to V3633, the location of the starting
velocity parameter register .
6
V3633

Acceleration LD
Load the constant K20 which is required to select an
acceleration time of 2 seconds (20 x 100 mS).
7
K20

OUT
V3634
Output this constant to V3634, the location of the
acceleration parameter register .
8
Deceleration LD
K40
Load the constant K40 which is required to select a
deceleration time of 4 seconds (40 x 100 mS). 9
OUT
V3635
Output this constant to V3635, the location of the
deceleration parameter register . 10
Start Profile
X3 Y0
OUT
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.
11
Profile Complete
SP 104 Y2
OUT
SP104 is the logical output of the HSIO to indicate
the move is complete. W e use Y2 to energize an
12
annunciator that the profile has finished.
13
Preload Position Value
At any time you can write (preload) a new position into the current position value. This is 14
often done after a home search (see the registration example programs).
A
C0 Load the constant K1000 as the new current position
LDD
K1000
value.
B
Profile / Target Output this constant to V1174/V1175 (CTA174/CTA175). the
OUTD
Velocity V1174
location of the current position value.
C
Y1
PD 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.
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–49


Appendix E: High-speed Input and Pulse Output Features

Program Example 2: Automatic Trapezoidal Profile with External Interrupt


Registration Applications:
1 1. In a typical application shown to the right,
product material in work moves past a work tool
2 such as a drill. Registration marks on the scrap Finished part area Scrap
Area
area of the work-piece allow a machine tool to
3 register its position relative to the rectangle, to
drill properly.
direction of motion

4 2. In other examples of registration, the work


piece is stationary and the tool moves. A drill bit
Registration marks

may approach the surface of a part in work,


E preparing to drill a hole of precise depth.
However, the drill bit length gradually decreases Detect contact
6 due to tool wear. A method to overcome this is to
detect the moment the drill makes contact with the surface of the part each time a part is
drilled. The bit can then drill a constant depth after making contact with the part’s surface.
7 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
8 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
9 to the physical “home position”.
When an interrupt pulse occurs on physical input X1, the starting position is declared to be
10 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.
11 Registration Profile
Velocity

12 Accel
Target Velocity

Decel
Starting

13 Velocity

Start Target Time


position position
14 Start Y0

External Interrupt X1

A Profile Complete SP104

The time line of signal traces below the profile indicates the order of events. The CPU uses
B logical output Y0 to start the profile. Immediately the HSIO turns off the Profile Complete
signal (SP104), so the ladder program can monitor the move’s completion by sensing the
C signal’s on state.

E–50 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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.
1
Automatic Trapezoidal Profile
Velocity
Target V elocity = 1 kHz
2
Accel = 2 sec Decel = 4 sec 3
Ending Velocity =
Starting
Velocity = 40 Hz
80 Hz 4
Time E
Start position Target position = 5000
6
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.
7
DirectSOFT 5
SP0 Load constant K30 into the accumulator. This selects
8
LD Mode 30 as the HSIO mode.
K30

Mode 30 Output this constant to V7633, the location of the HSIO


9
OUT Mode select register.
V7633

Locate Parameter LDA


Load the octal address of the beginning of the Profile
Parameter Table. The LDA instruction converts this to a
10
Table (optional) O3630 hex number in the accumulator.

OUT
Output this address to V7630, the location of the pointer
to the Profile Parameter Table.
11
V7630

Select Pulse / LD
K103
Load the constant K103 which is required to select
pulse and direction for physical Y0 and Y1 functions,
12
Direction respectively (Use K3 if your application requires CCW and CW).

OUT
V7632
Output this constant to V7637, configuring the pulse
output type. 13
Filtered Inputs LD
K2006
Load the constant K2006 which is required to select X0 and X1
as a filtered input with a 20 mS filter time constant. 14
Output this constant to V7634, configuring X0.
OUT
V7634 A
Output this constant to V7635, configuring X1.
OUT
V7635
Load the constant K1006 which is required to select X2 and X3 as a
B
LD filtered input with a 10 ms filter time constant.
K1006
Output this constant to V7636, configuring X2.
C
OUT
V7636

OUT
Output this constant to V7637, configuring X3.
D
V7637

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–51


Appendix E: High-speed Input and Pulse Output Features

Continued from previous page

1
SP0 Load the constant KF100 which is required to select
LD
2 KF100
Automatic Trapezoidal Profile, relative positioning, with interrupt a
velocity of 1 kHz (Fxxx times 10 pps).

Profile / Target Output this constant to V3630, the location of the Profile
OUT Select / StartingVelocity setup register.
3 Velocity V3630
Load the constant K5000 which selects a target
Target Position LDD position of 5000 pulses. Don’t forget to use double
K5000
4 OUTD
word size (8-digit BCD position value).
Output this constant to V3631 and V3632, the location of
the Target Position double-word register.
V3631
E Starting Velocity LD
Load the constant K4 which is required to select a
starting velocity of 40 Hz (4 x 10 pps).
K4

6 OUT
Output this constant to V3633, the location of the starting
velocity parameter register.
V3633

7 Acceleration LD
K20
Load the constant K20 which is required to select an
acceleration time of 2 seconds (20 x 100 mS).

8 OUT
V3634
Output this constant to V3634, the location of the
acceleration parameter register.

Load the constant K40 which is required to select a


9 Deceleration LD
K40
deceleration time of 4 seconds (40 x 100 mS).

Output this constant to V3635, the location of the


10 OUT
V3635
deceleration parameter register.

Ending Velocity Load the constant K8 which is required to select an


LD ending velocity of 80Hz (8 x 10 pps).
11 K8

Output this constant to V3637, the location of the


OUT ending velocity register.
12 Start Profile
X3
V3637

Y0
SET We use an input to allow the operator to start the
13 Profile Complete
profile. X3 is a momentary Start switch. When the
operator turns X3 ON, logical output Y0 starts the
profile.
SP104 Y2
14 OUT SP104 is the logical output of the HSIO to indicate
the move is complete. We use Y2 to energize an
annunciator that the profile has finished. This won’t
C0
A PD
occur until after the interrupt from X1 has occurred
and the profile is complete.

C0 Y0
B RST

C 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.
D

E–52 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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 1
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.
2
Load 3
Positioning System Motor
4
Limit Switches CCW limit (X0) Home limit (X1) CW limit (X2) E
Motion
Numbering System -3000 -2000 -1000 0 1000 2000 3000
6
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 7
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 machine’s engineering units.
8
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 9
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. 10
• 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
11
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
12
to the home limit switch from the same direction, so that the final physical position is the same
in either case! 13
Direct SOFT 5 Filtered Inputs
SP0
LD
K30
Selects Mode 30 as
the HSIO mode. LD
K2006
The constant K2006
selects a 20 mS filter
time constant.
14
Mode 30 OUT
V7633
OUT
V7634
Output this constant to
V7634, configuring X0. A
Locate Configure the address Output this constant to
Parameter
Table (optional)
LDA
O3630 of the parameter table.
OUT
V7635
V7635, configuring X1.
B
The constant K1006
OUT LD selects a 10 mS filter

Select Pulse /
V7630
Configure the Y0 and Y1
K1006 time constant.
Output this constant to
C
LD pulse outputs for pulse OUT V7630, configuring X2.
Direction K103 V7636

OUT
and direction, respectively.

OUT Output this constant to


D
V7637 V7637, configuring X3.
V7632

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–53


Appendix E: High-speed Input and Pulse Output Features

Profile / Target Velocity


C1 Add a timer to
SP0 Select Automatic Trape- TMR
1 LD
KD100
zoidal Profile, relative
positioning, and a target
T0
K5
create a slight
delay before
reversing motor.
velocity of 1000 pps

2 OUT
V3630
(Dxxx times 10 pps). T0 C2
SET CCW delay done.
Starting Velocity The constant K4 selects a
LD
3 K4 starting velocity of 40 Hz
(4 x 10 pps).
CCW past home
Y0
SET Start profile again.

OUT C2 C3 X1
4 V3633 C3
SET CCW past home
The constant K20 selects
Acceleration LD an acceleration time of 2 Load a small
E K20 seconds (20 x 100 mS). LDD
K50 positive position
count (go CW).
OUT
6 Deceleration
V3634

We’ll choose the same for


OUTD
V3631
OUT
V3635 the deceleration value. Home Limit found, CW search direction
7 X7 C10
C3 X1 Y0
Start the home search RST Turn off Start Profile.
SET
8 when X7 turns on.
C4
Go CW back to
Search in CW direction SET home.

9 C10 C0
LDD
K50
The constant K50 selects
a target position of 50
pulses (CW direction).
C4
TMR
T1
Add a timer to
create a slight
delay before
K5 reversing motor.
10 Target Position OUTD
V3631
Turn on Start Profile,
T1 C5
SET CW delay done.
Y0 searching for either the
11 SET
home limit or the CW limit
(depends on our starting Y0
position). SET Start profile again.
C0
12 SET Set C0 to indicate the CW
home search has begun. Home Limit found, CW search direction
CW Limit found C0 C1 C3 X1 Y0
13 C0 C1 X2 Y0
RST Turn off Start Profile.
C5
RST Turn off Start Profile.

LDD Load the constant

14 LDD
K80000200
The constant –K200
selects a target
position of –200
K0 K0 for our initialized
position.

pulses, which is in OUTD Output this constant


to V1174/V1175.
A OUTD
V3631
the CCW direction. V1174

Y1
C1 PD
B SET
The CW limit has
been reached.

The home search profile will execute specific parts of the program, based on the order of
C 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
D 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”.

E–54 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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. 1
Velocity (Hz) Step Trapezoidal Profile 2
1000 Step Step
800

600
Accel Step
3
4 5
Step
6
Decel 3
Step Step
2 7
Target position
400

200
Step
1
Step
8 4
Time

Start
Start position E
External Interrupt
(Optional)
Y0
X1
6
SP104
Profile Complete
7
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
8
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 9
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
10
the distance (number of pulses) of each step. You don’t 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 11
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. 12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–55


Appendix E: High-speed Input and Pulse Output Features

Program Example 4: Step Trapezoidal Profile


1 Program
Example SP0 Load the constant K30 which is required to select
LD
2 K30
Mode 30 as the HSIO mode.

Mode 30 Output this constant to V7633, the location of the


OUT HSIO mode selection register. .
3 V7633
Load the octal address O3630 of the beginning of
Locate Parameter LDA the Profile Parameter Table.
O3630
4 Table
OUT
Output this constant to V7630, the location of the
V7630 pointer to the Profile Parameter Table.

E LD
Load the constant K3 which is required to select CW
and CCW for physical Y0 and Y1 functions.
Select CW/CCW K3

6 OUT
V7632
Output this constant to V7632, configuring pulse
output type.

7 Filtered Inputs
LD
K2006
Load the constant K2006 which is required to
select X0 as a filtered input with a 20ms filter time
constant.

8 OUT
V7634
Output this constant to V7634, configuring X0.

Load the constant K1006 which is required to


9 LD
K1006
select X1 as a filtered input with a 10ms filter time
constant.

OUT Output this constant to V7635, configuring X1.


10 V7635

Load the constant K1006 which is required to


LD
11 K1006 select X2 as a filtered input with a 10ms filter time
constant.

OUT
V7636 Output this constant to V7636, configuring X2.
12 LD
Load the constant K1006 which is required to
select X3 as a filtered input with a 10ms filter time
K1006
13 OUT
constant.

Output this constant to V7637, configuring X3.


V7637

14 Profile/Target
LD
K8100
Load the constant K8100 which is required to select
trapezoidal profile, relative positioning, without
interrupt and a target velocity of 1kHz.
Velocity
A OUT
V3630
Output this constant to V3630, the location of the
profile select/starting velocity setup register.

B Target Position LDD


K30000
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
C OUTD
V3631 target position double-word register.

D Continued on next page

E–56 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: High-speed Input and Pulse Output Features

Continued from previous page

Program
Example SP0 Load the constant K20 which is required to select
1
LD the step 1 acceleration velocity of 200 Hz.
K20
Step 1 Acceleration
OUT
Output this constant to V3633, the location of the
2
V3633 step 1 acceleration velocity setup register.

Step 1 Distance
LD
Load the constant K100 which selects the step 1
distance of 100 pulses.
3
K100

OUT
V3634
Output this constant to V3634, the location of
the step 1 distance.
4
Step 2 Acceleration LD
K40
Load the constant K40 which is required to select
the step 2 acceleration velocity of 400 Hz. E
OUT
V3635
Output this constant to V3635, the location of the
step 2 acceleration velocity setup register. 6
Load the constant K200 which selects the step 2
Step 2 Distance LD
K200
distance of 200 pulses.
7
Output this constant to V3636, the location of
OUT
V3636 the step 2 distance.

Load the constant K60 which is required to select


8
Step 3 Acceleration LD the step 3 acceleration velocity of 600 Hz.
K60

Output this constant to V3637, the location of the


9
OUT step 3 acceleration velocity setup register.
V3637

LD
Load the constant K300 which selects the step 3
10
Step 3 Distance distance of 300 pulses.
K300

OUT
Output this constant to V3640, the location of
the step 3 distance.
11
V3640

Step 4 Acceleration LD
K80
Load the constant K80 which is required to select
the step 4 acceleration velocity of 800 Hz.
12
OUT
V3641
Output this constant to V3641, the location of the
step 4 acceleration velocity setup register.
13
Step 4 Distance LD
K400
Load the constant K400 which selects the step 4
distance of 400 pulses. 14
Output this constant to V3642, the location of
OUT
V3642 the step 4 distance. A
Load the constant K80 which is required to select
LD
Step 5 Deceleration K80
the step 5 deceleration velocity of 800 Hz.
B
Output this constant to V3643 which is required to select
OUT
V3643 the step 5 deceleration velocity of 800 Hz.
C
Continued on next page
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–57


Appendix E: High-speed Input and Pulse Output Features
Continued from previous page
Program
Example
1 SP0
LD
K400
Load the constant K400 which selects the step 5
distance of 400 pulses.

Step 5 Distance
2 OUT
V3644
Output this constant to V3644, the location of
the step 5 distance.

Load the constant K60 which is required to select

3 Step 6 Deceleration
LD
K60
the step 6 deceleration velocity of 600 Hz.

Output this constant to V3645, which is required to select


OUT
4 V3645 the step 6 deceleration velocity of 600 Hz.

Load the constant K300 which selects the step 6


Step 6 Distance LD distance of 300 pulses.
E K300

Output this constant to V3646, the location of


OUT the step 6 distance.
V3646
6 LD
Load the constant K40 which is required to select
Step 7 Deceleration the step 6 deceleration velocity of 400 Hz.
K40
7 OUT
Output this constant to V3647, which is required to select
the step 6 deceleration velocity of 400 Hz.
V3647

8 Step 7 Distance LD
K200
Load the constant K200 which selects the step 7
distance of 200 pulses.

9 OUT
V3650
Output this constant to V3650, the location of
the step 7 distance.

10 Step 8 Deceleration
LD
K20
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


11 OUT
V3651 the step 8 deceleration velocity of 200 Hz.

Load the constant K100 which selects the step 8


LD
12 Step 8 Distance K100 distance of 100 pulses.

Output this constant to V3652, the location of


OUT
13 Start Profile
V3652 the step 8 distance.

X3 Y0 We use a spare filtered input to allow the operator


14 OUT to start the profile. When the operator turns X3 ON,
then OFF, logical output Y0 starts the profile.

A X0
LDD
K0
Load
value.

Profile / Target Output this constant to V1174/V1175 (CT174/CT175), the


B Velocity
OUTD
V1174
location of the current position value.

Y1

C PD 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.
END
D

E–58 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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. 1
Velocity 2
3
4
E
Time

Start Y0
6
Profile 7
Complete SP104

The time line of signal traces below the profile indicates the order of events. Assuming the
8
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 9
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
10
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 11
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 12
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
13
registration profiles instead.
Unlike the trapezoidal and registration profiles, you must specify the desired direction of
14
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. A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–59


Appendix E: 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
1 velocity segment is of indefinite length. The velocity only changes when ladder logic (or other
device writing to V-memory) updates the velocity parameter.
2 Velocity Profile
Velocity
3
4
E
Time
6 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
7 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
8 the setup.
Direct SOFT 5
9 SP0
LD
Load constant K30 into the accumulator. This selects
Mode 30 as the HSIO mode.
K30
10 Mode 30 OUT
Output this constant to V7633, the location of the HSIO
Mode select register.
V7633

11 Locate Parameter LDA


O3630
Load the octal address of the beginning of the Profile
Parameter Table. The LDA instruction converts this to
Table (optional) hex number in the accumulator.

12 OUT
V7630
Output this address to V7630, the location of the pointer
to the Profile Parameter Table.

13 Select Pulse /
Direction
LD
K103
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
14 OUT
V7632
output type.

Load the constant K1006 which is required to select


Filtered Inputs
A LD
K1006
filtered inputs with a 10 mS filter time constant.

Output this constant to V7634, configuring X0.


OUT
B V7634

Output this constant to V7635, configuring X1.


OUT
C V7635

Output this constant to V7636, configuring X2.


OUT
V7636
D Output this constant to V7637, configuring X3.
OUT
V7637

E–60 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: High-speed Input and Pulse Output Features

Program Example Cont’d


1
SP0
LD
K2000
Load the constant K2000 which is required to select
Velocity Profile. This data word contains no velocity
2
information in the case of velocity mode.

Profile / Target
Velocity
OUT
V3630
Output this constant to V3630, the location of the Profile
Select setup register.
3
Select Direction LDD
K80000000
Load the constant K80000000 which selects CCW
direction for Velocity Profiles. Don’t forget to use double
word size (8-digit BCD position value).
4
Output this constant to V3631 and V3632, the location of
OUTD
V3631
the Target Position double-word register. E
Set Velocity Load the constant K10 which is required to select an
LD
K10
initial velocity of 100 pps (uses x10 multiplier).
6
Output this constant to V3633, the location of the velocity
OUT
V3633
parameter register. After the program is running, we can
write here again, using discrete input switches. 7
Start Profile
X1 Y0
OUT We use a spare filtered input to allow the operator
8
to start the profile. When the operator turns X1 ON

X2
Go Slow
and leaves it on, logical output Y0 starts the profile.

Load the constant K50 which is required to select a


9
LD velocity of 500 pps when the operator closes X2.
K50

OUT Output this constant to V3633, the location of the velocity


10
V3633 parameter register. The speed will change immediately.

X3
Go Moderately
Load the constant K200 which is required to select a
11
LD velocity of 2000 pps when the operator closes X3.
K200

OUT Output this constant to V3633, the location of the velocity


12
V3633 parameter register. The speed will change immediately.

X4
Go Fast
LD
Load the constant K600 which is required to select a
13
K600 velocity of 6000 pps when the operator closes X4.

OUT Output this constant to V3633, the location of the velocity


parameter register. The speed will change immediately.
14
V3633

A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–61


Appendix E: 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
1 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.
2 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.
3
Error Code Error Description
4 0000
0010
No error
Requested profile type code is invalid (must use 4 to 6 or C to F)
0011 Interrupt is selected for absolute mode
E 0020 Target Velocity is not in BCD
0021 Target Velocity is specified to be less than 40 pps
6 0022
0030
Target Velocity is specified to be greater than 10,000 pps
Target Position value is not in BCD
0031 Target Position value is zero
7 0032 Direction Select is not 0 or 80000000.
0040 Starting Velocity is not in BCD
8 0041
0042
Starting Velocity is specified to be less than 40 pps
Starting Velocity is specified to be greater than 10,000 pps
0050 Acceleration Time is not in BCD
9 0051 Acceleration Time is zero
0052 Acceleration Time is greater than 10 seconds
10 0060
0061
Deceleration Time is not in BCD
Deceleration Time is zero
0062 Deceleration Time is greater than 10 seconds
11 0070 Ending Velocity is not BCD
0071 Ending Velocity is specified to be less than 40 pps
12 0072
0073
Ending Velocity is specified to be greater than 1,000 pps
Ending Velocity is specified to be greater than Target Velocity

13 Troubleshooting Guide for Mode 30


If you’re having trouble with Mode 30 operation, please study the following symptoms and
14 possible causes. The most common problems are listed below:
Symptom: The stepper motor does not rotate.
A Possible causes:
1. Configuration – Verify that the HSIO actually generates pulses on outputs Y0 and Y1. Watch the
B 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.
C 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.
D 3. Check target value – The profile will not pulse if the count value is equal to the target value (ex.
count =0, target=0).

E–62 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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 1
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 single-
2
step 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. 3
Direct SOFT 5
SP0
LD
K60
Load constant K60 into the accumulator. This
selects Mode 60 as the HSIO mode. 4
Mode 60 OUT
V7633
Output the constant to V7633, the location of the
HSIO Mode select register. E
Load the constant K1006 which is required to configure
Filtered Inputs LD
K1006
filtered inputs with a time constant of 10 mS.
6
Output this constant to V7634, configuring X0.
OUT
V7634 7
Output this constant to V7635, configuring X1.
OUT
V7635

Output this constant to V7636, configuring X2.


8
OUT
V7636

Output this constant to V7637, configuring X3.


9
OUT
V7637

X0 Y0
10
OUT Use a switch on X0 input to manually control output Y0.

X1 Y1 11
OUT Use a switch on X1 input to manually control output Y1.

END END coil marks the end of the main program.. 12


13
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 14
DirectSOFT 5, select PLC > Setup > Initialize Scratch Pad from the Menu bar.
Symptom: The motor turns in the wrong direction. A
Possible causes:
1. Wiring – If you have selected CW and CCW type operation, just swap the wires on Y0 and Y1 B
outputs.
2. Direction control – If you have selected Pulse and Direction type operation, just change the
direction bit to the opposite state.
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–63


Appendix E: High-speed Input and Pulse Output Features

Mode 40: High-Speed Interrupts


1 Purpose
2 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
3 instructions in the subroutine is typical.
• An interrupt routine needs to occur on a timed basis which is different from the CPU scan time
4 (either faster or slower). The timed interrupt is programmable, from 5 to 999 mS.
Functional Block Diagram
E 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
6 external interrupts or normal filtered inputs.

7 DL06
PLC
Output Circuit

Y0, Y1 Y2 -Y17
8 HSIO I/O data CPU
Interrupt Interrupt
9 Interrupt
or
Filter
Mode select
V-memory
V7633 0040

10 X0 X1, X2, X3 X4 - X23

Input Circuit
11
12 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.
13
DL06 Output Circuit
14 PLC
Y0, Y1 Y2 - Y17
HSIO
A Interrupt
I/O data
Interrupt
CPU
Timer Interrupt V-memory
or Mode select
B Filter Filter V7633 0040

X0 X1, X2, X3 X4 - X23


C Input Circuit

E–64 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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 high-speed interrupts. 1
Memory Location V7633
Bits 15
0
14
0
13
0
12 11
0 0
10
0
9
0
8
0
7
0
6
1
5
0
4
0
3
0
2
0
1
0
0
0
2
0 0 4 0 3
Miscellaneous Setup (BCD) HSIO Mode Setup (BCD)
00 = Not Used (default)
10 = Battery Enabled
20 = Power-up in RUN
40 = High-Speed Interrupts 4
30 = Battery Enabled and
Power-up in RUN
E
Choose the most convenient method of programming V7633 from the following:
• Include load and out instructions in your ladder program
6
• DirectSOFT 5’s memory editor
• Use the Handheld Programmer D2–HPP
7
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
8
this.
Interrupts and the Ladder Program
9
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 10
V7634 serves a dual purpose:
• It selects between the two interrupt sources (external or internal timer). The timed interrupt can 11
only be used with X0.
• In the case of the timer interrupt, it programs the interrupt timebase between 5 and 999 mS. 12
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.
13
CPU Scan
Input
14
Update

Ladder INT A
X0, External Interrupt Program
Execution
Interrupt
Routine
B
TIMER Current Program
Interrupt source /
Instruction
IRT
C
Time select Input

V7634 xxx4
Update
D
X1-X3, External Interrupts

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–65


Appendix E: High-speed Input and Pulse Output Features

External Interrupt Timing Parameters


External interrupt signals must meet certain timing criteria to guarantee an interrupt will
1 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
2 smaller than 0.5 ms.
0.5 ms minimum
3 0.1 ms minimum
External
4 Interrupt X0

Time
E Timed Interrupt Parameters
When the timed interrupt is selected, the HSIO generates the interrupt to ladder logic. There
6 is no interrupt “pulse width” in this case, but the interrupt period can be adjusted from 5 to
999 ms.
7 5 ms to 999 ms
Timed

8 Interrupt
Time

9 X Input / Timed INT Configuration


The configurable discrete input options for High-Speed Interrupt Mode are listed in the table
10 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
11 X1’s 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.

12 Input Configuration Register Function


External Interrupt
Hex Code Required
0004 (default)
X0 V7634
Timed Interrupt xxx4, xxx = INT timebase 5 - 999 ms (BCD)
13 Interrupt 0004 (default)
X1 V7635 Pulse Input 0005
14 Filtered Input
Interrupt
xx06 (xx = filter time) 0 - 99 ms (BCD)
0004 (default)
X2 V7636 Pulse Input 0005
A Filtered Input xx06 (xx = filter time) 0 - 99 ms (BCD)
Interrupt 0004 (default)
B X3 V7637 Pulse Input
Filtered Input
0005
xx06 (xx = filter time) 0 - 99 ms (BCD)

C 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
D 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.

E–66 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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. 1
The program is otherwise generic, and may be adapted to your application.
Direct SOFT 5
2
SP0 Load constant K40 into the accumulator. This
LD
K40
selects Mode 40 as the HSIO mode.
3
Mode 40 Output this constant to V7633, the location of the
OUT
V7633
HSIO Mode select register.

Load the constant K4 which is required to select the


4
External Interrupt LD external interrupt option. X0 is the interrupt input.
K4

OUT
Output this constant to V7634, configuring the
E
external interrupt option for X0.
V7634

OUT
V7635
Output this constant to V7635, configuring the
external interrupt option for X1.
6
Filtered Inputs LD
K1006
Load the constant K1006 which is required to select
filtered inputs with a 10 mS filter time constant. 7
Output this constant to V7636, configuring X2.
OUT
V7636 8
Output this constant to V7637, configuring X3.
OUT
V7637
Y5
9
RST Reset output Y5.

Y6
RST Reset output Y6.
10
INT Enable ENI Enable Interrupts at the beginning of the program.

Insert Main Program rungs here for your application.


11
Main Program
END END coil marks the end of the main program.. 12
INT O0 The INT label marks the beginning of the interrupt

Interrupt Routine
service routine program.
13
Insert interrupt service routine rungs here for your
application.
SP1 Y5
SETI Set output Y5
14
IRT Return to the main ladder program. A
INT O1

Interrupt Routine Insert interrupt service routine rungs here for your
B
application.
SP1 Y6
SETI Set output Y6.
C
IRT Return to the main ladder program. D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–67


Appendix E: 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
1 interrupt period of 100 ms.
100 ms
2 Timed
Interrupt

3 Inputs X0, X1, X2, and X3, are configured as filtered inputs with a 10 ms time constant.
Time

Note that X0 uses the time constant from X1. The program is otherwise generic, and may be
4 adapted to your application.
Direct SOFT5
E SP0
LD
Load constant K40 into the accumulator. This
selects Mode 40 as the HSIO mode.
K40

6 Mode 40 OUT
V7633
Output this constant to V7633, the location of the
HSIO Mode select register.

Load the constant K1004 which is required to select

7 Timed Interrupt
LD
K1004
the timed interrrupt option, with a period of 100 mS.

Output this constant to V7634, configuring the timed


OUT interrupt for 100 ms period.
V7634
8 Filtered Inputs LD
K1006
Load the constant K1006 which is required to select
filtered inputs with a 10 ms filter time constant.

9 OUT
V7635
Output this constant to V7635, configuring X1 and X0.

Output this constant to V7636, configuring X2.


OUT
10 V7636
Output this constant to V7637, configuring X3.
OUT
V7637
11 INT Enable ENI Enable Interrupts at the beginning of the program.

12 Main Program
Insert Main Program rungs here for your application.

END END coil marks the end of the main program..

13 INT O0 The INT label marks the beginning of the interrupt


service routine program.
Interrupt Routine Insert interrupt service routine rungs here for your
14 SP1
application.

Load constant K1 into the accumulator.


LD
K1
A ADD Add the value in the accumulator with the value in
memory location V2000.
V2000

B OUT
V2000
Output the result into memory location V2000.

C IRT Return to the main ladder program.

D NOTE: X0 cann ot be used in the main program logic; however, using X0 to set C10, for instance, will
allow the use of C10 in the main program logic. Do not forget to reset C10.

E–68 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: High-speed Input and Pulse Output Features

Mode 50: Pulse Catch Input


Purpose
1
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
2
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. 3
This contact automatically goes off after one scan.
Functional Block Diagram 4
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
E
HSIO resets the latch at the end of the next CPU scan. Inputs X1 X2, and X3 can be filtered
discrete inputs, also. 6
DL06 Output Circuit
7
PLC
Y0, Y1 Y2 -Y17 8
HSIO I/O data CPU

Latch Latch
or V-memory
9
Filter Mode select
Set Reset V7633 0050
10
X0 scan X1, X2, X3 X4 - X23

Input Circuit 11
Pulse Catch Timing Parameters 12
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 13
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
14
pulse.
0.5 ms minimum
A
0.1 ms minimum B
Pulse
Input X0

Time
C
NOTE: The pulse catch and filtered input functions are opposite in nature. The pulse catch feature seeks to D
capture narrow pulses, while the filter input feature seeks to reject narrow pulses.

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–69


Appendix E: 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
1 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. Even if X0 is on for more than one scan,
2 SP100 is still on for only one scan.
PLC Scan X PLC Scan X + 1 PLC Scan X + 2
3 Input
Solve User Logic
Output Input
Solve User Logic
Output Input
Solve User Logic
Output
Update Update Update Update Update Update

4 X0
SP100
E
Input Status Relay
6 X0 SP100
X1 SP101
7 X2
X3
SP102
SP103

8 The status relay for X0 is SP100. The other status relays are shown in the table below.

9 Setup for Mode 50


Recall that V7633 is the HSIO Mode Select register. Refer to the diagram below. Use BCD
Memory Location V7633
10 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 1 0 1 0 0 0 0
11 0 0 5 0

12 Miscellaneous Setup (BCD)


00 = Not Used (default)
HSIO Mode Setup (BCD)
50 = Pulse Catch
10 = Battery Enabled
13 20 = Power-up in RUN
30 = Battery Enabled and
Power-up in RUN
50 in the lower byte of V7633 to select the High-Speed Counter Mode.
14 Choose the most convenient method of programming V7633 from the following:
A • Include load and out instructions in your ladder program
• DirectSOFT 5’s memory editor

B • Use the Handheld Programmer D2–HPP


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
C this.

E–70 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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. 1
Input
X0
Configuration Register
V7634
Function
Pulse Catch Input
Hex Code Required
0005 (default)
2
Interrupt 0004
X1 V7635 Pulse Catch Input 0005 (default) 3
Filtered Input xx06 (xx = filter time) 0 - 99 ms (BCD)

X2 V7636
Interrupt
Pulse Catch Input
0004
0005 (default)
4
Filtered Input xx06 (xx = filter time) 0 - 99 ms (BCD)
Interrupt 0004 E
X3 V7637 Pulse Catch Input 0005 (default)
Filtered Input xx06 (xx = filter time) 0 - 99 ms (BCD) 6
7
8
9
10
11
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–71


Appendix E: 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.
1 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.
2
Direct SOFT 5

3 SP0
LD
Load constant K50 into the accumulator. This
selects Mode 50 as the HSIO mode.
K50

4 Mode 50 OUT
V7633
Output this constant to V7633, the location of the
HSIO Mode select register.

E Pulse Catch LD
K5
Load the constant K5 which is required to configure X0
as the pulse catch input.

6 OUT
V7634
Output this constant to V7634, configuring the pulse
catch option for X0.

Output this constant to V3635, configuring the pulse


7 OUT
V7635
catch option for X1.

Load the constant K1006 which is required to select


LD
8 Filtered Inputs
K1006
filtered inputs with a 10 mS filter time constant.

Output this constant to V7636, configuring X2.


OUT
9 V7636
Load the constant K3006 which is required to select
LD filtered inputs with a 30 mS filter time constant.
K3006
10 OUT
Output this constant to V7637, configuring X3.
V7637
11 Main Program

12 SP100 Y0
SET Use the pulse catch input to set output Y0 on. This will
work even for a very short pulse on X0.

13 SP101 Y1
SET Use the pulse catch input to set output Y1 on. This will
work even for a very short pulse on X1.

14 END END coil marks the end of the main program.

A
B
C
D

E–72 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: High-speed Input and Pulse Output Features

Mode 60: Discrete Inputs with Filter


Purpose
1
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 2
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 appendix, X0 to 3
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.
4
Functional Block Diagram E
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 6
references X0 through X3.
7
DL06 Output Circuit
PLC
Y0, Y1 Y2-Y17
8
HSIO CPU

FILTERS
I/O data

X0-X3
9
V-memory
Mode select
V7633 0060 10
X0 X1 X2 X3

Input Circuit
X4-X23
11
12
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
13
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 14
logical input to the ladder program remains in the OFF state (input pulse was filtered out).
A
Filter Time Filter Time

Physical Input X0 B
Logical Input X0
C
Time
Physical Input X0 D
Logical Input X0

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–73


Appendix E: 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
1 60 in the lower byte of V7633 to select the High-Speed Counter Mode.

2 Memory Location V7633


Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

3 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0

0 0 6 0
4
Miscellaneous Setup (BCD) HSIO Mode Setup (BCD)
E 00 = Not Used (default) 60 = Filtered Inputs
10 = Battery Enabled
20 = Power-up in RUN
6 30 = Battery Enabled and
Power-up in RUN

7 Choose the most convenient method of programming V7633 from the following:
• Include load and out instructions in your ladder program
8 • DirectSOFT 5’s memory editor
• Use the Handheld Programmer D2–HPP
9 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
10 this.
X Input Configuration
11 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
12 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
13 X3 can only be filtered inputs. Each input has its own configuration register and filter time
constant.
14
Input Configuration Register Function Hex Code Required
A X0
X1
V7634
V7635
Filtered Input
Filtered Input
xx06 (xx = filter delay time) 0 - 99 ms (BCD) (default)
xx06 (xx = filter delay time) 0 - 99 ms (BCD) (default)
X2 V7636 Filtered Input xx06 (xx = filter delay time) 0 - 99 ms (BCD) (default)
B X3 V7637 Filtered Input xx06 (xx = filter delay time) 0 - 99 ms (BCD) (default)

C
D

E–74 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix E: 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. 1
The program is otherwise generic, and may be adapted to your application.
2
Direct SOFT 5

SP0
LD
K60
Load constant K60 into the accumulator. This
selects Mode 60 as the HSIO mode.
3
Mode 60 OUT
V7633
Output the constant to V7633, the location of the
HSIO Mode select register. 4
Filtered Inputs LD
K1006
Load the constant K1006 which is required to configure
filtered inputs with a 10 ms filter time constant. E
Output this constant to V7634, configuring X0.
OUT
V7634 6
Load the constant K2006 which is required to select
LD
K2006
filtered inputs with a 20 ms filter time constant.
7
Output this constant to V7635, configuring X1.
OUT
V7635
Load the constant K5006 which is required to select
8
LD filtered inputs with a 50 ms filter time constant.
K5006

OUT
Output this constant to V7636, configuring X2.
9
V7636

LD
Load the constant K7006 which is required to select
filtered inputs with a 70 ms filter time constant.
10
K7006

OUT
V7637
Output this constant to V7637, configuring X3. 11
Main Program Insert Main Program rungs here for your application. 12
END END coil marks the end of the main program..
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A E–75


A PPPENDIX
P ENDIX
PLC MEMORY
F
In this Appendix
DL06 PLC Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .F–2
Appendix F: PLC Memory

DL06 PLC Memory


1 When designing a PLC application, it is important for the PLC user to understand the
different types of memory in the PLC. The DL06 CPU uses two types of memory: RAM and
2 EEPROM. RAM is Random Access Memory and EEPROM is Rlectrically Erasable
Programmable Read Only Memory. The PLC program is stored in EEPROM, and the PLC
V-memory data is stored in RAM. There is also a small range of V-memory that can be copied
3 to EEPROM which will be explained later.
The V-memory in RAM can be configured as either retentive or non-retentive.
4 Retentive memory is memory that is configured by the user to maintain values through a
power cycle or a PROGRAM to RUN transition. Non-retentive memory is memory that is
5 configured by the PLC user to clear data after a power cycle or a PROGRAM to RUN
transition. The retentive ranges can be configured with either the handheld programmer
using AUX57 or DirectSOFT 5 (PLC Setup).
F The contents of RAM memory can be written to and read from an infinite number of times,
but RAM requires a power source to maintain the contents of memory. The contents of RAM
7 are maintained by the internal power supply (5VDC) only while the PLC is powered by an
external source, normally 120VAC. When power to the PLC is turned off, the contents of
8 RAM are maintained by a”Super-Capacitor”. If the Super-Capacitor ever discharges, the
contents of RAM will be lost. The data retention time of the Super-Capacitor backed RAM is
3 weeks maximum, and 4 1/2 days minimum (at 60쎷 C). An optional battery, D2-BAT-1, can
9 be added to maintain RAM retentive memory if the DL06 is ever without external power (see
Volume I, page 3-8 for a detailed explanation).
10 The contents of EEPROM memory can be read from an infinite number of times, but there
is a limit to the number of times it can be written to (typical specification is 100,000 writes).
11 EEPROM does not require a power source to maintain the memory contents. It will retain
the contents of memory indefinately.
12 PLC user V-memory is stored in both volatile RAM and non-volatile EEPROM memory.
Data being stored in RAM uses V400-V677, V1200-V7377 and V10000-V17777 which is
volatile. Data stored in EEPROM uses V7400-V7577 and V700-V777, V7600-V7777 and
13 V36000-V37777 are non-volatile.
Data values that must be retained for long periods of time, when the PLC is powered off,
14 should be stored in EEPROM based V-memory. Since EEPROM is limited to the number of
times it can be written to, it is suggested that transitional logic, such as a one-shot, be used to
A write the data one time instead on each CPU scan.
Data values that are continually changing or which can be initialized with program logic
should be stored in RAM based V-memory.
B
C
D

F-2 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix F: PLC Memory

Non-volatile V-memory in the DL06


There are 2 types of memory assigned for the non-volatile V-memory area. They are RAM
and flash ROM (EEPROM). They are sharing the same V-memory addresses; however, you 1
can only use the MOV instruction, D2-HPP and DirectSOFT 5 to write data to the flash
ROM. When you write data to the flash ROM, the same data is also written to RAM. If you
use other instructions, you can only write data to RAM. When you read data from the non-
2
volatile V-memory area, the data is always read from RAM.
3
Writing data Reading data 4
RAM Flash ROM RAM Flash ROM 5
V7400-V7577 V7400-V7577 V7400-V7577 V7400-V7577 F
7
Other instructions MOV MOV There is no way to read data
(OUT, OUTD...) D2-HPP
DirectSOFT 5
D2-HPP
DirectSOFT 5
from the Flash ROM directly.
8
9
After a power cycle, the PLC always copies the data in the flash ROM to the RAM.
If you use the instructions except for the MOV instruction to write data into the non-volatile
V-memory area, you only update the data in RAM. After a power cycle, the PLC copies the
10
previous data from the flash memory to the RAM, so you may think the data you changed
has disappeared. To avoid trouble such as this, we recommend that you use the MOV 11
instruction.
12
RAM Flash ROM
V7400 = 1111 V7400 = 1111 13
LD K2222
OUT V7400
V7400 = 2222 V7400 = 1111
14
Not changed
Cycle power Copy A
V7400 = 1111 V7400 = 1111
B
This appears to be previous data returning.
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A F-3


A PPPENDIX
P ENDIX
ASCII TABLE
G
In this Appendix
ASCII Conversion Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .G–2
Appendix G: ASCII Table

ASCII Conversion Table


1 DECIMAL TO HEX TO ASCII CONVERTER
DEC HEX ASCII DEC HEX ASCII DEC HEX ASCII DEC HEX ASCII
2 0 00 NUL 32 20 space 64 40 @ 96 60 `
1 01 SOH 33 21 ! 65 41 A 97 61 a
3 2
3
02
03
STX
ETX
34
35
22
23

#
66
67
42
43
B
C
98
99
62
63
b
c
4 04 EOT 36 24 $ 68 44 D 100 64 d
4 5 05 ENQ 37 25 % 69 45 E 101 65 e
6 06 ACK 38 26 & 70 46 F 102 66 f
5 7
8
07
08
BEL
BS
39
40
27
28

(
71
72
47
48
G
H
103
104
67
68
g
h
9 09 TAB 41 29 ) 73 49 I 105 69 i
6 10 0A LF 42 2A * 74 4A J 106 6A j
11 0B VT 43 2B + 75 4B K 107 6B k
G 12
13
0C
0D
FF
CR
44
45
2C
2D
,
-
76
77
4C
4D
L
M
108
109
6C
6D
l
m
14 0E SO 46 2E . 78 4E N 110 6E n
8 15 0F SI 47 2F / 79 4F O 111 6F o
16 10 DLE 48 30 0 80 50 P 112 70 p
9 17
18
11
12
DC1
DC2
49
50
31
32
1
2
81
82
51
52
Q
R
113
114
71
72
q
r
19 13 DC3 51 33 3 83 53 S 115 73 s
10 20 14 DC4 52 34 4 84 54 T 116 74 t
21 15 NAK 53 35 5 85 55 U 117 75 u
11 22
23
16
17
SYN
ETB
54
55
36
37
6
7
86
87
56
57
V
W
118
119
76
77
v
w
24 18 CAN 56 38 8 88 58 X 120 78 x
12 25 19 EM 57 39 9 89 59 Y 121 79 y
26 1A SUB 58 3A : 90 5A Z 122 7A z
13 27
28
1B
1C
ESC
FS
59
60
3B
3C
;
<
91
92
5B
5C
[
\
123
124
7B
7C
{
|
29 1D GS 61 3D = 93 5D ] 125 7D }
14 30 1E RS 62 3E > 94 5E ^ 126 7E ~
31 1F US 63 3F ? 95 5F _ 127 7F DEL
A
B
C
D

G-2 DL06 Micro PLC User Manual, 3rd Edition Rev. A


A PPPENDIX
P ENDIX
PRODUCT WEIGHTS
H
In this Appendix
Product Weight Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .H–2
Appendix H: Product Weights

Product Weight Table


1
2 PLC Weight
D0–06AR 1.78 lb./807g.
3 D0–06DR
D0–06DR-D
1.76 lb./798 g.
1.72 lb./780 g.
D0–06AA 1.78 lb./807 g.
4 D0–06DA 1.76 lb./798 g.
D0–06DD1 1.68 lb./762 g.
E D0–06DD1-D
D0–06DD2-D
1.64 lb./743 g.
1.64 lb./743 g.
D0–06DD2 1.68 lb./798 g.
6 D0–06LCD 0.12 lb./54.4g.

7
H
9
10
11
12
13
14
A
B
C
D

H–2 DL06 Micro PLC User Manual, 3rd Edition Rev. A


A PPPENDIX
P ENDIX
NUMBERING SYSTEMS
I
In this Appendix
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .I–2
Binary Numbering System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .I–2
Hexadecimal Numbering System . . . . . . . . . . . . . . . . . . . . . . . . . . .I–3
Octal Numbering System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .I–4
Binary Coded Decimal (BCD) Numbering System . . . . . . . . . . . . . . .I–5
Real (Floating Point) Numbering System . . . . . . . . . . . . . . . . . . . . . .I–5
BCD/Binary/Decimal/Hex/Octal - What is the Difference? . . . . . . . . .I–6
Data Type Mismatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .I–7
Signed vs. Unsigned Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .I–8
AutomationDirect.com Products and Data Types . . . . . . . . . . . . . . .I–9
Appendix I: Numbering Systems

Introduction
1 As almost anyone who uses a computer is somewhat aware, the actual operations of a
computer are done with a binary number system. Traditionally, the two possible states for a
2 binary system are represented by the digits for "zero" (0) and "one" (1) although "off" and
"on" or sometimes "no" and yes" are closer to what is actually involved. Most of the time a
typical PC user has no need to think about this aspect of computers, but every now and then
3 one gets confronted with the underlying nature of the binary system.
A PLC user, specifically the PLC programmer, should be familiar with the binary system.
4 This appendix will provide an explaination of the numbering systems most commonly used
by a PLC.
E Binary Numbering System
6 Computers, includeing PLCs, use the Base 2 numbering system, which is called Binary and
often called Decimal. Like in a computer there are only two valid digits a PLC relys on, zero
and one, or off and on respectively. You would think that it would be hard to have a
7 numbering system built on Base 2 with only two possible values, but the secret is by encoding
using several digits.
H Each digit in the base 2 system when referenced by a computer is called a bit. When four bits
are grouped together, they form what is known as a nibble. Eight bits or two nibbles would
I be a byte. Sixteen bits or two bytes would be a word (Table 1). Thirty-two bits or two words
is a double word.

10 Byte
Word
Byte
Nibble Nibble Nibble Nibble
11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Table 1
12
Binary is not “natural” for us to use since we grow up using the base 10 system. Base 10 uses
13 the numbers 0-9, as we are all well aware. From now on, the different bases will be shown as a
subscripted number following the number. Example; 10 decimal would be 10 . 10
14 Table 2 shows how base 2 numbers relate to their decimal equivalents.
3 0
A nibble of 1001 would be equal to a decimal number 9 (1*2 + 1*2 or 8 + 1 ). A byte of
2 10 10
A 7
11010101 would be equal to 213 (1*2 + 1*2 +1*2 + 1*2 +1*2 or 128 + 64 + 16 +
4 + 1 ).
2
6 4 2 0
10 10 10
10 10

B Bit # 15 14
Binary/Decimal Bit Pattern
13 12 11 10 9 8 7 6 5 4 3 2 1 0
Power 215 214 213 212 211 210 29 28 27 26 25 24 23 22 21 20
C
16384
32678

Decimal
4096

1024
2048
8192

512

256

128

64

32

16

1
2
4
8

Bit Value
D Max Value 6553510

Table 2

I–2 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix I: Numbering Systems

Hexadecimal Numbering System


The binary numbering system can be difficult and cumbersome to interpret for some users. 1
Therefore, the hexadecimal numbering system was developed as a convenience for humans
since the PLC (computer) only uderstands pure binary. The hexadecimal system is useful
because it can represent every byte (8 bits) as two consecutive hexadecimal digits. It is easier
2
for us to read hexadecimal numbers than binary numbers.
The hexadecimal numbering system uses 16 characters (base 16) to represent values. The first 3
ten characters are the same as our decimal system (0-9), and the first six letters of the alphabet
(A-F). Table 3 lists the first eighteen decimal numbers; 0-17 in the left column and the 4
equivalent hexadecimal numbers are shown in the right column.

Decimal Hex Decimal Hex


E
0 0 9 9
1 1 10 A 6
2 2 11 B
3
4
3
4
12
13
C
D
7
5 5 14 E
6 6 15 F H
7 7 16 10
8 8 17 11
I
Table 3

Note that “10” and “11” in hex are not the same as “10” and “11” in decimal. Only the first
10
ten numbers 0-9 are the same in the two representations. For example, consider the hex
number “D8AF”. To evaluate this hex number use the same method used to write decimal 11
numbers. Each digit in a decimal number represents a multiple of a power of ten (base 10).
Powers of ten increase from right to left. For example, the decimal number 365 means 3x102
+ 6x10 + 5. In hex each digit represents a multiple of a power of sixteen (base 16). Therefore,
12
the hex number D8AF translated to decimal means 13x163 + 8x162 + 10x16 + 15 = 55471.
However, going through the arithmetic for hex numbers in order to evaluate them is not 13
really necessay. The easier way is to use the calculator that comes as an accessory in Windows.
It can convert between decimal and hex when in “Scientific” view. 14
Note that a hex number such as “365” is not the same as the decimal number “365”. Its
actual value in decimal terms is 3x162 + 6x16 + 5 = 869. To avoid confusion, hex numbers are A
often labeled or tagged so that their meaning is clear. One method of tagging hex numbers is
to append a lower case “h” at the end. Another method of labeling is to precede the number
with 0x. Thus, the hex number “D8AF” can also be written “D8AFh”, where the lower case B
“h” at the end is just a label to make sure we know that it is a hex number. Also, D8AF can be
written with a labeling prefix as “0xD8AF”. C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A I–3


Appendix I: Numbering Systems

Octal Numbering System


1 Many of the early computers used the octal numbering system for compiled printouts. Today,
the PLC is about the only device that uses the Octal numbering system. The octal numbering
2 system uses 8 values to represent numbers. The values are 0-7 being Base 8. Table 4 shows the
first 31 decimal digits in octal. Note that the octal values are 0-7, 10-17, 20-27, and 30-37.

3 Octal
0
Decimal
0
Octal
20
Decimal
16
1 1 21 17
4 2 2 22 18
3 3 23 19
E 4
5
4
5
24
25
20
21
6 6 26 22
6 7 7 27 23
10 8 30 24
7 11
12
9
10
31
32
25
26
13 11 33 27
H 14 12 34 28
15 13 35 29
I 16
17
14
15
36
37
30
31
Table 4
10
This follows the DirectLOGIC PLCs. Refer to Chapter 3 bit maps and notice that the
11 memory addresses are numbered in octal, as well as each bit. The octal system is much like
counting in the decimal system without the digits 8 and 9 being available.
12 The general format for four digits of the octal number is:
(d x 80) + (d x 81) + (d x 82) + (d x 83)
13 where “d” means digit. This is the same format used in the binary, decimal, or hexadecimal
systems except that the base number for octal is 8.
Using the powers of expansion, the example below shows octal 4730 converted to decimal.
14
positional

A value 512

4
64

7 3
8

0
1

B 0 x 80 = 0 x 1= 0
1
3x8 =3x 8= 24
C 7 x 82 = 7 x 64 = 448
4 x 83 = 4 x 512 = 2048
D 2520 decimal
equivalent

I–4 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix I: Numbering Systems

Binary Coded Decimal (BCD) Numbering System


BCD is a numbering system where four bits are used to represent each decimal digit. The 1
binary codes corresponding to the hexadecimal digits A-F are not used in the BCD system.
For this reason numbers cannot be coded as efficiently using the BCD system. For example, a
byte can represent a maximum of 256 different numbers (i.e. 0-255) using normal binary,
2
whereas only 100 distinct numbers (i.e. 0-99) could be coded using BCD. Also, note that
BCD is a subset of hexadecimal and neither one does negative numbers. 3
BCD Bit Pattern
Bit # 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 4
Power 103 102 10 1
10 0

Bit Value
Max Value
8 4
9
2 1 8 4
9
2 1 8 4
9
2 1 8 4
9
2 1
E
Table 5
6
One plus for BCD is that it reads like a decimal number, for example, 867 in BCD would be
expressed the same as 867 decimal. No conversion is needed; however, within the PLC, BCD
calculations can be performed if numbers are adjusted to BCD after normal binary
7
arithmetic.
H
Real (Floating Point) Numbering System
The terms Real and floating-point both describe IEEE-754 floating point arithmetic. This I
standard specifies how single precision (32 bit) and double precision (64 bit) floating point
numbers are to be represented as well as how arithmetic should be carried out on them. 10
Real (Floating Point 32) Bit Pattern
Bit # 31 30
Sign
29 28 27 26
Exponent
25 24 23 22 21 20 19 18
Mantissa
17 16 11
Bit # 15 14 13 12 11 10 9 8 7 6 5
Mantissa (continues from above)
4 3 2 1 0
12
Table 6
Most PLCs use the 32-bit format for floating point (or Real) numbers.
13
Floating point numbers which DirectLOGIC PLCs use have three basic components: sign,
exponent and mantissa. The 32 bit word required for the IEEE standard floating point
14
numbers is shown in Table 6. It is represented as a number from 0 to 31, left to right. The
first bit (31) is the sign bit, the next eight bits (30-23) are the exponent bits and the final 23 A
bits (22-0) are the fraction bits. In summary:
The sign bit is either “0” for positive or “1” for negative; B
The exponent uses base 2;
The first bit of the mantissa is typically assumed to be “1.fff ”, where “f ” is the field of
fraction bits.
C
The Internet can provide a more indepth explaination of the floating point numbering
system. One website to look at is:
D
http://www.psc.edu/general/software/packages/ieee/ieee.html

DL06 Micro PLC User Manual, 3rd Edition Rev. A I–5


Appendix I: Numbering Systems

BCD/Binary/Decimal/Hex/Octal -
1 What is the Difference?
Sometimes there is confusion about the differences between the data types used in a PLC.
2 The PLC’s native data format is BCD, while the I/O numbering system is octal. Other
numbering formats used are binary and Real. Although data is stored in the same manner (0’s
3 and 1’s), there are differences in the way that the PLC interprets it.
While all of the formats rely on the base 2 numbering system and bit-coded data, the format
4 of the data is dissimilar. Table 7 below shows the bit patterns and values for various formats.

Binary/Decimal Bit Pattern


E Bit # 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
16384
32678
16384
32678

2048
4096

1024
8192

1024
4096

2048
Decimal
8192

512

256

128
512

256

128

64
6

32

16
64

32

16

11
22
44
88
Bit Value
Max Value 65535
7 Bit # 15 14 13 12 11 10
Hexadecimal Bit Pattern
9 8 7 6 5 4 3 2 1 0
Decimal
H Bit Value 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1
Max Value F F F F

I Bit # 15 14 13 12 11 10
BCD Bit Pattern
9 8 7 6 5 4 3 2 1 0
Decimal 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1
10 Bit Value
Max Value 9 9 9 9

11 Bit # 15 14 13 12 11 10
Octal Bit Pattern
9 8 7 6 5 4 3 2 1 0
Bit Value 1 4 2 1 4 2 1 4 2 1 4 2 1 4 2 1
12 Max Value 1 7 7 7 7 7
Real (Floating Point 32) Bit Pattern
13 Bit # 31 30
Sign
29 28 27 26
Exponent
25 24 23 22 21 20 19 18
Mantissa
17 16

14 Bit # 15 14 13 12 11 10 9 8 7 6 5
Mantissa (continued from above)
4 3 2 1 0

A Table 7
As seen in Table 7, the BCD and hexadecimal formats are similar, although the maximum
B number for each grouping is different (9 for BCD and F for hexadecimal). This allows both
formats to use the same display method. The unfortunate side effect is that unless the data
type is documented, it’s difficult to know what the data type is unless it contains the letters
C A-F.

I–6 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix I: Numbering Systems

Data Type Mismatch


Data type mismatching is a common problem when using an operator interface. Diagnosing 1
it can be a challenge until you identify the symptoms. Since the PLC uses BCD as the native
format, many people tend to think it is interchangeable with binary (unsigned integer)
format. This is true to some extent, but not in this case. Table 8 shows how BCD and binary
2
numbers differ.
Data Type Mismatch
3
Decimal 0 1 2 3 4 5 6 7 8 9 10 11
BCD 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 0001 0000 0001 0001 4
Binary 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 0000 1010 0000 1011
Table 8 E
As the table shows, BCD and binary share the same bit pattern up until you get to the
decimal number 10. Once you get past 10, the bit pattern changes. The BCD bit pattern for 6
the decimal 10 is actually equal to a value of 16 in binary, causing the number to jump six
digits by when viewing it as the BCD. With larger numbers, the error multiplies. Binary
values from 10 to 15 Decimal are actually invalid for the BCD data type.
7
Looking at a larger number, such as the value shown in Table 9, both the BCD bit pattern
and the decimal bit pattern correspond to a base 10 value of 409510. If bit patterns are read, H
or interpreted, in a different format than what is used to write them, the data will not be
correct. For instance, if the BCD bit pattern is interpreted as a decimal (binary) bit pattern, I
the result is a base 10 value of 1653310. Similarly, if you try to view the decimal (binary) bit
pattern as a BCD value, it is not a valid BCD value at all, but could be represented in
hexadecimal as 0xFFF.
10
Base 10 Value BCD Bit Pattern Binary Bit Pattern 11
4095 0100 0000 1001 0101 1111 1111 1111
Table 9 12
Look at the following example and note the same value represented by the different
numbering systems.
13
0100 0011
6 7
Binary
Decimal
0001 0010 0011 0100
4 6 6 0
Binary
Decimal
14
4 3 Hex 1 2 3 4 Hex A
0110 0111 BCD 0100 0110 0110 0000 BCD
1 0 3 Octal 1 1 0 6 4 Octal B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A I–7


Appendix I: Numbering Systems

Signed vs. Unsigned Integers


1 So far, we have dealt with unsigned data types only. Now we will deal with signed data types
(negative numbers). The BCD and hexadecimal numbering systems do not use signed data
2 types.
In order to signify that a number is negative or positive, we must assign a bit to it. Usually,
this is the Most Significant Bit (MSB) as shown in Table 10. For a 16-bit number, this is bit
3 15. This means that for 16-bit numbers we have a range of -32767 to 32767.

4 Bit # 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MSB LSB
E Table 10
There are two ways to encode a negative number: two’s complement and Magnitude Plus
sign. The two methods are not compatible.
6 The simplest method to represent a negative number is to use one bit of the PLC word as the
sign of a number while the remainder of the word gives its magnitude. It is general
7 convention to use the most significant bit (MSD) as the sign bit: a 1 will indicate a negative,
and a 0 a positive number. Thus, a 16 bit word allows numbers in the range ±32767. Table 12
H shows a representations of 100 and a representation of -100 in this format.

Magnitude Plus Sign


I Decimal Binary
100 0000 0000 0110 0100
10 -100 1000 0000 0110 0100

Table 11
11 Two’s complement is a bit more complicated. Without getting involved with a full
explanation, a simple formula for two’s complement is to invert the binary and add one (see
12 Table 12). Basically, 1’s are being changed to 0’s and all 0’s are being changed to 1.

13 Decimal
Two’s Compliment
Binary
100 0000 0000 0110 0100
14 -100 1111 1111 1001 1100

Table 12
A More information about 2’s complement can be found on the Internet at the following
websites:
B http://www.evergreen.edu/biophysics/technotes/program/2s_comp.htm

C
D

I–8 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix I: Numbering Systems

AutomationDirect.com Products and Data Types


DirectLOGIC PLCs
1
The DirectLOGIC PLC family uses the octal numbering system for all addressing which
includes: inputs, outputs, internal V-memory locations, timers, counters, internal control
2
relays (bits), etc. Most data in the PLC, including timer and counter current values, is in
BCD format by default. User data in V-memory loacations may be stored in other data types 3
if it is changed by the programmer, or comes from some external source, such as an operator
interface. Any manipulation of data must use instructions appropriate for that data type
which includes: Load instructions, Math instructions, Out box instructions, comparison
4
instructions, etc. In many cases, the data can be changed from one data type to another, but
be aware of the limitations of the various data types when doing so. For example, to change a E
value from BCD to decimal (binary), use a BIN instruction box. To change from BCD to a
real number, use a BIN and a BTOR instruction box. When using Math instructions, the
data types must match. For example, a BCD or decimal (binary) number cannot be added to
6
a real number, and a BCD number cannot be added to a decimal (binary) number. If the data
types are mismatched, the results of any math operation will be meaningless. 7
To simplify making, number conversions Intelligent Box (IBox) Instructions are avaialable
with DirectSOFT 5. These instruction descriptions are located in Volume 1, page 5-230, in H
the Math IBox group.
Most DirectLOGIC analog modules can be setup to give the raw data in decimal (binary) I
format or in BCD format, so it is necessary to know how the module is being used.
DirectLOGIC PID is another area where not all values are in BCD. In fact, nearly all of the
PID parameters are stored in the PLC memory as decimal (binary) numbers.
10
NOTE: The PID algorithm uses magnitude plus sign for negative decimal (binary) numbers, whereas the
standard math functions use two’s complement. This can cause confusion while debugging a PID loop.
11
When using the Data View in DirectSOFT 5, be certain that the proper format is selected for 12
the element to be viewed. The data type and length is selected using the drop-down boxes at
the top of the Data View window. Also notice that BCD is called BCD/Hex. Remember that
BCD is a subset of hexadecimal so they share a display format even though the values may be
13
different. This is where good documentation of the data type stored in memory is crucial.
C-more/C-more Micro-Graphic Panels
14
In the C-more and C-more Micro-Graphic HMI operator panels, the 16-bit BCD format is
listed as “BCD int 16”. Binary format is either “Unsigned int 16” or “Signed int 16” A
depending on whether or not the value can be negative. Real number format is “Floating PT
32”. B
More available formats are, “BCD int 32”, “Unsigned int 32” and “Signed int 32”.
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A I–9


EUROPEAN UNION A PPPENDIX
P ENDIX
DIRECTIVES (CE)
J
In This Appendix...
European Union (EU) Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . .J-2
Basic EMC Installation Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . .J-4
Appendix J: European Union Directives (CE)

European Union (EU) Directives


1
NOTE: The information contained in this section is intended as a guideline and is based on our
2 interpretation of the various standards and requirements. Since the actual standards are issued by other
parties, and in some cases governmental agencies, the requirements can change over time without advance
warning or notice. Changes or additions to the standards can possibly invalidate any part of the information
3 provided in this section.

This area of certification and approval is absolutely vital to anyone who wants to do business
4 in Europe. One of the key tasks that faced the EU member countries and the European
Economic Area (EEA) was the requirement to bring several similar yet distinct standards
5 together into one common standard for all members. The primary purpose of a single
standard was to make it easier to sell and transport goods between the various countries and
to maintain a safe working and living environment. The Directives that resulted from this
H merging of standards are now legal requirements for doing business in Europe. Products that
meet these Directives are required to have a CE mark to signify compliance.
7 Member Countries
As of January 1, 2007, the members of the EU are Austria, Belgium, Bulgaria, Cyprus, Czech
10 Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy,
Latvia, Lithonia, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia,
9 Slovenia, Spain, Sweden, and United Kingdom. Iceland, Liechtenstein, and Norway together
with the EU members make up the European Economic Area (EEA) and all are covered by
the Directives.
10 Applicable Directives
There are several Directives that apply to our products. Directives may be amended, or added,
J as required.
• Electromagnetic Compatibility Directive (EMC) — this Directive attempts to ensure that devices,
12 equipment, and systems have the ability to function satisfactorily in an electromagnetic
environment without introducing intolerable electromagnetic disturbance to anything in that
13 environment.
• Machinery Safety Directive — this Directive covers the safety aspects of the equipment,
installation, etc. There are several areas involved, including testing standards covering both electrical
14 noise immunity and noise generation.
• Low Voltage Directive — this Directive is also safety related and covers electrical equipment that
A has voltage ranges of 50–1000VAC and/or 75–1500VDC.
• Battery Directive — this Directive covers the production, recycling, and disposal of batteries.
B Compliance
Certain standards within each Directive already require mandatory compliance. The EMC
C Directive, which has gained the most attention, became mandatory as of January 1, 1996.
The Low Voltage Directive became mandatory as of January 1, 1997.
D Ultimately, we are all responsible for our various pieces of the puzzle. As manufacturers, we
must test our products and document any test results and/or installation procedures that are
necessary to comply with the Directives. As a machine builder, you are responsible for

J-2 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix J: European Union Directives (CE)

installing the products in a manner which will ensure compliance is maintained. You are also
responsible for testing any combinations of products that may (or may not) comply with the
Directives when used together. The end user of the products must comply with any Directives 1
that may cover maintenance, disposal, etc. of equipment or various components. Although we
strive to provide the best assistance available, it is impossible for us to test all possible configurations
of our products with respect to any specific Directive. Because of this, it is ultimately your
2
responsibility to ensure that your machinery (as a whole) complies with these Directives and to keep
up with applicable Directives and/or practices that are required for compliance. 3
As of January 1, 1999, the DL05, DL06, DL205, DL305, and DL405 PLC systems
manufactured by Koyo Electronics Industries or FACTS Engineering, when properly installed 4
and used, conform to the Electromagnetic Compatibility (EMC), Low Voltage Directive, and
Machinery Directive requirements of the following standards.
• EMC Directive Standards Relevant to PLCs
5
EN50081–1 Generic emission standard for residential, commercial, and light industry
EN50081–2 Generic emission standard for industrial environment. H
EN50082–1 Generic immunity standard for residential, commercial, and light industry
EN50082–2 Generic immunity standard for industrial environment.
• Low Voltage Directive Standards Applicable to PLCs
7
EN61010–1 Safety requirements for electrical equipment for measurement, control, and laboratory
use. 10
• Product Specific Standard for PLCs
EN61131–2 Programmable controllers, equipment requirements and tests. This standard replaces
the above generic standards for immunity and safety. However, the generic emissions standards must
9
still be used in conjunction with the following standards:
-EN 61000-3-2 Harmonics 10
-EN 61000-3-2 Fluctuations
• Warning on Electrostatic Discharge (ESD)
We recommend that all personnel take necessay precautions to avoid the risk of transferring
J
static charges to inside the control cabinet, and clear warnings and instructions should be
provided on the cabinet exterior. Such precautions may include, the use of earth straps, simila 12
devices or the powering off of the equipment inside the enclosure before the door is opened.
• Warning on Radio Interference (RFI)
This is a class A product. In a domestic environment this product may cause radio
13
interference in which case the user may be required to take adequate measures.
General Safety
14
• External switches, circuit breaker or external fusing, are required for thes devices.
• The switch or circuit breaker should be mounted near the PLC equipment.
A
AutomationDirect is currently in the process of changing their testing procedures from the
generic standards to the product specific standards. B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A J-3


Appendix J: European Union Directives (CE)

Special Installation Manual


The installation requirements to comply with the requirements of the Machinery Directive,
1 EMC Directive and Low Voltage Directive are slightly more complex than the normal
installation requirements found in the United States. To help with this, we have published a
2 special manual which you can order:
• DA–EU–M – EU Installation Manual that covers special installation requirements to meet the EU
3 Directive requirements. Order this manual to obtain the most up-to-date information.
Other Sources of Information
4 Although the EMC Directive gets the most attention, other basic Directives, such as the
Machinery Directive and the Low Voltage Directive, also place restrictions on the control
panel builder. Because of these additional requirements it is recommended that the following
5 publications be purchased and used as guidelines:
• BSI publication TH 42073: February 1996 – covers the safety and electrical aspects of the
H Machinery Directive
• EN 60204–1:1992 – General electrical requirements for machinery, including Low Voltage and
7 EMC considerations
• IEC 1000–5–2: EMC earthing and cabling requirements
10 • IEC 1000–5–1: EMC general considerations
It may be possible for you to obtain this information locally; however, the official source of
9 applicable Directives and related standards is:
The Office for Official Publications of the European Communities L–2985 Luxembourg;
quickest contact is via the World Wide Web at http://euro–op.eu.int/indexn.htm
10 Another source is:
J British Standards Institution – Sales Department
Linford Wood
12 Milton Keynes
MK14 6LE
13 United Kingdom; the quickest contact is via the World Wide Web at http://www.bsi.org.uk

14 Basic EMC Installation Guidelines


A Enclosures
The simplest way to meet the safety requirements of the Machinery and Low Voltage
Directives is to house all control equipment in an industry standard lockable steel enclosure.
B This normally has an added benefit because it will also help ensure that the EMC
characteristics are well within the requirements of the EMC Directive. Although the RF
C emissions from the PLC equipment, when measured in the open air, are well below the EMC
Directive limits, certain configurations can increase emission levels. Holes in the enclosure,
for the passage of cables or to mount operator interfaces, will often increase emissions.
D

J-4 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix J: European Union Directives (CE)

AC Mains Filters
The DL305 AC powered base power
supplies require extra mains filtering to 1
comply with the EMC Directive on Schaf fner
conducted RF emissions. All PLC
equipment has been tested with filters
Filter
FN2010
2
from Schaffner, which reduce emissions
levels if the filters are properly grounded 3
(earth ground). A filter with a current To AC
rating suitable to supply all PLC power Transient
Input
Circuitry 4
supplies and AC input modules should be Suppressor
selected. We suggest the FN2080 for
DL305 systems. Earth
Fused
Terminals
5
Terminal
L N H
NOTE: Very few mains filters can reduce problem emissions to negligible levels. In some cases, filters may 7
increase conducted emissions if not properly matched to the problem emissions.

Suppression and Fusing


10
In order to comply with the fire risk requirements of the Low Voltage and Machinery
Directive electrical standards EN 61010–1, and EN 60204–1, by limiting the power into 9
“unlimited” mains circuits with power leads reversed, it is necessary to fuse both AC and DC
supply inputs. You should also install a transient voltage suppressor across the power input
connections of the PLC. Choose a suppressor such as a metal oxide varistor, with a rating of
10
275VAC working voltage for 230V nominal supplies (150VAC working voltage for 115V
supplies) and high energy capacity (eg. 140 joules). J
Transient suppressors must be protected by fuses and the capacity of the transient suppressor
must be greater than the blow characteristics of the fuses or circuit breakers to avoid a fire 12
risk. A recommended AC supply input arrangement for Koyo PLCs is to use twin 3 amp TT
fused terminals with fuse blown indication, such as DINnectors DN–F10L terminals, or twin
circuit breakers, wired to a Schaffner FN2010 filter or equivalent, with high energy transient
13
suppressor soldered directly across the output terminals of the filter. PLC system inputs
should also be protected from voltage impulses by deriving their power from the same fused, 14
filtered, and surge-suppressed supply.
Internal Enclosure Grounding A
A heavy-duty star earth terminal block should be provided in every cubicle for the connection
of all earth ground straps, protective earth ground connections, mains filter earth ground B
wires, and mechanical assembly earth ground connections. This should be installed to comply
with safety and EMC requirements, local standards, and the requirements found in IEC
1000–5–2.The Machinery Directive also requires that the common terminals of PLC input
C
modules, and common supply side of loads driven from PLC output modules should be
connected to the protective earth ground terminal. D

DL06 Micro PLC User Manual, 3rd Edition Rev. A J-5


Appendix J: European Union Directives (CE)

Equi–potential Grounding
1
2
3
4
Serial Communication Cable
Key Equi-potential Bond
5 Adequate site earth grounding must be provided for equipment containing modern electronic
circuitry. The use of isolated earth electrodes for electronic systems is forbidden in some
H countries. Make sure you check any requirements for your particular destination. IEC
1000–5–2 covers equi-potential bonding of earth grids adequately, but special attention
7 should be given to apparatus and control cubicles that contain I/O devices, remote I/O racks,
or have inter-system communications with the primary PLC system enclosure. An equi-
potential bond wire must be provided alongside all serial communications cables, and to any
10 separate items of the plant which contain I/O devices connected to the PLC. The diagram
shows an example of four physical locations connected by a communications cable.
9 Communications and Shielded Cables
Conductive
10 Screened
Cable
Adapter

Serial
J I/O

12 To Earth
Block

13 Equi-potential
Bond
14
Control Cubicle

A Good quality 24 AWG minimum twisted-pair shielded cables, with overall foil and braid
shields are recommended for analog cabling and communications cabling outside of the PLC
B enclosure. To date it has been a common practice to only provide an earth ground for one end
of the cable shield in order to minimize the risk of noise caused by earth ground loop currents
C between apparatus. The procedure of only grounding one end, which primarily originated as
a result of trying to reduce hum in audio systems, is no longer applicable to the complex
industrial environment. Shielded cables are also efficient emitters of RF noise from the PLC
D system, and can interact in a parasitic manner in networks and between multiple sources of
interference.

J-6 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix J: European Union Directives (CE)

The recommendation is to use shielded cables as electrostatic “pipes” between apparatus and
systems, and to run heavy gauge equi-potential bond wires alongside all shielded cables.
When a shielded cable runs through the metallic wall of an enclosure or machine, it is 1
recommended in IEC 1000–5–2 that the shield should be connected over its full perimeter to
the wall, preferably using a conducting adapter, and not via a pigtail wire connection to an
earth ground bolt. Shields must be connected to every enclosure wall or machine cover that
2
they pass through.
Analog and RS232 Cables
3
Providing an earth ground for both ends of the shield for analog circuits provides the perfect
electrical environment for the twisted pair cable as the loop consists of signal and return, in a 4
perfectly balanced circuit arrangement, with connection to the common of the input circuitry
made at the module terminals. RS232 cables are handled in the same way. 5
Multidrop Cables
RS422 twin twisted pair, and RS485 single twisted pair cables also require a 0V link, which H
has often been provided in the past by the cable shield. It is now recommended that you use
triple twisted pair cabling for RS422 links, and twin twisted pair cable for RS485 links. This
is because the extra pair can be used as the 0V inter-system link. With loop DC power
7
supplies earth grounded in both systems, earth loops are created in this manner via the inter-
system 0v link. The installation guides encourage earth loops, which are maintained at a low 10
impedance by using heavy equi-potential bond wires. To account for non–European
installations using single-end earth grounds, and sites with far from ideal earth ground
characteristics, we recommend the addition of 100 ohm resistors at each 0V link
9
connection in network and communications cables.
Last Slave
TXD 0V RXD
Slave n
TXD 0V RXD
Master
RXD 0V TXD
10
+ – + – + – + – + – + –

100 ⏲ 100 ⏲

Termination Termination
100 ⏲ J
12
Shielded Cables within Enclosures 13
When you run cables between PLC items within an enclosure which also contains susceptible
electronic equipment from other manufacturers, remember that these cables may be a source
of RF emissions. There are ways to minimize this risk. Standard data cables connecting PLCs
14
and/or operator interfaces should be routed well away from other equipment and their
associated cabling. You can make special serial cables where the cable shield is connected to A
the enclosure’s earth ground at both ends, the same way as external cables are connected.
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A J-7


Appendix J: European Union Directives (CE)

Analog Modules and RF Interference


All Automationdirect products are tested to withstand field strength levels up to 10V/m,
1 which is the maximum required by the relevant EU standards. While all products passs this
test, analog modules will typically exhibit deviations of their readings. This is quite normal,
2 however, systems designers should be aware of this and plan accordingly.
When assembling a control system using analog modules, these issues must be adhered to and
3 should be integrated into the system design. This is the responsibility of the system
builder/commissioner.
4 Network Isolation
For safety reasons, it is a specific requirement of the Machinery Directive that a keyswitch must be
5 provided that isolates any network input signal during maintenance, so that remote commands cannot
be received that could result in the operation of the machinery. The FA–ISONET does not have a
keyswitch! Use a keylock and switch on your enclosure which when open removes power from the
H FA–ISONET. To avoid the introduction of noise into the system, any keyswitch assembly should be
housed in its own earth grounded steel box and the integrity of the shielded cable must be maintained.
7 Again, for further information on EU directives we recommend that you get a copy of our EU
Installation Manual (DA–EU–M). Also, if you are connected to the World Wide Web, you can check
10 the EU Commision’s official site at: http://ec.europa.eu/index_en.htm.
DC Powered Versions
9 Due to slightly higher emissions radiated by the DC powered versions of the DL06, and the
differing emissions performance for different DC supply voltages, the following stipulations
must be met:
10 • The PLC must be housed within a metallic enclosure with a minimum amount of orifices.
• I/O and communications cabling exiting the cabinet must be contained within metallic
J conduit/trunking.

12
13
14 1.5"
38mm
min

A
1.5"

B 38mm
min

C 1.5"
38mm
min

J-8 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix J: European Union Directives (CE)

Items Specific to the DL06


• The rating between all circuits in this product are rated as basic insulation only, as appropriate for
single fault conditions. 1
• There is no isolation offered between the PLC and the analog inputs of this product.
• It is the responsibility of the system designer to earth one side of all control and power circuits, and 2
to earth the braid of screened cables.
• This equipment must be properly installed while adhering to the guidelines of the in house PLC
installation manual DA–EU–M, and the installation standards IEC 1000–5–1, IEC 1000–5–2 and
3
IEC 1131–4.
• It is a requirement that all PLC equipment must be housed in a protective steel enclosure, which
4
limits access to operators by a lock and power breaker. If access is required by operators or untrained
personnel, the equipment must be installed inside an internal cover or secondary enclosure. A
warning label must be used on the front door of the installation cabinet as follows:
5
Warning: Exposed terminals and hazardous voltages inside.
• It should be noted that the safety requirements of the machinery directive standard EN60204–1
H
state that all equipment power circuits must be wired through isolation transformers or isolating
power supplies, and that one side of all AC or DC control circuits must be earthed. 7
• Both power input connections to the PLC must be separately fused using 3 amp T type anti–surge
fuses, and a transient suppressor fitted to limit supply overvoltages.
• If the user is made aware by notice in the documentation that if the equipment is used in a manner
10
not specified by the manufacturer the protection provided by the equipment may be impaired.
9
10
J
12
13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A J-9


INTRODUCTION TO SERIAL A PPPENDIX
P ENDIX
COMMUNICATIONS
K
In this Appendix
Introduction to Serial Communications . . . . . . . . . . . . . . . . . . . . . .K–2
Appendix K: Introduction to Serial Communications

Introduction to Serial Communications


DirectLOGIC® PLCs have two built-in serial communiction ports which can be used to
1 communicate to other PLCs or to other serial devices. In order to fully understand the
capabilities and limitations of the serial ports, a brief introduction to serial communications is
in order.
2 There are three major components to any serial communications setup:
3 Wiring standard
Communications protocol
4 Communications parameters
Each of these will be discussed in more detail as they apply to DirectLOGIC PLCs.
E Wiring Standards
There are three different wiring standards that can be used with DirectLOGIC PLCs:
6 RS-232C, RS-422 and RS-485.
RS-232C is a point-to-point wiring standard with a practical wiring distance of 15 meters, or
7 50 feet, maximum. This means that only two devices can communicate on an RS-232C
network, a single master device and a single slave device, and the total cable length cannot
exceed 50 feet. Belden® 8102, or equivalent, is recommended for RS-232C networks.
H

6
9 Point-to-point

11
1
DTE Device Signal GND
GND
1 0V Signal GND RXD
TXD
3 RXD RXD

10 4 TXD TXD TXD

CTS
RXD

RTS
PORT1 RTS

10

15
6P6C CTS

5
K Phone Jack

OR
Loop
RTS

Port 1 Connections Port 2 Connections Back CTS

12 RS-422 is
a multi-point wiring standard with a practical wiring distance 0f 1000 meters, or 3280 feet,
maximum total length. The RS-422 wiring standard does not specify a network topology, but
13 in practice, a daisy-chain topology with the master at one end is the only way to ensure
network reliablility. Belden 8102, or equivalent is recommended for RS-422 networks. Use a
14 terminating resistor equal in value to the characteristic impedance of the cable being used
(100 액 for Belden 8102).
A RXD+
RXD–

B TXD+
TXD–
Signal GND
9 TXD+ Termination

C The recommended cable


for RS422 is Belden
10
13
6
11
TXD–
RXD+
RXD–
RTS+
Resistor at
both ends of
network

8102 or equivalent. 12 RTS–

D 14
15
7
CTS+
CTS–
0V
PORT 2
Master

K–2 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix K: Introduction to Serial Communications

RS-485 is a multi-point wiring standard with a practical wiring distance of 4000 feet
maximum. This wiring standard provides for the possibility of up to 32 masters
communicating to up to 32 slaves all within the maximum distance of 4000 feet. Note that 1
while the RS-485 wiring standard provides for multiple masters on the same network, the
DirectLOGIC PLCs do not support multiple masters on a single network. The RS-485
wiring standard does not specify a network topology, but in practice, a daisy-chain topology
2
with the master at one end is the only way to ensure network reliablility. Belden 9841, or
equivalent is recommended for RS-485 networks. Use a terminating resistor equal in value to 3
the characteristic impedance of the cable being used (120 액 for Belden 9841).

TXD+ / RXD+
Termination
Resistor
TXD+ / RXD+ TXD+ / RXD+
4
TXD– / RXD– TXD– / RXD– TXD– / RXD–
E
Signal GND Signal GND Signal GND

RXD–
Connect shield
to signal ground
RXD– 6

6
6

11

11
1

1
0V
RTS+ 0V RTS+
7
TXD+ RXD+ RTS– TXD+ RTS–
RXD+
CTS+ Cable: Use Belden
9841 or equivalent
CTS+ H
CTS– CTS–
10

10
9
15
15
5

5
TXD– TXD–
DL06 CPU Port 2 DL06 CPU Port 2

10
Communications Protocols
A communications protocol is the ‘language’ the devices on a network use to communicate K
with each other. All the devices on the network must use the same communications protocol
in order to be able to communicate with each other. The protocols avalable in the
DirectLOGIC PLCs are listed in the following table.
12
Communications Protocols 13
Protocol Master Slave Port 1* Port 2 RS-232C RS-422 RS-485**
K-Sequence
DirectNET
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
14
MODBUS RTU Yes Yes Yes Yes Yes Yes Yes
ASCII Out In No Yes Yes Yes No A
* Port 1 supports slave only and is only RS-232C with fixed communications parameters of 9600
baud, 8 data bits, 1 start bit, 1 stop bit, odd parity and station address 1. It is an asynchronous, half- B
duplex DTE port and auto-selects between K-Sequence, DirectNET and MODBUS RTU protocols.
** RS-485 is available on Port 2 for MODBUS RTU protocol only. C
K-Sequence protocol is not available for use by a master DL06 PLC. Therefore, it cannot be
used for networking between PLCs. Its primary use in the DL06 PLC is as a slave to
DirectSOFT programming software and to an operator interface.
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A K–3


Appendix K: Introduction to Serial Communications

DirectNET protocol is available for use by a master or by a slave DL06 PLC. This, and the
fact that it is ‘native’ protocol, makes it ideal for PLC-to-PLC communication over a point-
1 to-point to multipoint network usijg the RX and WX instructions.
MODBUS RTU protocol is a very common industry standard protocol, and can be used by a
2 master or slave DL06 to communicate with a wide variety of industrial devices which support
this protocol.
3 ASCII is another very common industry standard protocol, and is commonly used where
alpha-numeric character data is to be transferred. Manyh input devices, such as, barcode
readers and electronis scales use ASCII protocol, and many output devices accept ASCII
4 commands, as well.
It doesn’t matter which wiring standard or protocol is used, there are several communications
E parameters to select for each device before they will be able to communicate. These
parameters include:
6 Baud Rate Flow Control
Data Bits Echo Suppression
7 Parity Timeouts
Stop Bits Delay Times
H Station Address Format
9 All of these parameters may not be necessary, or available, for your application. The
parameters used will depend on the protocol being used and whether the device is a master or
10 slave.

K NOTE: The point to remember is that when there is the same parameter available in the master and in the
slave (i.e. Baud Rate, Parity, Stop Bits, etc), the settings must match.

12
13
14
A
B
C
D

K–4 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix K: Introduction to Serial Communications

Communications Port 2
DL06 Port Specifications Connects to HPP, DirectSOFT 5, operator

Communications Port 1
interfaces, etc.
15-pin, multifunction port, RS232C, RS422, RS485
1
Connects to HPP, DirectSOFT 5, operator (RS485 with 2-wire is only available for MODBUS
and Non-sequence).
interfaces, etc.
6-pin, RS232C Communication speed (baud): 300, 600, 1200, 2
Communication speed (baud): 9600 (fixed) 2400, 4800, 9600, 19200, 38400
Parity: odd (fixed)
Port 1 Station Address: 1 (fixed)
Port 2
Parity: odd (default), even, none
Station Address: 1 (default)
3
8 data bits 8 data bits
1 start, 1 stop bit 1 start, 1 stop bit 4
Asynchronous, half-duplex, DTE Asynchronous, half-duplex, DTE
Protocol (auto-select): K-sequence (slave only),
DirectNET (slave only), MODBUS (slave only)
Protocols can be pre-selected: K-sequence (slave
only), DirectNET (master/slave), MODBUS E
(master/slave), non-sequence/print/ASCII in/out

DL06 Port Pinouts


6
Port 2 Pin Descriptions
1 5V Power (+) connection
7
2 TXD Transmit data (RS-232C)

1
Port 1 Pin Descriptions
0V Power (-) connection (GND)
3 RXD
4 RTS
Receive data (RS-232C)
Ready to send (RS-232C)
H
2 5V Power (+) connection
3 RXD Receive data (RS-232C)
5 CTS
6 RXD-
Clear to send (RS232C)
Receive data (-) (RS-422/485)
9
4 TXD Transmit data (RS-232C) 7 0V Power (-) connection (GND)
5
6
5V
0V
Power (+) connection
Power (-) connection (GND)
8 0V
9 TXD+
Power (-) connection (GND)
Transmit data (+) (RS-422/485)
10
10 TXD- Transmit data (-) (RS-422/485)
11 RTS+ Ready to send (+) (RS-422/485) K
12 RTS- Ready to send (-) (RS-422/485)
13 RXD+
14 CTS+
Receive data (+) (RS-422/485)
Clear to send (+) (RS-422/485)
12
15 CTS- Clear to send (-) (RS-422/485)

Note that the default configuration for port 2 is:


13
Auto-detect among K-Sequence, DirectNET, and MODBUS RTU protocols
Timeout = Base Timeout x 1 (800 ms)
14
RTS on delay time = 0 ms A
RTS off delay time = 0 ms
Station Number = 1 B
Baud rate = 19200
Stop bits = 1 C
Parity = odd
Format = Hex D
Echo Suppression = RS-422/485 (4-wire) or RS-232C

DL06 Micro PLC User Manual, 3rd Edition Rev. A K–5


Appendix K: Introduction to Serial Communications

Port Setup Using DirectSOFT 5 or Ladder Logic Instructions


Port 2 on the DL06 can be configured for communicatiojns using the various protocols
1 which have been previously mentioned. Also, the communications parameters can be
configured to match the parameters in the other device(s) with which the PLC will be
2 communicating. The port may be configured using the DirectSOFT 5 PLC programming
software, or by using ladder logic within the PLC program. It is important to note that the
settings for port 2 are never saved to disk with DirectSOFT 5, so if you are using port 2 in
3 other than it’s default configuration (see page K-6) it is a good idea to include the port setup
in the ladder program, typically on a first scan bit, or in an initialization subroutine.
4 To setup port 2 using DirectSOFT 5 the PLC must be turned on and connected to
DirectSOFT 5. If the PLC Setup toolbar is displayed, either select the Port 2 button or select
E PLC > Setup > Setup Sec. Comm Port... from the menu bar located at the top of the
programming window. A dialog box like the one below will appear. Make the appropriate
settings and write them to the PLC.
6
7
H
9
10
K
12
In order to setup port 2 in your relay ladder logic the appropriate values must be written to
13 V7655 (Word 1), V7656 (Word 2) and V7650 (Word 3, for ASCII only) to specify the
settings for the port. Then write the ‘setup complete’ flag (K0500) to V7657 (Word 3) to
request the CPU to accept the port settings. Once the CPU sees the ‘setup complete’ flag in
14 V7657 it will test the port settings which have selected for validity, and then change the value
in V7657 according to the results of this test. If the port settings are valid, the CPU will
A change the value in V7657 to 0A00 (‘A’ for Accepted). If there was an error in the port
settings, the CPU will change the value in V7657 to 0E00 (‘E’ for Error).

B NOTE: This is a Helpful Hint. Rather than build the setup words manually from the tables, use
DirectSOFT 5 to setup the port as desired then use a Dataview to view the setup words as BCD/HEX. Then
simply use these numbers in the setup code.
C
The data that is written to the port setup words has two formats. The format that is used
D depends on whether K-Sequence, DirectNET, MODBUS RTU (method 1) or ASCII
(method 2) is selected.

K–6 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix K: Introduction to Serial Communications

Port 2 Setup for RLL Using K-Sequence, DirectNET or MODBUS RTU


V7655 (Word 1) RTS On-delay Timeout
(% of timeout)
Protocol RTS Off-delay 1
0yyy 0ttt mmmm mxx yyy ttt mmmmm xxx
000 = 0ms 000 = 100% 10000 = K-Sequence 000 = 0ms 2
001 = 2ms 001 = 120% 01000 = DirectNET 001 = 2ms
010 = 5ms 010 = 150% 00100 = MODBUS RTU 010 = 5ms 3
011 = 10ms 011 = 200% 011 = 10ms
100 = 20ms
101 = 50ms
100 = 500%
101 = 1000%
100 = 20ms
101 = 50ms
4
110 = 100ms 110 = 2000% 110 = 100ms
111 = 500ms 111 = 5000% 111 = 500ms E
V7656 (Word 2) Parity Stop Bits Echo Suppression Baud Rate 6
K-Sequence, DirectNET
& MODBUS RTU
pps0 ebbb xaaa aaaa pp s e bbb 7
00 = None 0 = 1 bit 0 = 232 or 422 000 = 300
10 = Odd
11 = Even
1 = 2 bits 1 = 485, 2 wire 001 = 600
010 = 1200
H
011 = 2400
100 = 4800
9
101 = 9600
110 = 19200 10
111 = 38400
K
V7656 (Word 2) cont’d Protocol Secondary Address
K-Sequence, DirectNET
& MODBUS RTU (DirectNET) xaaaaaaa (DirectNET) 12
pps0 ebbb xaaa aaaa x _aaaaaaa (K-Seq. &
MODBUS RTU)
0 = Hex K-Sequence: 1-90 13
1 = ASCII DirectNET: 1-90
MODBUS: 1-247 14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A K–7


Appendix K: Introduction to Serial Communications

To setup port 2 for for MODBUS protocol for the following: RTS On-delay of 10ms, Base
timeout x1, RTS Off-delay of 5ms, Odd parity, 1 Stop bit, echo suppression for RS232-
1 C/RS422, 19,200 baud, Station Number 23 you would use the relay ladder logic shown
below.
2 SP0
LD
3 K3022

OUT
V7655
4 LD
K8617

E OUT
V7656

6
7 Port 2 Setup for RLL Using ASCII
H Word 1 RTS On-delay
Timeout
(in% of std. timeout) Protocol RTS Off-delay

9 0yyy 0ttt mmmm mxx yyy


000 = 0ms
ttt
000 = 100%
mmmmm
00010 = Non-Sequence
xxx
000 = 0ms
001 = 2ms 001 = 120% 001 = 2ms
10 010 = 5ms 010 = 150% 010 = 5ms
011 = 10ms 011 = 200% 011 = 10ms
DL05/06: V7655
K 100 = 20ms
101 = 50ms
100 = 500%
101 = 1000%
100 = 20ms
101 = 50ms

12 110 = 100ms
111 = 500ms
110 = 2000%
111 = 5000%
110 = 100ms
111 = 500ms

13 Word 2 Parity Stop Bits


Echo Suppression
Baud Rate
(valid for DL06 only)
K-Sequence, DirectNET
14 & MODBUS RTU
pps0 ebbb xaaa aaaa pp s e bbb
A 00 = None 0 = 1 bit 0 = RS-232C, RS-422 or
RS-485 (4 wire) 000 = 300

10 = Odd 1 = 2 bits 1 = RS-485 (2 wire) 001 = 600


B 11 = Even 010 = 1200
DL05/06: V7656 011 = 2400
C 100 = 4800
101 = 9600

D 110 = 19200
111 = 38400

K–8 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix K: Introduction to Serial Communications

Word 2 cont’d Protocol Mode


01110000 = No flow control 1
01110001 = Xon/Xoff flow control
DL05/06: V7656 01110010 = RTS flow control 2
01110011 = Xon/Xoff and
RTS flow control
3
Word 3 V-memory address for data
Hex value of the V-memory location to temporaily store the ASCII data coming into the PLC.
4
DL05/06: V7656 Set this parameter to an unused V-memory location which has enough consecutive memory
locations free to store the longest string that will come into the PLC.
E
To setup port 2 for for Non-sequence (ASCII) communications with the following: RTS On-
delay of 10ms, Base timeout x1, RTS Off-delay of 5ms, Odd parity, 1 Stop bit, echo 6
suppression for RS232-C/RS422, 19,200 baud, 8 data bits, V-memory buffer starting at
V2000 and no flow control you would use the relay ladder logic shown below. 7
SP0
LD
K3012
H
OUT
V7655 9
LD
K8670
10
OUT

LDA
V7656
K
O2000

OUT 12
V7650

13
14
A
B
C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A K–9


Appendix K: Introduction to Serial Communications

K-Sequence Communications
The K-Sequence protocol can be used for communication with DirectSOFT 5, an operator
1 interface or any other device that can be a K-Sequence master. The DL06 PLC can be a K-
Sequence slave on either port 1 or port 2. The DL06 PLC cannot be a K-Sequence master.
2 In order to use port 2 for K-Sequence communications you first need to setup the port using
either DirectSOFT 5 or ladder logic as described above.
3 DirectNET Communications
The DirectNET protocol can be used to communicate to another PLC or to other devices
4 that can use the DirectNET protocol. The DL06 can be either be used as a master using port
2 or as a slave using either port 1 or port 2.
E In order to use port 2 for DirectNET communications you must first setup the port using
either DirectSOFT 5 or ladder logic as previously described.
6 For network slave operation, nothing more needs to be done. Port 2 will function as a slave
unless network communications instructions are executed by the ladder logic program.
7 For a network master operation you will simply need to add some ladder rungs using the
network communication instructions RX and/or WX. If you use more than one network
communidcation instruction is executed at any given time. If you have just a few network
H communications instructions in your program, you can use discrete bits to interlock them. If
you are using many network communications instructions, a counter or a shift register will be
9 a more convenient way to interlock the instructions.
The following step-by-step procedure will provide you the information necessary to set up
10 your ladder program to receive data from a network slave.
Step 1: Identify Master Port # and Slave # F 2 0 1
K The first Load (LD) instruction identifies the
communications port number on the network master
(DL06) and the address of the slave station. This Slave address (BCD)
12 instruction can address up to 99 MODBUS slaves, or Port number (BCD)
90 DirectNET slaves. The format of the word is Internal port (hex)
13 shown to the right. The “F2” in the upper byte
indicates the use of the right port of the DL06 PLC,
LD
port number 2. The lower byte contains the slave
14 address number in BCD (01 to 99).
KF201

A 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 between the
B master and slave in the subsequent WX or RX
# of bytes to transfer
instruction. The value to be loaded is in BCD format
C (decimal), from 1 to 128 bytes.
LD
K64

K–10 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix K: Introduction to Serial Communications

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, you’ll have to use the X input data type 1
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. 2
DL05 / 06 / 205 / 350 / 405 Memory Bits per unit Bytes
V-memory 16 2 3
T / C current value 16 2
Inputs (X, SP)
Outputs
8 1
4
8 1
(Y, C, Stage, T/C bits)
Scratch Pad Memory 8 1 E
Diagnostic Status 8 1

DL330 / 340 Memory Bits per unit Bytes 6


Data registers 8 1
T / C accumulator
I/O, internal relays, shift register bits, T/C
16 2 7
1 1
bits, stage bits
Scratch Pad Memory 8 1 H
Diagnostic Status(5 word R/W) 16 10
9
Step 3: Specify Master Memory Area 4 0 6 0 0 (octal)
The third instruction in the RX or WX sequence is a
Load Address (LDA) instruction. Its purpose is to
10
load the starting address of the memory area to be Starting address of
transferred. Entered as an octal number, the LDA master transfer area K
instruction converts it to hex and places the result in
the accumulator. LDA
O40600 12
For a WX instruction, the DL06 CPU sends the
number of bytes previously specified from its memory
area beginning at the LDA address specified. MSB V40600 LSB 13
For an RX instruction, the DL06 CPU reads the
number of bytes previously specified from the slave,
15
MSB V40601 LSB
0
14
placing the received data into its memory area
beginning at the LDA address specified. 15 0 A
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 B
this case, only the 8 least significant bits of the last word location will be modified. The remaining 8 bits are
not affected. C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A K–11


Appendix K: Introduction to Serial Communications

Step 4: Specify Slave Memory Area SP116


LD
The last instruction in our sequence is the WX or RX KF201
1 instruction itself. Use WX to write to the slave, and RX
to read from the slave. All four of our instructions are LD
2 shown to the right. In the last instruction, you must
specify the starting address and a valid data type for the
K64

LDA
slave.
3 • DirectNET slaves – specify the same address in the WX
O40600

and RX instruction as the slave’s native I/O address RX


4 • MODBUS DL405, DL205, or DL06 slaves – specify the Y0
same address in the WX and RX instruction as the slave’s
E native I/O address
• MODBUS 305 slaves – use the following table to convert DL305 addresses to MODBUS addresses
6 DL305 Series CPU Memory Type–to–MODBUS Cross Reference (excluding 350 CPU)
PLC Base MODBUS PLC Memory PLC Base MODBUS
7 PLC Memory Type
Address Base Address Type Address Base Address
TMR/CNT Status
TMR/CNT Current Values R600 V0 CT600 GY600
H I/O Points IO 000 GY0
Bits
Control Relays CR160 GY160
Data Registers R401,R400 V100 Shift Registers SR400 GY400
9 Stage Status Bits (D3-330P only) S0 GY200

10
K
12
13
14
A
B
C
D

K–12 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Appendix K: Introduction to Serial Communications

Communications from a Ladder Program


Typically network
communications will last longer
SP117 Y1
SET
1
than 1 scan. The program must
wait for the communications to
finish before starting the next
SP116
LD
KF201
2
Port Communication Error
transaction.
Port 2, which can be a master, has
Port Busy
LD
K0003
3
two Special Relay contacts
associated with it (see Appendix
LDA
O40600 4
D for comm port special
relays).One indicates “Port
busy”(SP116), and the other
RX
Y0 E
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 6
the PLC communicates with the slave. When the bit is off the program can initiate the next
network request. 7
The “Port Communication Error” bit turns on when the Interlocking Relay
PLC has detected an error. Use of this bit is optional.
When used, it should be ahead of any network instruction
SP116 C100
LD
H
KF201
boxes since the error bit is reset when an RX or WX
instruction is executed. LD
9
K0003
Multiple Read and Write Interlocks
If you are using multiple reads and writes in the RLL LDA
O40600
10
program, you have to interlock the routines to make sure
all the routines are executed. If you don’t use the interlocks, RX
VY0
K
then the CPU will only execute the first routine. This is Interlocking
Relay
because each port can only handle one transaction at a
time.
C100
SET
12
In the example to the right, after the RX instruction is
executed, C100 is set. When the port has finished the
SP116 C100
LD
KF201
13
communication task, the second routine is executed and
C100 is reset. LD
K0003
14
If you’re using RLLPLUS Stage Programming, you can put
each routine in a separate program stage to ensure proper LDA
O40400 A
execution and switch from stage to stage allowing only one
of them to be active at a time. WX
VY0 B
C100
RST C
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A K–13


Appendix K: Introduction to Serial Communications

MODBUS RTU Communications


The MODBUS RTU protocol can be used for communication with any device that uses the
1 MODBUS RTU protocol. The protocol is very common and is probably the closest thing to
an “industry standard” protocol in existence. The DL06 can be a MODBUS RTU slave on
2 either port 1 or port 2, and it can be a MODBUS RTU master on port 2. The RS 485 wiring
standard may be used on port 2 for the MODBUS RTU protocol only.
3 In order to use port 2 for MODBUS RTU communications you must first set up the port
using either DirectSOFT 5 or ladder logic as previously described.
4 For network slave operation, nothing more needs to be done. Port 2 will function as a slave
unless network communications instructions are executed by the ladder logic program.

E For network master operation the MODBUS RTU network communication instructions
MRX and/or MWX needs to be added to some ladder rungs. If more than one network
communication instruction is used, the rungs need to be interlocked to ensure that only one
6 communication instruction is executed at any given time. If only a few network
communications instructions are used in your program, discrete bits can be used to interlock
7 them. If many network communicaitons instructions are used, either a counter or a shift
register will be a more convenient way to interlock the instructions.

H
9
10
K
12
13
14
A
B
C
D

K–14 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Index

A C
Accumulating Fast Timer instruction, 5–42 C Data Type, 3–26 1
Accumulating Timer (TMRA) instruction, 5–42 C-more, I-9
Accumulator, 5–69 Cables 2
Accumulator Instructions, 5–52 programming, 1–8
Aliases, 3–31 Cascade Control, 8–65
3
Analog IBoxes, 5–230 Tuning, 8–67
Approvals, 2–10 Changing Date and Time, 10–14
4
ASCII Conversion Table, G-2 Clock / Calendar Instructions, 5–171
ASCII In/Out and PRINT, 4–11 Combination Networks, 5–7
5
Comm Port 2, 3–4
ASCII Instructions, 5–210
Auto tuning error, 8–48 Comm Ports, configuring, 4–7
6
Auto Tuning Procedure, 8–45 Communication IBoxes, 5–231
Communications from a Ladder Program, K–13
7
Automatic Trapezoidal Profile, E–47
Auxiliary Functions, 3–9, A–2 Read and Write Interlocks, K–13 8
CPU Configuration, A–5 Communications Problems, 9–7
EEPROM Operations, A–8 Communications Protocols, K–3 9
Handheld Programmer Configuration, A–8 Comparative Boolean Instructions, 5–26
Password Operations, A–9 Components, 1–6 10
RLL Operations, A–4 Connecting DC I/O, 2–18
via DirectSOFT32, A–3 Connections 11
via the Handheld Programmer, A–3 power input, 1–8
V-memory Operations, A–4 programming device, 1–8 12
toggle switches, 1–7
B Contacts in Series, 5–6 13
Basic EMC Installation Guidelines, J-4 Control Relay Bit Map, 3–36
Battery Backup, 3–8 Converge Jump instruction, 7–23 14
BCD Numbering System, I–5 Converge Stage instruction, 7–23
Binary Numbering System, I–2 Convergence Jump instruction, 7–20 A
Bit Override, 9–19 Convergence Stages, 7–19
Boolean Instructions, 5–5, 5–10 Counter Example Using Discrete Status Bits B
Bumpless Transfer, 8–2, 8–3, 8–13, 8–26, 8–76, instruction, 5–46
8–77 Counter I/O IBoxes, 5–231 C
Counter Status Bit Map, 3–38
CPU Features, 3–2
D

DL06 Micro PLC User Manual, 3rd Edition Rev. A


i-1
Index

CPU Operation, 3–12 E


CPU Setup, 3–5
1 CPU Specifications, 3–3 Edits, Run-time, 9–14
CT Data type, 3–27 Electrical Noise, 9–10
2 END Instruction, 9–12

3 D END Statement, 5–5


Error Code Locations, 9–3
Data Type Mismatch, I–7
4 Date and Time, 10–14
Error Codes, 9–4, 9–5
Error Term Selection, 8–33
DC input wiring, 2–23
5 DC output wiring, 2–24
Errors, 9–2
European Union Directives, J-2
Diagnostics, 9–2
6 Dimensions, 2–7 F
DIN rail mounting, 2–9
i DirectNET, 4–9, K–10 Feedforward Control, 8–70
DirectNET Port Configuration, 4–10 Force I/O, 3–14
7 Discrete Helper IBoxes, 5–230 Forcing I/O Points, 9–16
Discrete Inputs with Filter, E–73 Freeze Bias, 8–11, 8–34
9 DL06 Error Codes, B–2 Front Panel, 2–5
DL06 PLCMemory, F-2 Fuse protection, 2–11
10 DL06 Port Pinouts, K–5
H
11 DL06 Port Specifications, K–5
Drum Instruction, 6–12 Hexadecimal Numbering System, I–3
12 chart representation, 6–3
counter assignments, 6–6
High-Speed Counter, E–7
High-speed I/O wiring, 2–25
13 drum control techniques, 6–10
event drum (EDRUM), 6–14
High-Speed Interrupts, E–64
HSIO Features, E–2
14 handheld programmer mnemonics, 6–16
masked event drum (MDRMD), 6–19, 6–21
HSIO Operating Mode, E–4
Hysteresis, 8–3, 8–13, 8–36, 8–37, 8–38
A overview, 6–8
powerup state, 6–9 I
B self-resetting, 6–11
step transitions, 6–11 I/O Configuration, 4–4
I/O type selection, 1–5
C Terminology, 6–2
Drum sequencer programming, 1–11 Indicators, 9–6
Inductive loads, 2–21
D Duplicate Reference Check, 9–13
Initial Stage (ISG), 7–22

i-2 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Index

Instruction execution times, C–3 Manual, documentation, 1–2


Instruction index, 5–2 Marine Use, 2–10 1
Instructions Math IBoxes, 5–230
drum, 6–12 Memory 2
stage, 7–21 EEPROM, 1–12
stage programming, 7–2 FLASH, 1–12 3
Instructions, by category Memory IBoxes, 5–230
Accumulator / Stack Load, 5–52 Memory Map, 3–25, 3–32 4
Bit Operation, 5–120 Message Instructions, 5–186
Boolean, 5–10 Midline Outputs, 5–6 5
Clock / Calendar, 5–171 MODBUS, 4–9
Comparative, 5–26 MODBUS RTU Communications, K–14 6
CPU Control, 5–173
MODBUS RTU Instructions, 5–204
Immediate, 5–32
Mode 10, E–7 7
Logical, 5–69
Mode 20, E–24
Math, 5–86
Mode 30, E–38 8
Number Conversion, 5–127
Mode 40, E–64
Table, 5–141
Timer, Counter and Shift Register, 5–39 Mode 50, E–69
9
Mode 60, E–73
Transcendental, 5–118
Mode Switch, 3–6
10
Intelligent Box (IBox) Instruction Index, 5–230
Motion Control, E–2
K Mounting Guidelines, 2–7
11
Clearances, 2–8
K-Sequence, K–10
MRX instruction, 4–22
12
L MWX instruction, 4–22 13
LCD Display Panel, 10–2 N 14
LCD Installation, 10–3
Network Master, 4–18
LCD instruction, 10–26
LCD Keypad, 10–2
Network Slave, 4–12 A
Network Specification, 4–8
LCD Menu Navigation, 10–5
Loop Mode, 8–27
Noise, 9–10 B
Non-volatile V-memory, F-3
Loop Table Word Definitions, 8–20
Not Jump, 7–22 C
M Numbering Systems, 3–23
D
Maintenance, 9–2

DL06 Micro PLC User Manual, 3rd Edition Rev. A


i-3
Index

O Program Setup, 8–72


Reverse Acting, 8–12, 8–14, 8–26, 8–40
1 Octal Numbering System, I–4 Setup, 8–18
Terminology, 8–77
2 P Troubleshooting Tips, 8–75
PID Mode 2 Word Description, 8–22
3 Parallel Branches in Series, 5–7
PID Mode Setting 1 Description, 8–21
Parallel Elements, 5–7
Port Setup, K–6
4 Parallel Processing, 7–19
Position Algorithm, 8–9, 8–15, 8–78
Password, 3–11, 10–17
5 PAUSE Instruction, 9–12 Position Form, 8–9
Power Budgeting, 4–5
PID
6 Analog Filter, 8–55 Power supply, 2–12
DirectSOFT 5 Filter Intelligent Box Product Weight table, H–2
i Instruction, 8–57 Products and Data Types, I–9
Error Flags, 8–18 Program Mode, 3–13
7 Example Program, 8–72 Programming Devices, 2–15
Loop Modes, 8–3, 8–27, 8–53, 8–54, 8–66 Pulse Catch Input, E–69
9 Parameters, 8–32 Pulse Output, E–38
Setup Alarms, 8–35
10 Special Features, 8–53 Q
PID Alarms, 8–35
Quick Start, 1–6
11 Calculation Overflow/Underflow Error, 8–38
Hysteresis, 8–38 R
12 Mode/Alarm Bit Description, 8–23
Ramp/Soak Generator, 8–58
Monitor Limit, 8–35
13 Programming Error, 8–38 Controls, 8–61
DirectSOFT 5 Ramp/Soak Example, 8–63
PV Deviation, 8–36
14 Rate-of-Change, 8–37 Profile Monitoring, 8–62
Ramp/Soak Flag Bit Description, 8–23
PID Loop
A Alarms, 8–13 Ramp/Soak Table Location, 8–24
Relay Ladder, 8–63
Auto Tuning, 8–40
B Configure, 8–25 Table, 8–59
Table Flags, 8–61
Features, 8–2
C Manual Tuning, 8–40, 8–41, 8–44, 8–47, 8–55 Test Profile with PID View, 8–64
Testing, 8–62
Mode, 8–27
D Operating Modes, 8–14 Rate-of-Change, 8–3, 8–13, 8–14, 8–37
Real Numbering System, I–5
Operation, 8–9

i-4 DL06 Micro PLC User Manual, 3rd Edition Rev. A


Index

Relay outputs, 2–20 convergence, 7–19


Remote I/O Bit Map, 3–39 emergency stop, 7–14
Reset Windup, 8–10, 8–34, 8–78 four steps to stage programmig, 7–9
1
Response Time, 3–17 garage door opener example, 7–10
Retentive Memory Ranges, 3–10 introduction, 7–2
2
jump instruction, 7–7
RUN Indicator, 9–7
Run Mode, 3–13 mutually exclusive transitions, 7–14
3
parallel processes, 7–12
Run Time Edits, 9–14
parallel processing concepts, 7–19
4
S power flow transition, 7–18
5
program organization, 7–15
S Data type, 3–28 questions and answers, 7–27
Safety, 2–2 stage instruction characteristics, 7–6
6
Emergency Stops, 2–3 stage view, 7–18
Orderly System Shutdown, 2–4 state transition diagrams, 7–3 7
Scan Time, 3–20 supervisory process, 7–17
Serial Communications, K–2 timer inside stage, 7–13 8
RS-232C, K–2 Startup, 9–11
RS-422, K–2 State Diagram, 7–11
9
RS-485, K–3 Status Indicators, 3–6
Series Branches in Parallel, 5–7 Step Transitions, 6–4
10
Signed vs. Unsigned Integers, I–8
Simple Rungs, 5–5
Step Trapezoidal Profile, E–46
STOP Instruction, 9–12
11
Sinking / sourcing concepts, 2–16
Slot Numbering, 4–3
Syntax Check, 9–11 12
System Design, 1–10
SP Data Type, 3–28
Special Instructions, 9–12 T 13
Special Relays, D–2
Special Relays, Error Codes, 9–3
T Data Type, 3–26 14
Technical Support, 1–2
Specifications, 2–26
Terminal Block Removal, 2–6 A
Specifications, environmental, 2–10
Time-Proportioning Control, 8–68
Square Root, 8–14
On/Off Control Program, 8–69 B
Stage Control / Status Bit Map, 3–34
Timer (TMR) and Timer Fast (TMRF), 5–40
Stage Counter instruction, 7–17
Timer Example Using Discrete Status Bits C
Stage instructions, 7–21 instruction, 5–41
Stage Jump Instruction, 7–7 Timer Status Bit Map, 3–38 D
Stage Programming, 7–2, 7–15

DL06 Micro PLC User Manual, 3rd Edition Rev. A


i-5
Index

Timer, Counter and Shift Register


Instructions,5–39
1 Transfer Mode, 8–26
Troubleshooting, 9–8, 9–11
2
U
3
Up/Down Counter, E–24
4 V
5 V Data Type, 3–27
Velocity Algorithm, 8–9, 8–15, 8–78
6 Velocity Form, 8–12
V-memory, 3–29
i
W
7 Web site, 1–2
Wiring Diagrams, 2–26
9 D0–06AA I/O Wiring Diagram, 2–26
D0–06AR I/O Wiring Diagram, 2–28
10 D0–06DA I/O Wiring Diagram, 2–30
D0–06DD1 I/O Wiring Diagram, 2–32
11 D0–06DD1–D I/O Wiring Diagram, 2–38
D0–06DD2 I/O Wiring Diagram, 2–34
12 D0–06DD2–D I/O Wiring Diagram, 2–40
D0–06DR I/O Wiring Diagram, 2–36
13 D0–06DR–D I/O Wiring Diagram, 2–42
14 Wiring Guidelines, 2–11

A X
X Data Type, 3–26
B X Input / Y Output Bit Map, 3–33

C Y
Y Data Type, 3–26
D

i-6 DL06 Micro PLC User Manual, 3rd Edition Rev. A

You might also like